fix(tests): mock redact_sensitive_text in large-content test cases - #8
Closed
dsr-restyn wants to merge 0 commit into
Closed
fix(tests): mock redact_sensitive_text in large-content test cases#8dsr-restyn wants to merge 0 commit into
dsr-restyn wants to merge 0 commit into
Conversation
dsr-restyn
force-pushed
the
fix/block-proc-environ-read
branch
from
April 3, 2026 20:47
0231836 to
0512b8f
Compare
dsr-restyn
force-pushed
the
fix/test-redact-perf
branch
from
April 3, 2026 20:47
41731f5 to
f39d452
Compare
Owner
Author
|
Superseded by upstream PR NousResearch#4860 which targets main directly. The fix will land in the fix/block-proc-environ-read branch naturally once NousResearch#4860 merges. |
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
redact_sensitive_textruns a multi-pass regex scan that is O(n) but slow enough on 100K+ char inputs to exceed the 30s per-testsignal.alarmin conftest.py. This caused three tests intest_file_read_guards.pyto return{'error': 'Test exceeded 30 second timeout'}as a JSON result instead of the expected response — tests appeared to pass in pytest but produced wrong output.Fix
Mock
redact_sensitive_textas a no-op in the three affected tests. These tests exercise the character-count guard and config override logic, not redaction behaviour — bypassing redaction is correct here.Affected tests
TestCharacterCountGuard::test_oversized_read_rejected— 100,001 chars through redact before the guard rejects itTestCharacterCountGuard::test_content_under_limit_passes— 99,999 chars through redactTestConfigOverride::test_custom_config_raises_limit— 200,000 chars through redactVerification
Stacks on top of #fix/block-proc-environ-read → upstream PR NousResearch#4609.