Repository navigation
fix(doctor): use the shared parseRequestTimeoutFlag - #370
x15967311210-crypto wants to merge 1 commit into
Conversation
doctor carried a private copy of parseRequestTimeoutFlag whose error message had already drifted from the shared helper every other command uses. Same flag, same bad input, two different messages. Delete the copy and import the shared helper, so the timeout flag reads identically across doctor and the rest of the CLI. Adds a wiring test that pins doctor's message to the shared wording. Refs TestSprite#364
|
Thanks for the PR, @x15967311210-crypto! It links an issue, but that issue isn't assigned to you yet: #364 (unassigned). Per our workflow, claim the issue first by commenting |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe doctor command now uses the shared request-timeout parser. Its command-wiring test verifies that a nonnumeric timeout produces the shared validation error. ChangesDoctor timeout validation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The timeout parser change preserves existing acceptance, conversion, and error behavior while aligning doctor’s validation wording. No actionable merge risk remains in the reviewed change. Pre-merge checks |
|
|
🏆 Season 4 CLI Improvement Bonus: entry recorded. Thanks, @x15967311210-crypto! To be counted, this PR needs the following by Oct 29, 11:59 PM PT:
Rewards go to merged PRs judged a genuine improvement, and up to three bonus-eligible PRs count per person. Untick the box to withdraw the entry. This comment refreshes when you edit the PR. Full rules. |
|
Thanks @x15967311210-crypto. Closing along with #364, which we're not taking (wording-only change while the command surface is being rewritten). |
Season 4 CLI Improvement Bonus
Discord username: @rr_1999
What does this PR do?
testsprite doctorcarried its own privateparseRequestTimeoutFlag, a leftover from before the helper was centralized insrc/lib/client-factory.ts. ItsVALIDATION_ERRORmessage had already drifted from the shared one every other command uses, so the same flag input produced a different message depending on the command:This deletes the local copy and imports the shared helper, so the flag reads identically across the CLI. There is no behaviour change beyond the message text — the two implementations were otherwise identical (
Number(raw), reject when non-finite or<= 0,Math.round(seconds * 1000)).Related issue
Closes #364
Type of change
Checklist
mainbranch.fix(doctor): ...).npm run lintandnpm run format:checkpass.npm run typecheckpasses.npm testpasses and coverage stays at or above the 80% gate. (115 files, 4578 passed / 11 skipped, 0 failed)README.md/DOCUMENTATION.mdwhere relevant (message-only unification; no docs surface changes).Notes for reviewers
The added test pins doctor's message to the shared wording. I checked it is not vacuous: restoring the previous
doctor.tsmakes the new test fail on the drifted message, and it passes against this change.The only lint output is a pre-existing unused
eslint-disabledirective atdoctor.test.ts:333, untouched by this PR.Discord username: @rr_1999
Summary by CodeRabbit