Skip to content

test: pin conditions from the 10-17 night fixes - #2703

Merged
freeqaz merged 7 commits into
mainfrom
mutant-sweep-1017a
Oct 17, 2026
Merged

freeqaz merged 7 commits into
mainfrom
mutant-sweep-1017a

Conversation

@freeqaz

@freeqaz freeqaz commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

A mutation sweep over the 10-17 night fixes (#2672/#2682, #2674/#2686, #2675/#2666, #2676/#2689, #2678, #2663) found conditions that no test pins: 123 hand-made mutants, each run alone against its owning tests with the product file restored after every one. 31 survived on main. The real gaps among them:

Change

Test-only.

  • codex-native-startup: three rows in the network-wait "still retried" table.
  • kubernetes-compute: four checks in the Pod quota test:
    • an unreadable quota beside a full one;
    • a cancellation during the Deployment read and during the quota read;
    • a known pending reason that leads.
  • New console-create-agent-mode-defaults browser test: four cases for which modes discovery may switch.
  • New console-agent-deploy-focus browser test: a reader who leaves the held heading.
  • Both new files are mapped in checks-browser-2.json.

New files rather than additions to the existing browser files, which open drafts are editing.

Verification

  • Each new check fails on its mutant and passes on main.
  • The touched node files pass in full. codex-native-startup (143 tests), the Pod quota test, and both new browser files passed 20/20 at 2 CPUs.
  • node scripts/ci/run-tests.mjs audit reports no issues. Prettier and eslint are clean on the touched files.
  • No PostgreSQL, Docker or cluster needed.

Survivors left on purpose:

  • Equivalent:
    • the probe's network wait read after turn.completed;
    • the quota pattern's used: anchor and a prefix match on pods;
    • a missing used count, for the statuses the quota controller writes;
    • the capability's NativeWorkerSupportError catch while the pinned runtime supports native workers;
    • the deployment read without an Agent ID, which fails and keeps the bare line;
    • the default mode before discovery;
    • the saved-Configuration guard on the discovery switch, which a rerun capability check cannot reach.
  • Not worth a test:
  • Covered by the PostgreSQL provisioning tests in CI (not run locally): the four 409/503 split mutants for new versus stored dedicated OpenClaw work.

One small product gap, filed on our tracker and not fixed here: the provision route also answers named 503 refusals with other codes, such as CHANNEL_CREDENTIAL_UNAVAILABLE. Create Agent shows them as "Outcome unknown" (the C3 mutant). Retry stays safe because it reuses the request ID; the reader just loses the reason.

Internal review approved with nits, and all of them are applied.

Risks

Test-only. The browser checks hold requests and sample focus each frame, as the #2689 tests do.

Rows for a blank reply, a turn completed twice and a terminated process after a
network wait; the Pod quota scan keeps going past an unreadable quota, ends the
pass on an owner cancellation during either read, and lets a known pending reason
lead.
…witch

A mode the reader picked, a harness change that hands the mode back to the form,
a provider whose credentials need Embedded, and operator-managed Preset
credentials without a mode.
… held heading

After an admitted deploy, the loading page's heading takes focus only while the
held heading still has it.
@freeqaz
freeqaz requested a review from a team as a code owner October 17, 2026 06:06
@clawsweeper

clawsweeper Bot commented Oct 17, 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 17, 2026
@clawsweeper

clawsweeper Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR adds regression tests for startup-probe results, Pod quota observations, execution-mode selection, and deployment focus.

Example: A reader selects Embedded before installation discovery reports Dedicated-only support.

  • Before: Existing tests did not establish that discovery preserves the reader's selection.
  • After: A browser test verifies that Embedded remains selected and Create Agent is disabled with an explanation.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, focused coverage with no identified defect; validation establishes fixture behavior rather than live runtime outcomes.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored, test-only PR changes no shipped behavior; browser cases exercise the real console and Fastify fixture, while conformance cases use scripted native output and Kubernetes clients.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Future regressions could replace a chosen execution mode, steal keyboard focus, misreport quota waits, or accept an incomplete startup probe.
Reason: The maintainer-authored additions protect established behavior without expanding product scope or adding production seams.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR adds useful coverage for existing contracts, with no introduced defect identified; required CI remains failed for an unclassified runtime-startup failure.

Priority: P3
Reviewed head: 5c1f2d1189077bf71053e597b274fc80b3cdc51b

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: These cases intentionally pass on main; mutant failures are reported in the body but were not independently replayed, and the fixtures do not establish live Kubernetes or provider execution.
Agent review details

How this fits together

The console turns installation capabilities and user choices into Agent requests, while Compute observes deployment readiness and the runtime evaluates startup-probe output.

flowchart TD
  A[CI test selection] --> B[Browser scenarios]
  A --> C[Conformance scenarios]
  B --> D[Console and API]
  C --> E[Kubernetes Compute]
  C --> F[Runtime startup parser]
  D --> G[Agent choices and focus]
Loading

Technical review

Best possible solution:

Retain the focused coverage and resolve the required CI failure according to its demonstrated cause before landing.

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

This PR reports coverage gaps rather than a current product bug; its mutation results are author-reported, and no target code was executed during this review.

Is this the best way to solve the issue?

The tests exercise existing production decisions with independent expected outcomes, and the browser additions cover timing and selection cases absent from neighboring tests.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Browser CI registration keeps the original intent (591feb3: Consolidate browser coverage while preserving explicit suite ownership.)
  • Startup network-wait completion keeps the original intent (4f9571a: Permit recovered network waits only for a fully answered, cleanly exited attempt.)
  • Quota observation keeps the original intent (761bf51: Confirm current quota exhaustion and avoid stale or unavailable observations overriding readiness diagnostics.)
  • Execution-mode discovery keeps the original intent (1463d96: Select an admitted default while preserving user choices and credential requirements.)
  • Deployment focus transfer keeps the original intent (8e897a8: Carry focus through loading only while the reader remains on the held heading.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Free Wortley: Raw commit 4f9571a adds tests/conformance/codex-native-startup.test.mjs:791 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4f9571a9a08a; files: tests/conformance/codex-native-startup.test.mjs)

Review metrics

Metric Value Why it matters
Change footprint Production +0; tests +278; suite manifest +9/-1 Growth is confined to distinct behavioral cases and their CI registration.

Labels

Label changes:

  • add P3: This is preventative test coverage with no production behavior change or newly established product failure.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is preventative test coverage with no production behavior change or newly established product failure.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 17, 2026, 2:19 AM ET / 06:19 UTC.

… tests

Pick Dedicated before the harness change, label the routed Installation answer,
wait for the new heading's focus, and name what the focus test pins.
@freeqaz
freeqaz temporarily deployed to integration-qa-pr October 17, 2026 06:38 — with GitHub Actions Inactive
@freeqaz
freeqaz temporarily deployed to integration-qa-pr October 17, 2026 06:38 — with GitHub Actions Inactive
@freeqaz
freeqaz merged commit 55659a6 into main Oct 17, 2026
42 of 43 checks passed
@freeqaz
freeqaz deleted the mutant-sweep-1017a branch October 17, 2026 06:51
freeqaz added a commit that referenced this pull request Oct 17, 2026
The custom-provider subagent case took the first native thread/start after
each spawn as that child's. Since #1559 every Agent maps to
/sandbox/enterprise, so cwd no longer separates a child from other native
turns on the parent route. Twice (main 004d658, #2703) the object case
picked up a parent-route request that was not its child's (finding 1645).

Select the request whose developer instructions carry the child's own
subagent prompt line ("- Your session: <childSessionKey>."). The model,
cwd, fallback-settlement and four-setup checks are unchanged. Drop the
earlier expectsCompletionMessage=false change: a proof run showed the
completion handoff sends no native request, so it was not the source.
freeqaz-openai pushed a commit that referenced this pull request Oct 17, 2026
#2715)

* test(runtime): keep requester handoff turns out of the subagent routing proof

The custom-provider subagent case attributes the first native thread/start
after each spawn to that case's child. sessions_spawn defaults to a
completion handoff: when a child fails, the Gateway runs a requester turn on
the requester Agent's own model (the parent route) after a 1.5 s reply
grace. Since every Agent maps to /sandbox/enterprise, that turn is
indistinguishable from the next child by cwd, and the main case's handoff
lands near the object case's spawn (finding 1645: object case saw
vendor/organization/parent on main 004d658 and on #2703).

Spawn with expectsCompletionMessage=false so no requester turn reaches the
native peer, and name every observed thread/start model in the assertion.

* test(runtime): temporary proof for finding 1645 (to be reverted)

Runs the subagent routing case with the default completion handoff and
with the fix, observing the native peer for 5 s after the last child
settles: the default must send a stray parent-route thread/start, the fix
none. A mutated expectation for the object case must still be rejected.

* Revert "test(runtime): temporary proof for finding 1645 (to be reverted)"

This reverts commit 835b934.

* test(runtime): temporary stress probe for finding 1645 (to be reverted)

The first proof showed no requester handoff thread/start within 5 s of the
last child settling, so the handoff explanation is unconfirmed. Run the
routing sequence 164 times across six concurrent Gateways with the default
handoff and report the origin of any stray first thread/start: its
connection, developer instructions, config keys and nearby Gateway debug
lines. The test always fails so the report reaches the diagnostics
artifact.

* test(runtime): scale the temporary 1645 stress probe (to be reverted)

164 warm cases with the default handoff showed no anomaly. Add 48 fresh
Gateways that each run one sequence, like the real test, next to six warm
Gateways running 40 sequences each.

* test(runtime): bound the 1645 stress probe and attribute every request (to be reverted)

Fourteen concurrent Gateways exhausted the 8-CPU runner (exit 137). Run at
most six at once: 30 fresh Gateways in batches of three, plus three warm
Gateways with 40 sequences each. Attribute every native thread/start to a
spawned child through the child session key in its developer instructions,
and report any request that names no child (a stray) or lands in another
child's window, wherever it falls.

* Revert the temporary 1645 stress probes

Removes the stress fixture, the stress test and its suite entry. Over about
270 attributed case runs, the probes found no stray native request and no
misplaced first request.

* test(runtime): attribute each native thread/start to its spawned child

The custom-provider subagent case took the first native thread/start after
each spawn as that child's. Since #1559 every Agent maps to
/sandbox/enterprise, so cwd no longer separates a child from other native
turns on the parent route. Twice (main 004d658, #2703) the object case
picked up a parent-route request that was not its child's (finding 1645).

Select the request whose developer instructions carry the child's own
subagent prompt line ("- Your session: <childSessionKey>."). The model,
cwd, fallback-settlement and four-setup checks are unchanged. Drop the
earlier expectsCompletionMessage=false change: a proof run showed the
completion handoff sends no native request, so it was not the source.

* test(runtime): temporary attribution and heartbeat proof for 1645 (to be reverted)

Before the object spawn, start an unrelated parent-route turn on its
requester session and let its native request arrive first. The old
first-request selector must report the parent model, as both CI failures
did, and child attribution must still report object-child. Also wake a
heartbeat and record whether it sends a parent-route native request.

* Revert "test(runtime): temporary attribution and heartbeat proof for 1645 (to be reverted)"

This reverts commit c7c12bf.

* test(runtime): show attribution in subagent routing failures

Review nits: list only the thread/starts since this spawn, with cwd and
whether each names the child, and name thread/start models when a wait
times out, so a reworded upstream marker reads as a marker change.

This branch had an error being deployed

1 failed deployment
integration-qa-pr — e1f1681c Deployed Oct 17, 2026 by freeqaz via QA advisory (OpenShell) #1771
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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