Skip to content

fix(qa): give hot-reload maintenance proofs their own budgets - #139580

Merged
steipete merged 2 commits into
mainfrom
codex/130706-extract-qa-hot-reload-20260905
Sep 6, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/130706-extract-qa-hot-reload-20260905

Conversation

@steipete

@steipete steipete commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Related: #130706.

What Problem This Solves

The config hot-reload QA umbrella could not reliably finish within its 15-minute budget. Browser tab cleanup needs two 305-second disabled witnesses plus an enabled sweep, and attachment retention can wait an hour for actual maintenance. Their timing could exhaust the umbrella before its remaining checks finished.

Why This Change Was Made

Give the existing browser and retention proofs separate scenarios with 20-minute and 75-minute budgets, preserving real cadences, ownership, controls, and cleanup. Remove their background bookkeeping from the 15-minute umbrella.

The umbrella now waits for the asynchronous environment stripe and uses the startup-owned Control UI base path for its deferred-restart check. The SSH fixture owns an authenticated config connection so unrelated traffic cannot consume its write budget; the actual rate limit, SSH deadlines, policy rejection checks, and existing-node continuity remain intact. Avahi is declared for the existing mDNS proof.

User Impact

No product runtime behavior changes. Maintainers can run the long maintenance checks independently and obtain a complete hot-reload result within each scenario's stated budget.

Evidence

Real Gateways and synthetic upstreams ran on disposable Blacksmith Testboxes:

  • Gateway umbrella: 75 checks, zero failures, 601,779 ms. Covers SSH revocation, deferred terminal restart, real mDNS, OTel, and UI behavior.
  • Browser cleanup: 936,487 ms; exact 9→8→9 retained tabs, unchanged Gateway boot/socket and external Chromium PID, CDP endpoint, and witness page.
  • Attachment retention: the real hourly sweep removed the three-hour-old file after 3,600,259 ms, preserved the fresh control, and retained the Gateway PID/boot/socket.

Those maintenance receipts belong to tree f237699cbdc7f6965b367dbff85b903742823755; the original final umbrella belongs to 846028056d9f31d44ad6f5c5ef319a4a1cd1c7f1. Their five proof leases are stopped. These are not relabeled as runs of the integrated tree.

Integration onto #139509 preserves its new heartbeat/Workshop monitor assertions byte-for-byte. Twenty-two maintenance fixture, production owner, config, and lockfile blobs match the original long proofs; relevant package dependency/runtime contracts also match. The surrounding Gateway changed, so a fresh combined umbrella ran on integrated tree 76ac4eb4d7c625deb7a92b708bcf9cea8485f774: 76 checks, zero failures, 599,153 ms. Real config.patch writes changed persisted heartbeat/Workshop cadence and enablement on the same Gateway boot/PID; the startup-only basePath control closed the original socket and replaced the boot as expected. All six proof leases are stopped and independently verified completed.

The integrated candidate passed 86 catalog/script-evidence tests, root-test types, semantic lint, formatting, and fresh managed P2 review with no actionable findings. Prior complete changed checks also passed. The integrated clean Linux build, Control UI sidecars, and performance checks passed. A portal-sync warning occurred after successful execution; both native and wrapper exit codes are zero and all terminal JSON/log evidence was captured.

Production runtime LOC: 0. QA catalog: +63; tests/support: +353. Added support gives each existing duration-sensitive proof an independent scenario and cleanup owner. No product config, persistence, protocol, dependency, or public API surface is added.

The first CI run failed on a newly landed main test-support lint suppression. Main independently repaired it in #139576 (e927f02952b); this PR retains that canonical implementation and drops the redundant local helper commit. The QA scenario patch rebased mechanically onto ae12ad058cd219dddccac1d14eb8c006d04a7e8f, and all ten QA file blobs remain byte-identical to the live-tested head. No held-work helper change is introduced by this PR.

The live receipt remains attributed to its actual 73feb7375307fc5ee96dd071d0e99d864afd9299 head and 76ac4eb4d7c625deb7a92b708bcf9cea8485f774 tree. Final CI must pass before native landing.

The next CI run exposed a transient Discord WAV-lifetime fixture failure. This PR now schedules its “leave during write” case through the existing pre-import temporary-workspace mock, after real WAV bytes are written and before the receive owner resumes. It preserves all original checks and also verifies the manager and WAV directory are already closed before queued processing is released. Removing the production ownership guard made the stronger cleanup assertion fail; production source is unchanged.

The final fixture passed all 3,390 Discord tests across 247 files on Linux, its focused seven cases, changed-file checks, and fresh P2 review. The precise transient late-spy/module-identity cause did not recur and remains inferred. Targeted lint passed in an independently installed, non-nested checkout of the identical source tree after the nested checkout resolved an ancestor qrcode manifest; no guard was bypassed. Linux proof, tree 0c1b00911a8f64bb18ce55e451b9e6b2f613fe59. The proof lease is stopped and independently verified completed.

@clawsweeper

clawsweeper Bot commented Sep 6, 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.

@steipete steipete self-assigned this Sep 6, 2026
@steipete
steipete marked this pull request as ready for review September 6, 2026 00:56
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 10:25 PM ET / September 6, 2026, 02:25 UTC.

ClawSweeper review

What this changes

Separates long-running hot-reload checks into independently budgeted QA scenarios, corrects fixture synchronization, and strengthens Discord voice-file cleanup coverage.

Merge readiness

✅ Ready for maintainer review

This remains useful QA work absent from current main. The extracted scenarios preserve meaningful assertions and real maintenance timing; no introduced blocking defect was found.

Priority: P2
Reviewed head: 44212460e84aaefe33b18423c21e5c13991fb10c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused QA repair with meaningful real-runtime evidence, preserved assertions, and no blocking correctness finding.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The supplied Testbox evidence exercises the extracted scripts through real Gateway RPC, Chromium, and hourly filesystem maintenance, with observed continuity and control-file results. Original source identities remain explicit; linked artifacts could not be independently retrieved here. The Discord-only follow-up has reported focused, full-shard, and negative-control validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The supplied Testbox evidence exercises the extracted scripts through real Gateway RPC, Chromium, and hourly filesystem maintenance, with observed continuity and control-file results. Original source identities remain explicit; linked artifacts could not be independently retrieved here. The Discord-only follow-up has reported focused, full-shard, and negative-control validation.
Evidence reviewed 7 items Verified scope and review continuity: The merge-base delta contains only QA catalogs, scenario scripts, and the Discord test. Comparing the previous reviewed head with this head shows only the Discord fixture changed; the previous completed review reported no findings.
Current-main necessity: Fetched main still starts attachment retention inside the umbrella and retains its concurrent plugin-policy bookkeeping. Its catalog keeps the 900000 ms umbrella budget; the two independently budgeted scenarios are absent.
Latest-release check: Neither new maintenance scenario exists in the supplied latest-release commit for v2026.9.2. The related merged PRs address monitor publication and a separate drain-test helper, not this scenario extraction.
Findings None None.
Security None None.

How this fits together

QA Lab launches isolated Gateways and exercises configuration changes through real RPC, browser, and filesystem boundaries. These scenarios produce evidence that settings take effect while the expected process, connection, and resource owners remain intact.

flowchart TD
  A[QA scenario catalog] --> B{Select proof}
  B --> C[Hot reload umbrella]
  B --> D[Browser cleanup]
  B --> E[Attachment retention]
  C --> F[Isolated Gateway and real clients]
  D --> F
  E --> F
  F --> G[Behavior and continuity assertions]
  G --> H[Evidence and cleanup]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +353, Other +63. Total +416 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 8 524 171 +353
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 3 64 1 +63
Total 11 588 172 +416

Review metrics

Metric Value Why it matters
Proof budgets Umbrella 15 minutes; browser cleanup 20 minutes; retention 75 minutes The independent budgets accommodate existing production maintenance cadences without extending the umbrella.
Production versus test growth Production 0; tests/support net +353; QA catalog net +63 lines Growth supplies separate scenario entrypoints and cleanup ownership without changing product runtime.

Technical review

Best possible solution:

Keep independently runnable maintenance proofs with production cadences, explicit continuity controls, and deterministic resource cleanup.

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

Yes, from source: current main places an observer that can wait for hourly maintenance inside a 15-minute scenario. No tests or runtime reproduction were executed during this read-only review.

Is this the best way to solve the issue?

Yes. Extracting the duration-sensitive checks preserves their real cadence and assertions, while the remaining fixture changes synchronize on the behavior being tested.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This repairs bounded QA reliability problems that prevent complete hot-reload validation.
  • 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 (linked_artifact): The supplied Testbox evidence exercises the extracted scripts through real Gateway RPC, Chromium, and hourly filesystem maintenance, with observed continuity and control-file results. Original source identities remain explicit; linked artifacts could not be independently retrieved here. The Discord-only follow-up has reported focused, full-shard, and negative-control validation.
  • proof: sufficient: Contributor real behavior proof is sufficient. The supplied Testbox evidence exercises the extracted scripts through real Gateway RPC, Chromium, and hourly filesystem maintenance, with observed continuity and control-file results. Original source identities remain explicit; linked artifacts could not be independently retrieved here. The Discord-only follow-up has reported focused, full-shard, and negative-control validation.

Evidence

What I checked:

  • Verified scope and review continuity: The merge-base delta contains only QA catalogs, scenario scripts, and the Discord test. Comparing the previous reviewed head with this head shows only the Discord fixture changed; the previous completed review reported no findings. (extensions/discord/src/voice/voice-wav-lifetime.test.ts:8, 44212460e84a)
  • Current-main necessity: Fetched main still starts attachment retention inside the umbrella and retains its concurrent plugin-policy bookkeeping. Its catalog keeps the 900000 ms umbrella budget; the two independently budgeted scenarios are absent. (test/e2e/qa-lab/runtime/gateway-config-hot-reload-runtime.ts:309, 41fba39c40aa)
  • Latest-release check: Neither new maintenance scenario exists in the supplied latest-release commit for v2026.9.2. The related merged PRs address monitor publication and a separate drain-test helper, not this scenario extraction. (3928bad9badf)
  • Maintenance assertions and execution budgets: Browser cleanup retains disabled/enabled/disabled observations, exact retained tab identities, and external-browser continuity. Retention reuses the existing 70-minute observer with an expired file and fresh control. QA Lab passes each script's declared timeout to its command runner. (test/e2e/qa-lab/runtime/gateway-config-hot-reload-tab-cleanup.ts:178, 44212460e84a)
  • Discord fixture protects the real cleanup boundary: The mock delegates the WAV write before retiring the voice session. The unchanged receive owner checks session ownership after that await and releases the pending WAV in finally; the revised test requires cleanup before releasing queued work. The supplied body reports a negative control failing this assertion and all 3390 Discord tests passing; the original transient spy failure remains inferred. (extensions/discord/src/voice/voice-receive.ts:242, 44212460e84a)
  • Source-attributed runtime proof: The captured PR body reports real Testbox observations: browser tabs 9→8→9 in 936487 ms; hourly retention deleting the expired file after 3600259 ms while preserving its control; and 76 umbrella checks with zero failures in 599153 ms. Maintenance evidence remains attributed to tree f237699cbdc7f6965b367dbff85b903742823755, and integrated umbrella evidence to tree 76ac4eb4d7c625deb7a92b708bcf9cea8485f774 at head 73feb7375307fc5ee96dd071d0e99d864afd9299. Links include https://github.com/openclaw/openclaw/actions/runs/33997340150 and https://github.com/openclaw/openclaw/actions/runs/34002106040. GitHub retrieval failed in this environment, so these are supplied observations, not independently replayed or newly inspected run artifacts.

Likely related people:

  • Peter Steinberger: Raw commit 91bcdd4 adds extensions/discord/src/voice/voice-wav-lifetime.test.ts:83 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 91bcdd409803; files: extensions/discord/src/voice/voice-wav-lifetime.test.ts)

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 (4 earlier review cycles)
  • reviewed 2026-09-06T01:02:45.285Z sha 73feb7375307fc5ee96dd071d0e99d864afd9299 :: blocked before merge. :: none
  • reviewed 2026-09-06T01:13:52.359Z sha 73feb7375307fc5ee96dd071d0e99d864afd9299 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-06T01:32:53.628Z sha fd3450d1f706aa493e8839461983c2ad8356dc16 :: blocked before merge. :: none
  • reviewed 2026-09-06T01:43:10.905Z sha d13fdd5 :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the codex/130706-extract-qa-hot-reload-20260905 branch from 73feb73 to fd3450d Compare September 6, 2026 01:26
@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Sep 6, 2026
Give browser tab cleanup and attachment retention their own scenario budgets while preserving real maintenance cadence, identity, and cleanup. Keep the remaining Gateway hot-reload umbrella at 15 minutes.

Wait for the environment stripe, use a startup-owned deferred-restart control, isolate SSH policy writes from unrelated rate-limit traffic, and declare the Avahi prerequisite.

Validation: real Gateway and Chromium tab cleanup, a full 60-minute retention sweep with fresh-file control, 75 passing umbrella checks, focused catalog and evidence tests, changed checks, and independent review.
@steipete
steipete force-pushed the codex/130706-extract-qa-hot-reload-20260905 branch from fd3450d to d13fdd5 Compare September 6, 2026 01:36
@openclaw-barnacle openclaw-barnacle Bot removed the gateway Gateway runtime label Sep 6, 2026
Schedule leave through the existing pre-import workspace mock after real
WAV bytes are written and before the receive owner's write await returns.
Keep the original transcription, caption, and cleanup assertions, and
verify session retirement and file cleanup before unblocking queued work.

The full Discord shard passes on Linux. Removing the existing post-write
ownership check fails the immediate cleanup assertion; production remains
unchanged.
@openclaw-barnacle openclaw-barnacle Bot added the channel: discord Channel integration: discord label Sep 6, 2026
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Verified 44212460e84aaefe33b18423c21e5c13991fb10c for native landing. Production delta is zero; QA catalog +63 and tests/support +353. The two maintenance scenarios retain real cadence, negative controls, continuity checks, and cleanup ownership. The existing 15-minute umbrella now finishes within its budget.

The integrated real-Gateway umbrella passed 76 checks with zero failures in 599,153 ms, including persisted heartbeat/Workshop updates on the same process and the expected startup-only restart. Browser cleanup retained the exact 9→8→9 tab sequence; hourly retention removed only the expired file after 3,600,259 ms. Those long receipts keep their original source identity; the ten scenario/support files remain byte-identical after integration, with the owner/dependency comparison recorded. Integrated proof · hourly retention.

The final Discord test-only addition passed all 3,390 tests across 247 files on Linux. It schedules leave through the existing pre-import real-write boundary and checks immediate cleanup before queued work is released. Removing the existing production guard made that stronger assertion fail. The exact intermittent late-spy cause was not reproduced; no production change or weakened assertion is included. Discord proof, exact final tree 0c1b00911a8f64bb18ce55e451b9e6b2f613fe59.

Recorded commands include:

xvfb-run -a pnpm openclaw qa suite --provider-mode mock-openai --scenario gateway-config-hot-reload --output-dir .artifacts/qa-e2e/qa-hot-reload-integrated
OPENCLAW_TESTBOX=1 OPENCLAW_VITEST_MAX_WORKERS=2 node scripts/run-vitest.mjs run --config test/vitest/vitest.extension-discord.config.ts

Builds, 86 QA catalog/script-evidence tests, focused Discord tests, types/lint/guards, independent P2 reviews, and lease cleanup passed. The required lint check used an independently installed, non-nested copy of the identical tree after the nested checkout's ancestor-manifest refusal; no guard was bypassed. Main's separate #139576 fix is retained, and the redundant local helper commit was dropped.

Exact-head CI passed. Latest ClawSweeper review has no before-merge findings. Native review artifacts are validated with zero findings; prepare/merge is next.

@steipete
steipete merged commit 95f963e into main Sep 6, 2026
177 checks passed
@steipete
steipete deleted the codex/130706-extract-qa-hot-reload-20260905 branch September 6, 2026 02:37
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit to ylcn91/openclaw that referenced this pull request Sep 6, 2026
* origin/main:
  fix(ci): rebalance services test roots below the memory bound (openclaw#139645)
  fix(backup): exclude shared workspace files from state-only archives (openclaw#139598)
  fix(config): preserve plugin secret references in Settings saves (openclaw#139536)
  fix(ui): retain real-Gateway browser proof across reruns (openclaw#134274)
  fix(browser): preserve node filenames in proxy media (openclaw#139559)
  fix(qa): give hot-reload maintenance proofs their own budgets (openclaw#139580)
  fix(streaming): preserve assistant items and settled output (openclaw#139507)
  fix(android): reconnect secondary gateways after rapid lifecycle changes (openclaw#139319)
  fix(gateway): restart inside a marker-less LaunchAgent no longer kills its caller (openclaw#139628)
vincentkoc added a commit that referenced this pull request Sep 6, 2026
* commit 'ef5972108dc690725717613cb0c1bdaaf910c8de':
  fix(browser): preserve node filenames in proxy media (#139559)
  fix(qa): give hot-reload maintenance proofs their own budgets (#139580)
  fix(streaming): preserve assistant items and settled output (#139507)
  fix(android): reconnect secondary gateways after rapid lifecycle changes (#139319)
  fix(gateway): restart inside a marker-less LaunchAgent no longer kills its caller (#139628)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 6, 2026
…aw#139580)

* test(qa): isolate hot-reload maintenance proofs

Give browser tab cleanup and attachment retention their own scenario budgets while preserving real maintenance cadence, identity, and cleanup. Keep the remaining Gateway hot-reload umbrella at 15 minutes.

Wait for the environment stripe, use a startup-owned deferred-restart control, isolate SSH policy writes from unrelated rate-limit traffic, and declare the Avahi prerequisite.

Validation: real Gateway and Chromium tab cleanup, a full 60-minute retention sweep with fresh-file control, 75 passing umbrella checks, focused catalog and evidence tests, changed checks, and independent review.

* test(discord): bind WAV cancellation to the write boundary

Schedule leave through the existing pre-import workspace mock after real
WAV bytes are written and before the receive owner's write await returns.
Keep the original transcription, caption, and cleanup assertions, and
verify session retirement and file cleanup before unblocking queued work.

The full Discord shard passes on Linux. Removing the existing post-write
ownership check fails the immediate cleanup assertion; production remains
unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: discord Channel integration: discord extensions: qa-lab maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. 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