fix(config): support timeout_sec in config set - #1179
Conversation
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s). |
Qiyuanqiii
left a comment
There was a problem hiding this comment.
The implementation itself looks good to me. There is one user-facing inconsistency I think should be fixed before merge: the configuration docs still explicitly say that timeout_sec is not supported by ocr config set and instruct users to edit config.json manually. Since enabling that exact CLI path is the purpose of this PR, the timeout documentation should be updated alongside the code.
One small robustness suggestion: parseTimeoutSeconds currently checks integer parsing and non-negativity, while the resolver also rejects values that overflow time.Duration. It would be cleaner if config set applied the same bound so it cannot successfully persist a value that the resolver will later reject.
Other than that, the setter paths and tests look good. I'd be happy to re-review once the docs are updated and CI has run.
Qiyuanqiii
left a comment
There was a problem hiding this comment.
Quick correction to my previous review: I was a bit too strong in using Request changes here.
The docs mismatch and the timeout overflow edge case are still worth addressing, but after reconsidering the scope and impact, I don't think either should be treated as a merge blocker for this PR. Please treat my earlier review as regular review feedback rather than a request to hold the PR.
The implementation itself looks good to me. I'll wait for CI to run before giving a final approval.
|
|
Qiyuanqiii
left a comment
There was a problem hiding this comment.
Even though the PR has been approved by a maintainer, I still want to keep my earlier point on record: the "timeout_sec" overflow validation is worth fixing so that "config set" and the resolver enforce the same bounds.
That said, I agree this is not a merge blocker for the current PR.
Qiyuanqiii
left a comment
There was a problem hiding this comment.
Thanks for the follow-up. The timeout validation now reuses the resolver's existing bounds check, and the related documentation has been updated as well.
This addresses my previous concerns. LGTM from my side.
|
Implemented in eba0978.
|
|
The requested overflow validation and documentation updates have been implemented in eba0978. All checks are passing. Thank you for the review. |
|
One thing to fix before merge: |
|
Fixed in a6af684. Added timeout_sec to isAuxiliaryProviderField so setting timeout_sec |
Description
Type of Change
How Has This Been Tested?
make testpasses locallyChecklist
go fmt,go vet)Related Issues