Skip to content

fix(sessions): keep session results current during cold reads - #156121

Merged
roboclaw-bot merged 17 commits into
openclaw:mainfrom
galiniliev:galiniliev/teamclaw-pr-session-reads
Sep 25, 2026
Merged

roboclaw-bot merged 17 commits into
openclaw:mainfrom
galiniliev:galiniliev/teamclaw-pr-session-reads

Conversation

@galiniliev

@galiniliev galiniliev commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

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 main already 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.resolve response 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 as 0ded27cc24742bebe6cc6f4d65ddc4aa0deeaea4, tree 4d0fbd66bdbea187773f349db72f9ec7de96b2c8. 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-gate entries—CI and Security Review—were successful before the native guarded merge. The landed commit is verified on current main, with the required galiniliev co-author trailer.

The preceding CI run exposed one stale UpdateStepResult import across five jobs. Importing directly from its current update-step-result.ts owner 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 64b7465 versus corrected 6d5965c. 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 64b746503109f6b73121db84769ff7177fe858d1 at the author's request. The published head is 58e64e5e303e8d6dd6fd998083cb932a42b0c8ad, tree 42f3ac32c3e33d03e1076441270be57205eea9e4. A final integration check against then-current main 02ad6b76b1a2ee2b414b170072e6e3e606fda3d4 was 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-gate presentations 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 and waitForSqliteSchemaProbeTurn. This branch still carried its earlier workaround caller, which broke the merged CI checkout 42b7ca355431d6ed808891bc68b00f82c4d8950e. 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 advancing setImmediate.

Rebased onto d9d8f0829d87bcedd2b3ab6735334289c83defb0 for 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 against f626e618a764b3d1f2dd90a115ee7b9f5c4843c1 was 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

  • Placement ownership: a resident row now adopts still-current facts from its existing retained exact-read batch instead of triggering a duplicate placement read during materialization. Batch limits, invalidation/forget/disposal fences, and private-row lifetimes are unchanged. The original 160-read assertion remains strict.
  • Relay fixture: native database cleanup now runs under the existing fork-based Gateway database-worker test owner. The complete 143-test file remains covered; no assertions or production broker guards were removed.
  • Baseline lint: incorporates the canonical cleanup from #156809, commit e597325322e121a3ff25e9a90f628a9ce6ac576, without changing lint limits. That upstream change has its own review and hosted-CI evidence.
Completed verification Observed result
Deterministic old-code control Two placement dispatches instead of one; one failed / four passed. Invalidated-before-registration sibling passed.
Corrected owner + registered RPC + relay selection 158 tests passed across three files.
Original registered burst file 20 fresh-process passes, 10 tests each; 28.07–34.54 s per file.
Exact CI-merge group, with relay under its proper owner Three passes: 3,889 group tests plus all 143 relay tests each; two existing skips. Group walls 548.99–551.92 s; relay walls 109.04–109.66 s.
Independent six-file source review Scoped clean through P2.

Corrected integration proof used the actual hosted merge e13d42b0e4f8368ea0aa7498e2925eb5953c12b3 (main 0bdab89c2015567b7316b4f5526ff16cb9e5cd80 plus the prior PR head). The tested placement/relay branch tree was 63d88466752df5c3f188a72510e4d51a3719895b; its merge-context tree was 39b59fb0194bd8d3f6161bbf67a99379c027d476. 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.

  • Functional A/B: 3 original review regressions fail before and pass after; 4 additional recipient-lifetime cases fail on the prior head and pass with this fix. Combined Crabbox evidence.
  • 236 scoped tests passed across 13 files. After extracting the race cases into a sibling file to satisfy the line cap, 4/4 race cases and 67 sibling tests passed. Final-layout evidence.
  • The full four-path changed check passed: formatting, core typechecking, 25 test-typecheck shards, lint (0 warnings/errors), dead exports, and remaining guards. Successful final verification. The preceding comparison runs include resolved line-cap or control-interruption failures; their test results are evidence, not successful whole-run gate claims.
  • Independent follow-up review: scoped clean through P2. Exact tested patch SHA-256: 129dc03124e7a4dc9eba01d1186ba2404e52a68ea2d941cb501a71538e0c92fe.
  • New lifetime test file: pnpm test src/gateway/control-ui-session-pr-subscriptions.lifetimes.test.ts --maxWorkers=1 took 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

  • Rebased onto main at 1841ec8b2d37afd80053cf466597641bac78b08f.
  • Full rebased 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.
  • Post-rebase projection + finding integration suite: 203 tests passed across 9 files. After the final selected-row repair, the finding-owner suite passed 135 tests across 4 files, including the registered handler regression that changes selection while the old row remains current.
  • Cold archive owner suite: 8 tests passed after migrating direct snapshots to the prepared-row contract.
  • Autoreview against exact rebased base 1841ec8b2d37afd80053cf466597641bac78b08f — scoped clean at P1 after resolving its selected-row finding.
  • Single-worker wall times (pnpm test <file> --maxWorkers=1):
    • src/agents/tools/embedded-gateway-stub.test.ts: 3.32 s
    • src/gateway/control-ui-session-pr-access.test.ts: 34.59 s
    • src/gateway/server-methods/control-ui.test.ts: 10.20 s
    • src/gateway/server-methods/sessions-search-scope.test.ts: 39.05 s
    • src/gateway/server-runtime-subscriptions.test.ts: 13.16 s
    • src/gateway/session-row-projection.archived.test.ts: 19.28 s
    • src/gateway/sessions-resolve-projection.test.ts: 18.31 s
    • src/gateway/sessions-resolve.resident.test.ts: 26.46 s
    • src/gateway/talk/handlers/index.test.ts: 12.64 s
    • src/tui/embedded-backend.test.ts: 14.29 s

The 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 from c947420a323 and 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 db32d566297435807bbdb0846257c344d53ccae3 completed 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: 1 watchdog, 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:

  • Original group reproduced both deferred-factory failures; original standalone reproduced one. Both reported the same disposal-start stopwatch error as hosted CI.
  • Corrected whole file: 20/20 passes, eight variants each. Original 64-file group: three passes, 1,676 tests passed / 14 existing skips each. Changed-file checks passed in 310.60 s, including typecheck, dead-export scans, and lint. Focused independent review was clean through P2.
  • Whole-file cost: cold process 120.02 s / 6,222,168 KB maximum RSS; its runner reported 83% transform time, including 48.606 s preparing compiled worker artifacts. Subsequent processes were 30.47–36.17 s, median 32.44 s, with peak 1,231,792 KB RSS. Original standalone was 47.97 s; no performance speedup is claimed. Group walls were 791.25 / 791.18 / 789.51 s.

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 af585c7490bd32741c9b66a3246cb36fba2dfa19 was 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

  • Retained worker schema admission: session-history requests now await the existing schema-facts owner's pending probe before reusing a read scope. This fixes the fast-request race that could accept a foreign newer schema. The synchronous scope API, one retained reader, per-turn probe bound, and original rejection assertions are preserved; no new SQL, cache, schema, or permission policy was added.
  • Workshop fixture: removed an obsolete Date-only mock. It put the caller and lease worker on different clocks, creating a timeout above Node's 32-bit limit that was clamped to 1 ms. Proposal status, file-safety, and invalid-transition assertions remain unchanged.

Isolated causal and integration proof on the exact published tree ede7299c8bfa873e9f7b2ff0b98e37f9b4e0db74, Node 24.19.0, pnpm 12.4.2:

Verification Result Command wall
New registered-handler regression on old production Expected red: stale successful listing; one failed, two passed—not a missing-method/setup failure 40.67 s
Fixed regression and reader/error-transfer siblings Six files, 101 tests passed 67.40 s
Original combined-store worker file 20/20 runs passed, nine tests each 493.92 s total
Original config group Three passes, 227 files / 3,197 tests each 614.66 / 613.92 / 611.36 s
Workshop file and original group 50 file tests passed; group 1,904 passed / one existing skip 56.08 / 1,000.28 s
Full five-path changed checks Passed, including typechecks, formatting, lint, dead-code scans, and guards 861.23 s

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 764c9331a31b4b87bdc06b95f39c6870c5aca2f3 was clean. Hosted CI on 290a81123eed5798543f5109f66f344ef32b27da completed 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 in 1f067fa03de, producing one more real conflict. The final rebase onto 096f14563272950e3c54fc0dc9554e7529d7b222 retains 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.

  • The pre-final-rebase candidate tree 8d5bdc3291f88c29df861a04fee887de4348ba17 passed 20 standalone file runs (six tests each) and three original-group replays (79 files / 1,125 tests each, no skips).
  • Full rebased-PR changed checks passed in 822.40 s, including core and all 25 core-test typecheck shards, formatting, lint, dead-code scans, and repository guards. Focused independent review was clean through P2.
  • Resume proof run: the script passed; its later artifact-download error was recovered through native copy, and the owned AWS lease was released.
  • The original announce failure did not reproduce in the baseline replay. The baseline group instead encountered an unrelated port-binding fixture failure; its resume cases and the standalone file passed. This is repeatability and integration coverage, not a claimed causal before/after reproduction.
  • Standalone command wall: median 45.79 s, range 43.36–86.81 s, including the existing real Gateway/worker fixture setup. Group walls: 1,088.16 / 1,083.56 / 1,084.08 s.
  • Hosted CI on 85df05847f77b7f678c8908f8d583898e2225eff passed 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.

  • The original three failed groups passed once unchanged in isolation. This is contention evidence, not proof that the failures were fixed.
  • Repeatability proof completed 20 standalone passes per affected file (80 total) and three passes of each original failed group (nine total). The groups passed 3,064, 3,061, and 128 tests respectively, with their existing skips preserved.
  • Full changed-file checks passed in 284.71 s, including the selected typecheck graphs, dead-export scans, and lint with zero warnings/errors. Independent review was scoped clean through P2.
  • These results validate the pre-rebase candidate tree 3d0f621a2622d37ead36f2a9a5b60aa462cf9756; the final rebase removed the superseded timing-test patch. Hosted CI on b2290d2216ce9e5dac5e4a9eeda717983ad5a81f passed the earlier repaired tests, but exposed one additional resume-announcement polling failure; the newer repair below supersedes that candidate.
  • Recovered repeatability proof: the test script passed; Crabbox's later automatic-download error was recovered through its native copy operation. The owned AWS lease was released after artifact verification. An earlier proof-host temporary-filesystem exhaustion was resolved without changing product code.

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 SessionRowReadView fixture contract was updated at the same time.

  • Secretless AWS Crabbox: the focused pre-fix regression failed as expected (2 failed, 1 passed); the rebased candidate passed 295 tests across 12 files and the complete 39-path changed check. Rebase verification run.
  • Rebase integration review found one P2 shared-fetch issue; the narrow correction review is scoped clean through P2.
  • The tested corrected tree is 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.
  • Main advanced after the pinned run only in disjoint paths. A synthetic merge with f649fdf3381d12eed4a295da78ceb9bfe012a4d0 was conflict-free; GitHub now reports this PR MERGEABLE. Fresh exact-head CI is queued.

@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@galiniliev
galiniliev marked this pull request as ready for review September 23, 2026 02:50
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime agents Agent runtime and tooling size: L maintainer Maintainer-authored PR labels Sep 23, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 24, 2026, 6:43 PM ET / 22:43 UTC (Revision 18).

ClawSweeper review

What this changes

The 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
Reviewed head: 58e64e5e303e8d6dd6fd998083cb932a42b0c8ad
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The owner-level direction and comparative evidence are useful, but the published head still has five blocking lifecycle defects.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: The Repository State identifies a MEMBER-authored PR, so the external-contributor proof gate does not apply. The PR describes registered-handler and real-SQLite cold-read observations on an unpublished corrected candidate, not proof that the published head resolves its five findings; the diff changes no stored-data contract.
Patch quality 🦐 gold shrimp (3/6) 5 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The Repository State identifies a MEMBER-authored PR, so the external-contributor proof gate does not apply. The PR describes registered-handler and real-SQLite cold-read observations on an unpublished corrected candidate, not proof that the published head resolves its five findings; the diff changes no stored-data contract.
Evidence reviewed 10 items Current main still has the cold archive fallback: The current-main archive descriptor calls synchronous preparation when an archived row is not ready, so the PR's central caller cutover remains useful.
Published subscription defects: The inactive-connection return precedes the admission callback's try/finally, and disconnected connection IDs remain in the new generation map.
Published delivery defect: The shared snapshot hash is recorded before asynchronous recipient delivery; an invalidated recipient can miss the snapshot while subsequent unchanged polls suppress another send.
Findings 5 actionable findings [P2] Settle admission for an inactive connection
[P2] Retire disconnected connection generations
[P2] Present TUI history inside its prepared read
Security None None.

How this fits together

The 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]
Loading

Decision needed

Question Recommendation
After the correctness repairs reach this PR, is the measured cold-read response-latency increase acceptable in exchange for the lower Gateway timer delay? Accept the measured tradeoff: Keep the worker-backed design after exact-head correctness review and record the benchmark limits in the PR.

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

  • Settle admission for an inactive connection (P2) - The inactive-connection return runs before the try/finally that calls admit(). The registered subscribe handler awaits that callback, so this request can remain unanswered.
  • Retire disconnected connection generations (P2) - Each replacement or unsubscribe increments replacementGenerations, but disconnect does not remove its entry. A Gateway with many short-lived connections retains those IDs until the subscription owner stops.
  • Present TUI history inside its prepared read (P2) - The prepared consumer returns a row, then loadHistory presents it after that read lifetime has ended. Present and validate the selected row in the synchronous prepared consumer so a subsequent row change cannot attach stale session information.
  • Preserve the CI-details recovery message (P2) - A changed selection or reader grant now throws from binding.assertCurrent() before the existing 409 error is constructed. The generic error formatter replaces the useful instruction to reopen CI details.
  • Retry a snapshot no current viewer received (P2) - The shared hash is updated before asynchronous delivery. If every selected recipient loses its current selection before send, no one receives the snapshot, yet the next unchanged poll sees the same hash and never retries it for a still-authorized viewer.
  • Resolve merge risk (P1) - The corrected-candidate benchmark trades lower timer delay for higher response p95. Its measured cost has no recorded maintainer acceptance for the final published change or pilot workload.
  • Complete next step (P2) - Reconcile and publish the coordinated corrections, address GitHub's reported dirty merge state, then obtain an exact-head review of the five findings and record the bounded test-failure investigation.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.

Findings

  • [P2] Settle admission for an inactive connection — src/gateway/control-ui-session-pr-subscriptions.ts:536-537
  • [P2] Retire disconnected connection generations — src/gateway/control-ui-session-pr-subscriptions.ts:665-668
  • [P2] Present TUI history inside its prepared read — src/tui/embedded-backend.ts:584
Agent review details

Security

None.

PR surface

Source +382, Tests +784. Total +1166 across 44 files.

View PR surface stats
Area Files Added Removed Net
Source 19 712 330 +382
Tests 25 932 148 +784
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 44 1644 478 +1166

Review metrics

Metric Value Why it matters
Production and test lines production +712/-330; tests +932/-148 The cross-consumer cutover explains substantial production growth and merits exact-head review of each caller lifetime.
Cold-read comparison concurrency 16: timer delay 30.59→5.01 ms; response p95 7.95→11.37 ms The unpublished corrected candidate shows a responsiveness benefit with a measurable response cost.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/gateway/session-row-projection.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Publish the coordinated repair (recommended)
    Reconcile the unpublished fixes onto the PR and verify admission, delivery, CI details, and TUI history on the resulting head.
  2. Own the response-latency cost
    After the defects are fixed, explicitly accept the measured response cost and its workload limits.

Technical review

Best 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:

  • [P2] Settle admission for an inactive connection — src/gateway/control-ui-session-pr-subscriptions.ts:536-537
    The inactive-connection return runs before the try/finally that calls admit(). The registered subscribe handler awaits that callback, so this request can remain unanswered.
    Confidence: 0.98
  • [P2] Retire disconnected connection generations — src/gateway/control-ui-session-pr-subscriptions.ts:665-668
    Each replacement or unsubscribe increments replacementGenerations, but disconnect does not remove its entry. A Gateway with many short-lived connections retains those IDs until the subscription owner stops.
    Confidence: 0.96
  • [P2] Present TUI history inside its prepared read — src/tui/embedded-backend.ts:584
    The prepared consumer returns a row, then loadHistory presents it after that read lifetime has ended. Present and validate the selected row in the synchronous prepared consumer so a subsequent row change cannot attach stale session information.
    Confidence: 0.87
  • [P2] Preserve the CI-details recovery message — src/gateway/server-methods/control-ui.ts:448-449
    A changed selection or reader grant now throws from binding.assertCurrent() before the existing 409 error is constructed. The generic error formatter replaces the useful instruction to reopen CI details.
    Confidence: 0.93
  • [P2] Retry a snapshot no current viewer received — src/gateway/control-ui-session-pr-subscriptions.ts:367-375
    The shared hash is updated before asynchronous delivery. If every selected recipient loses its current selection before send, no one receives the snapshot, yet the next unchanged poll sees the same hash and never retries it for a still-authorized viewer.
    Confidence: 0.88

Overall correctness: patch is incorrect
Overall confidence: 0.88

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 1dc005c7cb34.

Labels

Label changes:

No label changes.

Label justifications:

  • P1: The change affects core session resolution and updates across active Gateway and client workflows.
  • merge-risk: 🚨 session-state: The published head can omit a current pull-request snapshot or present a TUI row after its prepared read lifetime.
  • merge-risk: 🚨 availability: The published head can leave a subscription RPC unanswered and retain disconnected connection generations.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The Repository State identifies a MEMBER-authored PR, so the external-contributor proof gate does not apply. The PR describes registered-handler and real-SQLite cold-read observations on an unpublished corrected candidate, not proof that the published head resolves its five findings; the diff changes no stored-data contract.

Evidence

What I checked:

  • Current main still has the cold archive fallback: The current-main archive descriptor calls synchronous preparation when an archived row is not ready, so the PR's central caller cutover remains useful. (src/gateway/session-row-projection-archive.ts:192, 1dc005c7cb34)
  • Published subscription defects: The inactive-connection return precedes the admission callback's try/finally, and disconnected connection IDs remain in the new generation map. (src/gateway/control-ui-session-pr-subscriptions.ts:536, 58e64e5e303e)
  • Published delivery defect: The shared snapshot hash is recorded before asynchronous recipient delivery; an invalidated recipient can miss the snapshot while subsequent unchanged polls suppress another send. (src/gateway/control-ui-session-pr-subscriptions.ts:371, 58e64e5e303e)
  • Prepared TUI row escapes its consumer: The embedded history path awaits a prepared description, then presents the returned record outside that prepared read. (src/tui/embedded-backend.ts:584, 58e64e5e303e)
  • CI-details recovery text is lost: The newly invoked binding assertion throws a generic error before the handler can issue its existing 'reopen CI details' response. (src/gateway/server-methods/control-ui.ts:449, 58e64e5e303e)
  • Prior review and coordinated correction: The supplied completed ClawSweeper review names the same five findings on this exact head. The PR body and coordination comment say the fixes are in unpublished candidate 63d256e; the remote head remains unchanged. The candidate's full test run had unclassified failures, which the discussion records without claiming a fix. (58e64e5e303e)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Shakker: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Publish and reconcile the coordinated correction, then review the registered subscription, CI-details, and TUI paths on that exact head.
  • Record the owner's decision on the measured timer-delay versus response-latency tradeoff.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (17 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-24T02:36:57.677Z sha 280bade05be1e037e73f3cbc5a35d8341372003e :: blocked before merge. :: [P2] Settle admission for an inactive connection | [P2] Retire disconnected connection generations | [P2] Present TUI history within the prepared consumer
  • reviewed 2026-09-24T03:14:08.737Z sha d4c53521a61a736c22ac81e1db227775f1a041f5 :: blocked before merge. :: [P2] Settle admission for an inactive connection | [P2] Retire disconnected connection generations | [P2] Present TUI history inside the prepared consumer
  • reviewed 2026-09-24T03:57:40.712Z sha 9c82128c1b06b95067edb1d2f8b217be933213a3 :: blocked before merge. :: [P2] Settle subscription admission for inactive connections | [P2] Retire disconnected connection-generation entries | [P2] Present TUI history inside the prepared consumer
  • reviewed 2026-09-24T05:09:18.505Z sha 90cf2f59ec046e45481f65827943f4c39ca14e46 :: blocked before merge. :: [P2] Settle subscription admission for inactive connections | [P2] Retire disconnected connection generations | [P2] Present TUI history inside the prepared consumer | [P2] Preserve the CI-details recovery message on revoked reads
  • reviewed 2026-09-24T05:23:24.876Z sha 95f311a46ca3d013222ce06b5cf314457f77f259 :: blocked before merge. :: [P2] Settle admission for inactive connections | [P2] Retire disconnected connection generations | [P2] Present TUI history inside the prepared consumer | [P2] Preserve the CI-details recovery message on revoked reads
  • reviewed 2026-09-24T05:53:27.151Z sha 95f311a46ca3d013222ce06b5cf314457f77f259 :: blocked before merge. :: [P2] Always settle admission when a connection becomes inactive | [P2] Retire disconnected connection-generation entries | [P2] Present TUI history inside the prepared consumer | [P2] Preserve the CI-details recovery message on revoked reads
  • reviewed 2026-09-24T15:54:56.435Z sha 58e64e5 :: blocked before merge. :: [P2] Settle admission when the connection is already inactive | [P2] Retire disconnected connection-generation entries | [P2] Present TUI history inside its prepared read | [P2] Preserve the CI-details recovery message on revoked reads | [P2] Retry a snapshot that no current viewer received
  • reviewed 2026-09-24T17:23:25.357Z sha 58e64e5 :: blocked before merge. :: [P2] Settle admission for an inactive connection | [P2] Retire disconnected connection generations | [P2] Present TUI history inside its prepared read | [P2] Preserve the CI-details recovery message | [P2] Retry a snapshot no current viewer received

@galiniliev galiniliev self-assigned this Sep 23, 2026
@galiniliev
galiniliev force-pushed the galiniliev/teamclaw-pr-session-reads branch from 28c5bda to 28e75db Compare September 23, 2026 04:40
@galiniliev
galiniliev force-pushed the galiniliev/teamclaw-pr-session-reads branch from 28e75db to 5d2dd97 Compare September 23, 2026 04:41
@galiniliev

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 23, 2026
@steipete

steipete commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

I’m preparing the combined correction for the current published head, d4c53521, while preserving Galin’s rebased work, ancestry, assignment, and credit. The new placement reuse, relay test routing, per-read schema admission, and maintenance-start synchronization stay intact. The older schema-probe wait will not be restored.

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.

@roboclaw-bot
roboclaw-bot force-pushed the galiniliev/teamclaw-pr-session-reads branch from 91c03f5 to c91082b Compare September 23, 2026 17:04
@clawsweeper clawsweeper Bot added merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. and removed merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels Sep 23, 2026
@roboclaw-bot
roboclaw-bot force-pushed the galiniliev/teamclaw-pr-session-reads branch from c91082b to b2290d2 Compare September 23, 2026 19:05
roboclaw-bot and others added 2 commits September 24, 2026 19:22
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]>
@roboclaw-bot roboclaw-bot changed the title fix(sessions): avoid Gateway stalls on cold session reads fix(sessions): keep session results current during cold reads Sep 24, 2026
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]>
@roboclaw-bot
roboclaw-bot merged commit 0bbad56 into openclaw:main Sep 25, 2026
212 of 213 checks passed
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 25, 2026
* 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)
  ...
steipete added a commit that referenced this pull request Sep 25, 2026
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.
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* 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)
  ...
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* 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]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
…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]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
…#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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
* 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]>
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* 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]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants