You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Hackathon] fix(doctor): use the shared parseRequestTimeoutFlag — local copy's message has drifted #364
Every command validates --request-timeout through the shared parseRequestTimeoutFlag in src/lib/client-factory.ts — except doctor,
which still carries a private copy in src/commands/doctor.ts (around
line 507). The shared helper's own comment says it replaced five identical
copies because drift between them would silently change timeout behaviour
depending on the command. The doctor copy was missed, and its error
message has already drifted from the shared one.
Details / implementation notes
Verified against commit 988c0355bb05631e9c6c1785e443937ff2a88c0e
(v0.14.0), built from source, Node v24.20.0, Linux x86_64:
$ testsprite doctor --request-timeout abcError: Invalid request.Flag `--request-timeout` is invalid: must be a positive number of seconds (got "abc").
$ testsprite project list --dry-run --request-timeout abcError: Invalid request.Flag `--request-timeout` is invalid: "abc" is not valid — must be a positive number of seconds.
$ testsprite auth status --request-timeout abcError: Invalid request.Flag `--request-timeout` is invalid: "abc" is not valid — must be a positive number of seconds.Same flag, same bad input — two different messages depending on the command.Expecteddoctor produces the same validation error as every other command, fromthe single shared implementation, so the wording (and any future behaviourchange) cannot drift per command again.Actualdoctor resolves its common options through its own localparseRequestTimeoutFlag copy instead of importing the shared one fromsrc/lib/client-factory.ts, and the copy's message wording differs.Suggested fixDelete the local copy in src/commands/doctor.ts and importparseRequestTimeoutFlag from ../lib/client-factory.js, like the othercommands do. Align any doctor tests that reference the old wording.No behaviour change beyond the message text: both copies reject the sameinputs with exit 5 today.EnvironmentCLI version: 0.14.0 (built from source at 988c035)Node: v24.20.0OS: Linux x86_64### Confirmations- [x] I have searched existing issues and this is not a duplicate.- [x] I have provided my Discord identity above for reward coordination.
Thanks for the interest, @iamfirst! This issue hasn't been accepted for implementation yet — see the triage comment (a maintainer will label it accepted once it is). Feel free to check back, or ping us on Discord if it's been quiet.
PR #370 is up for this one: it deletes the doctor-local parseRequestTimeoutFlag and imports the shared helper, plus a wiring test that pins doctor's message to the shared wording (verified non-vacuous — the test fails against the previous doctor.ts).
Linking it here so it can be triaged. Getting this accepted would let the issue be claimed and the PR gate pass. Thanks!
Hi, I'm the author of this issue and I commented /assign on Oct 10 — I already have this fix ready locally and plan to open my PR when the hackathon window opens on Oct 16. Noting this so the claim order is clear during triage. Thanks!
Activity
iamfirst commentedon Oct 10, 2026
/assign
testsprite-hob commentedon Oct 10, 2026
Thanks for the interest, @iamfirst! This issue hasn't been accepted for implementation yet — see the triage comment (a maintainer will label it
acceptedonce it is). Feel free to check back, or ping us on Discord if it's been quiet.x15967311210-crypto commentedon Oct 11, 2026
PR #370 is up for this one: it deletes the doctor-local
parseRequestTimeoutFlagand imports the shared helper, plus a wiring test that pins doctor's message to the shared wording (verified non-vacuous — the test fails against the previousdoctor.ts).Linking it here so it can be triaged. Getting this
acceptedwould let the issue be claimed and the PR gate pass. Thanks!iamfirst commentedon Oct 12, 2026
Hi, I'm the author of this issue and I commented /assign on Oct 10 — I already have this fix ready locally and plan to open my PR when the hackathon window opens on Oct 16. Noting this so the claim order is clear during triage. Thanks!