Skip to content

refactor: share invalid-config recovery test runtime - #150379

Merged
steipete merged 1 commit into
mainfrom
codex/test-cli-invalid-config-runtime
Sep 17, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-cli-invalid-config-runtime

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Invalid-config recovery tests duplicate the runtime fixture already provided by shared command test support.

User Impact

No user-visible behavior changes. All six recovery cases and 21 assertion sites remain unchanged.

Why This Change Was Made

Use the existing typed runtime fixture at the same six test-local creation sites. Both fixtures provide only log, error and nonthrowing exit; no output writers or new runtime capabilities are added. The intentional Doctor exit assertion stays intact.

Production: unchanged. Tests: +8/-15, net -7 lines.

Evidence

  • Original and candidate: all six cases passed with identical case identities, order and results.
  • All 21 normal local changed checks passed, including the config-cli type graph, all three dead-export scans and targeted typed lint.
  • Independent applied review found no P0–P2 findings; formatting made no byte changes.

An initial gate attempt stopped before launching checks on a process-observation refusal; the separately admitted attempt passed. This is local mocked proof, with no live Doctor, startup or performance claim. Exact-head hosted CI remains required before landing.

@clawsweeper

clawsweeper Bot commented Sep 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.

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: XS maintainer Maintainer-authored PR labels Sep 16, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. labels Sep 16, 2026
@clawsweeper

clawsweeper Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 16, 2026, 7:37 PM ET / 23:37 UTC.

ClawSweeper review

What this changes

The PR replaces a duplicated runtime fixture in invalid-config recovery tests with the existing shared command-test helper.

Merge readiness

✅ Ready for maintainer review

Keep open: this useful cleanup is absent from current main, preserves existing coverage, and has no actionable correctness findings. The maintainer label also protects it from automatic closure.

Priority: P3
Reviewed head: f3ee1b0d96d788166f3c963458e6e4bb76dea490

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving cleanup with reported comparative validation and no blocking findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied repository state identifies a maintainer-authored test-only refactor, so external contributor runtime proof is not required; the reported mocked recovery tests match the changed fixture surface.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied repository state identifies a maintainer-authored test-only refactor, so external contributor runtime proof is not required; the reported mocked recovery tests match the changed fixture surface.
Evidence reviewed 5 items Introduced change preserves coverage: The pinned introduction diff changes fixture imports and six creation sites only; all six test cases and 21 assertion sites remain intact. The verified test merge changes only this test file.
Equivalent existing fixture: The shared helper creates fresh typed log/error mocks and a nonthrowing exit mock on every call. Its other imports are type-only; importing it does not execute config repair or add runtime capabilities.
Cleanup remains absent from main and release: Both fetched main and v2026.9.4 retain the local createRuntime helper. Production recovery and the shared helper are unchanged between fetched main and the reviewed head; no superseding implementation was established.
Findings None None.
Security None None.

How this fits together

CLI invalid-config recovery offers Doctor repair with user consent and retries the failed operation once. These tests supply mock runtime output and exit functions to verify recovery outcomes without running Doctor.

flowchart TD
 A[Six recovery test scenarios] --> B[Shared mock runtime]
 B --> C[CLI config recovery]
 D[Injected consent and Doctor results] --> C
 C --> E[Retry or decline]
 E --> F[Outcome and diagnostic assertions]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -7. Total -7 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 8 15 -7
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 8 15 -7

Review metrics

None.

Technical review

Best possible solution:

Use the established shared fixture while preserving independent runtime mocks and the existing recovery assertions.

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

Not applicable: this is test cleanup, and source inspection confirms the duplicated fixture rather than a reported runtime defect.

Is this the best way to solve the issue?

Yes: the existing helper supplies equivalent mocks, removes duplicate setup, and preserves all assertions without changing production code.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This is test-fixture deduplication with no production or user-visible behavior change.
  • 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: The supplied repository state identifies a maintainer-authored test-only refactor, so external contributor runtime proof is not required; the reported mocked recovery tests match the changed fixture surface.

Evidence

What I checked:

  • Introduced change preserves coverage: The pinned introduction diff changes fixture imports and six creation sites only; all six test cases and 21 assertion sites remain intact. The verified test merge changes only this test file. (src/cli/invalid-config-recovery.test.ts:2, f3ee1b0d96d7)
  • Equivalent existing fixture: The shared helper creates fresh typed log/error mocks and a nonthrowing exit mock on every call. Its other imports are type-only; importing it does not execute config repair or add runtime capabilities. (src/commands/test-runtime-config-helpers.ts:93, f3ee1b0d96d7)
  • Cleanup remains absent from main and release: Both fetched main and v2026.9.4 retain the local createRuntime helper. Production recovery and the shared helper are unchanged between fetched main and the reviewed head; no superseding implementation was established. (src/cli/invalid-config-recovery.test.ts:6, 2a5cacd22a82)
  • Existing helper history: Current-main history and GitHub commit metadata connect steipete to the shared fixture's typed mocks. The raw commit records parent c06f21d, and the API patch shows the generic mock calls replacing casts. Local blame encountered unavailable historical objects; the commit API supplied the relevant patch. (src/commands/test-runtime-config-helpers.ts:94, cb2a9822a8b6)
  • Validation and proof scope: The supplied complete PR body reports matching before/after results for all six cases and 21 local changed checks, explicitly describing mocked validation without live Doctor claims. This read-only review inspected source and passed git diff --check; it did not execute tests. (src/cli/invalid-config-recovery.test.ts, f3ee1b0d96d7)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

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.

@steipete steipete self-assigned this Sep 17, 2026
@steipete
steipete merged commit 13c6d9e into main Sep 17, 2026
106 checks passed
@steipete
steipete deleted the codex/test-cli-invalid-config-runtime branch September 17, 2026 01:52
@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

cli CLI command changes maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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.

1 participant