Repository navigation
fix(doctor): restore cold transcripts before session repair for renamed agents - #196079
Conversation
Co-authored-by: steipete <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. What this changesDoctor restores affected cold transcript generations before canonical session-key repair, using the physical store owner. Example: The newname store contains cold history for agent:oldname:conversation.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep this PR: it addresses a current upgrade-blocking defect through the existing storage owner, with no definite introduced code defect found. Priority: P1 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherDoctor inventories session repair candidates, restores their archived payloads through the cold-storage owner, then copies or archives history through the existing canonical repair lifecycle. flowchart TD
A[Doctor fix] --> B[Offline maintenance custody]
B --> C[Canonical repair inventory]
C --> D[Physical store archive owner]
D --> E[Verified transcript restoration]
E --> F[Canonical session repair]
Technical reviewBest possible solution: Restore affected generations through the existing archive owner under Doctor custody, preserving verification, history, and Gateway ownership checks. Do we have a high-confidence way to reproduce the issue? Current main reaches the hot-transcript assertion for cold canonical-repair generations; the report supplies matching release errors and the PR reports a failing-base file-backed regression, but this review executed no target code. Is this the best way to solve the issue? This is the smallest complete repair: prepare affected cold generations through the existing restoration owner before reserving the writer, retaining the original copy, archival, and integrity contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 06ee40a8facc. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +23, Tests +90, Docs +3, Other +2. Total +118 across 4 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 9, 2026, 11:07 AM ET / 16:07 UTC. |
…ed agents (openclaw#196079) Doctor's canonical session repair stopped with SessionTranscriptColdError when a renamed agent's store held cold transcripts keyed under the old agent id, and the Gateway history restore path refuses those keys, so upgrades to 2026.11.2 had no lossless way forward. The repair now restores the cold generations it needs through the existing cold-restore owner (size/SHA-256 verified, archive kept on failure), resolved by the physical store owner under Doctor's offline maintenance custody, before continuing the existing repair. No alias, flag, RPC or schema change; Gateway history ownership checks are unchanged. Fixes openclaw#196066 Co-authored-by: steipete <[email protected]>
… cell The 47,500-entry budget check only ran in Package Acceptance, which main never reached on a schedule (Update Migration is blocked at image prep), and the hourly published-driver cell uses the latest published driver, which degrades past the walk cap instead of refusing. So #196079 pushed main past the 50,000 entries that 2026.9.x updaters enforce without any CI going red. Measure the tree the published driver actually installed and assert the same release budget, so scheduled main validation goes red within the hour. Refs #196079
…197153) * fix(sessions): keep canonical row reads outside Doctor restoration Separate the unchanged exact-row reader from the mutable Doctor repair graph introduced by #196079. Preserve cold restoration, malformed-row handling and all read callers; keep standalone transcript worker graph assertions unchanged. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> * fix(sessions): keep transcript workers outside Doctor repair imports Worked on by: - @obviyus - @steipete Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> OpenClaw-Publication: a5810362-f6b3-86b4-b15f-fda48e461821 * style(sessions): remove extra canonical reader EOF line Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> * fix(test): complete canonical reader caller cutover Migrate three test imports outside the sessions directory and bind the existing database inventory operation to the extracted reader owner. Preserve all assertions. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> * fix(ci): give PostgreSQL 16 smoke its own execution budget Keep all three PostgreSQL 17 conformance shards at 30 minutes and run the unchanged pinned PG16 Gateway target in an independently gated 15-minute job. Preserve reporter, aggregate, completion and hosted-cost accounting. Six net lines extend existing guard cases; allocate exactly six lines in pg16-independent-smoke.txt, with no new cases or shared scalar increase. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> * fix(ci): isolate PostgreSQL smoke without expanding workflow aliases Keep independent PG16 admission and deadline in a fourth matrix row while restoring default YAML alias guard compatibility. Retain all PostgreSQL checks and aggregate gate ownership. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> * fix(ci): simplify PostgreSQL matrix display names Restore the workflow byte guard without changing matrix admission, execution budgets or tests. The pg16-smoke row remains identifiable by its matrix label. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> * fix(test): model PostgreSQL matrix exclusions in hosted admission Keep daily qualification at three shards and model PR matrix exclusions separately from Cartesian dimensions. Preserve actual jobs and guard thresholds; allocate twelve exact net guard lines. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> * fix(test): brace matrix exclusion control flow Satisfy the existing curly lint rule without changing matrix behavior. Account for the two required brace lines in the exact scoped test allocation. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> --------- Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]>
…penclaw#197153) * fix(sessions): keep canonical row reads outside Doctor restoration Separate the unchanged exact-row reader from the mutable Doctor repair graph introduced by openclaw#196079. Preserve cold restoration, malformed-row handling and all read callers; keep standalone transcript worker graph assertions unchanged. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> * fix(sessions): keep transcript workers outside Doctor repair imports Worked on by: - @obviyus - @steipete Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> OpenClaw-Publication: a5810362-f6b3-86b4-b15f-fda48e461821 * style(sessions): remove extra canonical reader EOF line Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> * fix(test): complete canonical reader caller cutover Migrate three test imports outside the sessions directory and bind the existing database inventory operation to the extracted reader owner. Preserve all assertions. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> * fix(ci): give PostgreSQL 16 smoke its own execution budget Keep all three PostgreSQL 17 conformance shards at 30 minutes and run the unchanged pinned PG16 Gateway target in an independently gated 15-minute job. Preserve reporter, aggregate, completion and hosted-cost accounting. Six net lines extend existing guard cases; allocate exactly six lines in pg16-independent-smoke.txt, with no new cases or shared scalar increase. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> * fix(ci): isolate PostgreSQL smoke without expanding workflow aliases Keep independent PG16 admission and deadline in a fourth matrix row while restoring default YAML alias guard compatibility. Retain all PostgreSQL checks and aggregate gate ownership. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> * fix(ci): simplify PostgreSQL matrix display names Restore the workflow byte guard without changing matrix admission, execution budgets or tests. The pg16-smoke row remains identifiable by its matrix label. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> * fix(test): model PostgreSQL matrix exclusions in hosted admission Keep daily qualification at three shards and model PR matrix exclusions separately from Cartesian dimensions. Preserve actual jobs and guard thresholds; allocate twelve exact net guard lines. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> * fix(test): brace matrix exclusion control flow Satisfy the existing curly lint rule without changing matrix behavior. Account for the two required brace lines in the exact scoped test allocation. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> --------- Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]>
…entry budget (#197269) * ci(update): enforce the installed-tree budget in the published-driver cell The 47,500-entry budget check only ran in Package Acceptance, which main never reached on a schedule (Update Migration is blocked at image prep), and the hourly published-driver cell uses the latest published driver, which degrades past the walk cap instead of refusing. So #196079 pushed main past the 50,000 entries that 2026.9.x updaters enforce without any CI going red. Measure the tree the published driver actually installed and assert the same release budget, so scheduled main validation goes red within the hour. Refs #196079 * test(sessions): bound the retirement-read worker build #196079 let the transcript worker's private build reach Doctor's cold-restore graph, which pushed the installed package past the 50,000 entries that 2026.9.x updaters accept; #197153 fixed the import edge. Build the retirement-read worker with its real private config and require it to stay small, so the edge cannot come back unnoticed: 5,408 emitted files before #197153, 58 after. Refs #196079 Refs #196418 * ci(update): mount the installed-tree budget module in the Docker harness The published-driver cell imports scripts/check-openclaw-installed-package-budget.mts, which the harness did not mount, so the cell would fail on import.
…penclaw#197153) * fix(sessions): keep canonical row reads outside Doctor restoration Separate the unchanged exact-row reader from the mutable Doctor repair graph introduced by openclaw#196079. Preserve cold restoration, malformed-row handling and all read callers; keep standalone transcript worker graph assertions unchanged. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> * fix(sessions): keep transcript workers outside Doctor repair imports Worked on by: - @obviyus - @steipete Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> OpenClaw-Publication: a5810362-f6b3-86b4-b15f-fda48e461821 * style(sessions): remove extra canonical reader EOF line Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> * fix(test): complete canonical reader caller cutover Migrate three test imports outside the sessions directory and bind the existing database inventory operation to the extracted reader owner. Preserve all assertions. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> * fix(ci): give PostgreSQL 16 smoke its own execution budget Keep all three PostgreSQL 17 conformance shards at 30 minutes and run the unchanged pinned PG16 Gateway target in an independently gated 15-minute job. Preserve reporter, aggregate, completion and hosted-cost accounting. Six net lines extend existing guard cases; allocate exactly six lines in pg16-independent-smoke.txt, with no new cases or shared scalar increase. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> * fix(ci): isolate PostgreSQL smoke without expanding workflow aliases Keep independent PG16 admission and deadline in a fourth matrix row while restoring default YAML alias guard compatibility. Retain all PostgreSQL checks and aggregate gate ownership. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> * fix(ci): simplify PostgreSQL matrix display names Restore the workflow byte guard without changing matrix admission, execution budgets or tests. The pg16-smoke row remains identifiable by its matrix label. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> * fix(test): model PostgreSQL matrix exclusions in hosted admission Keep daily qualification at three shards and model PR matrix exclusions separately from Cartesian dimensions. Preserve actual jobs and guard thresholds; allocate twelve exact net guard lines. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> * fix(test): brace matrix exclusion control flow Satisfy the existing curly lint rule without changing matrix behavior. Account for the two required brace lines in the exact scoped test allocation. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> --------- Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]>
…entry budget (openclaw#197269) * ci(update): enforce the installed-tree budget in the published-driver cell The 47,500-entry budget check only ran in Package Acceptance, which main never reached on a schedule (Update Migration is blocked at image prep), and the hourly published-driver cell uses the latest published driver, which degrades past the walk cap instead of refusing. So openclaw#196079 pushed main past the 50,000 entries that 2026.9.x updaters enforce without any CI going red. Measure the tree the published driver actually installed and assert the same release budget, so scheduled main validation goes red within the hour. Refs openclaw#196079 * test(sessions): bound the retirement-read worker build openclaw#196079 let the transcript worker's private build reach Doctor's cold-restore graph, which pushed the installed package past the 50,000 entries that 2026.9.x updaters accept; openclaw#197153 fixed the import edge. Build the retirement-read worker with its real private config and require it to stay small, so the edge cannot come back unnoticed: 5,408 emitted files before openclaw#197153, 58 after. Refs openclaw#196079 Refs openclaw#196418 * ci(update): mount the installed-tree budget module in the Docker harness The published-driver cell imports scripts/check-openclaw-installed-package-budget.mts, which the harness did not mount, so the cell would fail on import.
Fixes #196066
What Problem This Solves
openclaw doctor --fixblocks upgrades when a renamed agent's store contains cold transcripts keyed with the old agent ID and Gateway history cannot restore them.User Impact
Doctor can complete canonical session repair while preserving those transcripts, without a manual restore. Missing or damaged archives still stop the affected repair to protect history.
Why This Change Was Made
Canonical generation preparation now restores affected cold generations through the existing archive owner before copying or archiving history. Restoration uses the physical store owner, runs under Doctor's offline maintenance custody, and retains the existing size/SHA-256 verification and transactional restore semantics. Gateway history ownership checks are unchanged.
This fix belongs in the candidate Doctor; it requires no installed-updater change, config alias, CLI/RPC addition, or schema change. The process-local 24-hour restore cooldown remains unchanged: a later Gateway process can re-archive eligible restored transcripts, but cannot interrupt this offline restore-and-repair step.
Evidence
f001243c254f: a real file-backed cold transcript innewname's per-agent store, keyedagent:oldname:conversation, fails Doctor's canonical repair withSessionTranscriptColdError/TRANSCRIPT_COLD.--maxWorkers=1, through the repository Node test wrapper. The changed test file's isolated run took 62.47 seconds including 38.24 seconds of initial worker compilation; CI seconds are pending.git diff --checkpassed.scoped-clean, no findings, basef001243c254fe09663c98881cf831f417a1ef388→ head4b3d4efc0a8ad861173a08ef0525976066f46ab5.Named test files
Upgrade proof gap: the requested 2026.11.2 → branch CLI check did not run. Crabbox returned a lease immediately, but the Testbox remained
hydrating; the command never dispatched and the task-owned lease was stopped and confirmed completed. Allocation run. Broad build/typecheck/package proof is left to PR CI under the production-host limits.Reported by denvr-agents-admin[bot] on behalf of its operators. Thanks for the report and reproduction details.
Work sessions
Linked for team reference; these sessions aren’t public.