fix(tests): make vuln-scanner status test tolerant of the timeout-aware block - #1057
Merged
Conversation
…re block PR #1055 wrapped the filesystem trufflehog status echo in a timeout-aware if/else (the =124 guard mirrors the git-history block), which indented the line and added a sibling `trufflehog=timeout` echo. The contract test still matched `line.startswith('echo "trufflehog=')` at column 0, so it hit StopIteration and ci-tests went red on every PR that touches a ci-tests path. Select the RC-driven ok/fail echo by its expression and strip the indentation before running it, so the test tracks the restructured shape without asserting a specific indentation. No behavior change to the skill.
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.
What
ci-testshas been red onmainsince #1055. That PR wrapped the filesystem trufflehog status echo in a timeout-awareif [ "${TRUFFLEHOG_RC:-1}" = 124 ]; then ... else ... fiblock (the=124guard mirrors the existing git-history block), which:echo "trufflehog=..."line by two spaces, andecho "trufflehog=timeout"line.test_filesystem_clean_empty_stream_is_okextracted that line withline.startswith('echo "trufflehog=')at column 0, so it now raisesStopIteration. Becauseci-testsis path-filtered (scripts/**,bin/**,aeon.yml,harness-adapter/**), #1055 merged without running it and leftmainred; every later PR touching those paths surfaces the failure.Fix
Select the RC-driven ok/fail echo by its expression (
&& echo ok) and strip the indentation before executing it, so the contract test tracks the restructured shape instead of assuming a flat column-0 line. No change to the skill's behavior.Full
scripts/tests/suite passes locally (76 tests); the target file 5/5.