Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,9 @@ jobs:

# Per-PR tests: a PR registers its test by adding scripts/ci-tests.d/<slug>.sh (one command line),
# not by appending a line to the step above, so PRs never conflict on this file.
# pyyaml: scripts/test_workflow_persist_credentials.py fails closed without it.
- name: Install hypothesis for the property tests
run: python3 -m pip install hypothesis==6.170.12
run: python3 -m pip install hypothesis==6.170.12 pyyaml==6.0.3
- name: Per-PR tests (scripts/ci-tests.d)
run: |
set -euo pipefail
Expand Down
2 changes: 2 additions & 0 deletions changelog.d/hermetic-pyyaml.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
### Fixed
- CI pins `pyyaml==6.0.3` next to hypothesis: the `scripts/test_workflow_persist_credentials.py` guard fails closed without it, so the runner no longer depends on whatever PyYAML the image ships.
2 changes: 2 additions & 0 deletions changelog.d/scan-summary-worktree-path.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
### Fixed
- The scan-summary tests no longer fail when the checkout lives under a `.claude/worktrees/` path (every lane worktree): the "default excludes" check matched `worktrees` in the absolute `--config` path the tool logs, not in a scanned file. The check now strips the checkout path, and the hermetic suite runs the test from a worktrees-style path so the regression stays caught. The failure was blamed on the host semgrep cache; it was not.
9 changes: 9 additions & 0 deletions scripts/test-review-checks-scan-summary-hermetic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,12 @@ else
grep '^FAIL' "$T/out" || tail -5 "$T/out"
echo "FAILED: the scan-summary test depends on the host's semgrep cache"; exit 1
fi
# Same for the checkout path: lanes run from .claude/worktrees/<name>, so "worktrees" sits in every absolute path the tool logs.
mkdir -p "$T/.claude/worktrees/w"; ln -s "$ROOT/scripts" "$T/.claude/worktrees/w/scripts"
mkdir "$T/.claude/worktrees/w/.claude"; ln -s "$ROOT/.claude/skills" "$T/.claude/worktrees/w/.claude/skills"
if bash "$T/.claude/worktrees/w/scripts/test-review-checks-scan-summary.sh" >"$T/out2" 2>&1; then
echo "ok: the scan-summary test passes from a checkout path containing 'worktrees'"
else
grep '^FAIL' "$T/out2" || tail -5 "$T/out2"
echo "FAILED: the scan-summary test depends on the checkout path"; exit 1
fi
4 changes: 3 additions & 1 deletion scripts/test-review-checks-scan-summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ mkdir -p node_modules/p .claude/worktrees/w vendor
printf 'x\n' >node_modules/p/a.txt; printf 'x\n' >.claude/worktrees/w/b.txt; printf 'x\n' >vendor/c.txt; printf 'x\n' >real.txt
git add -f . && git -c user.email=t@example.com -c user.name=t commit -q -m vendored
: >"$GL_LOG"; : >"$SG_LOG"; run
grep -q 'real.txt' "$GL_LOG" && ! grep -Eq 'node_modules|worktrees|vendor' "$GL_LOG" "$SG_LOG" && ok "default excludes" || bad "default excludes"
# Strip the checkout path first: a lane worktree (.claude/worktrees/...) puts "worktrees" in the absolute --config path.
cat "$GL_LOG" "$SG_LOG" | while IFS= read -r l; do printf '%s\n' "${l//"$ROOT"/}"; done >"$T/args.log"
grep -q 'real.txt' "$GL_LOG" && ! grep -Eq 'node_modules|worktrees|vendor' "$T/args.log" && ok "default excludes" || bad "default excludes"
grep -q -- '--skip-dirs node_modules,.claude/worktrees,vendor' "$TV_LOG" && ok "trivy skip-dirs" || bad "trivy skip-dirs"

# Heavy lease: with one slot (tokens=off) taken by a live holder, REVIEW_LEASE_FULL=skip skips heavy scanners (default: degraded, see test-review-checks-lease-degraded.sh).
Expand Down
Loading