Skip to content

fix(tests): make vuln-scanner status test tolerant of the timeout-aware block - #1057

Merged
aaronjmars merged 1 commit into
mainfrom
fix/vuln-scanner-status-test
Sep 11, 2026
Merged

fix(tests): make vuln-scanner status test tolerant of the timeout-aware block#1057
aaronjmars merged 1 commit into
mainfrom
fix/vuln-scanner-status-test

Conversation

@aaronjmars

Copy link
Copy Markdown
Collaborator

What

ci-tests has been red on main since #1055. That PR wrapped the filesystem trufflehog status echo in a timeout-aware if [ "${TRUFFLEHOG_RC:-1}" = 124 ]; then ... else ... fi block (the =124 guard mirrors the existing git-history block), which:

  • indented the RC-driven echo "trufflehog=..." line by two spaces, and
  • added a sibling echo "trufflehog=timeout" line.

test_filesystem_clean_empty_stream_is_ok extracted that line with line.startswith('echo "trufflehog=') at column 0, so it now raises StopIteration. Because ci-tests is path-filtered (scripts/**, bin/**, aeon.yml, harness-adapter/**), #1055 merged without running it and left main red; 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.

…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.
@aaronjmars
aaronjmars merged commit 3fa3bef into main Sep 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant