Skip to content

test(controller): pin status-read, http library, baseUrl hint and superseded rules that survived mutation - #2452

Merged
freeqaz merged 3 commits into
mainfrom
mutant-sweep-1014c
Oct 14, 2026
Merged

freeqaz merged 3 commits into
mainfrom
mutant-sweep-1014c

Conversation

@freeqaz

@freeqaz freeqaz commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

A mutation sweep checked the rules that landed on 10-14 afternoon: #2430, #2437, #2442, #2436, #2446 and the Slack part of #2439. Their own tests left some conditions unpinned. The suites killed 44 of 77 mutants. Each real survivor is a regression that would ship green:

Change

Test-only. Rows and assertions sit next to the existing tests, with no new helpers.

  • tests/conformance/bounded-response-reads.test.mjs
    • The oversized test (finding 1327) and the in-limit parse test now run for 200 and 299.
    • New: a 300 or 399 with a held-open body settles as a redirect.
    • New: a 400 surfaces as the client's error, not a redirect.
  • tests/conformance/kubernetes-client.test.mjs: one test, appended at the end. A createNamespace through the shared clients sends POST with its JSON body. A read the server holds open stops when the operation's signal aborts mid-request.
  • tests/integration/configuration-controller.test.mjs
    • Seven Configuration rows expect the numeric-host message. The userinfo row uses syntheticCredentialUrl.
    • Two rows expect the general message (api.a<1, api.1<a).
    • One Preset row expects the numeric-host message.
  • tests/browser/console-agent-state.test.mjs: the superseded test now asserts the two neutral stage descriptions and the version record's neutral note. It ends with a refresh to REPOSITORY_REVISION_SUPERSEDED, which renders neutral with the status line hidden.

Verification

  • Kill table. 77 mutants: 44 killed before, 68 after. A new row or assertion kills each of the 24 newly killed mutants, and each passes on main.
  • The 9 survivors are equivalent:
    • K1, K3, K5: the oversized branch never sees a 1xx or 3xx.
    • K17: the awaited cancel sits inside a try/catch and resolves promptly. The existing held-open test shows it.
    • K20: the 3xx fallback in the catch block can't be reached while the middleware classifies 3xx first.
    • R12: none of the client-node APIs the controller calls reads binary().
    • N18: a value holding an environment reference is refused only for its slashes, which leaves the hint an empty host.
    • S2: Slack set to manual also reports unavailable after one request.
    • U3: the API sets error only on a failed status.
  • 20/20 pinned runs (taskset, 2 CPUs) of each touched file on the final head: console-agent-state 20/20 (22-35 s), configuration-controller 20/20 (5.5-7.2 s), kubernetes-client 20/20 (6.2-7.2 s), bounded-response-reads 20/20 (2.0-2.3 s).
  • Format and lint. prettier --check is clean on the touched files; I first confirmed it fails on an unformatted file. eslint is clean.
  • Not run. Docker conformance, PostgreSQL (postgres-platform-state) and a live cluster aren't needed for these rows.

Risks

Test-only.

…ded rules that survived mutation

Mutant sweep of #2430, #2437, #2442, #2436 and #2446: status-read 3xx and 2xx boundaries
with held-open bodies, write bodies, methods and cancellation through the shared Kubernetes
HTTP library, the numeric last label hint as the URL parser reads the host, and the
REPOSITORY_REVISION_SUPERSEDED code and superseded copy in Agent detail.
@freeqaz
freeqaz requested a review from a team as a code owner October 14, 2026 17:36
@clawsweeper

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

…299 as a parse row

Rows for a last label that only starts or ends with digits (N6, N7 survived); the
shared-library cancellation aborts once the server holds the read; the in-limit test runs
for 200 and 299 and the 400 case stands alone.
@clawsweeper clawsweeper Bot added 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. labels Oct 14, 2026
@clawsweeper

clawsweeper Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR expands tests for runtime status boundaries, Kubernetes request forwarding and cancellation, numeric-host validation hints, and superseded deployment rendering.

Example: The shared Kubernetes HTTP library accidentally sends GET instead of POST when creating Namespace tenant.

  • Before: Existing GET-focused coverage could miss the regression.
  • After: The new test checks the received POST method and Namespace JSON body.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, source-consistent regression coverage with passing relevant CI; evidence remains test-harness based rather than independently substantiated mutation results.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored, test-only PR changes no shipped behavior; passing exact-head CI supports the added cases without establishing live-cluster or deployment proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Regressions in existing controller and console behavior can escape the current test assertions.
Reason: The additions protect distinct boundary and transport failures while preserving the existing product contracts.

Merge readiness

✅ Ready for maintainer review

Keep this PR open for maintainer triage: it adds useful regression coverage without changing production behavior, and no actionable introduced defect was found.

Priority: P3
Reviewed head: 0efa1b6eb415319981a84647b787689de0be839e

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The reported mutation improvement is not accompanied by per-mutant execution artifacts; the additions intentionally pass on the unmutated base.
Agent review details

How this fits together

These suites exercise Kubernetes transport and status readers, Configuration and Preset admission, and console deployment rendering, turning controlled HTTP responses and deployment records into observable assertions.

flowchart TD
  A[Regression scenarios] --> B[Kubernetes SDK and shared client]
  A --> C[Configuration and Preset API]
  A --> D[Console browser]
  B --> E[Loopback HTTP and TLS servers]
  C --> F[Admission and validation]
  D --> G[Deployment rendering]
  E --> H[Observable assertions]
  F --> H
  G --> H
Loading

Technical review

Best possible solution:

Retain these focused cases in the existing suites and keep production behavior owned by the current implementations.

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

This is regression-test expansion rather than a current product bug; source inspection confirms the covered paths, and no target code was run during review.

Is this the best way to solve the issue?

Extending the owning suites is appropriate: the cases observe real transport, API responses, and rendering without adding production seams or duplicating implementation logic.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Bounded runtime status tests keeps the original intent (10fcfd8: Bound upstream reads and prevent oversized or unfinished responses from hanging the controller.)
  • Kubernetes transport coverage keeps the original intent (ad37118: Refuse redirects while preserving the SDK's method, body, authentication, dispatcher, and cancellation behavior.)
  • Numeric-host validation assertions keeps the original intent (6d04d87: Explain numeric-last-label parsing failures without changing accepted inputs.)
  • Superseded deployment assertions keeps the original intent (807f758: Render superseded deployment records neutrally while preserving genuine failures and revision visibility boundaries.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Free Wortley: Raw commit ad37118 adds tests/conformance/kubernetes-client.test.mjs:458 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ad37118035e5; files: tests/conformance/kubernetes-client.test.mjs)

Review metrics

Metric Value Why it matters
Change distribution Production +0/-0; tests +156/-24 Growth is confined to distinct regression scenarios and extensions of existing cases.

Labels

Label changes:

  • add P3: This is test maintenance protecting already-implemented behavior, with no current runtime repair.
  • 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 test maintenance protecting already-implemented behavior, with no current runtime repair.
  • 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 14, 2026, 1:58 PM ET / 17:58 UTC.

@freeqaz
freeqaz merged commit d430c2a into main Oct 14, 2026
30 of 32 checks passed
@freeqaz
freeqaz deleted the mutant-sweep-1014c branch October 14, 2026 18:00

This branch had an error being deployed

1 failed deployment
integration-qa-pr — 0efa1b6e Deployed Oct 14, 2026 by freeqaz via QA advisory (compose) #927
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