Repository navigation
feat: prepare bounded transcript pages for plugin history - #169241
SweetSophia wants to merge 13 commits into
Conversation
Local checkpoint only: bounded query, worker paging and identity refusal tests are preserved for the strict SQLite admission prerequisite. Focused checks: 62 pass; the actual-worker absent-WAL/SHM preservation test still fails. Core types, focused lint and formatting pass. Deadline/retirement, remaining lifecycle coverage and safe native admission are incomplete. Not ready for publication, merge, SDK registration or live deployment.
|
🦞👀 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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs real behavior proof before merge. What this changesAdds an internal read-only transcript-page operation with bounded source accounting, pagination, deadlines, and separately tracked settlement. Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision Merge readiness⛔ Blocked before merge - 3 items remain Keep open: this PR contains meaningful, distinct reader groundwork, but accepting its inactive contract and lifecycle policy requires session-owner judgment. Priority: P3 Decision needed
Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe session-history worker reads per-agent SQLite transcripts; the proposed operation accepts captured session identity and limits and returns source records, continuation positions, and accounting. flowchart LR
A[Future plugin consumer] --> B[Internal page operation]
B --> C[Existing history worker]
C --> D[Read-only database owner]
D --> E[Agent SQLite transcript]
E --> F[Page and accounting]
F --> B
Technical reviewBest possible solution: Agree on a minimal generic plugin-history contract at the existing history owner before qualifying this foundation through its intended consumer. Do we have a high-confidence way to reproduce the issue? This is a proposed capability rather than a reported bug; source confirms the new operation has no production consumer, and no target code was executed during this read-only review. Is this the best way to solve the issue? Reusing the existing history worker and read-only database owner is appropriate, but the consumer contract and additional failure-retention machinery need owner acceptance before this becomes the preferred implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 21f043cf86f5. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +885, Tests +1536, Docs +54, Other +2. Total +2477 across 20 files. Added test files: 4. View PR surface stats
LabelsLabel changes: No label 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 HistoryReview history (7 earlier review cycles)
Reviewed October 12, 2026, 4:49 PM ET / 20:49 UTC (Revision 8). |
|
The bounded CI investigation is complete. Pushed test-only correction The key source distinction is in the checkout log: failed run 38275479757 executed generated merge Confirmed contribution defect and correction: upstream The correction selects the fixture's pool from actual schema-admission state after writer close and targets both execution and rotation spies at that pool. Assertions, production handling, deadlines and timeouts are unchanged. Independent source review found no confirmed defect in this correction. Local verification using Node 24.19.0 (the binary version printed in the hosted job), frozen installs and normal timeouts:
Type-aware lint, formatting, line-cap and timeout-race checks also pass. These timings are local; fresh hosted timing is not yet available. Confirmed inherited failures: paired executions of the original failed cohorts on upstream
This establishes that those three failures occur without this contribution; it does not assert that upstream behavior is correct. No unrelated owner change or main refresh is included. The initial older-base diagnostic's shortened ten-second archive timeout is preserved separately and is not classified as the hosted failure. The PR description now distinguishes the actual executed tree, paired attribution and fresh test-only proof from the prior 170-test/build receipt. Command/selector, source/hash and raw-log receipts are preserved in |
An explicit cron run reads its authorized job definition and private scratch separately inside a SQLite read transaction. Read both in one dialect-layer LEFT JOIN so they share a statement snapshot, removing three SQL statements per SQLite run without another worker request. The job reader keeps its all-column authorization relation, ordered narrow projection, exact returned-ID check, existing decoder/config revision and legacy creation fallback. Missing scratch still reports revision 0; deletion keeps its revision tombstone. The standalone maintenance reader remains. No schema, cache, write, receipt, claim-before-effect, delivery authority, FIFO or 64-receipt retention change. PostgreSQL retains the shared reader's outer read-only transaction and rollback: its exact-job read is 4→3 SQL, not 4→1. SQLite exact-job is 4→1, heartbeat 3→1; PostgreSQL heartbeat remains 3→3. Accepted noncontract edges: an absent/malformed job can now require scratch SELECT privilege, and malformed job plus unsafe numeric scratch can reject the numeric data first. These do not remove the existing caller/source/cancellation checks. The production delta is +3 lines: one joined query replaces the transaction and duplicate read while sharing NULL handling with heartbeat. Existing test files cover read-after-write, tombstones, missing jobs/monitors and both database engines. No new suite or runner is added. Acceptance was registered before measurement: the committed `scripts/bench-cron-run.mts` drives signed WebSocket `cron.run` against an isolated synthetic Gateway/provider, once cold and twice warm. Each run must produce one start, one finish, one Responses request and exact-run history verification. Compare execution, history verification and settlement separately and together, plus shutdown and the entire invocation. The scratch owner must fall from 4→1 SQL with 1 request and 0 MAIN throughout; no cost may be deferred outside the run. Keep cold/warm separate and report median/p95/range. Three same-platform alternating pairs when calm, or one pair plus source attribution under campaign load. Counts and profiles make no latency/CPU-speed claim; timing claims require the timing lock, load below 24 and ≥5 alternating samples per arm. A 20% user-facing regression stops acceptance. Delivery mode none does not claim an external-send proof. The same-platform explicit comparison (baseline 814e732, candidate 93a6c4) gives: | SQL / requests / MAIN | Baseline | Candidate | | --- | --- | --- | | Cold execution + verification + settlement | 257 / 80 / 0 | 254 / 78 / 0 | | Warm 1 | 247 / 64 / 0 | 235 / 60 / 0 | | Warm 2 | 252 / 61 / 0 | 245 / 65 / 0 | | Warm median | 249.5 / 62.5 / 0 | 240 / 62.5 / 0 | | Warm descriptive p95 | 252 / 64 / 0 | 245 / 65 / 0 | | Warm range | 247–252 / 61–64 / 0 | 235–245 / 60–65 / 0 | | Shutdown | 22 / 6 / 5 | 40 / 10 / 5 | | Whole invocation | 1383 / 356 / 58 | 1369 / 352 / 58 | Each of the three runs completed one start, finish, Responses request and exact history verification. The scratch owner is exactly 4/1/0 → 1/1/0 in every run, all in its execution phase, with no extra or deferred scratch requests. All execution/verification/settlement phases are SQL-error-free and runtime MAIN remains zero. The count comparison is diagnostic, not an error-free full invocation: the frozen analyzer rejects two failed shutdown `state_leases` DELETEs (`database is locked`). Shutdown exceeds the 20% stop threshold; it was stopped and explicitly accepted by the coordinator as inherited after an independent main shutdown-lock reproduction. The separate SHUTDOWNLOCK lane owns that repair. The scratch join changes no lease code or writes. No latency or CPU-speed claim is made. The frozen 3.1.5 standard workload is a different scheduled `cron.add` flow: three valid baselines gave 06.cron 231/62/0, 235/65/0, 233/63/0 (median 233/63/0), versus ordinary warm 45/12/0. The descriptive excess is 188 SQL/51 requests, not causal subtraction. One extra standard setup aborted before any Gateway; it supplies no performance evidence. The existing scratch source is identical across that baseline and the explicit baseline. Full current-standard delta is deferred to the next census. Validation: count regression red on baseline (2 SELECTs and BEGIN/COMMIT), all 17 scratch-store tests green on the candidate; two isolated Codex P0–P2 reviews scoped-clean. The existing two-engine conformance test passed on actual SQLite and PostgreSQL 17, with catalog/trigger parity and cleanup verified. Test cost: scratch cases totaled 6.528 s (125.95 s file duration, mostly transform); the two engine cases totaled 1.846 s (260.62 s file duration, mostly transform). The candidate build and official source-freshness check passed at measured runtime head 93a6c4d; the three-sample invocation completed with the shutdown limitation above. Exact-head CI run 40176443806 completed successfully: 39 successful jobs, 26 skipped, no failures, including all three actual PostgreSQL shards, production/test types, lint, source contracts, Madge, and worker/T1/dialect ratchets. The earlier run passed types, lint and source contracts but found a worker-inventory omission: the new direct query was conservatively labeled T1. Head a187ecf corrects only inventory metadata and regenerates its snapshot: the worker snapshot and its private heartbeat helper are W, while the native Doctor reader stays T3. No runtime or SQL change is involved. The generated snapshot also catches up existing main classifications; targeted script lint and formatting pass. The two production reviews remain valid; this tooling-only correction adds no production review round. PG review approved the semantics at 68c24c4, and the coordinator explicitly carried REVIEW-OK to 93a6c4d because only benchmark TypeScript annotations changed. Candidate counts and the inherited-shutdown disposition are recorded; the corrected head’s CI and all three PG shards passed. The test-only import relocation avoids another open PR's adjacent import change; production bytes remain identical to both isolated reviews and database proof. The benchmark annotations fix CI TS7022 without changing emitted behavior. Final-head overlap at a187ecf: complete shared-index base-versus-candidate merge-tree comparison covers 21 peers (#183410, #183285, #181057, #180871, #180286, #180139, #169241, #168956, #168615, #167546, #167471, #165039, #161997, #157922, #157693, #156613, #141004, #137788, #136476, #129388, #121204). No new source conflict paths, regions or messages. Six peers (#181057, #180871, #180139, #169241, #129388, #121204) have added or changed conflicts confined to the fully generated worker inventory. The coordinator explicitly accepted this class because main's snapshot was stale and generated outputs must be regenerated, not hand-edited. The same exact-head disposition carries PG REVIEW-OK because runtime bytes are unchanged. Exact-head CI and all three PostgreSQL shards passed. PG checklist: (1) read-only; existing writer transaction/advisory-lock, DML/conflict and cross-store commit ordering unchanged. (2) At most one joined row via the existing composite primary keys, original job fields plus four scratch fields, unchanged 256 KiB scratch write bound. (3) No cache/generation or invalidation change; one statement snapshot, existing outer PG read transaction retained. (4) No schema/admission/identity/retry/probe change. (5) Same worker owner, one request, no MAIN expansion; target 4→1 SQL in all three real Gateway runs, with the inherited shutdown failure disclosed above. (6) Actual PostgreSQL 17 and SQLite owner conformance passed; all three final-head PostgreSQL CI shards and the other selected static checks passed. Knip was run separately because ordinary PR CI excludes it. The canonical candidate export scan failed with 26 script, 20 production and 16 full-tree findings; none is in a changed file. All 62 occurrences (52 unique file/symbol pairs), scanner/config/compiler inputs and package inputs are unchanged from merge-base dada70f. The only removed imports, runSqliteReadSnapshotSync and loadCronRows, both retain multiple real production consumers. Current-main diagnostic sections reported 14 script and 7 production findings; main has already repaired 40 candidate occurrences in unrelated changes. Its separate full-tree scan was intentionally stopped after the coordinator accepted the source-attributed inherited findings; it is not a passing full-main scan. No ignored exports, baselines or unrelated code were changed. The failed candidate scan is explicitly accepted as inherited; all branch changes and selected CI static checks pass. Pre-merge shared-index refresh retains 17 open peers from that audit. Only #180871 moved (f140f16); its fresh base-versus-candidate comparison still adds conflicts solely in the generated worker inventory, within the coordinator-accepted class. No new source conflicts. Co-authored-by: Peter Steinberger <[email protected]>
|
This pull request has been automatically marked as stale after 7 days without qualifying human activity. |
An explicit cron run reads its authorized job definition and private scratch separately inside a SQLite read transaction. Read both in one dialect-layer LEFT JOIN so they share a statement snapshot, removing three SQL statements per SQLite run without another worker request. The job reader keeps its all-column authorization relation, ordered narrow projection, exact returned-ID check, existing decoder/config revision and legacy creation fallback. Missing scratch still reports revision 0; deletion keeps its revision tombstone. The standalone maintenance reader remains. No schema, cache, write, receipt, claim-before-effect, delivery authority, FIFO or 64-receipt retention change. PostgreSQL retains the shared reader's outer read-only transaction and rollback: its exact-job read is 4→3 SQL, not 4→1. SQLite exact-job is 4→1, heartbeat 3→1; PostgreSQL heartbeat remains 3→3. Accepted noncontract edges: an absent/malformed job can now require scratch SELECT privilege, and malformed job plus unsafe numeric scratch can reject the numeric data first. These do not remove the existing caller/source/cancellation checks. The production delta is +3 lines: one joined query replaces the transaction and duplicate read while sharing NULL handling with heartbeat. Existing test files cover read-after-write, tombstones, missing jobs/monitors and both database engines. No new suite or runner is added. Acceptance was registered before measurement: the committed `scripts/bench-cron-run.mts` drives signed WebSocket `cron.run` against an isolated synthetic Gateway/provider, once cold and twice warm. Each run must produce one start, one finish, one Responses request and exact-run history verification. Compare execution, history verification and settlement separately and together, plus shutdown and the entire invocation. The scratch owner must fall from 4→1 SQL with 1 request and 0 MAIN throughout; no cost may be deferred outside the run. Keep cold/warm separate and report median/p95/range. Three same-platform alternating pairs when calm, or one pair plus source attribution under campaign load. Counts and profiles make no latency/CPU-speed claim; timing claims require the timing lock, load below 24 and ≥5 alternating samples per arm. A 20% user-facing regression stops acceptance. Delivery mode none does not claim an external-send proof. The same-platform explicit comparison (baseline 814e732, candidate 93a6c4) gives: | SQL / requests / MAIN | Baseline | Candidate | | --- | --- | --- | | Cold execution + verification + settlement | 257 / 80 / 0 | 254 / 78 / 0 | | Warm 1 | 247 / 64 / 0 | 235 / 60 / 0 | | Warm 2 | 252 / 61 / 0 | 245 / 65 / 0 | | Warm median | 249.5 / 62.5 / 0 | 240 / 62.5 / 0 | | Warm descriptive p95 | 252 / 64 / 0 | 245 / 65 / 0 | | Warm range | 247–252 / 61–64 / 0 | 235–245 / 60–65 / 0 | | Shutdown | 22 / 6 / 5 | 40 / 10 / 5 | | Whole invocation | 1383 / 356 / 58 | 1369 / 352 / 58 | Each of the three runs completed one start, finish, Responses request and exact history verification. The scratch owner is exactly 4/1/0 → 1/1/0 in every run, all in its execution phase, with no extra or deferred scratch requests. All execution/verification/settlement phases are SQL-error-free and runtime MAIN remains zero. The count comparison is diagnostic, not an error-free full invocation: the frozen analyzer rejects two failed shutdown `state_leases` DELETEs (`database is locked`). Shutdown exceeds the 20% stop threshold; it was stopped and explicitly accepted by the coordinator as inherited after an independent main shutdown-lock reproduction. The separate SHUTDOWNLOCK lane owns that repair. The scratch join changes no lease code or writes. No latency or CPU-speed claim is made. The frozen 3.1.5 standard workload is a different scheduled `cron.add` flow: three valid baselines gave 06.cron 231/62/0, 235/65/0, 233/63/0 (median 233/63/0), versus ordinary warm 45/12/0. The descriptive excess is 188 SQL/51 requests, not causal subtraction. One extra standard setup aborted before any Gateway; it supplies no performance evidence. The existing scratch source is identical across that baseline and the explicit baseline. Full current-standard delta is deferred to the next census. Validation: count regression red on baseline (2 SELECTs and BEGIN/COMMIT), all 17 scratch-store tests green on the candidate; two isolated Codex P0–P2 reviews scoped-clean. The existing two-engine conformance test passed on actual SQLite and PostgreSQL 17, with catalog/trigger parity and cleanup verified. Test cost: scratch cases totaled 6.528 s (125.95 s file duration, mostly transform); the two engine cases totaled 1.846 s (260.62 s file duration, mostly transform). The candidate build and official source-freshness check passed at measured runtime head 93a6c4d; the three-sample invocation completed with the shutdown limitation above. Exact-head CI run 40176443806 completed successfully: 39 successful jobs, 26 skipped, no failures, including all three actual PostgreSQL shards, production/test types, lint, source contracts, Madge, and worker/T1/dialect ratchets. The earlier run passed types, lint and source contracts but found a worker-inventory omission: the new direct query was conservatively labeled T1. Head a187ecf corrects only inventory metadata and regenerates its snapshot: the worker snapshot and its private heartbeat helper are W, while the native Doctor reader stays T3. No runtime or SQL change is involved. The generated snapshot also catches up existing main classifications; targeted script lint and formatting pass. The two production reviews remain valid; this tooling-only correction adds no production review round. PG review approved the semantics at 68c24c4, and the coordinator explicitly carried REVIEW-OK to 93a6c4d because only benchmark TypeScript annotations changed. Candidate counts and the inherited-shutdown disposition are recorded; the corrected head’s CI and all three PG shards passed. The test-only import relocation avoids another open PR's adjacent import change; production bytes remain identical to both isolated reviews and database proof. The benchmark annotations fix CI TS7022 without changing emitted behavior. Final-head overlap at a187ecf: complete shared-index base-versus-candidate merge-tree comparison covers 21 peers (openclaw#183410, openclaw#183285, openclaw#181057, openclaw#180871, openclaw#180286, openclaw#180139, openclaw#169241, openclaw#168956, openclaw#168615, openclaw#167546, openclaw#167471, openclaw#165039, openclaw#161997, openclaw#157922, openclaw#157693, openclaw#156613, openclaw#141004, openclaw#137788, openclaw#136476, openclaw#129388, openclaw#121204). No new source conflict paths, regions or messages. Six peers (openclaw#181057, openclaw#180871, openclaw#180139, openclaw#169241, openclaw#129388, openclaw#121204) have added or changed conflicts confined to the fully generated worker inventory. The coordinator explicitly accepted this class because main's snapshot was stale and generated outputs must be regenerated, not hand-edited. The same exact-head disposition carries PG REVIEW-OK because runtime bytes are unchanged. Exact-head CI and all three PostgreSQL shards passed. PG checklist: (1) read-only; existing writer transaction/advisory-lock, DML/conflict and cross-store commit ordering unchanged. (2) At most one joined row via the existing composite primary keys, original job fields plus four scratch fields, unchanged 256 KiB scratch write bound. (3) No cache/generation or invalidation change; one statement snapshot, existing outer PG read transaction retained. (4) No schema/admission/identity/retry/probe change. (5) Same worker owner, one request, no MAIN expansion; target 4→1 SQL in all three real Gateway runs, with the inherited shutdown failure disclosed above. (6) Actual PostgreSQL 17 and SQLite owner conformance passed; all three final-head PostgreSQL CI shards and the other selected static checks passed. Knip was run separately because ordinary PR CI excludes it. The canonical candidate export scan failed with 26 script, 20 production and 16 full-tree findings; none is in a changed file. All 62 occurrences (52 unique file/symbol pairs), scanner/config/compiler inputs and package inputs are unchanged from merge-base 71bc695. The only removed imports, runSqliteReadSnapshotSync and loadCronRows, both retain multiple real production consumers. Current-main diagnostic sections reported 14 script and 7 production findings; main has already repaired 40 candidate occurrences in unrelated changes. Its separate full-tree scan was intentionally stopped after the coordinator accepted the source-attributed inherited findings; it is not a passing full-main scan. No ignored exports, baselines or unrelated code were changed. The failed candidate scan is explicitly accepted as inherited; all branch changes and selected CI static checks pass. Pre-merge shared-index refresh retains 17 open peers from that audit. Only openclaw#180871 moved (f140f16); its fresh base-versus-candidate comparison still adds conflicts solely in the generated worker inventory, within the coordinator-accepted class. No new source conflicts. Co-authored-by: Peter Steinberger <[email protected]>
|
Closing due to inactivity. |
What Problem This Solves
A future plugin history reader needs bounded source pages without entering transcript restoration or writable projection paths.
User Impact
This is an internal foundation with no production caller or public SDK export. Existing readers retain their request kinds, timeout defaults and successful read paths; no schema or dependency changes are introduced.
Why This Change Was Made
The new page operation reuses the session-history lane and retained database owner. It uses native read-only primary scopes, preserves upstream's read-only quarantine admission and a page frontier across appends, and bounds kernel source work to 50 returned records, 1,000 scanned entries and 16 MiB of UTF-8 source. SQLite-owned WAL/SHM coordination is permitted; writer fallback, missing-store creation, migration and cold restoration are prohibited.
One captured deadline of at most five seconds bounds the response across queueing and execution. Settlement separately joins the owned task and cleanup. Late pages cannot replace an interrupted response. Lost accounting rejects settlement and retains failed admission until the existing database owner recovers it; there is no automatic replay. A failed claim also prevents shared-lane idle retirement until recovery.
Remaining acceptance limits: kernel accounting does not yet qualify every schema/quarantine admission SQL query, and the post-snapshot archive/rewrite publication fence still needs proof. Schema refusal is qualified at first admission; warm reads preserve upstream's published schema facts and do not add a version fence for later untracked header edits. This contribution does not provide a complete public session-read contract.
Evidence
Source baseline: captured upstream main
bb6818fd172e35956189a56c3f71dd1133c3c1d2(2026.10.2 source), current candidate6426296c6aef7f2aef3f01089c5e4665e57f89be. This latest correction changes only the page-runtime test fixture relative todc8101b7; production source is unchanged. Three conflicts against each ofb9439454and037aa311justified two earlier source merges. A later probe againstbb6818fdfound only a generated-inventory conflict; source and request types merged cleanly. Earlier checkpoint proof remains historical evidence. This contribution does not modify or depend on the public cold-restoration opt-out wrappers in #165710. No installed-gateway claim is made.dc8101b7snapshot, 170 tests across thirteen files pass locally through the normal router (129.95 seconds of router-reported wall time; shard durations 30.28, 63.95 and 26.73 seconds). A preceding affected native worker/quarantine/packaging run passed 42 tests across four files (47.16 seconds). The broader regression was rerun because main also changed the shared query layer. Earlier 172-test and 171-test counts remain qualified only for their earlier snapshots. These are not new full-run results for the test-only correction; fresh hosted timing is not available.dc8101b7source, core type checking passes (70.82 seconds); the affected test-type graphtest/tsconfig/tsconfig.core.test.agents-sessions.jsonalso passes (70.67 seconds).git diff --check.dc8101b7, the fullcorepack pnpm buildpasses (exit 0, 395.24 seconds). Its receipt binds that source SHA-256a93a39737f681958a522b3745d4b0a07b0c4676b56aaf9b7669cd2d860452b29to every check, including the failed dialect gate; it does not report all checks passing. No new full build is claimed for the test-only correction.json-projectionconstructs (design: 0 -> 3). This is an intentional increase requiring maintainer review, not a passing or inherited check. See the owner and backend contract below; no baseline or guard was relaxed.The 172-to-170 difference comes from upstream
4dea82441409284fde36419b7a9f034e75b0dac1(#169898), which removed the twoit.each(["initialized", "empty"])quarantine observation cases. Both contribution-added read-only/missing-store regressions remain present and pass in both local runs. The current receipt isverification-post-push-refresh-2026-10-12.json; its broader-regression entry was appended after the verification script completed and is backed by the unchanged source hash andpost-push-full-regression-2026-10-12.log.Hosted CI associated with
dc8101b7is not green (run 38275479757, 2026-10-12): five distinct checks fail. These arechecks-fast-baseline-ratchets(the disclosed dialect increase),checks-node-changed-compact-small-3(7 page-runtime failures, including three 120-second timeouts),checks-node-changed-compact-large-32(2 quarantine-cache test failures),checks-node-changed-compact-large-10(1 gateway history-worker lifecycle failure), and theopenclaw/ci-gaterollup.The checkout log shows that this run executed generated merge
42ac1c657eba0b4ce54ef344df6fc14ae30e82ba, combining upstreamea0e2099e059522703cb65db2b3eb4c7be73830awithdc8101b7. It did not execute the contribution head's tree on its capturedbb6818fdbase. The bounded comparison therefore pins the actual merge and its first parent, without another main refresh. Frozen installs, the hosted binary version Node 24.19.0, original file cohorts/configurations and normal test timeouts are used on the local host.19eddcf75194e9fca33b146b3b820a0a00831576(fix: prevent Code Mode worker OOM after databases close #169956) retires admission facts after the last native close. The fixture closes its writer, so the existing read owner selectstargetDiscoveryLane; seven controlled tests incorrectly spy onhistoryLane.pooland are bypassed. The original wrong-result case reproduces on the unmodified CI merge (one failure / twelve skipped; 32.91 router seconds).6426296c6selects the fixture pool from real schema-admission state after writer close and uses it for the execution/rotation mocks. No production owner, assertion, deadline, test timeout or ratchet changes. Independent source review found no confirmed defect.pnpm test src/config/sessions/session-transcript-page-read.runtime.test.ts --maxWorkers=1passes all 13 tests on the contribution source (39.07 seconds wall time) and on the actual CI merge with the identical patch (39.63 seconds). The original 11-file runtime cohort also passes on the patched merge: 81 tests, 86.60 seconds wall time, 82.15 seconds in Vitest.verification-ci-attribution-2026-10-12.jsonbinds the new committed tree and contribution source SHA-25601d49eb3203d0f09348f6bcfaed7d44c7d5ca1dca3e1e8cc8a5982cf69ced1f5to the unchanged tested file; raw logs and paired receipts are preserved.allChecksPassedremains false. These results do not qualify a new full build or clear fresh hosted CI.The initial older-base runtime diagnostic lowered its timeout to ten seconds: all 13 page tests passed, but one archive test exceeded that diagnostic limit. It is preserved separately, does not reproduce the hosted failure and is not classified as a contribution regression. Final merge reproduction uses normal timeouts.
The first published head had real CI defects: seven nullable/indexed test-type accesses, three kernel type assertions, and an omitted identity module in the wrapper runtime inventory exposed by two suites.
b9eb1bf3repairs those;cca5302farecords the kernel's worker-only caller and regenerates the SQL inventory. This refresh preserves main's transcript statistics, prepared anchor facts, entry/snapshot modes, current-entry worker types, harness-mode forwarding and failed-retirement custody. Both sides of the type/document conflicts are retained; the inventory is regenerated. Two unchanged preview/title request shapes move to the existing request-types module, preserving the existing preview import. The unchanged page contract is placed beside session operations rather than migration notes appended at the end. The first merge repaired an inherited duplicate anchor manifest entry; after newer main removed the opposite copy, existing closure tests caught the combined deletion. The final manifest preserves main's single required anchor entry and adds only the page-identity module relative to this baseline. Fresh independent review found no remaining integration defect. No guard or test expectation was weakened.Newer main caches quarantine decisions published by the writer. The two read-only/missing-store fixtures now clear their setup's admission cache to exercise ordinary cold lookup; they do not request the explicit repair read lane or change runtime caching. The deletion race also asserts one opener call, so a cached answer cannot falsely pass the non-creating-open regression. The original missing-store assertions remain intact, and scoped independent review confirmed the setup change. Main's optional database-engine capabilities are preserved; this contribution does not add backend support.
Before Merge
The upstream review at #169241 (comment) (revision 6, reviewed
dc8101b7at 2026-10-12 16:23 UTC) reportsFindings: None, patch quality 3/6 and readiness/proof 1/6. Its three before-merge items are accepted-consumer behavior proof, attribution of the hosted CI failures, and the session-owner decision. The paired comparisons and fixture correction above address attribution locally; fresh hosted CI and upstream acceptance of the evidence remain required. The fabricated built-worker fixtures qualify the internal boundary; they are not a shipped-consumer artifact or a complete public SDK flow. The comment is edited in place; the local task ledger preserves the fetched revision-6 comment separately from later revisions. Dialect classification remains open; this contribution is not merge-ready.The intended consuming feature is an Ikati-only agent/session chooser and cross-device visible chat history. It must use an ordinary registered plugin's public, registration-scoped read contract; no plugin import of private storage helpers or transcript-file parser is proposed. Before that consumer can be qualified, aggregate admission SQL and the post-snapshot publication fence need proof, followed by the public facade and redacted consumer evidence for paging, append continuation and interrupted settlement. Existing remote catalog-paging consumers do not consume this SQLite operation. Approval of the consuming contract and retained-failure policy remains an upstream owner decision; no accepted shipped consumer is claimed here.
The dialect ratchet's three occurrences are two
json_objectcalls and onejson_extractinsession-transcript-page-read.kernel.ts. The owning operation istranscript-page-read, dispatched only bysession-history-read-operation.worker.ts; direct kernel callers outside that worker are test fixtures. These project lifecycle identity and event-size metadata, allowing UTF-8 source measurement before returning the projected payload or decompressing an event, without fetching full private entry JSON. A future backend must implement equivalent bounded projection and pre-fetch byte measurement at the session-history store owner, preserving the identity, snapshot and source-accounting tests, or refuse this operation as unsupported. No backend, stored format or migration is added. The worker-access guide records the same contract. Scoped dialect classification still needs maintainer review.Watched regressions first reproduced queued response deadline failures, unresolved expiry before timer service, settlement accepting non-final accounting, missing response rejection handling and unregistered failed task-close recovery. Independent review verified the repaired ownership paths. All fixtures use fabricated local state; no live transcripts, provider turns, gateway changes or deployment. The full repository test suite was not run.
Focused test command
corepack pnpm test \ src/config/sessions/session-transcript-page-read.kernel.test.ts \ src/config/sessions/session-transcript-page-read.worker.test.ts \ src/config/sessions/session-transcript-page-read.runtime.test.ts \ src/config/sessions/session-transcript-page-read.identity.test.ts \ src/state/openclaw-quarantine-store.test.ts \ src/config/sessions/session-transcript-events.worker.test.ts \ src/config/sessions/session-transcript.worker.schema-freshness.test.ts \ src/config/sessions/session-history-worker-errors.test.ts \ src/config/sessions/session-transcript-worker-lanes.test.ts \ src/infra/session-cost-usage-cache.cleanup.test.ts \ src/infra/session-cost-usage-cache.admission.test.ts \ test/scripts/pr-wrapper-source-closure.test.ts \ test/scripts/eager-import-closure.test.ts \ --maxWorkers=1