Validate channels status timeout values#59382
Conversation
Greptile SummaryReplaces the raw Confidence Score: 5/5
Prompt To Fix All With AIThis is a comment left during a code review.
Path: src/commands/channels.status.command-flow.test.ts
Line: 175-181
Comment:
**Test placed in semantically unrelated describe block**
This timeout validation test lives inside `channelsStatusCommand SecretRef fallback flow`, but it has nothing to do with SecretRef resolution. It happens to work fine because `parseTimeoutMsWithFallback` throws before any mocked gateway/config calls, but a reader scanning for timeout-related tests won't find it here. Consider moving it to a more general or dedicated describe block (e.g., `channelsStatusCommand option validation`).
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "Validate channels status timeout values" | Re-trigger Greptile |
|
The remaining failure appears unrelated to this change and is currently coming from |
This comment was marked as spam.
This comment was marked as spam.
7a86ea5 to
51504d9
Compare
|
ProjectClownfish pushed a narrow repair to this branch so the original contributor path can stay canonical. Source PR: #59382 |
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: yes. by source inspection. Current main passes raw Real behavior proof Next step before merge Security Review findings
Review detailsBest possible solution: Rebase the branch on current main, keep the command-boundary parser change, preserve channel filtering and probe defaults, assert the current parser message, and add redacted real CLI output proof. Do we have a high-confidence way to reproduce the issue? Yes, by source inspection. Current main passes raw Is this the best way to solve the issue? Mostly yes. Reusing Full review comments:
Overall correctness: patch is incorrect Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 3b7d01b63f02. |
Summary
Validate
channels status --timeoutvalues using the shared CLI timeout parser.What changed
channels statusfrom rawNumber(opts.timeout ?? 10_000)parsing toparseTimeoutMsWithFallback(...)Why
channels statuswas parsing--timeoutwith a rawNumber(...)conversion, unlike adjacent commands that already use the shared timeout parsing helper.That made invalid inputs less consistently validated. This change brings
channels statusin line with the existing CLI timeout behavior and ensures invalid values such as0fail clearly.Manual verification
src/commands/channels.status.command-flow.test.tssrc/commands/channels/status.tsto useparseTimeoutMsWithFallback(..., { invalidType: "error" })pnpm vitest run src/commands/channels.status.command-flow.test.ts -t "throws for invalid timeout values"pnpm vitest run src/commands/channels.status.command-flow.test.ts