Skip to content

fix(copilot): keep tool transcript groups structurally complete - #114403

Merged
steipete merged 33 commits into
mainfrom
refactor/copilot-transcript-journal
Jul 27, 2026
Merged

steipete merged 33 commits into
mainfrom
refactor/copilot-transcript-journal

Conversation

@steipete

@steipete steipete commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor
Additional instructions

Allow edits from maintainers is enabled. This PR is AI-assisted; I reviewed the implementation and proof.

What Problem This Solves

Fixes an issue where Copilot-backed turns could durably record an assistant tool call without all of its tool results when a timeout, abort, process failure, or write failure interrupted the turn. That left the canonical transcript structurally incomplete and unsafe to replay.

Why This Change Was Made

Copilot now journals the initial user turn before provider dispatch, but buffers any assistant message that requests tools. Once the final result arrives, the assistant plus results are appended in request order through a new session-transcript batch facade backed by one existing SQLite transaction. There is no schema or protocol-version change.

All redaction, stable identity preparation, and before_message_write hooks finish before BEGIN; the transaction synchronously revalidates the session and all-or-none idempotency state before inserting rows. A steady-state replay preflight avoids rerunning hooks. Because hooks are forbidden inside the transaction, concurrent processes can both evaluate hooks before one transaction wins; the transaction still prevents a partial or duplicate group.

An authoritative hook block on any group member suppresses the entire assistant/result group. This intentionally trades that group's audit detail for structural validity; the native checkpoint is retained but marked replay-invalid. Timeout, abort, detach, partial identity, and append failures likewise drop the open buffer and fail closed. Finalize-time reconstruction and the old dual-write path are deleted.

User Impact

Copilot transcripts are always valid prefixes ending between complete tool groups. Operators no longer get a canonical transcript with dangling tool calls after interrupted turns, and post-run persistence does not duplicate runtime-owned assistant messages.

Audit Completeness

Surface Canonical behavior Proof
Initial user Prepared media/input is appended before provider dispatch; stable run key; hook block remains authoritative attempt ordering and hook tests
SDK users Root, non-ephemeral users are recorded; autopilot/skill context stays hidden; unknown source and sanitized attachment provenance are retained journal SQLite projection test
Assistant without tools Text, reasoning, model, timestamp, usage defaults, and ownership commit on the terminal assistant event attempt and bridge tests
Assistant with tools Assistant is buffered; call order defines result order; no row exists before the group completes real-SQLite journal tests
Tool results Success/error text and sanitized details are recorded; child, ephemeral, and user-requested results stay out of the root group bridge and journal tests
Interruption/failure Open group is absent, attempt fails closed, checkpoint is retained and replay-invalid live Copilot abort plus injected SQLite failure tests
Post-run ownership Runtime-owned final assistant is not appended again by CLI finalization CLI transcript tests

Diff Size and Justification

Exact numstat against origin/main: +1908/-1263, net +645 overall; +913/-447, net +466 production; +995/-816, net +179 tests.

Production category Numstat Why it remains
Copilot journal +439/-0 Ordered SDK event queue, complete audit projection, group buffer, hook/idempotency policy, fail-closed lifecycle, and returned snapshot ownership
Bridge audit projection +301/-70 Captures/sanitizes user, assistant, usage, tool, attachment, provenance, and visibility facts; the leaf projection contract breaks runtime cycles and the split keeps the bridge below the max-lines gate
Atomic transcript accessor/facade +81/-4 Canonical reusable batch API, pre-transaction preparation, authoritative row revalidation, and synchronous all-or-none commit
Execution/finalization ownership +92/-126 Wires fail-closed journal lifecycle and deletes finalize reconstruction; net deletion
Deleted dual-write path +0/-247 Removes obsolete mirroring and compensation machinery
Regression/integration proof +995/-816 Replaces dual-write tests with real-SQLite group, audit, replay, hook, CLI ownership, and rollback coverage

The production delta remains above the rough target because the accepted design revision adds a reusable atomic accessor and retains complete event audit coverage. The former finalize reconstruction and dual-write implementations are fully removed; the remaining blocks map directly to audit completeness, fail-closed ownership, structural atomicity, or the cycle-free bridge contract.

Evidence

  • Live Copilot interruption proof: real Copilot SDK/CLI and tool calls on direct AWS Crabbox run run_ccfc2b7414c3. Complete prefix roles were user, assistant, toolResult, assistant; the aborted turn left only its user row; terminal was aborted; replay was unsafe; no dangling tool call survived.
  • Exact-head GitHub CI: run 30246269248 succeeded on 71e65b6f39a3444ecffc04317f75f7a6a6291c10 with no failed or cancelled jobs.
  • Blacksmith Testbox tbx_01kyh5mhpf0rbpyh2ezrhbx0a3: pnpm check:changed passed every selected core, extension, SDK surface, typecheck, lint, database-first, and import-cycle gate in 20m59s.
  • Hosted Copilot lane: 496 Copilot tests, 21 transcript-runtime tests, and 71 CLI transcript tests passed together.
  • Exact cycle fix: pnpm check:architecture and 43 journal/bridge tests passed on Testbox tbx_01kyh7dbbx3a992fww8nwa8fgq.
  • Group atomicity: a real SQLite trigger aborts the tool-result insert after the assistant insert; the transaction rolls back and the group remains entirely absent. A second test interrupts between groups and verifies a valid prefix with one assistant/tool-result pair and zero dangling calls.
  • Hook policy: blocking one tool result suppresses the entire group; hook replacement cannot remove an existing hidden flag; idempotent replay does not rerun steady-state hooks.
  • Autoreview: the complete branch review and the final cycle-breaking diff both reported autoreview clean: no accepted/actionable findings reported.
  • git diff --check passes on head 71e65b6f39a3444ecffc04317f75f7a6a6291c10.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling extensions: copilot size: XL maintainer Maintainer-authored PR labels Jul 27, 2026
@steipete steipete self-assigned this Jul 27, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. labels Jul 27, 2026
@clawsweeper

clawsweeper Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 27, 2026, 3:28 PM ET / 19:28 UTC.

ClawSweeper review

What this changes

This PR replaces Copilot’s best-effort transcript mirroring with an SQLite-backed journal that atomically stores an assistant tool call together with all of its tool results, preventing incomplete replay transcripts after interrupted Copilot turns.

Merge readiness

⛔ Blocked until stronger real behavior proof is added - 5 items remain

Keep this PR open for explicit maintainer review. The central Copilot transcript-integrity repair is not shown to be redundant with current main, but the latest head changed journal provenance and replay handling after the submitted live interruption evidence; the protected maintainer label also requires human handling rather than automated cleanup.

Priority: P2
Reviewed head: 8e08d2d4cd9fef0f13e455da85d791e72c7cdec7
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The branch has substantial targeted tests and no concrete code defect identified here, but current-head real behavior proof does not yet cover the later persisted replay changes.
Proof confidence 🦪 silver shellfish (2/6) Needs stronger real behavior proof before merge: A redacted real Copilot abort run is linked, but it was captured on commit 71e65b6 before the latest provenance and replay changes; provide latest-head terminal or live-output evidence for complete, abort, and resumed-session behavior, with private details redacted. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: A redacted real Copilot abort run is linked, but it was captured on commit 71e65b6 before the latest provenance and replay changes; provide latest-head terminal or live-output evidence for complete, abort, and resumed-session behavior, with private details redacted. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 5 items Latest-head change scope: The current head adds the Copilot transcript journal and routes tool-group persistence through the shared session-transcript runtime; this is substantive new behavior rather than an already-merged main-only cleanup.
Shared persistence contract: The branch adds ordered batch append and strict singleton outcomes to the plugin SDK, backed by an all-or-none SQLite transcript write path; this makes replay and upgrade semantics compatibility-sensitive.
Submitted live proof predates latest changes: The PR body links real Copilot interruption output for commit 71e65b6, while the current PR head is 8e08d2d after later provenance and replay commits; the prior review correctly requested current-head proof.
Findings None None.
Security None None.

How this fits together

The Copilot extension turns SDK session events into OpenClaw agent messages and persists them in the canonical session transcript. The new journal buffers tool-using assistant turns, then uses the session-transcript runtime to commit a complete ordered group or leave no partial group behind.

flowchart LR
  A[Copilot SDK events] --> B[Copilot event bridge]
  B --> C[Transcript journal]
  C --> D{Tool group complete?}
  D -->|Yes| E[Atomic SQLite transcript append]
  D -->|No or failed| F[Drop open group and mark replay invalid]
  E --> G[Canonical session transcript]
  F --> G
Loading

Decision needed

Question Recommendation
Does the designated owner approve the current-head replay-provenance and fail-closed recovery behavior as the durable compatibility contract for existing Copilot sessions? Approve after current-head proof: Keep the atomic journal and confirm it with a redacted real Copilot complete, abort, and resumed-session run using the latest PR head.

Why: The branch changes persisted session binding state and exposes a reusable plugin-SDK batch transcript API; the submitted real run predates later replay/provenance changes, so source and CI evidence cannot settle the upgrade-policy choice alone.

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: A redacted real Copilot abort run is linked, but it was captured on commit 71e65b6 before the latest provenance and replay changes; provide latest-head terminal or live-output evidence for complete, abort, and resumed-session behavior, with private details redacted. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - The PR introduces a shared plugin-SDK batch transcript contract and a persisted journalVersion replay marker; existing Copilot sessions need current-head upgrade and resume proof, not only interruption proof from an earlier commit.
  • Resolve merge risk (P1) - The intentional fail-closed behavior drops an open assistant/tool-result group and invalidates replay after persistence failure or interruption; a maintainer should confirm this remains the accepted operator-visible recovery behavior.
  • Complete next step (P2) - The protected maintainer label and the unresolved current-head replay/upgrade proof require owner review; there is no narrow automated repair to apply without that evidence.
Agent review details

Security

None.

PR surface

Source +1153, Tests +1442, Other +12. Total +2607 across 26 files.

View PR surface stats
Area Files Added Removed Net
Source 16 1611 458 +1153
Tests 9 2259 817 +1442
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 12 0 +12
Total 26 3882 1275 +2607

Review metrics

Metric Value Why it matters
Persisted replay surfaces 1 optional binding marker added; 2 shared transcript append APIs added The change affects existing session resume behavior and expands the plugin SDK beyond the Copilot extension, so upgrade semantics need direct proof.

Stored data model

Persistent data-model change detected: serialized state: extensions/copilot/src/dual-write-transcripts.test.ts, serialized state: src/config/sessions/session-accessor.sqlite-transcript-write.ts, serialized state: src/config/sessions/session-accessor.transcript-turn.ts, serialized state: src/config/sessions/session-accessor.ts, serialized state: src/plugin-sdk/session-transcript-runtime.test.ts, serialized state: src/plugin-sdk/session-transcript-runtime.ts, and 4 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Prove the current replay contract before merge (recommended)
    Run and post redacted latest-head Copilot evidence for a completed group, an aborted open group, and a resumed stored session so the new persisted provenance marker and fail-closed behavior are reviewable.
  2. Accept the recovery tradeoff explicitly
    Approve the intentional policy that an interrupted or failed open group is omitted and the native checkpoint remains replay-invalid, with operator recovery documented in the PR discussion.
  3. Pause the API expansion
    Defer the reusable plugin-SDK batch surface if maintainers do not want this persisted-session compatibility contract to become shared runtime behavior now.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Post redacted latest-head real Copilot terminal or live-output proof covering complete commit, abort while a tool group is open, and resumed-session behavior with an existing stored binding.

Technical review

Best possible solution:

Keep the atomic journal design only if current-head proof demonstrates complete commit, interrupted-group omission, and resumed-session behavior against existing stored Copilot bindings, with the resulting replay-invalid state and recovery path visible to reviewers.

Do we have a high-confidence way to reproduce the issue?

Yes for the source-defined failure mode: an assistant tool call can be observed before all result events arrive, and interruption or persistence failure can leave an incomplete group. The submitted real reproduction is credible, but it predates later latest-head provenance and resume changes.

Is this the best way to solve the issue?

Unclear: atomic group persistence is a strong solution for structural transcript validity, but the shared SDK contract and persisted replay behavior still need current-head upgrade proof before this can be called the best final path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 52e519220cea.

Labels

Label justifications:

  • P2: This is a substantial but bounded transcript-integrity repair whose remaining concern is compatibility and evidence, not an established emergency.
  • merge-risk: 🚨 compatibility: The PR adds shared session-transcript APIs and an optional persisted journalVersion binding field that affects old-session resume behavior.
  • merge-risk: 🚨 session-state: The new journal deliberately changes how interrupted tool groups and replay-invalid checkpoints are persisted and resumed.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: A redacted real Copilot abort run is linked, but it was captured on commit 71e65b6 before the latest provenance and replay changes; provide latest-head terminal or live-output evidence for complete, abort, and resumed-session behavior, with private details redacted. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Latest-head change scope: The current head adds the Copilot transcript journal and routes tool-group persistence through the shared session-transcript runtime; this is substantive new behavior rather than an already-merged main-only cleanup. (extensions/copilot/src/attempt-transcript-journal.ts, 8e08d2d4cd9f)
  • Shared persistence contract: The branch adds ordered batch append and strict singleton outcomes to the plugin SDK, backed by an all-or-none SQLite transcript write path; this makes replay and upgrade semantics compatibility-sensitive. (src/plugin-sdk/session-transcript-runtime.ts, 8e08d2d4cd9f)
  • Submitted live proof predates latest changes: The PR body links real Copilot interruption output for commit 71e65b6, while the current PR head is 8e08d2d after later provenance and replay commits; the prior review correctly requested current-head proof. (extensions/copilot/harness.ts, 8e08d2d4cd9f)
  • Current review continuity: The prior completed ClawSweeper review recorded no discrete patch finding, but required current-head real behavior proof for complete commit, abort, and resumed-session behavior after later journal changes. (2cad501ddf39)
  • Feature-history signal: The PR’s Copilot journal, event bridge, session binding, and transcript SDK changes were carried through the branch by steipete across the related implementation and replay-hardening commits. (extensions/copilot/src/attempt-execution.ts, 4010b2392959)

Likely related people:

  • steipete: Assigned to this PR and authored the journal, replay-provenance, event-bridge, and shared transcript-runtime changes across the PR’s commit history. (role: assigned Copilot transcript contributor; confidence: medium; commits: 3a390946d21e, 961cbcd7d7fe, 4010b2392959; files: extensions/copilot/src/attempt-transcript-journal.ts, extensions/copilot/src/event-bridge.ts, extensions/copilot/harness.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Post a redacted current-head Copilot run proving a complete group, an abort while a group is open, and a resumed stored session.
  • Have the designated owner confirm the fail-closed replay-invalid recovery policy for existing Copilot session bindings.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (7 earlier review cycles)
  • reviewed 2026-07-27T07:23:27.662Z sha c29ae1e :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-27T07:34:14.052Z sha 71e65b6 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-27T08:20:53.357Z sha 71e65b6 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-27T08:35:35.660Z sha 71e65b6 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-27T18:05:15.445Z sha 71e65b6 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-27T18:47:42.279Z sha 610a6c0 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-27T19:10:19.781Z sha 2cad501 :: needs real behavior proof before merge. :: none

@steipete

steipete commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Live Copilot interruption proof is now available on the current product head.

Provider: direct AWS Crabbox
Lease: cbx_e3ca1c815f36 (stopped after proof)
Run: run_ccfc2b7414c3
Runtime: real @github/copilot-sdk / Copilot CLI with a real custom tool; temporary test harness only, no proof code committed

Observed redacted summary:

{
  "prefixRoles": ["user", "assistant", "toolResult", "assistant"],
  "afterRoles": ["user", "assistant", "toolResult", "assistant", "user"],
  "suffixRoles": ["user"],
  "terminalKind": "aborted",
  "replaySafe": false,
  "toolCalls": ["complete-prefix", "interrupted-group"]
}

The first live tool turn committed a complete replayable prefix. The second live tool was observed and then externally aborted while its assistant/tool group was open. The canonical transcript retained only that turn's pre-dispatch user row: no assistant tool call and no tool result survived, so there is no dangling tool call. The attempt retained fail-closed replay metadata.

Maintainer decisions from the task brief are resolved: the generic session-transcript batch seam is explicitly authorized, and the fail-closed policy that drops an open group while retaining/replay-invalidating the native checkpoint is accepted.

@clawsweeper re-review

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 27, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Maintainer decision record for the remaining ClawSweeper items:

  • The task brief explicitly authorizes appendSessionTranscriptMessagesByIdentity as the durable shared batch seam and accepts the all-or-none fail-closed policy, including checkpoint retention plus replay invalidation.
  • I am not rebasing solely for behind-main drift. Repository policy treats behind-main state as advisory when there is no conflict; this PR is mergeable, and exact-head CI run 30246269248 validated the synthetic merge successfully with no failed or cancelled jobs.

No prepare or merge action has been run.

@steipete
steipete force-pushed the refactor/copilot-transcript-journal branch from 71e65b6 to 610a6c0 Compare July 27, 2026 18:43
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Jul 27, 2026
@steipete
steipete force-pushed the refactor/copilot-transcript-journal branch from 2cad501 to 8e08d2d Compare July 27, 2026 19:24
@steipete

Copy link
Copy Markdown
Contributor Author

Maintainer decision for the latest ClawSweeper review on head 8e08d2d:

  • The task authorization explicitly accepts the shared atomic session-transcript batch API and the fail-closed policy for incomplete or failed Copilot transcript groups, including native checkpoint retention and replay invalidation.
  • I am intentionally skipping a second credentialed live Copilot run. The existing live interruption proof demonstrates the complete-prefix/open-group invariant. The later commits conservatively invalidate replay for additional unprojected or uncertain states; they do not relax atomic insertion. Current-head focused tests cover complete commit, abort/incomplete send, persisted provenance, storage rewrites, and resumed-session gating, and exact-head CI run 30298083506 is green.
  • The current-main Codex shard repair is test-routing-only and was separately proven with 220 routing tests plus 5 prewarm tests.

This records the designated owner acceptance requested by the review and explains why the optional current-head live-proof rank-up move is not required for this landing.

@steipete
steipete merged commit 3dc3370 into main Jul 27, 2026
119 checks passed
@steipete
steipete deleted the refactor/copilot-transcript-journal branch July 27, 2026 19:42
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 28, 2026
…claw#114403)

* refactor(copilot): make SQLite own transcripts

* fix(copilot): harden transcript event projection

* test(copilot): tighten transcript journal types

* fix(copilot): retain unmatched usage metadata

* refactor(copilot): commit tool groups atomically

* fix(copilot): break journal bridge import cycle

* fix(copilot): preserve grouped transcript replay

* test(copilot): cover opaque replay state

* fix(copilot): invalidate lossy transcript replay

* fix(copilot): guard transcript rewrite topology

* fix(copilot): drain transcript finalization

* fix(copilot): preserve resumed session history

* fix(copilot): dedupe replayed transcript snapshots

* fix(copilot): isolate transcript write hooks

* fix(copilot): track staged transcript identities

* fix(copilot): isolate ephemeral transcript events

* fix(copilot): coalesce assistant snapshots

* fix(copilot): invalidate unprojected SDK context

* fix(copilot): guard resumed transcript replay

* fix(plugin-sdk): expose strict transcript append

* fix(copilot): persist journal provenance safely

* fix(copilot): separate live and durable deltas

* fix(copilot): require durable projection ownership

* fix(copilot): preserve strict append typing

* fix(copilot): gate deferred session deletion

* fix(copilot): preserve transcript replay identity

* fix(copilot): retain cited replay history

* fix(copilot): require complete replay provenance

* fix(copilot): reject ambiguous assistant snapshots

* fix(copilot): return latest assistant snapshot

* chore(copilot): align transcript lint gates

* test(lint): cover Copilot line budgets

* test(ci): dedupe Codex prewarm shard
steipete added a commit that referenced this pull request Aug 25, 2026
… removed dual-write mirror (#125599)

* docs(copilot): describe the transcript journal, not the removed dual-write mirror

The new copilot plugin doc described transcript persistence through
extensions/copilot/src/dual-write-transcripts.ts with session-scoped
content-fingerprint keys and best-effort failure containment. That module
was removed in #114403 (Jul 27): attempts now own an
attempt-transcript-journal keyed by run id and SDK event id, journaled in
structurally complete groups, and persistence failures fail closed by
aborting the SDK session and flagging replay as unvalidated.

Rewrite the section around the current journal, and update the two
"transcript mirror" references that pointed at it.

* docs(copilot): clarify invalid replay starts a fresh session

Co-authored-by: Santhi Prakash <[email protected]>

---------

Co-authored-by: Peter Steinberger <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 26, 2026
… removed dual-write mirror (openclaw#125599)

* docs(copilot): describe the transcript journal, not the removed dual-write mirror

The new copilot plugin doc described transcript persistence through
extensions/copilot/src/dual-write-transcripts.ts with session-scoped
content-fingerprint keys and best-effort failure containment. That module
was removed in openclaw#114403 (Jul 27): attempts now own an
attempt-transcript-journal keyed by run id and SDK event id, journaled in
structurally complete groups, and persistence failures fail closed by
aborting the SDK session and flagging replay as unvalidated.

Rewrite the section around the current journal, and update the two
"transcript mirror" references that pointed at it.

* docs(copilot): clarify invalid replay starts a fresh session

Co-authored-by: Santhi Prakash <[email protected]>

---------

Co-authored-by: Peter Steinberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling extensions: copilot maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant