Repository navigation
test(daemon): split install reinstall coverage under max-lines - #145113
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 11, 2026, 2:17 PM ET / 18:17 UTC (Revision 3). ClawSweeper reviewWhat this changesSeparates Gateway installation and reinstallation tests into smaller suites with shared setup, leaving more room under the file-length limit. Merge readiness✅ Ready for maintainer review The split remains useful after the immediate lint repair merged. Both test blocks, shared mocks, helpers, and lifecycle hooks are preserved exactly; no actionable defect was found. Priority: P3 Review scores
Verification
How this fits togetherGateway installation turns CLI options and existing configuration into a managed background service. These tests check installation decisions, preserved settings, and refusal paths using mocked service operations. flowchart LR
A[Installation scenarios] --> C[Shared mocks and setup]
B[Reinstallation scenarios] --> C
C --> D[Gateway install command]
D --> E[Mock service operations]
D --> F[Results and warnings]
E --> G[Existing assertions]
F --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +78. Total +78 across 3 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep installation and reinstallation coverage in focused suites backed by one shared fixture owner and unchanged assertions. Do we have a high-confidence way to reproduce the issue? Not applicable to a remaining product bug: this PR reorganizes tests, and the original lint failure has already been repaired on main. Is this the best way to solve the issue? Yes. Exact preservation of the test blocks and shared setup makes this a narrow way to create file-length headroom without weakening coverage or changing lint limits. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ebb7cb266fb6. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
ed8573a to
db0e8a1
Compare
db0e8a1 to
b77aba7
Compare
|
Merged via squash.
|
Related: #143905, #145061, #145115
Additional instructions
Keep Allow edits from maintainers enabled for this PR so maintainers can help update the branch when needed.
What Problem This Solves
Resolves a problem where PR merge-ref CI fails
check-lint-corebecausesrc/cli/daemon-cli/install.test.tsexceeds the max-lines limit on main since #143905. This blocked unrelated PRs, including #145061. #145115 restored the immediate lint gate during this work; this requested split moves the suite comfortably below the limit as coverage grows.Why This Change Was Made
Mechanically split the already-installed/reinstall cluster into
install.reinstall.test.ts, with shared mocks, fixtures, assertions, and lifecycle setup ininstall.test-support.ts. The support module retains hoisted mock registration and loads the command afterward, following the existing CLI test-support pattern. Both complete test blocks remain byte-identical to the current base after formatting. No production behavior, suppressions, ratchets, or baselines change.User Impact
Restores the lint path for contributors without changing runtime behavior or removing coverage. The two test files are 492 and 388 physical lines; shared support is 315 lines.
Evidence
node scripts/run-vitest.mjs src/cli/daemon-cli/install.test.ts— 42 cases passed.node scripts/run-vitest.mjs src/cli/daemon-cli/install.test.ts src/cli/daemon-cli/install.reinstall.test.ts— 42 cases passed (26 install + 16 reinstall).pnpm oxfmt src/cli/daemon-cli/install.test.ts src/cli/daemon-cli/install.reinstall.test.ts src/cli/daemon-cli/install.test-support.ts— passed.node scripts/check-changed.mjs— completed successfully, including max-lines ratchet, core-test typechecks, unused-export scans, and core lint.git diff --check— passed.The work order quoted 31 tests; the baseline runner reports 42 expanded cases, all retained.