Skip to content

test(gateway): backport FRV ordering and lifecycle fixtures - #166828

Closed
RomneyDa wants to merge 1369 commits into
release/2026.10.2from
backport/release-2026.10.2-frv-gateway-concurrency
Closed

RomneyDa wants to merge 1369 commits into
release/2026.10.2from
backport/release-2026.10.2-frv-gateway-concurrency

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Problem

Beta FRV 37694088337 failed Gateway writer and plugin lifecycle fixtures at timing/settlement boundaries on frozen candidate e4c6c87.

Proposed release backport

Backport #166820's inbound-writer completion ordering and #166823's RPC-owned config observation/startup settlement repair. Include the recovery-settlement follow-up discovered during the release-tree replay: the recovered runtime can serve a probe before background configuration work is settled, so wait through the existing authoritative settled probe before retrying reload.

All lease-held, writer independence, plugin cleanup rejection/deadline, registry identity, recovery, and retry assertions remain. No production lease policy, timeout, new polling seam, version, changelog, or release-candidate change.

Keep draft until the main sources (including the recovery follow-up) have landed and their review proof is complete.

Evidence

  • Initial exact release-tree replay: 7 passed / 1 failed; recovered timeout-case retry correctly returned busy while background config work remained active. This is not claimed as repaired by the earlier source head.
  • Recovery settlement added: pnpm test src/gateway/server.sessions.inbound-worktree-writer.test.ts src/gateway/server-plugins.lifecycle.test.ts --maxWorkers=1, 8 passed, 96.67 seconds wrapper / 91.71 seconds Vitest.
  • Source PRs contain original failure reproduction and the meaningful boundary assertions. Repeated-run policy proof remains with the main plugin fixture repair.
  • git diff --check passed. Required exact-head CI/review pending; full local CI not run.

Older branches

Writer completion ordering and cleanup/recovery settlement apply to both release/2026.10.1 at b882e76 and release/2026.9.9 at 76cfa7f. The older 9.9 watcher adapter needs a branch-specific adaptation, not a transplant of the newer filesystem observer. Applicability is source-audited, not older-line execution proof.

FRV: https://github.com/openclaw/openclaw/actions/runs/37694088337

Qualification hold — repeated counterevidence

The main follow-up head df3530f passed two complete-file replays (116.15 s and 86.46 s wrapper), then failed replay 3 (97.27 s): the recovered timeout-case retry again received Another plugin or config operation is already running. The release-tree 8-case pass is not sufficient proof of a repair. Startup/config-settlement observations do not establish that every lifecycle lease holder has completed. Keep draft while the actual competing lease owner is diagnosed and the required repeated proof is completed. No lock policy or assertions have been weakened.

Deferred startup-maintenance follow-up

Include only the lifecycle fixture completion barrier from merged main 1cb7db9 (#166613), not its unrelated required-worker-destination feature. Lease diagnostics identified deferred startup registry maintenance as a competing holder that config readiness did not join. Exact release-tree replay with this barrier: 8 passed, 160.79 s Vitest; wrapper cleanup completed successfully. Main fixture source remains draft while 20 standalone / 3 original-shard qualification runs finish.

The pinned older branches do not contain runGatewayPostReadyStartupMaintenance; this new barrier is not applicable there. Writer ordering remains applicable to both; older watcher cleanup control needs its existing adapter rather than this new startup-maintenance owner.

Current-head local gates

Exact head c36a235 passed all selected changed-file gates: guard/ratchet/dependency checks, formatting, Gateway-server test types (23.4 s), coercion/deprecation checks, all three dead-export scans, and focused lint. No inherited gate failure at this release base. Source repeat qualification/landing hold remains; full local CI was not run.

Repetition collection — 2026-10-08 01:14 UTC

Source head 5f40bd029f23878b17c4762a5553131b9ee4d8d4 completed 20/20 standalone original-order complete-file replays, each with all 6 cases passing. Aggregate wrapper wall time 2818.96 s (86.98–208.92 s per run). The first exact original 49-file shard started but has only partial output; 0/3 original-shard terminal results were collected.

The existing repetition process and its dependent local test processes are no longer present. Its tool session is unavailable; the partial shard log stops without a terminal test summary or failure verdict. The interruption's cause is unestablished. No replacement run, head change, assertion change, or cancellation was performed during collection. Standalone passes do not erase prior counterevidence or prove the full repair. Required original-shard/sibling qualification and source review/landing holds remain; no release qualification is claimed.

Resumed original-shard terminal result

Unchanged source head 5f40bd029f23878b17c4762a5553131b9ee4d8d4 retains 20/20 standalone complete-file passes. The resumed original frozen 49-file selection completed on this main head with exit 1, 750.51 s wrapper / 747.98 s Vitest: 38 passed / 8 failed files, 505 passed / 6 failed / 5 skipped tests, and one unhandled error. The changed lifecycle file passed all six cases in this shard. This is local main-source proof, not frozen-candidate qualification.

Observed failures: server-close.plugin-state catalog-close ordering; browser bootstrap missing browser.request; mixed-case bootstrap identity registration; webhook lifecycle cleanup receiving busy instead of drain refusal; lifecycle readers timing out; startup-error recovery receiving busy instead of activation refusal. File/teardown errors also report an open Gateway fixture, live skills watchers, and a null worker reply in state-integrity. The wrapper retained resource claims and temporary namespaces because descendant cleanup was unverified. Those states are preserved; no forced cleanup, assertion/timeout change, or passing baseline attribution is claimed. The unchanged channel/startup-error fixture sources alone do not establish the competing lease owner.

The collector stopped automatically on this terminal failure. Original-shard repetitions 2 and 3 are not run, not passing coverage; no repeat was performed merely to obtain green. This counterevidence leaves original-shard/sibling qualification unsatisfied. Keep the existing source and backport qualification holds; no complete-repair, source landing, release qualification, or candidate change is claimed.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S 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.