Skip to content

[AI-assisted] docs(copilot): describe the transcript journal, not the removed dual-write mirror - #125599

Merged
steipete merged 2 commits into
openclaw:mainfrom
santhiprakash:docs/copilot-transcript-journal
Aug 25, 2026
Merged

steipete merged 2 commits into
openclaw:mainfrom
santhiprakash:docs/copilot-transcript-journal

Conversation

@santhiprakash

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where developers reading the new Copilot plugin doc would be pointed at a transcript mirroring architecture that no longer exists. The doc (added in #125556) describes runCopilotAttempt dual-writing messages via extensions/copilot/src/dual-write-transcripts.ts, scoped per session (copilot:${sessionId}) with per-message content-fingerprint keys, and claims a transcript write failure "never fails the attempt" because failures are merely logged.

None of that matches current main: dual-write-transcripts.ts was removed in #114403 (Jul 27) and replaced by the attempt transcript journal.

Why This Change Was Made

The section now describes the shipped architecture, verified against extensions/copilot/src/ on current main:

  • Each attempt owns a journal (createAttemptTranscriptJournal, wired in attempt-execution.ts) that persists turn messages into the OpenClaw session transcript.
  • Identity is turn-scoped, not content-scoped: the initial user turn is keyed ${runId}:user, SDK events copilot-sdk:${sdkSessionId}:${eventId}, deduped via claimed event ids plus an idempotency scan at the transcript store. The journal itself comments that old mirror keys "can be content fingerprints and are not turn identity".
  • Assistant turns and tool results are journaled as structurally complete groups; before_message_write hooks may redact content but not role/tool topology.
  • Failure containment is the opposite of the old wording: the first write failure marks the journal failed, aborts the in-flight SDK session, and flags the attempt's replay as unvalidated (journalValidated/nativeReplayInvalid in attempt-finalize.ts) so the next run revalidates rather than trusting a partial transcript. Only the post-append transcript update notification is best-effort.

The two "transcript mirror" references that pointed at the section (intro list, compaction lead-in) were updated to match, and the heading renamed to "Transcript persistence". No other doc or anchor references the old heading (repo-wide grep).

User Impact

Developers extending or debugging the Copilot plugin read an accurate description of transcript persistence, key identity, and failure behavior instead of hunting for a deleted module and wrong invariants (the old text implied transcript write failures are silent, when they now abort the session and invalidate replay).

Evidence

  • git log: dual-write-transcripts.ts last exists before fix(copilot): keep tool transcript groups structurally complete #114403 (3dc3370d), which added attempt-transcript-journal.ts (+ tests) and deleted the dual-write files.
  • Current main: attempt-transcript-journal.ts implements ${runId}:user / copilot-sdk:${sdkSessionId}:${eventId} keys (L473/L521/L681), captureFailure aborts the SDK session, attempt-finalize.ts sets journalValidated: false / nativeReplayInvalid: true on journal failure.
  • bash scripts/docs-spellcheck.sh → exit 0 across the full docs tree.
  • Anchor safety for the heading rename: repo-wide grep finds zero references to the old #transcript-mirroring anchor; the changed section adds and removes zero links; file parses cleanly under markdown-it (15 headings).

…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.
@clawsweeper

clawsweeper Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation extensions: copilot size: XS labels Aug 18, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. labels Aug 18, 2026
@clawsweeper

clawsweeper Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed August 25, 2026, 2:55 AM ET / 06:55 UTC.

ClawSweeper review

What this changes

The PR replaces obsolete Copilot transcript-mirroring documentation with the current attempt-journal persistence, identity, grouping, and failure behavior.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open: the central correction is source-backed, but the renamed documentation leaves two linked callers advertising the removed transcript-mirroring architecture.

Priority: P3
Reviewed head: 0716b9cab1b50ed8c9a9522aa3bd829f98093b0c

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The central source-backed correction is good, but two stale caller references remain before the documentation is coherent.
Proof confidence 🌊 off-meta tidepool Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
Evidence reviewed 5 items Current journal behavior: The current-main journal assigns run/event identities, preserves complete tool groups, and treats only the transcript-update notification as best-effort.
Replay behavior: Current main creates a new SDK session when persisted replay state is invalid, matching the PR’s fresh-session clarification.
Stale caller documentation: Two callers still present the target page as describing “transcript mirroring,” which is the retired architecture this PR removes from the canonical page.
Findings 1 actionable finding [P2] Update the remaining transcript-mirroring callers
Security None None.

How this fits together

The Copilot plugin converts SDK attempt events into OpenClaw’s durable session transcript. Its journal gives turns stable identities, commits complete assistant/tool groups, and prevents replay of incomplete persistence.

flowchart LR
  A[Copilot SDK events] --> B[Attempt execution]
  B --> C[Transcript journal]
  C --> D[Session transcript]
  C --> E[Failure handling]
  E --> F[Replay decision]
Loading

Before merge

  • Update the remaining transcript-mirroring callers (P2) - This rename establishes the journal as the canonical persistence model, but the runtime overview and the plugin README still tell readers the page documents “transcript mirroring.” Update those two callers to persistence/journal terminology in this PR so readers do not continue to discover the removed architecture.
  • Resolve merge risk (P1) - GitHub reports the branch as mergeable but behind current main; refresh it and rerun the documentation check on the exact merge head before landing.
  • Complete next step (P2) - The remaining blocker is a narrow, mechanical documentation consistency repair with clear files and validation.

Findings

  • [P2] Update the remaining transcript-mirroring callers — docs/plugins/copilot.md:234
Agent review details

Security

None.

PR surface

Docs +10. Total +10 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 1 25 15 +10
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 25 15 +10

Review metrics

Metric Value Why it matters
Stale caller references 2 unchanged callers Both route readers to the corrected page while naming the retired mirroring architecture.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Use “transcript persistence” or “transcript journal” in the two linked caller documents, then rebase and merge the focused documentation correction.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Use “transcript persistence” or “transcript journal” in the two linked caller documents, then rebase and merge the focused documentation correction.

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

Not applicable: this is documentation correctness, and current-main source directly establishes the terminology that the docs must describe.

Is this the best way to solve the issue?

No: the canonical page is corrected, but its two linked callers still advertise transcript mirroring; updating them is the smallest coherent solution.

Full review comments:

  • [P2] Update the remaining transcript-mirroring callers — docs/plugins/copilot.md:234
    This rename establishes the journal as the canonical persistence model, but the runtime overview and the plugin README still tell readers the page documents “transcript mirroring.” Update those two callers to persistence/journal terminology in this PR so readers do not continue to discover the removed architecture.
    Confidence: 0.97

Overall correctness: patch is incorrect
Overall confidence: 0.95

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp. Replaced prior rating: 🐚 platinum hermit.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P3: This is a narrow developer-documentation consistency repair with no runtime change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp. Replaced prior rating: 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required because this PR only changes files under docs/.

Evidence

Acceptance criteria:

  • [P1] pnpm docs:list.
  • [P1] pnpm docs:check-mdx.
  • [P1] git diff --check.

What I checked:

Likely related people:

  • steipete: Authored the merged journal implementation and the latest clarification commit on this documentation path. (role: transcript-journal feature owner and recent documentation contributor; confidence: high; commits: 3dc3370d9e08, 0716b9cab1b5; files: extensions/copilot/src/attempt-transcript-journal.ts, docs/plugins/copilot.md)

Rank-up moves

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

  • Replace “transcript mirroring” with journal/persistence terminology in docs/concepts/agent-runtimes.md and extensions/copilot/README.md.
  • Refresh the branch onto current main and rerun the documentation check on the merge head.

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 (3 earlier review cycles)
  • reviewed 2026-08-18T04:49:08.156Z sha 4b3602c :: needs maintainer review before merge. :: none
  • reviewed 2026-08-22T14:04:46.719Z sha 4b3602c :: needs maintainer review before merge. :: none
  • reviewed 2026-08-24T13:49:16.864Z sha 4b3602c :: needs maintainer review before merge. :: none

@steipete

Copy link
Copy Markdown
Contributor

Maintainer verification complete on head 0716b9cab1b50ed8c9a9522aa3bd829f98093b0c.

Current main describes a deleted Copilot dual-write mirror and incorrectly says transcript persistence failures are swallowed. I checked the canonical journal, attempt execution/finalization, event bridge, replay decision owner, and their existing real-SQLite and replay regressions. The documentation now correctly explains turn-scoped identity, atomic assistant/tool-result groups, fail-closed writes, and best-effort update notifications.

Independent review also caught one inaccurate recovery detail in the original patch: an invalidated replay is not revalidated. decideReplayAction creates a fresh SDK session, and the contributor branch now says exactly that while retaining Santhi Prakash's original commit and contributor credit.

Verification:

  • git diff --check 0776c4680af7da6759e76c54fcc03183ad433510...0716b9cab1b50ed8c9a9522aa3bd829f98093b0c passed.
  • node_modules/.bin/oxfmt --check docs/plugins/copilot.md passed.
  • Exact-head CI run 32818679975 passed.
  • Exact-head Workflow Sanity run 32818679947 passed.
  • Two independent source reviews found no remaining actionable issues. Documentation only; no runtime, persistence, authentication, configuration, or protocol changes.

@steipete
steipete merged commit eb8e948 into openclaw:main Aug 25, 2026
54 checks passed
@steipete

Copy link
Copy Markdown
Contributor

Merged via squash.

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

docs Improvements or additions to documentation extensions: copilot P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants