fix: nightly hardening - fetch timeout clamping - #15
Open
mouse-value-add wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem\n accepted arbitrarily large values. Extremely large timeouts can lead to unreliable runtime behavior (timer overflow/coercion edge cases) and let untrusted config hold network operations open far longer than intended.\n\n## Approach\n- Added constant ().\n- Hardened timeout resolution to clamp oversized values to this maximum.\n- Kept existing fallback behavior for invalid/non-positive timeout values.\n- Added test coverage to assert clamping behavior for very large timeout inputs.\n\n## Verification\n-
RUN v2.1.9 /Users/mouse/.openclaw/workspace/you.md
✓ test/parser/loadFromUrl.test.ts (5 tests) 8ms
Test Files 1 passed (1)
Tests 5 passed (5)
Start at 01:32:13
Duration 247ms (transform 37ms, setup 0ms, collect 41ms, tests 8ms, environment 0ms, prepare 32ms)\n-
RUN v2.1.9 /Users/mouse/.openclaw/workspace/you.md
✓ test/parser/markdown.test.ts (11 tests) 3ms
✓ test/core/validator.test.ts (10 tests) 3ms
✓ test/core/discovery.test.ts (13 tests) 5ms
✓ test/cli/skill.test.ts (8 tests) 10ms
✓ test/cli/wizard.test.ts (12 tests) 2ms
✓ test/cli/check.test.ts (4 tests) 10ms
✓ test/core/parser.test.ts (16 tests) 13ms
✓ test/parser/loadFromUrl.test.ts (5 tests) 12ms
✓ test/core/signals.test.ts (21 tests) 9ms
✓ test/parser/frontmatter.test.ts (7 tests) 3ms
✓ test/core/merger.test.ts (4 tests) 2ms
✓ test/cli/templates.test.ts (6 tests) 4ms
✓ test/cli/skill-status.test.ts (1 test) 21ms
✓ test/core/known-sections.test.ts (4 tests) 4ms
✓ test/parser/timeout.test.ts (3 tests) 4ms
✓ test/parser/yaml.test.ts (12 tests) 5ms
✓ test/mcp/server.test.ts (7 tests) 2ms
Test Files 17 passed (17)
Tests 144 passed (144)
Start at 01:32:13
Duration 629ms (transform 322ms, setup 0ms, collect 802ms, tests 110ms, environment 1ms, prepare 743ms)\n- Result: 17 files, 144 tests passing.\n\n## Risks\n- Some consumers might have intentionally set very large timeouts and will now see a max of 60s.\n- This is a behavior change, but constrained to safer upper-bound enforcement.\n\n## Rollback Plan\n- Revert commit to restore prior timeout behavior.\n- Alternatively, adjust upward in a follow-up if a legitimate use case requires it.