Repository navigation
fix(sessions): keep transcript workers outside Doctor repair imports - #197153
Conversation
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]>
Worked on by: - @obviyus - @steipete Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> OpenClaw-Publication: a5810362-f6b3-86b4-b15f-fda48e461821
|
🦞👀 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. |
Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]>
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]>
|
Codex review: needs maintainer review before merge. What this changesThis PR extracts the unchanged canonical session-row reader from Doctor repair code and updates its callers and database inventory. Example: Build the standalone config/sessions/session-transcript.worker entry.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenanceRegression provenance — suspected predecessor, not a causality claim: source commit Possible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep this PR: it repairs an owned worker import-boundary regression while preserving Doctor restoration, with no introduced defect identified. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherTranscript workers and Doctor consume canonical SQLite session rows; the extracted reader returns the same entry and row while Doctor retains ownership of restoration and repair. flowchart TD
A[Transcript worker] --> B[Retirement comparison reader]
B --> C[Canonical row reader]
C --> D[SQLite session rows]
E[Doctor imports and lifecycle repair] --> C
E --> F[Doctor cold restoration]
Technical reviewBest possible solution: Keep the exact-row reader separate from Doctor restoration, with every caller using the extracted implementation and the existing graph guard unchanged. Do we have a high-confidence way to reproduce the issue? Source establishes the transcript-worker → retirement reader → legacy claims → canonical repair → cold-storage import path; the linked main job failed, but its detailed trace was inaccessible and no target code was executed. Is this the best way to solve the issue? This is the smallest complete fix: separate the unchanged read operation from the mutable repair dependency graph, migrate its callers, and preserve existing restoration and regression assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8830ff6d8ed6. Provenance checked
TestingProof path: none. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +4, Tests 0, Other +10. Total +14 across 12 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. LabelsLabel changes:
Label justifications:
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 11, 2026, 4:18 AM ET / 09:18 UTC. |
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]>
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]>
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]>
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]>
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]>
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…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.
Backport the omitted inventory hunk from 6d71e65 (#197153), keeping its existing T2 ownership with the extracted canonical reader. Document the existing model-navigation assertion at its operator for the safety ratchet. No runtime behavior or gate thresholds change. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]> Co-authored-by: RomneyDa <[email protected]> Co-authored-by: vincentkoc <[email protected]>
…stage 2) Catches the pure continuation candidate bc7e568 up to openclaw/openclaw main 41bdde2 (fetched 2026-11-19T14:32:59Z), 2,996 upstream commits past the old merge base 401a1de. Merge commit only; rerere disabled, so every resolution was made here. 80 conflicted paths (77 content, 3 modify/delete), each recorded with base, ours and theirs blobs and its reason in the lane's stage2-conflicts.md: - 8 take upstream whole: the openclaw#197153 pg16-smoke cherry-pick (6909b64) now ships upstream (ci.yml, ci-build-manifest, ci-workflow-planning test), the Control UI settings child moved onto runDistArtifactChild, the canary worker target and two active-facts migration tests. - 3 deleted with upstream: session-fork and update-candidate-canary suites whose production paths upstream removed; cwd-split folded away (openclaw#198916), its one continuation case rehomed to attempt.continuation-tools.test.ts. - One-owner cutovers where upstream now owns a fork extraction: the requester-origin projection and replacement-text helpers (openclaw#200533) replace the fork's byte-identical copies in user-turn-transcript.metadata.ts. - Ports into fork-extracted owners: removalReason in the queued-start plan and collector-group sweep (openclaw#199868), the async prepared-pricing usage diagnostic, the announce flow types, and the session-delivery codec, which gains upstream's mediaCandidate kind, reviewedTaskId and their schemas (openclaw#198227), importing its retention type from the leaf types module. - Transcript repair (openclaw#201304, post-b894): upstream's payload-free adapter kernel carries the fork's continue_delegate attachment redaction through a payload-adapter-only fact and a withBlock update. - Reset cleanup: upstream's process and retained-send stops (openclaw#199079, openclaw#200326) with the fork's continuation-aware reason as the single input; the chat reset's retention adapter wraps upstream's stopSessionResetWork, the Gateway preemption keeps stopSessionResetSubagents as upstream does. - Schema: upstream owns agent 42 (tool usage) and 43 (pending-input endings) and is at 43; 44 is unused upstream. Continuation's recipient authority moves 42 -> 44: version constants, step order, historical schemas, witness additive table and version set, backup scope, PostgreSQL ladder (V43 = current minus the authority table) and port descriptor. package.json schemaVersions state 40, agent 44. - Generated outputs regenerated, never hand-merged: config baseline, gateway validators, postgres schema catalogs, worker-access inventory. - Compile follow-through for upstream's delivery-union narrowing and its readSessionDelivery callers. Refs openclaw#129388
check:test-lines-ratchet --base 41bdde2 at c5b57d9 measured +113058 net test lines against 400 allowance plus 112361 credit, 297 over. Every fork record credited at bc7e568 is still credited, so the gap is this lane's own growth: measured per file as (HEAD - 41bdde2) minus (bc7e568 - 401a1de), the fork's test lines grew by 696. The new continuation-stage2-coverage.txt breaks that down by commit: the O4a real-producer pins (+324), O3 and H1 custody pins (+137), O2 (+54), capacity pools (+30), O1 (+32), schema-44 pins (+47), fixtures that follow upstream contracts merged at 41bdde2 (+52), merge resolutions (+62) and fork deltas upstream absorbed (-42). pg16-independent-smoke.txt was the fork's cherry-picked copy of upstream openclaw#197153's record. Upstream retired it in openclaw#197656. The merge kept the fork's copy, but its 14 lines are now upstream's, in the base. It goes too. With both changes: "Test lines OK. Net test lines: +113058; allowance: 400; allocation credit: 113043." Refs openclaw#129388 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Related: #196079
What Problem This Solves
Fixes: standalone transcript-worker builds pull unrelated Gateway/update code into their dependency graph when reading canonical session rows.
User Impact
User impact: transcript workers can read canonical session rows without loading the Doctor restoration dependency owner. Session data, permissions, malformed-row handling, and Doctor's offline-custody restoration of renamed-agent cold transcripts remain unchanged; no migration or user action is required.
Why This Change Was Made
#196079 (
7010349a97d3b94f5a15cbf90abca5c9cadd234d) added a dynamic cold-restoration import to the shared canonical-repair module. The transcript → retirement-read → legacy-claims → exact-reader path then reached that mutable Doctor module. This change moves the unchanged exact-row reader into a dedicated read module and migrates all six callers, including three fixture imports, without retaining the obsolete export. It preserves the complete Doctor implementation rather than rolling back cold restoration, and changes no SQL, queries, schema, authority, tests, graph assertions, baselines, or timeouts.Evidence
config/sessions/session-transcript.workergraph check reports 616 forbidden Gateway/update inputs.scoped-clean, report produced, no P2 findings, confidence 0.92.git diff --checkreports one extra blank line at EOF in the new read module; the exact already-reviewed commit is preserved without source edits.Contributor credit: @steipete and @obviyus.
Work sessions
Linked for team reference; these sessions aren’t public.
Worked on by