Repository navigation
test(release): forward-port 2026.10.5 release-line harness fixes - #177319
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR forward-ports release-validation fixture repairs and increases the Telegram candidate job budget. Example: Release validation runs the Telegram candidate scenario set.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: these maintainer-authored harness repairs remain useful on main, and review found no definite correctness or security regression. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherRelease workflows invoke test harnesses that prepare isolated installations, exercise Gateway behavior, and turn observed results into release-validation evidence. flowchart TD
A[Release workflow] --> B[Scenario harness]
B --> C[Published baseline fixtures]
C --> D[Candidate Gateway]
D --> E[Behavior assertions]
E --> F[Release validation result]
Technical reviewBest possible solution: Land the fixture repairs through the existing release harness owners once required checks pass. Do we have a high-confidence way to reproduce the issue? Source inspection supports the fixture mismatches, and the PR reports selected before/after failures; this read-only review ran no target code and does not independently reproduce the timing-sensitive lanes. Is this the best way to solve the issue? The changes use existing persistence, context-parsing, and discovery owners while retaining behavioral assertions; the extracted Ultra helper supports the existing line-cap constraint without introducing a parallel production path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 436a01a2e3e4. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +173, Config 0, Other +41. Total +214 across 22 files. Added test files: 2. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 19, 2026, 8:48 AM ET / 12:48 UTC. |
…d evidence test/gateway-agentsapi.live.test.ts (new since 2026.10.4) skips its only case unless OPENCLAW_LIVE_AGENTS_API=1, which the native live test-harness shard never sets, so the shard's no-passing-assertions guard failed it on every 2026.10.5 candidate once the other harness tests went green. Register it in the existing whole-file opt-in map like the other env-gated live proofs. (cherry picked from commit 761ef64)
The live Codex npm plugin lane matched the expected post-uninstall error against raw --json stdout, where quotes are escaped, so the correct owner-plugin-not-activatable error never matched. Decode the canonical CLI error message first, as the 2026.10.4 release line does (a9fd56d). (cherry picked from commit e8772a9)
The native subagent restart live proof SIGKILLs the Gateway three times in about two minutes. The third unclean boot trips the documented restart-loop breaker (3 unclean boots within 5 minutes, #166238), which pauses restart settlement, including interrupted subagent recovery (#166846), until the unclean window drains. The orphan assertion added with the #169144 backport only waited 30 seconds, so the nonannouncing child was still `running`. Wait up to 360 seconds for the orphan settlement so the proof covers the breaker pause and the automatic resume after its window. Assertions are unchanged. 2026.10.4 passed because it predates the breaker pause, startup subagent reconciliation, and this assertion. Deterministic proof: the quiet-child e2e twin with SIGKILL restarts and an exec-blocked child passes with one prior kill; with two warm-up kills it logs "restart-loop breaker tripped" and the parent continuation never arrives within 60 seconds; with a 400-second wait it settles and passes (338s). (cherry picked from commit 1a4c2a0)
…roof The sessions_send visible-child proof timed out on every 2026.10.5 candidate: its synthetic provider picked the latest user item that lacked the legacy <<<BEGIN_OPENCLAW_INTERNAL_CONTEXT>>> marker as the user prompt. Since #168546 (backport 8d66b94), OpenAI-compatible Responses endpoints, including mock-openai, keep runtime context in a user-role "OpenClaw runtime context:" carrier after the user turn instead of a developer message. The fixture then read that carrier as the prompt, never saw the "send" prompt on turn 2, answered PARENT_READY again, and the test waited for PARENT_DONE until timeout. Captured provider requests: v2026.10.4 sends the turn-2 carrier with role developer; the 10.5 tip sends it with role user. Reverting a293f2e (#168410) left the failure unchanged. Select the prompt with the shared qa-lab isInternalRuntimeContextCarrierText helper, which already accepts current and legacy carrier shapes. (cherry picked from commit d3a06e7)
(cherry picked from commit fa2049a)
The isolated Telegram candidate job hit its 60-minute limit at scenario 24/25 on every 2026.10.5 candidate (about 62 minutes needed at 102-108s per packaged Gateway start). main carries the same Telegram scenario set and job, so raise the job budget to 90 minutes; the calling release-checks job keeps its 210-minute bound. Also carry the 2026.10.4 release-line fixture fix for telegram-prepared-delivery-recovery (8b78670): keep the audit receipt in the shared Gateway workspace and create it up front so the isolated SUT can append without EACCES. main still writes it under the private tempRoot. (cherry picked from commit 3cb49f0, adapted to main's runner anchor)
The deferred-fleet startup test failed twice in 2026.10.5 FRV #12 with `fetch failed` / `read ECONNRESET`. Its Gateway shares the test process's event loop. A /healthz or /readyz probe could reuse a keep-alive socket that Undici still treated as live; when the request was written and a synchronous main-thread startup stall followed, the server's idle-timer callback ran before the poll phase read the request and destroyed the socket with the request unread, so the kernel reset the connection. main still probes with default keep-alive fetches. Probe with `Connection: close`, matching existing Gateway test probes. Assertions are unchanged. (cherry picked from commit e3c63f2, adapted to main's probe sites)
…s in the Ultra lane Since #161057 the Skill Workshop counts iterations per session, so Ultra probe sessions trigger a background review after idling. The review runs under its own skill-workshop-review: run and does not inherit the session's thinking level, so the lane's every-request-is-max assertion failed on 2026.10.5 whenever a review reached the provider. On main, #173889 pins review runs to thinkLevel "low" (review-run.ts), which the OpenAI stream wrapper sends as effort "low". Expect that effort for review runs; Ultra runs and their sessions must still be max, and independent heartbeats stay medium. The live file is over the line cap, so the Ultra wire effort policy moves to a sibling helper with its observation type, and the deterministic review cases run in the normal helper suite. (cherry picked from commit ca15213, adapted to main's review thinking level)
…me-smoke harness fixes Release-line harness fixes that 2026.10.1-2026.10.5 carried but main never received: - cron-scheduled-authority: seed the cron authority specimen through the published baseline's own SQLite writer (seedPublishedCronJobs) instead of a raw cron/jobs.json that current candidates treat as a retired pre-July store; drop owner fields for pre-2026.7.1 baselines (usesCronOwnerAtBaseline). The dispatcher passes the package root to seedState, and the scenario now requires a published baseline. - bundled plugin runtime smoke: join deferred read-only update discovery via update.status before the package-manager child watchdog. main still defers install discovery (`<manager> root -g`) until after ready, so it can race the watchdog's no-package-manager-children check. Skips the codex npm plugin live source-reply grep from the release commit: main already probes dynamic-tool-source-reply.ts and dynamic-tools.ts. (cherry picked from commit fcdf0d1, codex grep hunk dropped; cron seed test adapted to main's executable-mode fixture writes)
4c6f438 to
47ce2ed
Compare
…nclaw#177319) * fix(test): treat the env-gated Agents API live proof as optional shard evidence test/gateway-agentsapi.live.test.ts (new since 2026.10.4) skips its only case unless OPENCLAW_LIVE_AGENTS_API=1, which the native live test-harness shard never sets, so the shard's no-passing-assertions guard failed it on every 2026.10.5 candidate once the other harness tests went green. Register it in the existing whole-file opt-in map like the other env-gated live proofs. (cherry picked from commit 761ef64) * fix(test): decode the Codex CLI JSON error after plugin uninstall The live Codex npm plugin lane matched the expected post-uninstall error against raw --json stdout, where quotes are escaped, so the correct owner-plugin-not-activatable error never matched. Decode the canonical CLI error message first, as the 2026.10.4 release line does (a9fd56d). (cherry picked from commit e8772a9) * fix(test): scope CLI announcement barrier to parent probe (cherry picked from commit d5c0db7) (cherry picked from commit a48d4a8) * test(live): wait out the crash-loop breaker before the orphan settles The native subagent restart live proof SIGKILLs the Gateway three times in about two minutes. The third unclean boot trips the documented restart-loop breaker (3 unclean boots within 5 minutes, openclaw#166238), which pauses restart settlement, including interrupted subagent recovery (openclaw#166846), until the unclean window drains. The orphan assertion added with the openclaw#169144 backport only waited 30 seconds, so the nonannouncing child was still `running`. Wait up to 360 seconds for the orphan settlement so the proof covers the breaker pause and the automatic resume after its window. Assertions are unchanged. 2026.10.4 passed because it predates the breaker pause, startup subagent reconciliation, and this assertion. Deterministic proof: the quiet-child e2e twin with SIGKILL restarts and an exec-blocked child passes with one prior kill; with two warm-up kills it logs "restart-loop breaker tripped" and the parent continuation never arrives within 60 seconds; with a 400-second wait it settles and passes (338s). (cherry picked from commit 1a4c2a0) * test(qa-lab): skip user-role runtime carriers in visible-child send proof The sessions_send visible-child proof timed out on every 2026.10.5 candidate: its synthetic provider picked the latest user item that lacked the legacy <<<BEGIN_OPENCLAW_INTERNAL_CONTEXT>>> marker as the user prompt. Since openclaw#168546 (backport 8d66b94), OpenAI-compatible Responses endpoints, including mock-openai, keep runtime context in a user-role "OpenClaw runtime context:" carrier after the user turn instead of a developer message. The fixture then read that carrier as the prompt, never saw the "send" prompt on turn 2, answered PARENT_READY again, and the test waited for PARENT_DONE until timeout. Captured provider requests: v2026.10.4 sends the turn-2 carrier with role developer; the 10.5 tip sends it with role user. Reverting a293f2e (openclaw#168410) left the failure unchanged. Select the prompt with the shared qa-lab isInternalRuntimeContextCarrierText helper, which already accepts current and legacy carrier shapes. (cherry picked from commit d3a06e7) * test(buzz): skip real reconnect backoff in cold-start recovery (cherry picked from commit fa2049a) * fix(release): let the Telegram release lane finish its 25 scenarios The isolated Telegram candidate job hit its 60-minute limit at scenario 24/25 on every 2026.10.5 candidate (about 62 minutes needed at 102-108s per packaged Gateway start). main carries the same Telegram scenario set and job, so raise the job budget to 90 minutes; the calling release-checks job keeps its 210-minute bound. Also carry the 2026.10.4 release-line fixture fix for telegram-prepared-delivery-recovery (8b78670): keep the audit receipt in the shared Gateway workspace and create it up front so the isolated SUT can append without EACCES. main still writes it under the private tempRoot. (cherry picked from commit 3cb49f0, adapted to main's runner anchor) * test(gateway): probe startup readiness on fresh connections The deferred-fleet startup test failed twice in 2026.10.5 FRV openclaw#12 with `fetch failed` / `read ECONNRESET`. Its Gateway shares the test process's event loop. A /healthz or /readyz probe could reuse a keep-alive socket that Undici still treated as live; when the request was written and a synchronous main-thread startup stall followed, the server's idle-timer callback ran before the poll phase read the request and destroyed the socket with the request unread, so the kernel reset the connection. main still probes with default keep-alive fetches. Probe with `Connection: close`, matching existing Gateway test probes. Assertions are unchanged. (cherry picked from commit e3c63f2, adapted to main's probe sites) * test(live): expect review effort for Skill Workshop background reviews in the Ultra lane Since openclaw#161057 the Skill Workshop counts iterations per session, so Ultra probe sessions trigger a background review after idling. The review runs under its own skill-workshop-review: run and does not inherit the session's thinking level, so the lane's every-request-is-max assertion failed on 2026.10.5 whenever a review reached the provider. On main, openclaw#173889 pins review runs to thinkLevel "low" (review-run.ts), which the OpenAI stream wrapper sends as effort "low". Expect that effort for review runs; Ultra runs and their sessions must still be max, and independent heartbeats stay medium. The live file is over the line cap, so the Ultra wire effort policy moves to a sibling helper with its observation type, and the deterministic review cases run in the normal helper suite. (cherry picked from commit ca15213, adapted to main's review thinking level) * test(release): forward-port 2026.10.4-line upgrade-survivor and runtime-smoke harness fixes Release-line harness fixes that 2026.10.1-2026.10.5 carried but main never received: - cron-scheduled-authority: seed the cron authority specimen through the published baseline's own SQLite writer (seedPublishedCronJobs) instead of a raw cron/jobs.json that current candidates treat as a retired pre-July store; drop owner fields for pre-2026.7.1 baselines (usesCronOwnerAtBaseline). The dispatcher passes the package root to seedState, and the scenario now requires a published baseline. - bundled plugin runtime smoke: join deferred read-only update discovery via update.status before the package-manager child watchdog. main still defers install discovery (`<manager> root -g`) until after ready, so it can race the watchdog's no-package-manager-children check. Skips the codex npm plugin live source-reply grep from the release commit: main already probes dynamic-tool-source-reply.ts and dynamic-tools.ts. (cherry picked from commit fcdf0d1, codex grep hunk dropped; cron seed test adapted to main's executable-mode fixture writes)
Co-authored-by: RomneyDa <[email protected]>
telegram-prepared-delivery-recovery failed with EACCES when the trusted QA runner read the audit receipt. The isolated SUT created that file itself, with the launcher's umask 077, so it was sut:sut 0600 and unreadable by the runner. Moving the path (state dir, workspace subdir) or chmodding its directory could not help: the launcher re-owns the workspace only at SUT start, before the file exists. Create the receipt as the runner before restartAfterStateMutation, as main does. The launcher then re-owns it runner:sut 0660, the SUT appends through group write, and the runner reads it as owner. Scenario hunk taken from main a000edb (#177319), which carried the 2026.10.4/2026.10.5 release-line fixture fix.
The cron-scheduled-authority survivor wrote a retired cron/jobs.json specimen that no shipped baseline would hold, then ran an older "bridge" Doctor (2026.9.7, later chained with 2026.10.1) to move it into SQLite. That bridge cannot open schema-20 state from 2026.10.x baselines, and on pre-October baselines it rewrites config into a shape the baseline updater rejects. Forward-port the main harness design (#177319): seed the five jobs through the installed baseline's openclaw/plugin-sdk/cron-store-runtime writer, so the specimen is in the baseline's own SQLite codec, and let the candidate update perform the scheduled-authority migration. June baselines predate persisted owners, so their jobs are seeded ownerless and must stay without authority. Remove the bridge, the baseline Doctor phase, and the assertion carve-outs that only existed for it.
The native test-harness shard selects test/gateway-agentsapi.live.test.ts, which skips unless OPENCLAW_LIVE_AGENTS_API=1. The release shard checker then rejected the lane for a selected file with no passing assertions. Register it as an opt-in file, matching origin/main (#177319).
All 25 scenarios now pass, and the recovered prepared-delivery scenario takes about 3.5 minutes instead of failing fast, so the 60-minute job was cancelled during the last scenario on two candidates (runs 41422605053, 41430660433). Match origin/main's 90-minute budget (#177319); the parent waits up to 180m.
What Problem This Solves
release/2026.10.5(shipped as v2026.10.5, tip1b58cb9a1b4) carried test and harness fixes that never reachedmain. The stable-main closeout audit listed 21 candidates. Several of them fix defects thatmainstill has: lanes that time out, live and e2e proofs that fail, and fixtures that race on every candidate.User Impact
No user-visible change. Release-validation lanes on
mainstop failing for harness reasons that 10.5 already diagnosed. The only CI-cost change: the Telegram candidate job can now use up to 90 minutes. The calling release-checks job keeps its 210-minute bound.Why This Change Was Made
Each candidate was checked against current
main:main's code at the affected sitegit log -Sandgit apply --check -Rmainbefore portingCommits that still apply cleanly and correctly use
cherry-pick -x. The rest are adapted tomain's code, and their messages say how. Release-only adapters, and fixesmainalready has, are skipped with the reason below.Test and harness files only, plus one CI job budget (
run_telegram60 → 90 min). No product code changes.Included
3cb49f0c4c0run_telegram60 → 90 min; precreate the prepared-delivery audit receipt in the shared workspace (10.48b786700801e)mainstill has a 60-minute budget, the same scenario set, and the receipt under the privatetempRootmain's runner YAML anchor761ef64bd51test/gateway-agentsapi.live.test.tsas env-gated optional shard evidencemain; nothing setsOPENCLAW_LIVE_AGENTS_API; it is not inOPTIONAL_LIVE_SHARD_FILE_ENVScherry-pick -xe8772a97030--jsonerror before matching after plugin uninstallmain: a canonical{"error":{"message":...}}payload failsassert-agent-error(escaped quotes)cherry-pick -xfcdf0d1b2cecron-scheduled-authorityseeds through the published baseline's SQLite writer, with owner gating for pre-2026.7.1 baselines; bundled-plugin runtime smoke joins deferred discovery viaupdate.statusbefore the package-manager watchdogmainstill writes a rawcron/jobs.json, which current candidates treat as a retired pre-July store.mainstill defers install discovery (<manager> root -gviadetectGlobalInstallManagerForRoot) until after readymain'swriteFileSync(..., { mode })a48d4a8faedagent:dev:cli-announce-*parent probemain's probe plugin registers the barrier for every session, so subagent children see it.d5c0db78debonly reached the 10.1 backport branchescherry-pick -x(addsgateway-cli-backend.live-cache.test.ts)1a4c2a0ebc8mainstill SIGKILLs 3 times, and the breaker threshold is 3 unclean boots within 5 min (gateway-boot-lifecycle.kernel.ts), but the wait is 30 scherry-pick -xd3a06e7e573main: the unmodified test times out after 120 s (final bus-event kinds=[...])cherry-pick -xca1521329f3maxeffortmain. Onmain, #173889 pins reviews tothinkLevel: "low", so the release's "medium" expectation would still faillowforskill-workshop-review:runs. Over-cap live file, so the effort policy moves togateway-models.profiles.live.ultra-wire.test-helpers.ts; deterministic cases run in the normal helper suitee3c63f2de46Connection: closemainstill probes/healthz//readyzwith keep-alive fetches against an in-process Gatewaymain's probe sites (9)fa2049a3693computeBackoff→ 0main: the reconnect cases take 1.66–1.72 s of the 4 swaitForSettledbudget (#175418)cherry-pick -xSkipped
af481921454(ACP upgrade metadata)mainalready has the equivalent:readSavedAcpMetadatareadsacp_sessionsby session key8abe2e9ff2e(widget restart observer identity)mainalready gives the TEST observer its ownobserver-device.sqliteidentity156472fa4c2(cron placement HOOK_ROTATED skip)mainfixed the step instead of skipping it (#175764,HOOK_QUEUEDrespects root FIFO). #174956 is still opene2cf9a3ff79(tsdown heartbeat worker target)mainalready listsgateway-state-owner-heartbeatinworkerBuildTargetsc26630c4cf4(scoped refresh reacquisition)mainalready has ("retains compatible discovery and reacquires it after credentials change")aac0e3be82a(settlement read resume)main4ea92815a86(dashboard transcript persistence)main'se6c4986438b(already onmain) to release-only IndexedDB stores2493e5b10f7(preauth timeout constant)mainships 30 s, and its test already matches it0e702cadf5d(restart module harness stubs)main's harness passes unchanged (test/scripts/update-restart-module-outcome.test.ts)8ec76b2e670(droperrorDetails)mainkeeps them21d68f6290a(flip-proof TS2459)mainalready usespath.basename(..., SESSION_ARCHIVE_ZSTD_SUFFIX)fcdf0d1b2cecodex npm grep hunk onlymainalready probesdynamic-tool-source-reply.tsanddynamic-tools.tsforcontinuesSourceReplyProgressNot candidates (release-only by design): the #167443/#173580 reverts, the Kova pin, and the OpenCode
glm-5.2pin.Evidence
Local, macOS,
pnpm test <file> --maxWorkers=1(wall time fromtime):test/e2e/qa-lab/runtime/sessions-send-visible-child.product-proof.e2e.test.ts,mainversion (before)extensions/buzz/src/gateway.cold-start-recovery.test.ts, before → aftersrc/gateway/server-agent-database-startup.test.tssrc/gateway/gateway-models.profiles.live.test-helpers.test.ts(new Skill Workshop review cases)pnpm test:live -- src/gateway/gateway-models.profiles.live.test.ts -t "OpenAI Ultra wire capture"(deterministic block, no credentials)src/gateway/gateway-cli-backend.live-cache.test.ts(new)test/scripts/upgrade-survivor-cron-seed.test.ts(4 cases, was 3: adds the 2026.6.34 pre-owner baseline)test/scripts/upgrade-survivor-assertions.test.tstest/scripts/openclaw-release-telegram-qa-workflow.test.ts+test/scripts/test-live-shard.test.tstest/scripts/update-restart-module-outcome.test.tsonmain(justifies skipping0e702cadf5d)node scripts/e2e/lib/codex-npm-plugin-live/assertions.mjs assert-agent-error 1with a canonical JSON error payloadmain, passes herepnpm tsgo:testpasses (1m21s);pnpm tsgo:scriptspasses.oxfmt --checkandoxlintpass on the touched files;pnpm check:line-cap-ratchetpasses;git diff --checkis clean.pnpm check:changed --base origin/main(10m52s): typecheck all, lint, and the guards pass. Two checks fail for reasons outside this diff. The dead-export scan flagsextensions/matrix/.../inbound-dedupe-migration.tsandextensions/copilot/.../tool-bridge.test-support.ts, neither touched here. The core tsgo shard root budget is over its advisory 720 limit in bothgateway-root(725, including the one newlive-cache.test.tsroot) andplugins-platform(725, not touched here).node --checkpasses for the touched.mjsfiles;bash -npasses for the touched shell scripts.Rebased onto
origin/main2c15272ec4fa(505 new commits). Conflicts:src/gateway/server-agent-database-startup.test.ts: started from main's newer version (69bef1a) and reapplied theConnection: closeprobe at its 9 sites.src/gateway/gateway-models.profiles.live.test-helpers.test.ts: kept main's newcreateRpcSourceForTestimport andwaitForGatewayAgentRunsuite, and added the Skill Workshop review cases after them.None of the 505 commits fixes an included defect. The included/skipped tables are unchanged. Main's
assertOpenAIUltraWireEffort, its observation type, and review-run'sthinkLevel: "low"are byte-identical to the pre-rebase versions.Post-rebase:
server-agent-database-startup.test.tsgateway-models.profiles.live.test-helpers.test.tsupgrade-survivor-cron-seed.test.tsupgrade-survivor-assertions.test.tspnpm tsgo:test(5m38s) andpnpm tsgo:scriptspass.oxfmt --check,oxlint, the line-cap ratchet, andgit diff --checkare clean.Not run locally (credentials or Docker required): the Telegram release lane, the Codex npm plugin live Docker lane, the upgrade-survivor Docker lanes, the bundled plugin runtime smoke, the CLI backend, widget, and subagent restart live proofs, and the Ultra live lane. These are covered by typecheck, lint, the cheapest deterministic paths above, and the 10.5 release-line runs that motivated each fix.
Note: on macOS's
/bin/bash3.2,openclaw-release-telegram-qa-workflow.test.ts > keeps launcher identity private...fails withdeclare: -A: invalid option. That is a host-shell limitation and unrelated to this diff. It passes with bash 5.Refs #175418 (Buzz cold-start flake), #174956 (fixed on
mainby #175764; can be closed).