Skip to content

test(public-read,kubernetes): pin untested rules from the 10-16 reader, oauth seed and workspace fixes - #2570

Merged
freeqaz merged 2 commits into
mainfrom
mutant-sweep-1016a
Oct 16, 2026
Merged

freeqaz merged 2 commits into
mainfrom
mutant-sweep-1016a

Conversation

@freeqaz

@freeqaz freeqaz commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

A mutation sweep of the rules that landed on 10-16 with their own tests (#2550, #2562 and #2558 public GitHub reader connection caps; #2552 OAuth seed Secret delete-first; #2555 OpenShell network proxy drop and the first-Agent prior PAT helper; #2559 single Harness workspace claim) ran 90 mutants against the owning tests on main. 46 survived. 30 of those are real rules that no test pinned, including:

  • Public reader: the 8-refusal ceiling (removing it, making it > or 1000), the one-second close of a refused socket that never closes (a 30 s or no-op timer), the refusal count leaking (refusing-- dropped), the refused socket's error handler (a client reset would throw), draining the request (without it a refused socket stays open after its client closes), and closing only after the client reads (a destroy right after the write resets a client that is still sending).
  • OAuth seed Secret: each retry status (timeout, 404, 409, 429, 500) could be dropped; every 4xx could be retried; 2, 4 or unbounded attempts all passed. Also untested: the already-consumed path deleting the seed first, removeOAuthBootstrap retiring a legacy Deployment, the Job delete re-reading on 404, a non-conflict Job delete error being re-read, a foreign bootstrap Deployment being deleted (get instead of getOwned), and the Job starting while a legacy Deployment's Pod still runs.
  • Workspace claim: an OAuth home mount on an API-key Harness was accepted, and a node subPath such as workspace-node-…/../x passed a loosened shape check.
  • Prior PAT helper: the harness === "codex" condition could be dropped, and so could the exact workspace-write match (any non-full-access sandbox).

Change

Test-only. New cases sit next to the existing ones:

  • tests/integration/public-github-read-http.test.mjs: one subtest, with setTimeout mocked so the one-second timer fires on tick. It checks that a refused connection closes when its client closes, that a request arriving after the answer is drained rather than reset, that a client reset leaves the reader running, that a lingering refused socket is closed at exactly 1000 ms, and that eight refused sockets can wait while a ninth closes unanswered until one of the eight frees its slot.
  • tests/conformance/kubernetes-compute.test.mjs: four new tests and one added assertion. The new tests cover the seed delete retry table (timeout, 404, 409, 429, 500 then 503, and 403 not retried); three failed seed deletes, then an already-consumed pass that removes the seed before a failing Job delete and a later pass that clears a legacy Deployment; a Job already gone at its delete; a foreign bootstrap Deployment that is refused and kept, with the source left unconsumed; and a legacy Deployment's Pod being awaited before the Job is created, whether the Deployment is deleted or already gone. The added assertion counts Job deletes in the existing seed-first test, so a non-conflict error is not re-read.
  • tests/conformance/kubernetes-harness-workspace-volume.test.mjs: one node subPath traversal row, plus the API-key render with an OAuth home mount.
  • tests/integration/first-agent-startup.test.mjs: read-only sandbox and openclaw harness rows.

Verification

  • Mutants: on main, 44 of 90 were killed. On this branch, 74 of 90 are killed. Every new case fails on its mutant and passes on main.
  • The 16 remaining survivors:
    • Equivalent mutants: the refused end handler (stream autoDestroy closes the socket once both sides end), the left >= 0 map entry, the undefined-address and no-listener guards, the only-first-listener mutant (Node registers a single connection listener), the final seed delete always running (a no-op after delete-first), Background propagation (Pods are awaited separately), the missing-home count (the name check refuses it), readOnly shape strictness on home and node mounts (an undefined value is writable either way), the initializer path-only filter, priorRevisionId !== undefined (revision IDs are always set), and the prepare-site nodeExpected (the render always adds the node mount when a node exists).
    • Timing only: the seed retry backoff.
    • Needs a controller and PostgreSQL: first-agent.mjs reporting and printing the prior PAT warning, so those mutants were not run.
  • Each touched file passed 20/20 runs pinned to 2 CPUs: kubernetes-compute 20/20 (max 11.4 s), public-github-read-http 20/20 (max 7.4 s), kubernetes-harness-workspace-volume 20/20, first-agent-startup 20/20.
  • prettier --check and eslint pass on the four files. Review nits are applied: the Pod wait now requires an empty Pod list, and the drain mutants fail on an assertion rather than the subtest timeout.

Risks

Test-only. Open PRs that touch kubernetes-compute.test.mjs (#2518, #1982, #115) or other files here have the same conflict count against this branch as against main, so this change adds no new conflicts. The public reader subtest mocks only setTimeout and resets it after the subtest. The reset case uses a half-open client: resetAndDestroy() after an auto-ended socket spun the event loop on Node 26.

…der, oauth seed and workspace rules

Mutant sweep of #2550/#2562/#2558, #2552, #2555 and #2559 left real rules untested:
the refused-connection ceiling, close-on-client-close, the one-second close and the
request drain in the public reader; the consumed seed Secret retry statuses and
attempt cap, the already-consumed path, the Job 404 re-read, the Deployment
ownership check and the legacy Pod wait; an OAuth home on an API-key Harness and a
node subPath escape; two prior-PAT helper conditions.
@freeqaz
freeqaz requested a review from a team as a code owner October 16, 2026 06:57
@clawsweeper

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

@freeqaz-openai freeqaz-openai left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I verified that the new assertions in three files at 4aa5a937 distinguish working behavior from specific regressions. This is a partial review, not whole-PR approval; the fourth changed file still needs its separate review.

New coverage What I actually observed
Public GitHub reader, refused connection Exact full test file: 13 passed. In an isolated negative control removing only socket.resume() from the refusal path, the new test failed at its 15-second deadline (rather than falsely passing). Real loopback sockets and a fixture provider; not a live GitHub or load-capacity claim.
Harness workspace volume, provider projection Exact owning test passed. Separately permitting a suffix after the valid node directory name, or permitting an OAuth home in the API-key projection, made the new assertion fail with “Missing expected exception.” No cluster or volume was created.
First-Agent prior OpenShell PAT policy Exact owning test passed. Separately removing the Codex-harness requirement or falsely accepting read-only as that historical policy made the new assertion fail (true !== false). This tests the policy predicate, not a live login.

Node 24.20.0 on Linux, isolated local controls, no product changes requested from these results. Required CI passed; I saw Claw’s acknowledgment, not a final verdict, and did not request a duplicate run.

Post-merge check of the three files above. I verified their final 3c379506 bytes match squash commit 70698b4d and ran the revised tests: public-reader file 13 passed; the changed workspace-volume and first-Agent cases each passed, with no skips. In particular, I changed only refusing >= maxRefusing to refusing > maxRefusing in a private negative control. The new ninth-client assertion failed on the actual 429 Too Many Requests response versus the required empty response, rather than simply timing out. That rules out the revised already-closed-client branch masking an off-by-one regression in this case. These are local tests, not production traffic, a retrospective approval, or a claim about the fourth file. No contributor action or rerun requested.

…ases

The legacy Pod wait now requires an empty Pod list before the Job starts; refused-socket
reads resolve at once when the connection is already gone, so drain mutants fail on an
assertion instead of the subtest timeout; the unowned Deployment case also checks the
source stays unconsumed; the node subPath traversal row is pinned to its own message.
@freeqaz
freeqaz temporarily deployed to integration-qa-pr October 16, 2026 07:09 — with GitHub Actions Inactive
@freeqaz
freeqaz temporarily deployed to integration-qa-pr October 16, 2026 07:09 — with GitHub Actions Inactive
@freeqaz
freeqaz temporarily deployed to integration-qa-pr October 16, 2026 07:09 — with GitHub Actions Inactive
@clawsweeper

clawsweeper Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: test(public-read,kubernetes): pin untested rules from the 10-16 reader, oauth seed and workspace fixes This is item 1/1 in the current shard. Shard 0/1.

This temporary status tracks the active review worker. The completed review will appear in the durable ClawSweeper review comment.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 16, 2026
@freeqaz
freeqaz merged commit 70698b4 into main Oct 16, 2026
47 checks passed
@freeqaz
freeqaz deleted the mutant-sweep-1016a branch October 16, 2026 07:23

This branch was previously deployed

1 inactive deployment
integration-qa-pr — 3c379506 Deployed Oct 16, 2026 by freeqaz via QA advisory (compose) #1278
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants