Skip to content

fix(gateway): unhealthy channels appear ready after clock rollback - #128222

Merged
steipete merged 3 commits into
mainfrom
codex/gateway-health-clock-rollback-20260823
Aug 23, 2026
Merged

steipete merged 3 commits into
mainfrom
codex/gateway-health-clock-rollback-20260823

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where operators monitoring Gateway readiness or channel health would continue to see a stopped or disconnected channel reported as healthy after the host clock moved backward. Readiness probes could incorrectly return HTTP 200, cached health snapshots and refresh throttles could remain stale, and the automatic channel-health monitor could skip a restart that should have recovered the channel.

Why This Change Was Made

Gateway health now treats future-dated observations as incapable of proving current readiness, freshness, or an active grace window. Channel lifecycle starts retain their authoritative boundary even when they are future-dated, so heartbeat and disconnect evidence inherited from an earlier lifecycle cannot revive the newer lifecycle; the same existing timestamp predicate validates readiness caches, health snapshots, and request-refresh throttles. Normal startup, reconnect, busy-run, absent-telemetry, and cache/throttle behavior are preserved.

User Impact

Readiness endpoints accurately return HTTP 503 for stopped, starting, recovering, or otherwise disconnected channels after a clock rollback; health requests refresh stale snapshots promptly; and the health monitor resumes restarting channels that can no longer receive messages. No public API, configuration, authentication, protocol, persistent storage, or dependency contract changes.

Evidence

  • Authentic before/after regressions: real Gateway HTTP request dispatch previously returned /readyz HTTP 200 for four disconnected lifecycle states and now returns HTTP 503; the channel monitor previously skipped restarting a disconnected channel and now performs the restart.
  • Additional owner-boundary regressions prove future startup timestamps, future run activity, future disconnects, prior-lifecycle inherited activity/disconnects, future cached snapshots, and backward-clock refresh throttling all fail safely.
  • Full channel-policy, monitor, readiness, and actual HTTP suites: 274 tests passed.
  • Complete Gateway RPC health-cache/refresh owner suite: 34 tests passed.
  • Independent reviewer separately reran 38 focused regressions and verified 11 real owner-boundary lifecycle cases; authenticated full-commit Codex review reported no actionable findings.
  • Gateway production typecheck, both Gateway test typecheck shards, exact changed-file lint and formatting, max-lines ratchet, assertion-safety ratchet, canonical coercion guard, runtime-sidecar guard, and dead-export scans all passed.
  • The full repository core-test typecheck additionally encounters pre-existing unrelated local missing UI development dependencies (@panzoom/panzoom and @types/pako); both Gateway-owned test shards pass without errors.
  • Production change: +16 lines, justified by preserving the absent versus future-invalid lifecycle distinction and sharing canonical observed-timestamp normalization across channel health, readiness caches, and refresh ownership.
  • Exact reviewed head: 6507a8fc1e199d382a534d57096bb3ee31472d00.
Focused verification commands
OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_FS_MODULE_CACHE_PATH=/private/tmp/openclaw-gateway-health-vitest-cache node scripts/run-vitest.mjs src/gateway/channel-health-policy.test.ts src/gateway/channel-health-monitor.test.ts src/gateway/server/readiness.test.ts src/gateway/server-http.probe.clock-rollback.test.ts --configLoader runner --reporter=dot

OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_FS_MODULE_CACHE_PATH=/private/tmp/openclaw-gateway-health-vitest-cache node scripts/run-vitest.mjs src/gateway/server-methods/server-methods.test.ts --configLoader runner --reporter=dot -t 'gateway healthHandlers.health cache freshness'

node scripts/run-tsgo.mjs -p tsconfig.core.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core.tsbuildinfo
node scripts/run-tsgo.mjs -b test/tsconfig/tsconfig.core.test.gateway-root.json --builders 1
node scripts/run-tsgo.mjs -b test/tsconfig/tsconfig.core.test.gateway-other.json --builders 1

@clawsweeper

clawsweeper Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: M maintainer Maintainer-authored PR labels Aug 23, 2026
@steipete
steipete marked this pull request as ready for review August 23, 2026 12:51
@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 23, 2026
@clawsweeper

clawsweeper Bot commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 23, 2026, 10:50 AM ET / 14:50 UTC.

ClawSweeper review

What this changes

This PR makes Gateway health policy, readiness caching, health refreshes, and the background channel monitor reject future-dated observations after a host clock rollback.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

No blocking correctness finding remains on the exact PR head: the prior monitor-local rollback gap is now covered. This maintainer-authored, maintainer-labelled PR should stay open for a current-main merge refresh and exact-head checks.

Priority: P1
Reviewed head: b427c6c31d05e57b8855382b0b14a50affaf4ed3

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The focused owner-boundary repair and regression coverage are solid; a current-main refresh remains the material merge check.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body also describes focused Gateway HTTP and monitor regressions.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body also describes focused Gateway HTTP and monitor regressions.
Evidence reviewed 5 items Shared timestamp contract: The internal normalizer treats only Date-valid timestamps strictly after the supplied time as future; the PR consistently uses that established predicate.
Policy owner and callers: Future lifecycle starts cannot grant startup grace, and observed run, disconnect, and transport timestamps are rejected before shared health evaluation; readiness, the channel-status RPC, and health collection all consume this policy.
Prior monitor finding addressed: The monitor now fences its startup grace, cooldown, and hourly restart budget at their owning decision points, so a pre-rollback monitor no longer retains future-dated local facts.
Findings None None.
Security None None.

Live Verification

Command: OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/gateway/server-http.probe.clock-rollback.test.ts --configLoader runner --reporter=verbose

Result: FAIL (partial) — step 2 expect_output returns 503 for a stopped channel after the clock moves backward: expected terminal output was not visible within 30 seconds: "returns 503 for a stopped channel after the clock moves backward"

OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/gateway/server-http.probe.clock-rollback.test.ts --configLoader runner --reporter=verbose
runner@runnervm76f27:/tmp/clawsweeper-live-proof-128222-cIWzPp/target$ OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/gateway/server-http.probe.c
lock-rollback.test.ts --configLoader runner --reporter=verbose
OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/gateway/server-http.probe.clock-rollback.test.ts --configLoader runner --reporter=verbose
[test] starting test/vitest/vitest.gateway.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-128222-cIWzPp/target

 ✓  gateway-server  ../../src/gateway/server-http.probe.clock-rollback.test.ts › Gateway readiness probe clock rollback › returns 503 for a 'stopped' channel af
ter the clock moves backward 34ms
 ✓  gateway-server  ../../src/gateway/server-http.probe.clock-rollback.test.ts › Gateway readiness probe clock rollback › returns 503 for a 'starting' channel a
fter the clock moves backward 3ms
 ✓  gateway-server  ../../src/gateway/server-http.probe.clock-rollback.test.ts › Gateway readiness probe clock rollback › returns 503 for a 'recovering' channel
 after the clock moves backward 2ms
 ✓  gateway-server  ../../src/gateway/server-http.probe.clock-rollback.test.ts › Gateway readiness probe clock rollback › returns 503 for a 'unrecorded' channel
 after the clock moves backward 2ms
 ✓  gateway-server-isolated  ../../src/gateway/server-http.probe.clock-rollback.test.ts › Gateway readiness probe clock rollback › returns 503 for a 'stopped' c
hannel after the clock moves backward 13ms
 ✓  gateway-server-isolated  ../../src/gateway/server-http.probe.clock-rollback.test.ts › Gateway readiness probe clock rollback › returns 503 for a 'starting'
channel after the clock moves backward 2ms
 ✓  gateway-server-isolated  ../../src/gateway/server-http.probe.clock-rollback.test.ts › Gateway readiness probe clock rollback › returns 503 for a 'recovering
' channel after the clock moves backward 2ms
 ✓  gateway-server-isolated  ../../src/gateway/server-http.probe.clock-rollback.test.ts › Gateway readiness probe clock rollback › returns 503 for a 'unrecorded
' channel after the clock moves backward 2ms

 Test Files  2 passed (2)
      Tests  8 passed (8)
   Start at  14:51:19
   Duration  19.10s (transform 15.12s, setup 990ms, import 17.62s, tests 65ms, environment 0ms)

[test] passed 1 Vitest shard in 25.27s
runner@runnervm76f27:/tmp/clawsweeper-live-proof-128222-cIWzPp/target$ OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/gateway/server-http.probe.c
lock-rollback.test.ts --configLoader runner --reporter=verbose
[test] starting test/vitest/vitest.gateway.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-128222-cIWzPp/target















Assertions:

  • FAIL expect_output: returns 503 for a stopped channel after the clock moves backward

How this fits together

Gateway turns channel runtime snapshots into readiness responses, cached health summaries, and restart decisions. Channel lifecycle timestamps enter the shared health policy and determine whether Gateway reports availability or restarts a stalled channel.

flowchart LR
  A[Channel runtime snapshots] --> B[Shared health policy]
  C[Gateway clock] --> B
  B --> D[Readiness endpoint]
  B --> E[Health summary]
  B --> F[Background monitor]
  D --> G[HTTP readiness result]
  E --> H[Health response]
  F --> I[Channel restart]
Loading

Before merge

  • Resolve merge risk (P1) - GitHub reports this PR behind current main, so merge the refreshed three-way result only after the relevant Gateway checks pass on its exact resulting head.
  • Resolve merge risk (P1) - The bug fix adds 27 net production lines; the growth appears necessary for four independent timestamp decision owners, but further local policy branches should not be added during refresh.
  • Complete next step (P2) - No repair-lane change is indicated; refresh the merge result and validate the exact head through normal maintainer handling.
Agent review details

Security

None.

PR surface

Source +27, Tests +280. Total +307 across 10 files.

View PR surface stats
Area Files Added Removed Net
Source 4 54 27 +27
Tests 6 280 0 +280
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 10 334 27 +307

Review metrics

Metric Value Why it matters
Production versus regression coverage production +54/-27 (net +27); tests +280/-0 The runtime growth is confined to timestamp validity at four health decision owners, with focused regressions for each affected outcome.

Merge-risk options

Maintainer options:

  1. Refresh the merge head (recommended)
    Update the branch against current main and require the focused Gateway health, readiness, and monitor checks to pass on that exact head before merge.

Technical review

Best possible solution:

Rebase or refresh against current main, retain the shared policy plus monitor-local timestamp gates, and merge after exact-head Gateway readiness and monitor validation succeeds.

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

Yes, from source: the focused HTTP, readiness-cache, health-refresh, and pre-existing-monitor regressions construct the rollback sequence and assert the corrected readiness or restart outcome. They were inspected but not executed in this read-only review.

Is this the best way to solve the issue?

Yes. The repair uses the established future-timestamp predicate at the shared health-policy owner and the three monitor-local gates, rather than adding a downstream readiness-only workaround.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body also describes focused Gateway HTTP and monitor regressions.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P1: Incorrect readiness and stalled channel recovery affect active Gateway channel workflows.
  • merge-risk: 🚨 availability: The changed gates determine whether Gateway reports a channel ready and whether the monitor restarts it.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body also describes focused Gateway HTTP and monitor regressions.

Evidence

What I checked:

Likely related people:

  • steipete: All three supplied PR commits target the shared Gateway health path, and current-line blame attributes the corrected monitor gates to this head; the grafted checkout prevents older-owner attribution. (role: recent Gateway health contributor; confidence: medium; commits: 6507a8fc1e19, 79b4bad1909e, b427c6c31d05; files: src/gateway/channel-health-policy.ts, src/gateway/channel-health-monitor.ts, src/gateway/server/readiness.ts)

Rank-up moves

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

  • Refresh against current main and confirm the focused Gateway checks are green on the resulting exact head.

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 (3 earlier review cycles)
  • reviewed 2026-08-23T12:58:23.666Z sha 6507a8f :: found issues before merge. :: [P1] Reject stale transport across a future lifecycle boundary
  • reviewed 2026-08-23T13:41:28.897Z sha 6507a8f :: needs changes before merge. :: [P1] Reject inherited transport after a future lifecycle start
  • reviewed 2026-08-23T14:01:01.079Z sha 79b4bad :: needs changes before merge. :: [P1] Fence monitor-local rollback gates

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 23, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Addressed the ClawSweeper P1/rank-up on exact head 79b4bad1909ef6c22f4825a23dc585bd67af9356.

  • Root cause: after a wall-clock rollback, an inherited transport heartbeat older than a future-dated channel lifecycle incorrectly received fresh-lifecycle grace because Math.max(0, now - lastStartAt) converted its negative age to zero.
  • Canonical repair: grant inherited-transport grace only when the existing shared lifecycle owner has established that the current lifecycle actually started. The correction removes the obsolete age clamp and is net -1 production line.
  • Authentic pre-fix RED: the real channel-health policy incorrectly returned healthy for inherited stale transport, and the real channel monitor made zero restart calls; both regressions failed in both Gateway Vitest projects (4 failures).
  • Exact corrected-head GREEN: the policy classifies the channel as stale-socket and the real monitor stops and restarts it. Full relevant owner/monitor/readiness/real-HTTP suites pass 278 tests, and RPC health-cache/throttle coverage passes 34 tests (312 total).
  • Preserved public contract: stale sockets intentionally do not fail readiness; independent production-owner proof returns { health: { healthy: false, reason: "stale-socket" }, readiness: { ready: true, failing: [] } }. All four existing real /readyz clock-rollback cases still transition from HTTP 200 to HTTP 503 for disconnected/stopped channel states.
  • Independent first-class review and a fresh authenticated full-branch review are clean; focused formatter, lint/max-lines, production types, and Gateway test types all pass. No config, security, auth, protocol, persistence, or public API changes.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 23, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Addressed the latest ClawSweeper monitor-owned clock-rollback P1 on exact head b427c6c31d05e57b8855382b0b14a50affaf4ed3.

  • Root cause: a health monitor that was already running before wall-clock rollback retained three distinct future-dated facts: its startup timestamp, the previous restart cooldown timestamp, and entries in the hourly restart budget. Each could prevent actual channel recovery even though channel-health policy and readiness already rejected future observations.
  • Canonical repair: the monitor now uses the existing shared future-timestamp predicate at all three monitor-owned decision boundaries. Normal startup grace, cooldown, hourly restart caps, failed-attempt accounting, and the single pending-restart continuation remain unchanged.
  • Real-process regression proof: the new dedicated suite constructs the actual monitor before rollback, exercises a nonzero startup grace, then creates actual restart records before moving the clock backward. Incremental owner fixes produce the independently attributable RED-to-GREEN sequence 6 failing → 4 failing → 2 failing → 0 failing across both Gateway test projects: startup grace first, cooldown second, hourly budget last.
  • Exact-head validation: the complete relevant channel-policy, real-monitor, readiness, and actual HTTP probe suites pass 284 tests; health RPC cache/throttle coverage adds 34 tests, for 318 passing tests. Existing /readyz disconnected-channel HTTP 503 behavior and the intentional stale-socket readiness HTTP 200 contract are preserved.
  • Production ownership delta: +12 lines is justified by three independent, lifecycle-owned timestamp gates plus the existing canonical helper import; no new configuration, API, security, persistence, protocol, threshold, or retry surface was added. The oversized existing monitor suite remains untouched through a separate focused regression file.
  • Independent first-class review, fresh authenticated full-branch review, formatter, lint/max-lines, production/test type checks, and the assertion-safety guard all pass.

@steipete
steipete merged commit a7d30b9 into main Aug 23, 2026
225 checks passed
@steipete
steipete deleted the codex/gateway-health-clock-rollback-20260823 branch August 23, 2026 15:03
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@clawsweeper clawsweeper Bot added 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 23, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 24, 2026
…penclaw#128222)

* fix(gateway): reject stale health after clock rollback

* fix(gateway): fence inherited stale transport after clock rollback

* fix(gateway): recover running health monitors after clock rollback
steipete added a commit that referenced this pull request Oct 14, 2026
Share completion projection and settlement, reuse existing command gates and
session-source preparation, and remove duplicate response/receipt mirrors.
Keep private-source authority, approvals, FIFO, transcript durability, bounded
retry behavior, and write-capable shutdown settlement at their existing owners.

Best-effort tradeoffs accepted:
- Idle source/config changes may retain unused capacity until expiry; allocation
  and private-source transfer still authorize use (#143372, #143410).
- Mid-read model configuration and native availability may keep prepared display
  facts for that read; catalog/account authority remains (#169253).
- Cosmetic health topology and clock rollback use normal refresh or an explicit
  probe; live lifecycle mismatch checks remain (#128222, #128503).
- Bootstrap enrollment overlapping shutdown/reload may fail and retry rather than
  reject every post-await close interleaving (#133037).
- Late internal completion reducers are not persisted; completion stays idempotent
  and final-intent receipt validation remains (#168592).
- An in-flight plugin UI catalog may finish against its selected registry;
  HTTP asset disclosure still checks current authority (#134943, #169449).

These removed guards have speculative/synthetic provenance, not cited human
actual-use incidents. Keep the human-reported memory-flush retry bound (#85645).
The Phase E standalone session memory backend and its tests are untouched.
steipete added a commit that referenced this pull request Oct 14, 2026
* refactor(gateway): consolidate reply and worker preparation paths

Share completion projection and settlement, reuse existing command gates and
session-source preparation, and remove duplicate response/receipt mirrors.
Keep private-source authority, approvals, FIFO, transcript durability, bounded
retry behavior, and write-capable shutdown settlement at their existing owners.

Best-effort tradeoffs accepted:
- Idle source/config changes may retain unused capacity until expiry; allocation
  and private-source transfer still authorize use (#143372, #143410).
- Mid-read model configuration and native availability may keep prepared display
  facts for that read; catalog/account authority remains (#169253).
- Cosmetic health topology and clock rollback use normal refresh or an explicit
  probe; live lifecycle mismatch checks remain (#128222, #128503).
- Bootstrap enrollment overlapping shutdown/reload may fail and retry rather than
  reject every post-await close interleaving (#133037).
- Late internal completion reducers are not persisted; completion stays idempotent
  and final-intent receipt validation remains (#168592).
- An in-flight plugin UI catalog may finish against its selected registry;
  HTTP asset disclosure still checks current authority (#134943, #169449).

These removed guards have speculative/synthetic provenance, not cited human
actual-use incidents. Keep the human-reported memory-flush retry bound (#85645).
The Phase E standalone session memory backend and its tests are untouched.

* refactor(gateway): consolidate dispatch and trusted result projections

* refactor(workers): trust admitted preparation facts
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 15, 2026
…2342)

* refactor(gateway): consolidate reply and worker preparation paths

Share completion projection and settlement, reuse existing command gates and
session-source preparation, and remove duplicate response/receipt mirrors.
Keep private-source authority, approvals, FIFO, transcript durability, bounded
retry behavior, and write-capable shutdown settlement at their existing owners.

Best-effort tradeoffs accepted:
- Idle source/config changes may retain unused capacity until expiry; allocation
  and private-source transfer still authorize use (openclaw#143372, openclaw#143410).
- Mid-read model configuration and native availability may keep prepared display
  facts for that read; catalog/account authority remains (openclaw#169253).
- Cosmetic health topology and clock rollback use normal refresh or an explicit
  probe; live lifecycle mismatch checks remain (openclaw#128222, openclaw#128503).
- Bootstrap enrollment overlapping shutdown/reload may fail and retry rather than
  reject every post-await close interleaving (openclaw#133037).
- Late internal completion reducers are not persisted; completion stays idempotent
  and final-intent receipt validation remains (openclaw#168592).
- An in-flight plugin UI catalog may finish against its selected registry;
  HTTP asset disclosure still checks current authority (openclaw#134943, openclaw#169449).

These removed guards have speculative/synthetic provenance, not cited human
actual-use incidents. Keep the human-reported memory-flush retry bound (openclaw#85645).
The Phase E standalone session memory backend and its tests are untouched.

* refactor(gateway): consolidate dispatch and trusted result projections

* refactor(workers): trust admitted preparation facts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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