Skip to content

llp: OpenClaw full-capture spec (0157) + backfill decisions (0158, 0159) - #488

Merged
philcunliffe merged 3 commits into
masterfrom
llp/openclaw-full-capture-spec
Jul 30, 2026
Merged

llp: OpenClaw full-capture spec (0157) + backfill decisions (0158, 0159)#488
philcunliffe merged 3 commits into
masterfrom
llp/openclaw-full-capture-spec

Conversation

@philcunliffe

@philcunliffephilcunliffe commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #475 / #486: the Accepted OpenClaw full-capture decision set (LLP 0143-0149, 0152) gets its spec, plus the backfill design those decisions anticipated. All three documents were grilled against the corpus and code (/llp-grill, 2026-07-30) and are Accepted.

What's here

LLP 0157 (spec, Accepted) - requirements for implementing the set, citing the decisions via constrained-by rather than restating them:

  • OpenClaw-side steering plugin: two shadow providers via catalog contribution, before_model_resolve steering, prepareRuntimeAuth credential borrow + gateway baseUrl, wrapStreamFn parity mirror (concrete beta list verified against extensions/anthropic/stream-wrappers.ts 2026-07-30).
  • @hypaware/openclaw adapter rework: settings.js + undo record retired, attach_probe dropped, openai-completions projection branch, match-key stamping, settlement enricher, backfill provider.
  • Core removal: json_path probe format (OpenClaw was the last consumer).
  • Structured, queryable warning ledger per LLP 0149.
  • openclaw_capture acceptance procedure mirroring codex_desktop_capture, proving BOTH routes.
  • 14 RFC-2119 requirements with explicit anchors for code @refs.

LLP 0158 (decision, Accepted) - one shared reader for the OpenClaw session JSONL (~/.openclaw/agents/<id>/sessions/*.jsonl), consumed by the settlement enricher and the backfill provider. Placement is plugin-local (inside @hypaware/openclaw), matching the Claude (transcripts.js) / Codex (backfill.js) precedent of plugin-owned format readers; the promotion trigger to src/core/openclaw/ is named explicitly (a cross-plugin consumer, e.g. hyp session learning OpenClaw sessions). Read rules mirror LLP 0150, including the absolute-cwd predicate for the .hypignore gate.

LLP 0159 (decision, Accepted) - backfill route agreement. Codex's routes agree by construction (native ids on both sides); OpenClaw's live rows have no native identity at capture (LLP 0144: prompt-head hash + gateway fallback ids). Chosen mechanism: the LLP 0027 pattern - projector stamps a match key, a settlement enricher performs a full identity upgrade at flush (native message id + session_id, the LLP 0030 partition key + cwd from the session header), and the existing part_id dedupe layers (committed + spool scan) resolve overlap. rows_written: 0 on overlap becomes the acceptance pass condition, matching codex.

The enricher also applies the LLP 0085 flush-time usage-policy drop: live OpenClaw proxy rows carry no cwd, so without this seam .hypignore would fail open for the entire client (spec R14).

Grill outcomes folded in (second commit)

  • 0158 moved from core placement to plugin-local (precedent check).
  • 0159 gained: the LLP 0085 policy-drop duty; the verified restart seed-miss churn note (self-healing via flush part_id dedupe); the cross-partition twin restated on the real partition keys (session_id per LLP 0030 + cwd) with a message-grain sweep upgrade as the duplication-preventing option; match-key normalization across wire vs transcript shapes (tool_use vs toolCall) flagged as an implementation risk with timestamp-and-order matching as the fallback shape.
  • 0157 gained R14 (settlement cwd + policy drop).

Verified facts backing the docs

  • OpenClaw session JSONL on a live machine (2,573 files): header line carries id + cwd + timestamp; assistant messages carry model, provider, api, stopReason, full usage; tool calls/results in-transcript.
  • Live projector today: hash session identity, conversation_id unset, hardcoded provider: 'anthropic', no cwd (plugins-workspace/openclaw/src/projector.js).
  • Codex backfill posture (no route marker on rows, provenance off-row, part_id-only route separation) confirmed in plugins-workspace/codex/src/backfill.js + ai-gateway/src/dataset.js.
  • Beta lists for the 0148 mirror read from the openclaw repo at extensions/anthropic/stream-wrappers.ts:8-18.

Checks

  • ref-check: the 3 files contribute zero errors at every commit (74 pre-existing corpus errors unchanged).
  • test/core/llp-ref-hygiene.test.js: 9/9 pass (number uniqueness holds; 0157-0159 were verified free on origin/master and all remote branches).
  • No em dashes; no [inferred] claims survive into Accepted.

🤖 Generated with Claude Code

philcunliffeand others added 3 commits July 30, 2026 11:23
Spec 0157 turns the Accepted decision set (0143-0149, 0152) into
requirements: steering plugin, adapter rework, core json_path removal,
warning ledger, backfill route, coverage statement, acceptance procedure.
Decision 0158: one core reader for the OpenClaw session JSONL, shared by
the settlement enricher and the backfill provider (the LLP 0150 shape).
Decision 0159: backfill route agreement rides native-identity settlement
plus the existing part_id dedupe, because live OpenClaw rows have no
native identity at capture time (LLP 0144).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
From /llp-grill against the corpus and code:
- 0158: reader moves from core to plugin-local, matching the Claude
(transcripts.js) and Codex (backfill.js) precedent of plugin-owned
format readers; promotion trigger to src/core/openclaw/ named
explicitly (a cross-plugin consumer such as hyp session).
- 0159: settlement upgrade scope settled as full (message id + session_id
+ cwd); enricher also applies the LLP 0085 flush-time policy drop,
without which .hypignore fails open for all live OpenClaw capture
(proxy rows carry no cwd). Restart seed-miss churn verified as
self-healing and documented. Cross-partition twin restated on the real
partition keys (session_id per LLP 0030, cwd), with a message-grain
sweep upgrade as the duplication-preventing option. Match-key
normalization across wire vs transcript shapes flagged as an
implementation risk with a fallback shape.
- 0157: new R14 (settlement cwd + policy drop); reader wording follows
0158's placement.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@philcunliffe
philcunliffe merged commit 73b4618 into masterJul 30, 2026
9 checks passed
@philcunliffe
philcunliffe deleted the llp/openclaw-full-capture-spec branch July 30, 2026 21:36
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@philcunliffe