Skip to content

chore(qa): verify repeated restart recovery - #105126

Merged
steipete merged 1 commit into
mainfrom
codex/qa-live-multi-restart-resume
Jul 12, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa-live-multi-restart-resume

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Related: #104993
Follow-up to #104997

What Problem This Solves

The automatic restart-recovery path had only a single-restart mock scenario. It lacked durable live proof that one substantive OpenAI task can survive several sequential Gateway replacements without duplicate delivery, a resend request, or loss of the restart-safe tool policy.

Why This Change Was Made

Adds a live GPT-5.4 QA scenario that records three distinct replay-safe checkpoints, replaces the Gateway child after each checkpoint, and validates automatic recovery through the final audit. The QA transcript summary now counts assistant tool calls so the scenario distinguishes completed checkpoints instead of reusing stale tool state; the existing one-restart scenario also uses additive tool policy and an isolated per-peer session.

User Impact

No runtime behavior change. Maintainers gain repeatable live regression proof for multi-restart automatic recovery, exactly-once final delivery, and fail-closed tool filtering.

Evidence

  • Live OpenAI GPT-5.4 fast-mode run: Crabbox run_6e09312041c8, passed on the first attempt.
    • Gateway replacements: 3
    • Recovery dispatches: 3
    • Restart-safe policies retained: 3
    • Final deliveries: 1
    • Resend notices: 0
    • Unsafe probe executions: 0
    • Final audit: components 16, risks 6, deployments 27, controls 21, recommendation GO
  • Focused Testbox tests: 49 passed across the scenario catalog and transcript summary helper.
  • Existing single-restart mock scenario: passed after the policy/session corrections.
  • Full check:changed Testbox gate: passed formatting, generated baselines, typecheck, core/extension/script lint, policy guards, and import-cycle validation.
  • Source-blind behavior contract: all 9 requirements passed.
  • Fresh Codex autoreview: no accepted/actionable findings.

AI-assisted. I reviewed the implementation and understand the checkpoint-counting, session-isolation, restart orchestration, and safe-tool assertions.

@steipete steipete self-assigned this Jul 12, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f6b5f1d508

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

args:
- lambda:
async: true
expr: "readSessionTranscriptSummary(env, sessionKey).then((summary) => (summary.assistantToolCallCounts.exec ?? 0) >= checkpoint && (summary.assistantToolCallCounts.wait ?? 0) >= checkpoint ? summary : undefined).catch(() => undefined)"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Count only restart checkpoint tool calls

When the live model makes any extra Code Mode exec/wait call before all three qa_restart_wait checkpoints are complete (for example a retry or the later audit/read step), this condition treats those unrelated calls as completed checkpoints and triggers the next gateway restart at the wrong point. The final assertion also only checks exec >= 4 / wait >= 3, so the scenario can pass without proving three distinct replay-safe checkpoint calls; filter/count the assistant tool calls by the exec input containing qa_restart_wait or a checkpoint marker instead of all exec/wait calls.

Useful? React with 👍 / 👎.

@steipete
steipete force-pushed the codex/qa-live-multi-restart-resume branch from f6b5f1d to d90e68a Compare July 12, 2026 07:55

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d90e68a38e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +59 to +63
components=16
risks=6
deployments=27
controls=21
unsafeVisible=false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Hide audit answers from the live prompt

Because the live prompt itself supplies the exact expected totals, the scenario can pass even if the recovered model never reads restart-audit/ after the restarts and simply echoes these required lines; the final assertion only checks for these strings in the outbound text. For this to prove a substantive audit survived recovery, keep only the output keys/format in the prompt and keep the expected values solely in harness-side fixtures/assertions.

Useful? React with 👍 / 👎.

@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact head d90e68a38edf548cda35d7c38ef211490a5c47b9:

  • Live OpenAI GPT-5.4 fast-mode scenario, first attempt: run_6e09312041c8 (artifacts). Command: corepack pnpm openclaw qa suite --provider-mode live-frontier --model openai/gpt-5.4 --alt-model openai/gpt-5.4 --fast --scenario gateway-restart-multi-live --output-dir .artifacts/qa-e2e/live-multi-restart-final.
  • Live result: 3 Gateway replacements, 3 recovery dispatches, 3 retained restart-safe policies, 1 final delivery, 0 resend notices, 0 unsafe executions, exact final audit 16/6/27/21 GO.
  • Focused Testbox lease tbx_01kxadhc89mtkskx03b22ke4fv: corepack pnpm test extensions/qa-lab/src/suite-runtime-agent-session.test.ts extensions/qa-lab/src/scenario-catalog.test.ts — 49/49 passed.
  • Same Testbox: env OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 corepack pnpm check:changed — passed formatting, generated baselines, typecheck, lint, guards, and import cycles.
  • Source-blind behavior contract: 9/9 passed. Fresh Codex autoreview: no actionable findings.
  • GitHub CI 29185016469: exact head, 49 successful jobs, zero failures.

Initial CI exposed unrelated broken-main locale and cron fixtures. #105100 repaired both; this branch was rebased onto that fix with an identical patch-id, then the exact-head CI run above passed.

Known gap: live provider output can vary. The deterministic single-restart mock remains covered, while the live scenario asserts semantic checkpoint, safety, delivery, and audit invariants.

@steipete
steipete merged commit 1a946db into main Jul 12, 2026
105 checks passed
@steipete
steipete deleted the codex/qa-live-multi-restart-resume branch July 12, 2026 08:03
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant