Skip to content

fix(qa): exercise a real config restart boundary - #127285

Merged
vincentkoc merged 1 commit into
mainfrom
codex/qa-config-restart
Aug 23, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
codex/qa-config-restart

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Aug 21, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Make the config restart capability scenario toggle a safe restart-owned Gateway terminal setting.
  • Restore the exact prior setting in cleanup.
  • Assert the restart-owned path is applied before waiting for the sentinel wake.

Root cause

config-restart-capability-flip restored tools.deny and agents.defaults.mediaModels, but both surfaces now hot reload. The scenario nevertheless waited for a restart sentinel that could never be emitted. Run 32444623691 timed out twice at 360 seconds; Gateway logs show only config hot reload applied (tools.deny) and no restart.

Validation

  • Pre-fix live evidence: config-restart-capability-flip, run 32444623691, two 360-second sentinel waits.
  • Catalog regression asserts a restart-owned path precedes the wake wait.
  • git diff --check
  • Autoreview: clean, 0.99.
  • Focused Vitest/live scenario is delegated to PR CI because isolated worktrees intentionally have no reconciled dependencies.

LOC

  • Production: 0
  • QA scenario/test: +19 / -0

No config schema/default or public runtime contract changes.

@clawsweeper

clawsweeper Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 21, 2026
@clawsweeper

clawsweeper Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 23, 2026, 5:04 PM ET / 21:04 UTC.

ClawSweeper review

What this changes

The PR makes the QA restart scenario toggle gateway.terminal.enabled, preserve the original terminal configuration during cleanup, and add catalog checks for the restart trigger and cleanup shape.

Regression provenance

Possible regression — suspected (failure trace). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

No blocking correctness finding: the scenario now mutates a Gateway path that current code explicitly classifies as restart-owned, and restores the prior terminal subtree. This maintainer-authored PR remains necessary because current main lacks these additions; exact-head CI is still in progress.

Priority: P2
Reviewed head: 48ace4959c39bff1fb41ed8ff1f97ccdcb48203f

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch cleanly targets the documented restart boundary and has no supported correctness finding; final readiness depends on exact-head CI.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored QA PR is exempt from the external-contributor proof gate; the recorded pre-fix timeout and exact-head CI remain relevant landing evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored QA PR is exempt from the external-contributor proof gate; the recorded pre-fix timeout and exact-head CI remain relevant landing evidence.
Evidence reviewed 4 items Restart-owned contract: Current main deliberately lets gateway.terminal.* fall through to the Gateway restart rule because terminal availability and CSP are startup-bound; its reload test explicitly requires gateway.terminal.enabled to restart.
Patch follows the owner boundary: The changed scenario snapshots the terminal subtree, flips its effective enabled state, patches the restart-owned leaf before the wake wait, and restores the original subtree in cleanup.
QA mutation path: The scenario's patchConfig action forwards the patch, delivery context, note, and replacement paths to the authenticated Gateway config mutation flow.
Findings None None.
Security None None.

Live Verification

Command: pnpm test extensions/qa-lab/src/scenario-catalog.config-restart.test.ts

Result: FAIL (partial) — step 2 expect_output QA config-restart scenario catalog: expected terminal output was not visible within 30 seconds: "QA config-restart scenario catalog"

pnpm test extensions/qa-lab/src/scenario-catalog.config-restart.test.ts
runner@runnervm76f27:/tmp/clawsweeper-live-proof-127285-1DESdw/target$ pnpm test extensions/qa-lab/src/scenario-catalog.config-restart.test.ts
$ node --import tsx scripts/test-projects.mts extensions/qa-lab/src/scenario-catalog.config-restart.test.ts
pnpm test extensions/qa-lab/src/scenario-catalog.config-restart.test.ts
[test] starting test/vitest/vitest.extension-qa.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-127285-1DESdw/target

 ✓  extension-qa  extensions/qa-lab/src/scenario-catalog.config-restart.test.ts (2 tests) 814ms
     ✓ waits for the restart wake before using restored capabilities  809ms

 Test Files  1 passed (1)
      Tests  2 passed (2)
   Start at  21:05:51
   Duration  2.47s (transform 1.32s, setup 950ms, import 355ms, tests 814ms, environment 0ms)

[test] passed 1 Vitest shard in 8.43s
runner@runnervm76f27:/tmp/clawsweeper-live-proof-127285-1DESdw/target$ pnpm test extensions/qa-lab/src/scenario-catalog.config-restart.test.ts
$ node --import tsx scripts/test-projects.mts extensions/qa-lab/src/scenario-catalog.config-restart.test.ts
[test] starting test/vitest/vitest.extension-qa.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-127285-1DESdw/target

 ✓  extension-qa  extensions/qa-lab/src/scenario-catalog.config-restart.test.ts (2 tests) 762ms
     ✓ waits for the restart wake before using restored capabilities  757ms

 Test Files  1 passed (1)
      Tests  2 passed (2)
   Start at  21:06:00
   Duration  1.65s (transform 453ms, setup 440ms, import 212ms, tests 762ms, environment 0ms)

[test] passed 1 Vitest shard in 7.53s
runner@runnervm76f27:/tmp/clawsweeper-live-proof-127285-1DESdw/target$


















Assertions:

  • FAIL expect_output: QA config-restart scenario catalog

How this fits together

QA Lab executes declarative Gateway scenarios that patch configuration, wait for a restart wake message, then verify the same agent session works afterward. This scenario exercises the boundary between configuration mutation, Gateway restart planning, session wake delivery, and cleanup.

flowchart LR
  A[Saved Gateway config] --> B[QA scenario setup]
  B --> C[Apply config patch]
  C --> D[Gateway restart planner]
  D --> E[Wake marker delivery]
  E --> F[Capability probe]
  F --> G[Cleanup restores config]
Loading

Before merge

  • Resolve merge risk (P1) - The head is behind main and several exact-head checks are still running; landing should wait for the clean, current-head CI result.
  • Complete next step (P2) - This protected maintainer-authored PR has no mechanical repair finding; it needs the normal exact-head CI and maintainer landing path.
Agent review details

Security

None.

PR surface

Tests +19, Other +18. Total +37 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 19 0 +19
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 18 0 +18
Total 2 37 0 +37

Review metrics

Metric Value Why it matters
Production versus QA LOC production +0/-0; QA scenario and catalog coverage +37/-0 The patch changes only QA behavior and verification, with no public configuration or runtime contract addition.

Stored data model

Persistent data-model change detected: serialized state: extensions/qa-lab/src/scenario-catalog.config-restart.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the focused QA scenario once the exact head has green required CI, retaining the terminal subtree restoration rather than returning to hot-reload-only mutations.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the focused QA scenario once the exact head has green required CI, retaining the terminal subtree restoration rather than returning to hot-reload-only mutations.

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

Yes, at source level: current main classifies the prior scenario's tool/model changes as hot reload, while the PR adds the explicitly restart-owned terminal leaf before waiting for the restart wake marker.

Is this the best way to solve the issue?

Yes: exercising gateway.terminal.enabled uses the Gateway-owned restart contract instead of adding a test-only restart mechanism, while the cleanup preserves the pre-existing terminal state.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded QA regression repair with no demonstrated user-facing outage.
  • 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 MEMBER-authored QA PR is exempt from the external-contributor proof gate; the recorded pre-fix timeout and exact-head CI remain relevant landing evidence.

Evidence

What I checked:

Likely related people:

  • steipete: Commit c700ab3 introduced the existing config-restart scenario and catalog test; current-main blame also attributes the restart-owned terminal-path coverage to that work. (role: introduced existing QA scenario and restart-path coverage; confidence: high; commits: c700ab31ffd8; files: qa/scenarios/config/config-restart-capability-flip.yaml, extensions/qa-lab/src/scenario-catalog.config-restart.test.ts, src/gateway/config-reload.test.ts)

Rank-up moves

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

  • Wait for the remaining exact-head checks to finish green before landing.

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-21T16:56:17.871Z sha 775260d44b8bbac4c5544d97f55c3c91d570ccd2 :: needs changes before merge. :: [P2] Restore an absent terminal block instead of leaving an empty one
  • reviewed 2026-08-21T17:45:16.293Z sha 0d3a697 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-23T01:51:44.850Z sha 0d3a697 :: needs maintainer review before merge. :: none

@RomneyDa
RomneyDa force-pushed the codex/qa-config-restart branch from 775260d to 980106d Compare August 21, 2026 17:26
@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Addressed the current-head finding by snapshotting and restoring the complete gateway.terminal subtree. When it was originally absent, cleanup now merge-deletes the parent; when present, cleanup restores the exact cloned object. Added focused catalog coverage for both the full-subtree cleanup expression and the single setup-only restart path. Please rerun the focused mock QA scenario and retain wake/cleanup evidence.

@clawsweeper

clawsweeper Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@RomneyDa
RomneyDa force-pushed the codex/qa-config-restart branch from 980106d to 3323855 Compare August 21, 2026 17:34
@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Addressed the new current-head merge-patch finding from exact-review artifact run 32508169827: cleanup now distinguishes (1) absent terminal parent → delete parent, (2) present terminal with enabled → restore exact cloned subtree, and (3) present terminal without enabled → restore cloned subtree plus enabled: null to delete the injected leaf. Focused test contract covers the ownership marker and cleanup expression. Prior trusted live run visibly passed 2/2 focused Vitest tests twice; its terminal matcher timed out looking for the describe title even though the captured pane contains the passing result.

@clawsweeper

clawsweeper Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@RomneyDa
RomneyDa force-pushed the codex/qa-config-restart branch from 3323855 to 0d3a697 Compare August 21, 2026 17:41
@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

The prior review misread originalTerminal?.enabled === false: it evaluates to true when the original value is false, so it already flipped that branch. I made the truth table unambiguous at current head with originalTerminal?.enabled === false ? true : false, added the default-enabled invariant comment, and asserted the exact flip expression in focused coverage. Cleanup still preserves all three parent/leaf-presence states.

@clawsweeper

clawsweeper Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@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 21, 2026
@vincentkoc
vincentkoc force-pushed the codex/qa-config-restart branch from 0d3a697 to 48ace49 Compare August 23, 2026 20:59
@vincentkoc vincentkoc self-assigned this Aug 23, 2026
@vincentkoc
vincentkoc merged commit 0d727c3 into main Aug 23, 2026
230 checks passed
@vincentkoc

Copy link
Copy Markdown
Member

Merged via squash.

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

Labels

extensions: qa-lab maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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.

2 participants