Repository navigation
fix(sessions): keep session results current during cold reads - #156121
roboclaw-bot merged 17 commits into
Conversation
|
🦞👀 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. Reviewed September 24, 2026, 6:43 PM ET / 22:43 UTC (Revision 18). ClawSweeper reviewWhat this changesThe branch moves cold session reads for Gateway responses, events, embedded tools, Talk, TUI, and Control UI pull-request views toward worker-prepared row facts with current-session and viewer checks. Merge readiness⛔ Blocked before merge - 9 items remain Keep this PR open. Current main still performs synchronous cold-archive preparation, while the published PR head retains five concrete correctness defects. The PR is protected by a maintainer label, and the coordinated corrections remain unpublished. Priority: P1 Review scores
Verification
How this fits togetherThe Gateway turns SQLite session records into rows used by session requests, events, and Control UI views. Embedded tools, Talk, and TUI also consume those rows; cold reads must prepare stored facts before selecting and presenting a current result. flowchart LR
A[SQLite session stores] --> B[Read-only worker]
B --> C[Session row projection]
C --> D[Current row and viewer checks]
D --> E[Gateway responses and events]
D --> F[Control UI pull-request updates]
C --> G[Embedded tools, Talk, and TUI]
Decision needed
Why: The comparison establishes a real tradeoff but does not establish a production workload threshold; that operating choice belongs to the area owner. Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +382, Tests +784. Total +1166 across 44 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep worker preparation and synchronous final presentation under one current projection and viewer lifetime, with settled subscription admission and eventual delivery to every authorized viewer; accept the measured latency cost only after the corrected head is reviewed. Do we have a high-confidence way to reproduce the issue? Yes, from source: a cold archived-row description on current main still enters synchronous preparation. The read-only review did not execute contributor code. Is this the best way to solve the issue? No for the published head. Worker preparation fits the existing projection owner, but the five response, delivery, and presentation lifetime defects must be corrected on the PR branch. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1dc005c7cb34. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (17 earlier review cycles; latest 8 shown)
|
28c5bda to
28e75db
Compare
28e75db to
5d2dd97
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
I’m preparing the combined correction for the current published head, The remaining corrections cover pending PR-reader replacement and disconnect cleanup, retries for readers that missed unchanged data, inactive subscription settlement, cold archived group access, and presenting embedded history inside its prepared consuming frame. Those twelve correction files are still absent from the published head. Fresh review also found that a changed session or reader grant during CI-details loading lost the intended “reopen CI details” message. Strengthening the existing registered-handler matrix reproduced eight failures on the original code; both complete handler/access files pass all 77 cases with the correction. Independent review of the updated combined candidate is running. Nothing has been pushed from this maintainer preparation yet. The current-head CI diagnostics are preserved. The temporary disposal tracing will be removed to resolve its typed-lint failure, while retaining the 50 ms assertion and the canonical terminal-publication/readback path. The observed disposal delay and successful-but-empty task page remain under investigation; prior passing replays are not being called fixes. Full native gates remain pending. Please coordinate additional branch pushes with this landing effort. I’ll verify the current remote head again immediately before publication and reconcile any author update rather than overwrite it. |
91c03f5 to
c91082b
Compare
c91082b to
b2290d2
Compare
Authorize group defaults from committed sharing metadata and physical-store membership without warming archived rows. Preserve zero-argument publication while preparing exact event rows and ancestors. Co-authored-by: galiniliev <[email protected]>
Retain the canonical resume-fixture settlement owner to resolve the current-main conflict. Incorporate main's existing failover-test line-cap repair without duplicating it or weakening coverage. Preserve the reviewed session-read corrections and contributor ancestry. Co-authored-by: galiniliev <[email protected]>
Retain cancellation-aware maintenance startup while also surfacing deferred startup failure from main. Preserve both lifetime checks and all assertions. CI supplies the remaining verification per the author's instruction. Co-authored-by: galiniliev <[email protected]>
Repair the stale type-only import reported by the CI build, production/test typechecks, lint preparation and extension boundary jobs. Runtime update behavior is unchanged. Co-authored-by: galiniliev <[email protected]>
|
Merged via squash.
|
* commit 'ef2dd3235123371860c9154da7b47b2c1e940788': (41 commits) fix(ci): prevent Security Review checkout retry collisions (#157652) fix(ci): recover interrupted Security Review response bodies (#157651) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131) refactor(msteams): share stored service URL validation (#157706) fix(codex): honor configured tool PATH in native commands (#157290) refactor(msteams): share approval kind labels (#157705) fix(sessions): keep session results current during cold reads (#156121) fix(testing): capture bounded upgrade integrity diagnostics (#157535) refactor(i18n): reuse native branch candidate extraction (#157636) fix(update): preserve recovery files after ownership refusal (#148890) fix(test): prevent late announcements from contaminating registry tests (#157681) fix(e2e): scan full onboarding logs for prompts (#157624) refactor(session-tools): derive contracts from schemas (#156365) refactor(channels): derive config contracts from schemas (#156367) perf(test): reuse MCP archives and batch worker fixture copies (#157689) refactor: reuse prepared fixtures in slow core tests (#157685) refactor(codex): reuse marketplace reference selection (#157621) chore(ui): refresh control ui locales (#157710) ...
Retain the keys owned by each pending replacement so disconnect and supersession retire abandoned cache interest immediately. Install successor interest before retiring the previous generation, and release completed generation tokens. Preserve per-viewer delivery and forced-refresh generations. Follow-up to #156121. Original production fails the disconnect and other-session controls; same-session reuse passes. All 57 owner and sibling cases, targeted typed lint, formatting, and independent review pass.
* commit '229ab8a1fe957d3d4822309a39ddf9c7ec616395': (25 commits) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131) refactor(msteams): share stored service URL validation (#157706) fix(codex): honor configured tool PATH in native commands (#157290) refactor(msteams): share approval kind labels (#157705) fix(sessions): keep session results current during cold reads (#156121) fix(testing): capture bounded upgrade integrity diagnostics (#157535) refactor(i18n): reuse native branch candidate extraction (#157636) fix(update): preserve recovery files after ownership refusal (#148890) fix(test): prevent late announcements from contaminating registry tests (#157681) fix(e2e): scan full onboarding logs for prompts (#157624) refactor(session-tools): derive contracts from schemas (#156365) refactor(channels): derive config contracts from schemas (#156367) perf(test): reuse MCP archives and batch worker fixture copies (#157689) refactor: reuse prepared fixtures in slow core tests (#157685) refactor(codex): reuse marketplace reference selection (#157621) chore(ui): refresh control ui locales (#157710) docs(gateway): show how we build OpenClaw on Team (#157675) refactor: verify IRC surrogate chunking over loopback (#157580) ...
* fix(ui): keep Stop available while drafts cannot send * chore: integrate main fixes for Stop UI validation * commit 'ef2dd3235123371860c9154da7b47b2c1e940788': (41 commits) fix(ci): prevent Security Review checkout retry collisions (#157652) fix(ci): recover interrupted Security Review response bodies (#157651) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131) refactor(msteams): share stored service URL validation (#157706) fix(codex): honor configured tool PATH in native commands (#157290) refactor(msteams): share approval kind labels (#157705) fix(sessions): keep session results current during cold reads (#156121) fix(testing): capture bounded upgrade integrity diagnostics (#157535) refactor(i18n): reuse native branch candidate extraction (#157636) fix(update): preserve recovery files after ownership refusal (#148890) fix(test): prevent late announcements from contaminating registry tests (#157681) fix(e2e): scan full onboarding logs for prompts (#157624) refactor(session-tools): derive contracts from schemas (#156365) refactor(channels): derive config contracts from schemas (#156367) perf(test): reuse MCP archives and batch worker fixture copies (#157689) refactor: reuse prepared fixtures in slow core tests (#157685) refactor(codex): reuse marketplace reference selection (#157621) chore(ui): refresh control ui locales (#157710) ... Co-authored-by: Vincent Koc <[email protected]>
…aw#156121) * fix(sessions): prepare projection reads before consumption Co-authored-by: galiniliev <[email protected]> * fix(sessions): close prepared read authorization gaps Co-authored-by: galiniliev <[email protected]> * fix(sessions): bind prepared PR reads to selection Co-authored-by: galiniliev <[email protected]> * fix(sessions): fence PR updates to current viewers Recheck watcher membership after prepared reads, validate each recipient against its own target, and keep one revoked viewer from blocking other recipients. Exercise the four publication races and migrate archived test reads to explicit preparation. Co-authored-by: galiniliev <[email protected]> * fix(sessions): keep shared PR fetches reader-bound Authorize shared pull-request fetches through any surviving prepared viewer, retain per-recipient publication guards, and update the current-main placement fixture contract. Co-authored-by: galiniliev <[email protected]> * test: await subagent and model catalog completion Replace polling deadlines with owned completion joins and real FIFO or snapshot event signals. Preserve durable state, delivery, transcript, queue-depth, and model-scope assertions without widening timeouts. Co-authored-by: galiniliev <[email protected]> * test(gateway): await resumed subagent completion Join the actual announcement and its owned root work before asserting resumed task completion. Preserve authorization, input custody, exact delivery counts, and cancellation-aware cleanup without extending polling deadlines. Co-authored-by: galiniliev <[email protected]> * fix(sessions): refresh retained worker schema admission Await the existing coalesced schema-probe boundary before the next retained worker read. Preserve the synchronous scope API and keep the native connection while rejecting foreign unsupported schemas. Add deterministic registered-handler coverage and update the sibling scope fixture. Co-authored-by: galiniliev <[email protected]> * fix(gateway): reuse owned placement facts during materialization Adopt a still-current completed read snapshot when its exact row becomes resident. Keep the existing batch lifetime, invalidation fences, and capacity limits. Cover valid reuse and invalidation before registration without weakening the registered burst assertions. Co-authored-by: galiniliev <[email protected]> * test(gateway): retain relay database cleanup in the host process Route the real native-database relay fixture through the existing gateway database-worker fork owner. Preserve the fixture and production host-broker guard instead of running native retirement inside a Vitest thread. Co-authored-by: galiniliev <[email protected]> * fix(sessions): follow per-read schema admission Retire the branch-only probe-turn import, wrapper, worker wait, and mock after upstream ef700b5 removed turn-coalesced schema freshness. Keep the registered worker regression on a real retained connection and require foreign changes to be observed without advancing a scheduled turn. Co-authored-by: galiniliev <[email protected]> * test(agents): observe foreign maintenance startup Await the foreign hook start signal while preserving its release gate. Keep caller-memory independence, task-list stability, call counts, and terminal-settlement assertions unchanged after async task admission. Co-authored-by: galiniliev <[email protected]> * fix(sessions): settle prepared read delivery lifetimes Track successful PR snapshot delivery per viewer and bind forced-refresh acknowledgments to the requesting generations joined by each shared load. Settle inactive admissions and retire disconnected replacement generations without reviving an earlier use of the same connection ID. Present embedded history metadata inside its prepared consuming frame and preserve the CI-details recovery response when a session or grant changes. Add deterministic lifecycle regressions and join setup hydration before asserting forced-refresh delivery. Co-authored-by: galiniliev <[email protected]> * fix(sessions): preserve cold group access and event publication Authorize group defaults from committed sharing metadata and physical-store membership without warming archived rows. Preserve zero-argument publication while preparing exact event rows and ancestors. Co-authored-by: galiniliev <[email protected]> * fix(update): import npm pack step results from their owner Repair the stale type-only import reported by the CI build, production/test typechecks, lint preparation and extension boundary jobs. Runtime update behavior is unchanged. Co-authored-by: galiniliev <[email protected]> --------- Co-authored-by: galiniliev <[email protected]>
…#157776) Retain the keys owned by each pending replacement so disconnect and supersession retire abandoned cache interest immediately. Install successor interest before retiring the previous generation, and release completed generation tokens. Preserve per-viewer delivery and forced-refresh generations. Follow-up to openclaw#156121. Original production fails the disconnect and other-session controls; same-session reuse passes. All 57 owner and sibling cases, targeted typed lint, formatting, and independent review pass.
* fix(ui): keep Stop available while drafts cannot send * chore: integrate main fixes for Stop UI validation * commit '5dae23c843013fce2e0bb80037d232bbabfc70e5': (41 commits) fix(ci): prevent Security Review checkout retry collisions (openclaw#157652) fix(ci): recover interrupted Security Review response bodies (openclaw#157651) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (openclaw#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (openclaw#139131) refactor(msteams): share stored service URL validation (openclaw#157706) fix(codex): honor configured tool PATH in native commands (openclaw#157290) refactor(msteams): share approval kind labels (openclaw#157705) fix(sessions): keep session results current during cold reads (openclaw#156121) fix(testing): capture bounded upgrade integrity diagnostics (openclaw#157535) refactor(i18n): reuse native branch candidate extraction (openclaw#157636) fix(update): preserve recovery files after ownership refusal (openclaw#148890) fix(test): prevent late announcements from contaminating registry tests (openclaw#157681) fix(e2e): scan full onboarding logs for prompts (openclaw#157624) refactor(session-tools): derive contracts from schemas (openclaw#156365) refactor(channels): derive config contracts from schemas (openclaw#156367) perf(test): reuse MCP archives and batch worker fixture copies (openclaw#157689) refactor: reuse prepared fixtures in slow core tests (openclaw#157685) refactor(codex): reuse marketplace reference selection (openclaw#157621) chore(ui): refresh control ui locales (openclaw#157710) ... Co-authored-by: Vincent Koc <[email protected]>
* refactor(ui): share slash-command failure results * Merge main to incorporate the upstream update type fix * commit '0484d7a3ecf52589b0d3d98741e58e5f6b5bf661': (68 commits) fix(subagents): stop completion transcript retry loops (#157571) perf(sessions): remove duplicate foreground history reference scans (#157572) improve(typesafe): defer startup work until the first decision (#157380) fix(update): restore npm-pack helper typechecking (#157659) fix(packaging): avoid heap exhaustion on large bundles (#157471) refactor(infra): share process error handler registries (#157632) chore(ui): refresh control ui locales (#157573) fix(gateway): release remote Skills subscriptions when shutdown drains (#157592) perf(plugins): reuse declared tool membership during resolution (#156205) fix(ui): pasted text previews fail before sending (#157390) fix(agents): wait for database resources during deletion (#157631) improve: move operator profile database reads off the Gateway thread (#155800) fix: explain rejected settings without losing edits (#157549) fix: keep Gateway responsive while recording trajectory events (#157598) fix(auth): show SIWC email and selected model account identity (#157629) docs: explain Codex app approval precedence (#155089) refactor(wizard): share select prompt requests (#157607) fix(ui): omit empty sections from conversation Markdown exports (#157590) fix(doctor): explain update lint supervisor refusals (#156547) fix(ui): GitHub folder links lose repository context (#157619) ... * Merge frozen main to include the question fixture authority fix * commit '229ab8a1fe957d3d4822309a39ddf9c7ec616395': (25 commits) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131) refactor(msteams): share stored service URL validation (#157706) fix(codex): honor configured tool PATH in native commands (#157290) refactor(msteams): share approval kind labels (#157705) fix(sessions): keep session results current during cold reads (#156121) fix(testing): capture bounded upgrade integrity diagnostics (#157535) refactor(i18n): reuse native branch candidate extraction (#157636) fix(update): preserve recovery files after ownership refusal (#148890) fix(test): prevent late announcements from contaminating registry tests (#157681) fix(e2e): scan full onboarding logs for prompts (#157624) refactor(session-tools): derive contracts from schemas (#156365) refactor(channels): derive config contracts from schemas (#156367) perf(test): reuse MCP archives and batch worker fixture copies (#157689) refactor: reuse prepared fixtures in slow core tests (#157685) refactor(codex): reuse marketplace reference selection (#157621) chore(ui): refresh control ui locales (#157710) docs(gateway): show how we build OpenClaw on Team (#157675) refactor: verify IRC surrogate chunking over loopback (#157580) ... * chore: merge frozen main prerequisite repairs Co-authored-by: Vincent Koc <[email protected]>
* refactor(ui): share slash-command failure results * Merge main to incorporate the upstream update type fix * commit 'dda1f68bfa102cb804392c0e7cc22c0566a0944a': (68 commits) fix(subagents): stop completion transcript retry loops (openclaw#157571) perf(sessions): remove duplicate foreground history reference scans (openclaw#157572) improve(typesafe): defer startup work until the first decision (openclaw#157380) fix(update): restore npm-pack helper typechecking (openclaw#157659) fix(packaging): avoid heap exhaustion on large bundles (openclaw#157471) refactor(infra): share process error handler registries (openclaw#157632) chore(ui): refresh control ui locales (openclaw#157573) fix(gateway): release remote Skills subscriptions when shutdown drains (openclaw#157592) perf(plugins): reuse declared tool membership during resolution (openclaw#156205) fix(ui): pasted text previews fail before sending (openclaw#157390) fix(agents): wait for database resources during deletion (openclaw#157631) improve: move operator profile database reads off the Gateway thread (openclaw#155800) fix: explain rejected settings without losing edits (openclaw#157549) fix: keep Gateway responsive while recording trajectory events (openclaw#157598) fix(auth): show SIWC email and selected model account identity (openclaw#157629) docs: explain Codex app approval precedence (openclaw#155089) refactor(wizard): share select prompt requests (openclaw#157607) fix(ui): omit empty sections from conversation Markdown exports (openclaw#157590) fix(doctor): explain update lint supervisor refusals (openclaw#156547) fix(ui): GitHub folder links lose repository context (openclaw#157619) ... * Merge frozen main to include the question fixture authority fix * commit 'dc64cc3a3a3cf38fff1e44c1d7af42a32929d7e4': (25 commits) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (openclaw#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (openclaw#139131) refactor(msteams): share stored service URL validation (openclaw#157706) fix(codex): honor configured tool PATH in native commands (openclaw#157290) refactor(msteams): share approval kind labels (openclaw#157705) fix(sessions): keep session results current during cold reads (openclaw#156121) fix(testing): capture bounded upgrade integrity diagnostics (openclaw#157535) refactor(i18n): reuse native branch candidate extraction (openclaw#157636) fix(update): preserve recovery files after ownership refusal (openclaw#148890) fix(test): prevent late announcements from contaminating registry tests (openclaw#157681) fix(e2e): scan full onboarding logs for prompts (openclaw#157624) refactor(session-tools): derive contracts from schemas (openclaw#156365) refactor(channels): derive config contracts from schemas (openclaw#156367) perf(test): reuse MCP archives and batch worker fixture copies (openclaw#157689) refactor: reuse prepared fixtures in slow core tests (openclaw#157685) refactor(codex): reuse marketplace reference selection (openclaw#157621) chore(ui): refresh control ui locales (openclaw#157710) docs(gateway): show how we build OpenClaw on Team (openclaw#157675) refactor: verify IRC surrogate chunking over loopback (openclaw#157580) ... * chore: merge frozen main prerequisite repairs Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Fixes: cold, archived, or dirty session reads can synchronously hydrate projection rows on the Gateway thread while resolving sessions, searching transcripts, or publishing session events.
User Impact
User impact: session resolution, transcript search, embedded tools, Talk, TUI history reads, and Control UI pull-request reads prepare durable row facts in workers before synchronous authorization and presentation, preserving current session and viewer state at the response boundary.
No configuration, persistent schema, data-model migration, or user action is required.
Why This Change Was Made
Reported Gateway stalls and restarts in the TeamClaw ACA pilot motivated this work; this PR does not establish their production cause or claim a measured fix for them. Current
mainalready owns exact durable session and ACP metadata reads in workers; this change completes the caller cutover to those owners. It removes the remaining synchronous cold-archive materialization fallback, preserves physical store and lifecycle identity across awaits, and rechecks projection ownership, selected-row identity, and visibility before publishing results.Earlier review findings were addressed by keeping every
sessions.resolveresponse inside the prepared consumer scope and by restoring cold archived Control UI subscription/check-detail reads through worker-backed preparation. Subscription admission remains fast while GitHub hydration continues in the background, and queued/retired watcher work is fenced by its watch lifetime.Evidence
Merged — CI stabilized
Merged into main at 00:18:04 UTC on September 25, 2026 as
0bbad56fa809. The verified source correction was published as0ded27cc24742bebe6cc6f4d65ddc4aa0deeaea4, tree4d0fbd66bdbea187773f349db72f9ec7de96b2c8. Exact leased pushes and remote commit/tree readback preserved Galin's original ancestry and credit. The current-main conflict is resolved: the maintenance fixture retains both cancellation-aware startup and main's early deferred-failure propagation, without removing assertions or extending deadlines.Exact-head CI 36072333053 passed: 136 successful jobs, 20 skipped, no failed CI jobs. Both required
openclaw/ci-gateentries—CI and Security Review—were successful before the native guarded merge. The landed commit is verified on current main, with the requiredgalinilievco-author trailer.The preceding CI run exposed one stale
UpdateStepResultimport across five jobs. Importing directly from its currentupdate-step-result.tsowner fixed build, production/test types, lint preparation and extension boundary compilation without changing runtime update behavior. Existing evidence was reused; no additional standalone local proof campaign or paid runner was started. Historical local-suite failures below were not restamped as successful evidence.The native landing accepted its completed ClawSweeper receipt under the documented freshness policy with a stale-head warning; the newer receiver had finished but durable publication was pending. The old concrete findings were repaired and checked using the existing independent review/regressions and current CI, not represented as a freshly published bot approval. GitHub denied deletion of the contributor's branch during closeout; that branch remains intact.
The five concrete review findings and subsequent group-access, refresh/admission and event-publication findings are repaired. Existing evidence includes 292 passing scoped correction cases, 16 prior integration cases, and clean independent review of the prior complete candidate through P2. Native full build and full check also passed on
63d256edce5. Those results keep their original revision scope. The prior local full-suite run failed on this credentialed host, with explicit secret-egress refusals to local fixtures, unclassified assertion failures, and an unreleased resource claim; it is not counted as passing proof. Its retained fixture state was not erased or given a manufactured completion receipt.The registered-handler/real-SQLite cold-read comparison completed on baseline
64b7465versus corrected6d5965c. All 2,564 response/cold-state/materialization checks passed. It shows a responsiveness/latency tradeoff, not universal acceleration: at concurrency 1, median maximum timer delay fell 31.08→2.41 ms while response p95 rose 0.72→3.03 ms; at concurrency 16, delay fell 30.59→5.01 ms while p95 rose 7.95→11.37 ms. These are projection-cold, process/SQLite-cache-warm measurements on a shared host, not WebSocket/authentication, cold-disk or pilot-traffic proof. First-request lazy-load costs remain large in both arms. The unsupported blanket stall-reduction claim is withdrawn.The stored-data classifier does not apply: this changes in-memory preparation/delivery through existing read-only row-facts workers, not schemas, stored formats, migrations, retention or permission contracts. “Backfill” here is bounded read-only enrichment of resident display rows. Retained-reader schema-freshness cases are not migration proof.
The following records retain their named historical revision scopes and do not replace current-head CI.
Historical rebased head: 58e64e5
Rebased onto main at
64b746503109f6b73121db84769ff7177fe858d1at the author's request. The published head is58e64e5e303e8d6dd6fd998083cb932a42b0c8ad, tree42f3ac32c3e33d03e1076441270be57205eea9e4. A final integration check against then-current main02ad6b76b1a2ee2b414b170072e6e3e606fda3d4was clean, and GitHub reports MERGEABLE. Publication used an exact old-head force-with-lease guard; contributor authorship and credit are preserved.Conflict resolution retains both main's captured read-source contract and this PR's prepared membership reads, along with the archived-row and placement regressions. Already-landed canonical fixes were kept from main. Reverted diagnostic commits were omitted only after their combined source effect was verified empty; no probes were reintroduced.
Main includes the reviewed compaction-test stabilization in #157036: it asserts terminal publication before disposal rather than timing SQLite-worker settlement against 50 ms. The resource lifetime and expired-write checks remain. This rebase adopts that upstream, regression-tested contract; it does not claim a production latency improvement. The earlier config-include timeout remains recorded as historical evidence, not a demonstrated repair or a failure of this new head.
Formatting and diff sanity passed. Independent integration review reported one pre-existing P2: retrying delivery to a still-authorized recipient after transient selection invalidation when the shared snapshot is unchanged. The subscription-owner file is byte-identical to the prior published head, and this correction remains in the separate maintainer preparation described in coordination. This is not a clean-review or merge-ready claim.
Exact-head CI 36022284240 passed: 137 successful jobs, 19 skipped, none failed or pending. Both required
openclaw/ci-gatepresentations are successful for this head: the CI aggregate check and the Security Review commit status. GitHub reports CLEAN / MERGEABLE.Direct logs confirm all eight compaction-resource cases passed with main’s ordering proof. The previously timed-out config-include reload case passed in 1,074 ms, and the authenticated task-page case passed in 6,850 ms. These are complete case durations, not disposal latency measurements. The config timeout’s earlier cause remains unproven; a passing replay is not a causal repair claim.
The requested rebase/push/current-CI outcome is complete. Earlier A/B and diagnostic results below retain their original revision scope, and the separately documented pre-existing review finding remains. The PR is still open and unmerged; auto-merge is off.
Schema-owner cutover: 280bade05be
Main's per-read freshness repair,
57f912b5f70, deliberately retired turn-coalesced schema probes andwaitForSqliteSchemaProbeTurn. This branch still carried its earlier workaround caller, which broke the merged CI checkout42b7ca355431d6ed808891bc68b00f82c4d8950e. The repair follows the new owner: removes the obsolete import, wrapper, worker wait, and mock rather than restoring the retired API. Those three production/mock files now match main. The three real-SQLite registered-worker cases remain, verifying newer-schema rejection, missing-table rejection, and ordinary-commit success on one retained reader without advancingsetImmediate.Rebased onto
d9d8f0829d87bcedd2b3ab6735334289c83defb0for this material integration break and two actual conflicts. Main's complete compaction/maintenance implementations were retained; superseded Workshop, compaction-fixture, and lint commits were dropped. Range-diff confirmed the original five feature patches and the placement/relay repairs were preserved. The cutover review is scoped clean through P2; source references to the retired helper are gone. Current tree:3fd46022ce9b0f9a746f52c45b7ff3968ce92927. A merge check againstf626e618a764b3d1f2dd90a115ee7b9f5c4843c1was clean.Hosted CI on that head passed build/type/lint gates and completed with three failed test jobs: accepted-maintenance startup, foreign-maintenance startup, and the 50 ms disposal budget. The next changes and remaining investigation are described above. No merge or auto-merge has been requested.
Placement repair evidence: 5629dc2c421
e597325322e121a3ff25e9a90f628a9ce6ac576, without changing lint limits. That upstream change has its own review and hosted-CI evidence.Corrected integration proof used the actual hosted merge
e13d42b0e4f8368ea0aa7498e2925eb5953c12b3(main0bdab89c2015567b7316b4f5526ff16cb9e5cd80plus the prior PR head). The tested placement/relay branch tree was63d88466752df5c3f188a72510e4d51a3719895b; its merge-context tree was39b59fb0194bd8d3f6161bbf67a99379c027d476. The original burst failure did not recur naturally in that baseline; the deterministic control establishes the defective handoff. Earlier broad replay failures from temporary-directory permissions and incorrect source context were corrected, not treated as green runs.Remaining validation is explicit: the full changed check reached two pre-existing core line-cap failures, after its format/type/boundary/dead-export stages passed. The six-file candidate now includes their already-merged upstream repair, but the final owner-test/check/build attempt never started because two isolated hosts could not establish SSH. Both hosts were released. The then-published tree was
defab48463ad6e228da495efe8edfc0bc729cf14; it is not the earlier tested whole tree. Required validation is continuing in this PR's supported GitHub-hosted CI route. CI on that head exposed the removed schema-helper import in its merged checkout. Its build and declaration preparation failed; the current cutover above supersedes it. The PR remains unmerged.Feature and review-boundary evidence
Review follow-up: 91c03f5799c
The follow-up rechecks watched-cell and connection liveness after preparation, validates each recipient's own prepared target, and lets other authorized viewers receive updates when one recipient loses authority. Existing archived-row tests now prepare rows explicitly without weakening their assertions.
pnpm test src/gateway/control-ui-session-pr-subscriptions.lifetimes.test.ts --maxWorkers=1took 21.61 s wall on Node 24.19.0 / pnpm 12.4.0, secretless AWS Crabbox. Fresh CI timing is pending.This is functional RPC/owner-boundary proof, not a Gateway latency or throughput benchmark. GitHub responses and sockets are controlled fixtures; session storage and worker preparation are real isolated owners.
Earlier verification
mainat1841ec8b2d37afd80053cf466597641bac78b08f.node scripts/check-changed.mjs -- <37 changed files>gate passed through formatting, production/test typechecks, lint, dead exports, dependency, database, import-cycle, schema, and boundary guards. After the final selected-row review repair, formatter, core typecheck, core-test typecheck, and changed-file lint passed again.1841ec8b2d37afd80053cf466597641bac78b08f— scoped clean at P1 after resolving its selected-row finding.pnpm test <file> --maxWorkers=1):src/agents/tools/embedded-gateway-stub.test.ts: 3.32 ssrc/gateway/control-ui-session-pr-access.test.ts: 34.59 ssrc/gateway/server-methods/control-ui.test.ts: 10.20 ssrc/gateway/server-methods/sessions-search-scope.test.ts: 39.05 ssrc/gateway/server-runtime-subscriptions.test.ts: 13.16 ssrc/gateway/session-row-projection.archived.test.ts: 19.28 ssrc/gateway/sessions-resolve-projection.test.ts: 18.31 ssrc/gateway/sessions-resolve.resident.test.ts: 26.46 ssrc/gateway/talk/handlers/index.test.ts: 12.64 ssrc/tui/embedded-backend.test.ts: 14.29 sThe search and Control UI access suites exceed 30 seconds because their existing owner-boundary fixtures exercise real worker-backed reads, multi-store authorization, archive preparation, and post-await revocation. Cheaper isolated tests would not prove those cross-store and handler-boundary contracts.
Earlier CI repair and rebase evidence
These are historical results for the named revisions, not current-head gate claims.
Conflict resolution: db32d566297
Main subsequently landed its own compaction fixture correction. The new conflict was resolved by retaining that entire upstream file, byte-identical to main at
0bdab89c2015567b7316b4f5526ff16cb9e5cd80, including terminal-task publication coverage fromc947420a323and the event-driven disposal wait from #156850. The production maintenance owners are unchanged since this branch's base, and the observer APIs already exist here. The upstream PR records its own negative control, ten stress passes, changed checks, and scoped review; those are upstream evidence, not additional runs performed in this work session.This is a narrow fast-forward alignment, not a rebase of unrelated main changes. The resulting merge check against that main revision is clean. The earlier compaction repair also passed all eight cases in hosted CI (7.677 s summed case time; group 526.28 s), but its isolated tree below is historical—not the current tree. Hosted CI on
db32d566297435807bbdb0846257c344d53ccae3completed with only the duplicate-placement-read test failing, plus its aggregate gate; the repair is described above. The PR remains unmerged.Earlier compaction fixture synchronization: 505143e4382
Deferred maintenance must settle its canonical task through the worker before disposing the engine. The existing owner test explicitly permits disposal to wait behind an 11-second held settlement; the fixture's separate one-second progress stopwatch was not a compaction SLA. The correction awaits the actual lifecycle signals under the unchanged 120-second case cancellation deadline. The production
compaction.timeoutSeconds: 1watchdog, all eight scenarios, every resource/write-authority/transcript/state assertion, and exactly-once cleanup checks remain intact. No production code changed.Before/after proof, then-published tree
1b10047e4e7a691be023facef74922e5fac63a05:The exact CI time split between worker startup, queueing, settlement, and readback is not known; the evidence establishes the ordering contract and reproduced fixture failure, not a measured SQLite-latency claim. The script passed, artifact-transfer failure was recovered with native copy, and the owned AWS lease was released. The publication was a fast-forward; a merge check against main at
af585c7490bd32741c9b66a3246cb36fba2dfa19was clean. That head was superseded by the upstream fixture alignment below. At the conflict checkpoint its CI had 132 successful jobs, 17 skipped, one still running, and no failures. The PR remains unmerged.Worker admission and Workshop repairs: 290a81123ee
Isolated causal and integration proof on the exact published tree
ede7299c8bfa873e9f7b2ff0b98e37f9b4e0db74, Node 24.19.0, pnpm 12.4.2:The Workshop failure reproduced in both original-file and original-group runs with the same overflow/lease-loss signature. The natural schema replay passed, so its causal proof is the deterministic held-probe registered-handler control, paired with the unchanged real-worker tests. The new regression reuses the real SQLite reader and verifies a healthy ordinary-commit sibling rather than forcing a cold connection. Static independent review was clean through P2.
The test script passed; its subsequent automatic artifact-download error was recovered through native copy. All 43 artifacts were verified and the owned AWS lease was released. The fixes were pushed as a fast-forward, and a merge check against main at
764c9331a31b4b87bdc06b95f39c6870c5aca2f3was clean. Hosted CI on290a81123eed5798543f5109f66f344ef32b27dacompleted with only the two deferred-compaction fixture cases below failing; the schema and Workshop repairs were retained. The PR remains unmerged.Earlier resume CI repair: 85df05847f7
The remaining hosted-CI failure waited only for a polling deadline rather than the resumed child's actual announcement. The real Gateway integration test now awaits cancellation-aware start/announcement signals and drains the existing owned completion work before asserting. Explicit and automatic resume, authorization, input custody, exact call counts, and durable task success remain covered. No production behavior, test timeout, or expected outcome was weakened.
The branch was verified on main at
9505f6eeab162026b1b5c14ef78fe7889549be8f. Main then landed the equivalent steer/restart cleanup fix in1f067fa03de, producing one more real conflict. The final rebase onto096f14563272950e3c54fc0dc9554e7529d7b222retains the upstream registry, timing, and steer/restart fixtures in full. The resume and model-snapshot test files remain byte-identical to the verified candidate; only the superseded local steer/restart patch was dropped.8d5bdc3291f88c29df861a04fee887de4348ba17passed 20 standalone file runs (six tests each) and three original-group replays (79 files / 1,125 tests each, no skips).85df05847f77b7f678c8908f8d583898e2225effpassed the resume repair and exposed the two admission/clock failures addressed above. This candidate is superseded; the PR has not been merged.Earlier CI test repair and follow-up rebase: b2290d2216c
The failed CI assertions timed out while polling for worker-backed completion or the initial saved-session model snapshot. The registry tests now join owned completion work, and the catalog test awaits its actual publication event. All existing state, delivery, transcript, account, and model-scope assertions remain; no test was skipped and no timeout was widened.
During verification, main independently gained the FIFO timing-test correction in caa1422. The resulting conflict was resolved by retaining main's entire implementation, including its cancellation-aware waits, and rebasing onto main at ee55812. The other five PR commits are patch-identical across that rebase; the CI repair retains three test-file changes.
3d0f621a2622d37ead36f2a9a5b60aa462cf9756; the final rebase removed the superseded timing-test patch. Hosted CI onb2290d2216ce9e5dac5e4a9eeda717983ad5a81fpassed the earlier repaired tests, but exposed one additional resume-announcement polling failure; the newer repair below supersedes that candidate.Measured standalone command walls on the isolated AWS host (Node 24.19.0, pnpm 12.4.0, one worker): registry 38.20–40.92 s, steer/restart 35.01–35.54 s, timing 30.36–36.99 s, and catalog publication 35.61–36.21 s. These are whole-file command costs including worker preparation, not a claimed speedup; the existing real registry/SQLite and Gateway publication fixtures are retained. Hosted CI timing will be recorded with the exact-head outcome.
Conflict-resolving rebase: c91082b6a12
Rebased the PR's four published commits onto main at
fc1d9ce863718d206c0c6073b6a16ee6d558eb53. The conflicts were with main's newer activity-summary publication fix. The resolution keeps main's store-aware exact-row/ancestor publisher and its stronger extracted tests, removes the PR's superseded duplicate helper, and retains the PR's lifecycle fixture update.During rebase review, a shared-fetch lifetime regression was found and repaired: a departing viewer can no longer invalidate work still authorized by another prepared viewer, while all-viewer revocation still fails closed. The current-main
SessionRowReadViewfixture contract was updated at the same time.007f3a97b58977a59e798a9281452d27276e32eb. Tests used Node 24.19.0 / pnpm 12.4.0; changed checks completed with 0 lint warnings/errors and all typecheck/dead-export/database/import guards passing.f649fdf3381d12eed4a295da78ceb9bfe012a4d0was conflict-free; GitHub now reports this PR MERGEABLE. Fresh exact-head CI is queued.