← Back to Pull requests

docs(architecture): verify the recovery and resume docs against main (#3522) #6038

Closed
unknown closed this pull request without merging on Oct 10, 2026 13:01 UTC
View on GitHub
unknown unknown commented on Oct 10, 2026 02:06 UTC
Author

Summary

The Recovery and resume group of the #3522 docs-verification campaign: all six documents were checked claim-by-claim against main, and the stale ones are corrected (7 files, +111/−92).

What the verification found and fixed:

  • PR B is merged, not planned. The main architecture doc (EN+ZH) described the events.length high-water, the in-process claim, and a continuationSource header as current, with PR B as future. The reality is runtime_continuation_claims, continuation_start_v2 + replayManifestDigest, and AgentRunLineage; continuationSource survives only in the legacy run-header decoder. The PR ladder diagram and the follow-up-gaps list now reflect merged vs future status.

  • Storage is SQLite-only. phase0 ("future SQLite tool journal", "torn JSON row", "file-backed store"), phase1 ("does not make JSONL transactional", "SQLite canonical storage ... remain later phases"), phase3-4 ("file-backed AgentRun operational projection", FileRuntimeEventStore), and the extraction ledger (§8.3) all described the JSONL era as current. They now describe the SQLite tool journal and SQLite AgentRun projection (core_agent_runs/core_agent_run_projections), with the remaining open item stated precisely (cross-host exactly-once needs owner lease/fencing).

  • Hard errors. Runtime Host compatibility epoch 57 → 206 (packages/runtime-host/src/protocol/index.ts); a dead desktop path in the code-reading map (use-shell-resume.ts moved under features/conversation/controller/); a Chinese-only sentence claiming an added system reminder after outcome_unknown (the system prompt stays byte-stable, model-history.ts); the ADR's ToolJournalState union missed abandoned/interrupted_unknown; the ADR's actions.stateDelta.replaySources was replaced at implementation time by replayManifestDigest + the claim boundary cursor (noted as a dated implementation note rather than rewriting the accepted decision); the ledger's historical tables carry a dated erratum (continuation_source_v2 now legacy-only, renamed test file, fixtures path).

  • One reverse-sync. The English doc said Desktop recovers only "Graph coordination" while the Chinese translation also named the supervisor wake — the code has agent-graph-supervisor-wake.ts, so the EN text gained the supervisor wake instead of deleting it from ZH.

  • last_verified refreshed to 2026-10-10 in both main docs and added to phase0/phase1, which had none.
  • Known remaining drift (not in this PR)

    Two cosmetic ZH-side extra passages (a Phase 0 aside ~:394 and a CLI streaming bullet ~:823) are plausibly true and not verified false; resyncing them needs a separate look, so they are left untouched rather than blindly deleted.

    Verification

  • Every named symbol, failpoint id, rejection code, and cited path in the group was grepped against the code during the pass; the failpoint table (P0–P11), the ten stable rejection codes, RUNTIME_RESUME_FAILPOINTS, RecoveryResolver, and the crash-harness coverage claims all verified clean and are unchanged.

  • Docs-only change; no code paths touched.
  • Refs #3522

    AI use

    Select exactly one:

  • No generative tool made a substantive contribution

  • Generative tooling made a substantive contribution
  • Tool(s) and scope: ZCode (GLM). Ran the doc-vs-code verification pass and drafted the corrections; the human contributor reviewed the findings, ran the pass in their environment, and owns the result. Commits carry Generated-by: ZCode.

    Diff: 444 lines (+333 / -111) across 5 files Reviewer: Astro-Han Review duration: 654m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.45) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 444 lines diff across 5 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.365
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #6038"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 45.3% (MEDIUM) · Higher = larger blast radius
    45.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 19.6% · Safe to merge
    19.6%
    Repository