Skip to content

fix(gateway): small agents stay unavailable until larger agents finish startup preparation - #165107

Merged
steipete merged 1 commit into
mainfrom
fix/agent-admission-head-of-line
Oct 4, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/agent-admission-head-of-line

Conversation

@steipete

@steipete steipete commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes: after a Gateway restart, an agent whose database is tiny stays unavailable (UNAVAILABLE … has not completed startup inspection and preparation) for as long as every earlier deferred agent takes to finish its own startup preparation, with no log output while it waits.

User Impact

User impact: each deferred agent becomes available as soon as its own database is opened and its sessions are prepared; a large or slow agent no longer holds smaller agents' sessions, cron jobs, and chat history hostage. Operators now see per-agent phase durations on recovery/failure and a progress warning every 60 s while recovery is pending. No config, schema, or stored-data changes.

Why This Change Was Made

Deferred startup recovery ran each agent's whole preparation (credentials refresh, session migration, model refresh) through one FIFO. Opening the database and session migration are agent-local and now run per agent (two concurrent opens as before, up to four concurrent session migrations, readiness awaited without holding a slot). Only credential/model publication and the final admission keep the serialized turn, because the secrets snapshot is global and each refresh can include only admitted or borrowed auth stores. All existing authority checks on that turn (config identity, secrets revision, auth store, prepared model, deletion journal) are unchanged. Migration uses the same agent-database configuration guard the open step already used. No deadline fails a slow agent; slowness is now visible instead of silent.

Evidence

Production incident (OpenClaw 2026.9.8, three agents, host load 50–70): all three deferred agents finished their writable open, including a 44 s full integrity check on a 1.69 GB store, within ~6 minutes of startup. Their recoveries then completed strictly one after another, at +22 min, +41 min, and +42 min. The last agent's store was 12 MB and its own preparation took 64 s; the other ~36 minutes were spent waiting for the FIFO. The Gateway main thread was saturated (event-loop utilization 1.0, p99 delay 1–3.7 s), so each preparation crawled, and nothing was logged between the deferral warning and recovery. Integrity checks, activation timing, and reindexing were ruled out from the same log.

Regression test (src/gateway/server-agent-database-startup.preparation.test.ts, real withAgentDatabaseStartupAdmission + activateGatewayAgentDatabaseStartup). On the original code it fails as in the incident: the small agent stays agent-database-inspection-pending while the large agent's session migration is blocked. With the fix it passes. The same test lets the small agent's secrets publication replace the runtime config mid-migration and checks that the large agent still recovers. It also covers the phase durations, the progress warning with fake time, and timer cleanup. Other cases cover holding the publication turn through models and the final deletion check, the readiness wait happening outside the migration pool, and refusal on agent removal, database move, deletion, and shutdown.

Checks: server-agent-database-startup.preparation.test.ts 7 passed; server-agent-database-startup.test.ts (real native admission lifecycle) 12 passed; pnpm tsgo, scoped oxlint, oxfmt, git diff --check clean. Codex autoreview (P2 threshold): scoped-clean.

Consumer suites: all 11 test files that import the startup admission owner (preflight lifecycle/schema-only/startup-index/startup-prepared, admission, update canary, spawn broker, doctor container upgrade, run-main, and both Gateway startup files) passed on Blacksmith Testbox tbx_01m44b4ffw6da35gjk3jfzz78q at this head: 106 tests, exit 0.

Synthetic reproduction under CPU contention (real Gateway from a fresh build, isolated state, three agents: two ~1.6 GB stores with 128/144 pending transcript-projection rebuilds, one 672 KiB store; agents SIGKILLed for stale leases without clean-close receipts; Gateway pinned to 2 cores shared with 4 stress-ng workers; per-agent scoped history RPC polled every 5 s). The tiny agent sorts after the large ones, matching production ordering:

Agent Recovered: base → fix First successful history RPC: base → fix UNAVAILABLE replies: base → fix
tiny (672 KiB) T+1534 s → T+89 s T+1537 s → T+93 s 300 → 6
large A T+739 s → T+1954 s T+742 s → T+1957 s 141 → 379
large B T+1520 s → T+1097 s T+1522 s → T+1101 s 297 → 208

On the base, the tiny agent passed its integrity gate at T+57 s, then waited 24.6 min behind both large agents' transcript rebuilds. On the fix, it recorded zero migration-permit wait and zero publication wait while both large migrations were still running. The new phase durations attribute the slow phase directly: the large agents spent 1,034 s and 1,879 s in migration; secrets, models, and publication took about 2–3 s each. Progress warnings fired every 60 s with the current phase. No agent ended degraded.

Caveat on the large-agent rows: the base ran on AWS c7a.8xlarge (32 vCPU) and the fix on Hetzner ccx33 (8 vCPU) after two AWS allocation failures, so absolute times are not hardware-matched. The transcript-reconcile pool has a single worker (MAX_WORKERS = 1 in session-transcript-reconcile-pool.ts), so the two large rebuilds now interleave in that worker instead of running one after the other. The first large agent can therefore finish later than it would have at the head of the old FIFO. This PR does not change that pool; per-store prioritization there is a possible follow-up.

…r agents

Deferred startup recovery chained every agent's whole preparation
(secrets refresh, session migration, model refresh) through one FIFO, so a
12 MB agent waited ~36 minutes behind two slower agents on a starved
Gateway, and nothing was logged between deferral and recovery.

Open and session migration now run per agent (two open slots, four
migration slots, readiness awaited without a slot). Only credential/model
publication and final admission keep the FIFO turn, with the existing
config, revision, auth-store, model and deletion checks. Migration uses the
same agent-database configuration guard as the open step.

Recovery and degraded lines now carry elapsedMs and phaseDurationsMs, and a
60 s progress warning names each pending agent's phase and, while waiting
for publication, the agent holding the turn.
@clawsweeper

clawsweeper Bot commented Oct 4, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime size: L labels Oct 4, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 4, 2026
@clawsweeper

clawsweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 4, 2026, 6:24 PM ET / 22:24 UTC (Revision 2).

ClawSweeper review

What this changes

The PR prepares deferred agents’ sessions concurrently, preserves serialized credential and model publication, and adds startup progress diagnostics.

Merge readiness

⛔ Blocked before merge - 1 item remains

The fix remains necessary: current main still serializes deferred session preparation. No blocking patch defect was found, and the new real-Gateway evidence supports the improvement. The earlier data-model compatibility blocker is resolved because no persisted contract changes.

Priority: P1
Reviewed head: 22efa2d9b94eef810b147186ca1250025bdacec3

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused scheduling repair with meaningful regression coverage and direct real-Gateway evidence supports normal mergeable quality.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The supplied real-Gateway run exercises deferred admission through scoped history RPCs under CPU contention: the tiny agent becomes usable while large migrations continue. Hardware differences limit comparative large-agent timings. Independent diff inspection confirms no stored-data contract changes, resolving the previous migration-proof request.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The supplied real-Gateway run exercises deferred admission through scoped history RPCs under CPU contention: the tiny agent becomes usable while large migrations continue. Hardware differences limit comparative large-agent timings. Independent diff inspection confirms no stored-data contract changes, resolving the previous migration-proof request.
Evidence reviewed 9 items Pinned production change: The introduced delta moves session preparation ahead of the publication queue, bounds migration concurrency, and retains the final deletion check inside the serialized turn.
Current main still needs the fix: Current main retains this.preparation and queues activation.prepareAgent behind the previous agent’s complete preparation; it does not contain the proposed migration/publication split.
Existing-state compatibility and prior review: Inspection confirms that the same runStartupSessionMigration owner operates on the same databases; the diff changes neither schemas nor stored formats, configuration, or Doctor transforms. The response at #165107 (comment) correctly resolves the earlier compatibility request. A separate data-model migration gate does not apply.
Findings None None.
Security None None.

How this fits together

Gateway startup inspects and prepares each agent’s databases before allowing sessions to use them. Deferred admission keeps an agent unavailable until its session preparation, credentials, models, and final ownership checks complete.

flowchart TD
 A[Agent databases] --> B[Background inspection]
 B --> C[Bounded database opening]
 C --> D[Startup recovery readiness]
 D --> E[Concurrent session preparation]
 E --> F[Serialized credentials and models]
 F --> G[Final ownership and deletion checks]
 G --> H[Agent sessions available]
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +141, Tests +421, Docs +13. Total +575 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 3 241 100 +141
Tests 1 421 0 +421
Docs 1 20 7 +13
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 682 107 +575

Review metrics

Metric Value Why it matters
Preparation concurrency 2 database opens; up to 4 agent migrations; 1 publication turn The new migration bound removes fleet-wide preparation blocking while retaining serialized global publication.
Production versus test growth production +141 net lines; tests +421 net lines Production growth is explained by bounded scheduling and phase diagnostics; tests protect ordering and lifecycle refusal behavior.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/state/agent-database-startup.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep agent-local session preparation bounded and independent while one publication owner preserves global credential revisions and final admission checks.

Do we have a high-confidence way to reproduce the issue?

Yes: current-main source serializes complete deferred preparation, and the supplied real-Gateway reproduction observes the tiny agent waiting behind large transcript rebuilds. This read-only review did not execute that reproduction.

Is this the best way to solve the issue?

Yes: splitting agent-local preparation from global publication repairs the existing owner’s scheduling boundary without adding configuration or changing stored formats.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against b48245c41428.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The supplied real-Gateway run exercises deferred admission through scoped history RPCs under CPU contention: the tiny agent becomes usable while large migrations continue. Hardware differences limit comparative large-agent timings. Independent diff inspection confirms no stored-data contract changes, resolving the previous migration-proof request.

Label justifications:

  • P1: The reported shipped behavior leaves otherwise healthy agents’ sessions and jobs unavailable for many minutes after Gateway restart.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The supplied real-Gateway run exercises deferred admission through scoped history RPCs under CPU contention: the tiny agent becomes usable while large migrations continue. Hardware differences limit comparative large-agent timings. Independent diff inspection confirms no stored-data contract changes, resolving the previous migration-proof request.
  • proof: sufficient: Contributor real behavior proof is sufficient. The supplied real-Gateway run exercises deferred admission through scoped history RPCs under CPU contention: the tiny agent becomes usable while large migrations continue. Hardware differences limit comparative large-agent timings. Independent diff inspection confirms no stored-data contract changes, resolving the previous migration-proof request.

Evidence

What I checked:

  • Pinned production change: The introduced delta moves session preparation ahead of the publication queue, bounds migration concurrency, and retains the final deletion check inside the serialized turn. (src/state/agent-database-startup.ts:424, 22efa2d9b94e)
  • Current main still needs the fix: Current main retains this.preparation and queues activation.prepareAgent behind the previous agent’s complete preparation; it does not contain the proposed migration/publication split. (src/state/agent-database-startup.ts, b48245c41428)
  • Existing-state compatibility and prior review: Inspection confirms that the same runStartupSessionMigration owner operates on the same databases; the diff changes neither schemas nor stored formats, configuration, or Doctor transforms. The response at fix(gateway): small agents stay unavailable until larger agents finish startup preparation #165107 (comment) correctly resolves the earlier compatibility request. A separate data-model migration gate does not apply. (src/gateway/server-agent-database-startup.ts:130, 22efa2d9b94e)
  • Real Gateway recovery evidence: The complete supplied body, captured under sourceRevision 39d27053fed04ff15d18d3648fd2c650c9ec6c81fa26e71bd5880599294e5252, records an isolated built Gateway with stale leases, large pending transcript rebuilds, CPU contention, and scoped history RPC polling. The tiny agent recovered at T+89 s and answered history at T+93 s while large migrations remained active, versus T+1534 s and T+1537 s on the base. Progress warnings appeared and no agent ended degraded. Different base/fix hosts prevent hardware-matched large-agent timing conclusions. (22efa2d9b94e)
  • Authority and cancellation remain guarded: The migration uses the existing agent-local admission borrow with live configuration and shutdown guards. Credential publication retains config identity and secrets-revision checks; auth-store loading still excludes other pending agents. Final admission rechecks deletion and the live refusal. No new principal or durable authorization capability is introduced. (src/gateway/server-agent-database-startup.ts:166, 22efa2d9b94e)
  • Focused regression coverage: The new tests exercise the real scheduling and admission owners with controlled migration/model/journal dependencies: small-agent recovery during a blocked migration, serialized final publication, readiness outside the migration pool, and refusal after removal, database relocation, deletion, or shutdown. Existing native lifecycle coverage was also inspected. The body reports 106 passing consumer tests at this head; this review did not execute tests. (src/gateway/server-agent-database-startup.preparation.test.ts:204, 22efa2d9b94e)

Likely related people:

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

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 (1 earlier review cycle)
  • reviewed 2026-10-04T20:54:52.064Z sha 22efa2d :: blocked before merge. :: none

@steipete

steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Maintainer response to the "Add data-model compatibility proof" item: this PR changes no stored data, schema, or migration. It changes only in-process scheduling of startup preparation (which steps run per agent and which share the serialized publication turn) and adds log fields. No SQLite schema version, table, row shape, config key, Doctor transform, or on-disk artifact is added or changed. The same agent databases, written by the same session-migration code, are opened before and after this change. Upgrade and rollback behavior are unchanged: a downgraded Gateway runs the old serialized order over identical files. The CPU-contention reproduction is now in the PR body; the tiny agent was admitted at T+89 s instead of T+1534 s.

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Oct 4, 2026
@steipete
steipete merged commit c8b847e into main Oct 4, 2026
163 of 164 checks passed
@steipete
steipete deleted the fix/agent-admission-head-of-line branch October 4, 2026 22:45
@steipete

steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 5, 2026
…r agents (openclaw#165107)

Deferred startup recovery chained every agent's whole preparation
(secrets refresh, session migration, model refresh) through one FIFO, so a
12 MB agent waited ~36 minutes behind two slower agents on a starved
Gateway, and nothing was logged between deferral and recovery.

Open and session migration now run per agent (two open slots, four
migration slots, readiness awaited without a slot). Only credential/model
publication and final admission keep the FIFO turn, with the existing
config, revision, auth-store, model and deletion checks. Migration uses the
same agent-database configuration guard as the open step.

Recovery and degraded lines now carry elapsedMs and phaseDurationsMs, and a
60 s progress warning names each pending agent's phase and, while waiting
for publication, the agent holding the turn.
steipete added a commit that referenced this pull request Oct 10, 2026
Remove speculative registry retargeting, reader custody and generation protocols, reconcile priority reservations and successor handoffs. Keep one current-authority check at effects, atomic projection finalization, bounded resources and ordinary write-capable shutdown settlement.

Retain simple session-boundary fairness for the production incident recorded in #165107 and bounded backoff for the human report #115908. Unsupported mid-call topology changes and failed derived projection preparation are best effort until the next request or restart. No schema, stored-data, retention, permission or public API change.

Validation: 36 focused history/bootstrap tests pass; corrected Testbox shutdown and registry controls pass; both import-cycle checks report zero cycles; core typecheck and targeted lint pass. Review findings addressed, including empty archive-path semantics and immediate async-consumer rejection handling.

Publication remains blocked before PR/merge: still-open heartbeat PR #167796 protects session-logical-entry-read.worker.test.ts, whose obsolete pending-registration assertions require a scope exception. Full sessions proof is incomplete. Unchanged baseline suppression and UI test-root budget failures are recorded in the lane ledger.
steipete added a commit that referenced this pull request Oct 11, 2026
Remove speculative registry retargeting, reader custody and generation protocols, reconcile priority reservations and successor handoffs. Keep one current-authority check at effects, atomic projection finalization, bounded resources and ordinary write-capable shutdown settlement.

Retain simple session-boundary fairness for the production incident recorded in #165107 and bounded backoff for the human report #115908. Unsupported mid-call topology changes and failed derived projection preparation are best effort until the next request or restart. No schema, stored-data, retention, permission or public API change.

Validation: 36 focused history/bootstrap tests pass; corrected Testbox shutdown and registry controls pass; both import-cycle checks report zero cycles; core typecheck and targeted lint pass. Review findings addressed, including empty archive-path semantics and immediate async-consumer rejection handling.

Publication remains blocked before PR/merge: still-open heartbeat PR #167796 protects session-logical-entry-read.worker.test.ts, whose obsolete pending-registration assertions require a scope exception. Full sessions proof is incomplete. Unchanged baseline suppression and UI test-root budget failures are recorded in the lane ledger.
steipete added a commit that referenced this pull request Oct 11, 2026
Remove speculative registry retargeting, reader custody and generation protocols, reconcile priority reservations and successor handoffs. Keep one current-authority check at effects, atomic projection finalization, bounded resources and ordinary write-capable shutdown settlement.

Retain simple session-boundary fairness for the production incident recorded in #165107 and bounded backoff for the human report #115908. Unsupported mid-call topology changes and failed derived projection preparation are best effort until the next request or restart. No schema, stored-data, retention, permission or public API change.

Validation: 36 focused history/bootstrap tests pass; corrected Testbox shutdown and registry controls pass; both import-cycle checks report zero cycles; core typecheck and targeted lint pass. Review findings addressed, including empty archive-path semantics and immediate async-consumer rejection handling.

Publication remains blocked before PR/merge: still-open heartbeat PR #167796 protects session-logical-entry-read.worker.test.ts, whose obsolete pending-registration assertions require a scope exception. Full sessions proof is incomplete. Unchanged baseline suppression and UI test-root budget failures are recorded in the lane ledger.
steipete added a commit that referenced this pull request Oct 11, 2026
…ling (#168991)

* refactor(sessions): simplify history request capture and list reads

Clone typed history parameters once while retaining entry and environment pruning. Let the native list reader validate the selected file instead of repeating host stat probes around dispatch. A replacement immediately after the native read is best effort; consumer authority and multi-store checks remain.

Provenance: request capture from #147914; redundant host probes from #165470. Net production reduction: 94 lines. Focused proof: 123 tests passed; core typecheck and independent review passed. Existing lint-suppression allowlist failure in untouched #168002 test-support files is not changed.

* refactor(sessions): simplify read and reconcile lifecycles

Remove speculative registry retargeting, reader custody and generation protocols, reconcile priority reservations and successor handoffs. Keep one current-authority check at effects, atomic projection finalization, bounded resources and ordinary write-capable shutdown settlement.

Retain simple session-boundary fairness for the production incident recorded in #165107 and bounded backoff for the human report #115908. Unsupported mid-call topology changes and failed derived projection preparation are best effort until the next request or restart. No schema, stored-data, retention, permission or public API change.

Validation: 36 focused history/bootstrap tests pass; corrected Testbox shutdown and registry controls pass; both import-cycle checks report zero cycles; core typecheck and targeted lint pass. Review findings addressed, including empty archive-path semantics and immediate async-consumer rejection handling.

Publication remains blocked before PR/merge: still-open heartbeat PR #167796 protects session-logical-entry-read.worker.test.ts, whose obsolete pending-registration assertions require a scope exception. Full sessions proof is incomplete. Unchanged baseline suppression and UI test-root budget failures are recorded in the lane ledger.

* test(sessions): retire obsolete registry interleavings

* test(sessions): retire obsolete history lifecycle guards

* test(sessions): retire obsolete read lifetime assertions

* test(sessions): keep reclamation checks at the write boundary

* test(sessions): retire obsolete incognito reconcile handoffs

* test(sessions): retire remaining registry and handoff fixtures

* refactor(sessions): remove unused registry settlement waiters

* fix(sessions): bound reconcile admission and close readiness safely

* style(sessions): format merged target cache imports

* test(sessions): decouple cross-agent recovery ordering

* fix(sessions): keep registry settlement independent of callers

* fix(sessions): reauthorize incognito context publication

* fix(sessions): preserve absent incognito context reads
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 12, 2026
…ling (openclaw#168991)

* refactor(sessions): simplify history request capture and list reads

Clone typed history parameters once while retaining entry and environment pruning. Let the native list reader validate the selected file instead of repeating host stat probes around dispatch. A replacement immediately after the native read is best effort; consumer authority and multi-store checks remain.

Provenance: request capture from openclaw#147914; redundant host probes from openclaw#165470. Net production reduction: 94 lines. Focused proof: 123 tests passed; core typecheck and independent review passed. Existing lint-suppression allowlist failure in untouched openclaw#168002 test-support files is not changed.

* refactor(sessions): simplify read and reconcile lifecycles

Remove speculative registry retargeting, reader custody and generation protocols, reconcile priority reservations and successor handoffs. Keep one current-authority check at effects, atomic projection finalization, bounded resources and ordinary write-capable shutdown settlement.

Retain simple session-boundary fairness for the production incident recorded in openclaw#165107 and bounded backoff for the human report openclaw#115908. Unsupported mid-call topology changes and failed derived projection preparation are best effort until the next request or restart. No schema, stored-data, retention, permission or public API change.

Validation: 36 focused history/bootstrap tests pass; corrected Testbox shutdown and registry controls pass; both import-cycle checks report zero cycles; core typecheck and targeted lint pass. Review findings addressed, including empty archive-path semantics and immediate async-consumer rejection handling.

Publication remains blocked before PR/merge: still-open heartbeat PR openclaw#167796 protects session-logical-entry-read.worker.test.ts, whose obsolete pending-registration assertions require a scope exception. Full sessions proof is incomplete. Unchanged baseline suppression and UI test-root budget failures are recorded in the lane ledger.

* test(sessions): retire obsolete registry interleavings

* test(sessions): retire obsolete history lifecycle guards

* test(sessions): retire obsolete read lifetime assertions

* test(sessions): keep reclamation checks at the write boundary

* test(sessions): retire obsolete incognito reconcile handoffs

* test(sessions): retire remaining registry and handoff fixtures

* refactor(sessions): remove unused registry settlement waiters

* fix(sessions): bound reconcile admission and close readiness safely

* style(sessions): format merged target cache imports

* test(sessions): decouple cross-agent recovery ordering

* fix(sessions): keep registry settlement independent of callers

* fix(sessions): reauthorize incognito context publication

* fix(sessions): preserve absent incognito context reads
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant