Skip to content

chore: sync PR-review context excludes (keep SPEC.md, filter artifacts/snapshots)#83

Open
nick-inkeep wants to merge 1 commit into
mainfrom
chore/pr-review-context-excludes
Open

chore: sync PR-review context excludes (keep SPEC.md, filter artifacts/snapshots)#83
nick-inkeep wants to merge 1 commit into
mainfrom
chore/pr-review-context-excludes

Conversation

@nick-inkeep

Copy link
Copy Markdown
Contributor

What

Syncs this repo's PR-review workflow exclude lists with the updated team-skills template:

  • Artifact dirs excluded from auto-injected review context: reports/, tech-probes/, stories/, projects/, strategy/, and all of tmp/ — these were flowing into the cloud reviewers' diff context and burning reviewer budget on non-code content.
  • specs/ excluded with SPEC.md kept: spec sub-artifacts (evidence/, meta/, analyses) are filtered, but a feature's SPEC.md diff stays in — load-bearing grounding for understanding the change. Implemented as a dynamic per-file exclude (git pathspecs cannot re-include after an exclude).
  • Generated-file noise: **/__snapshots__/**, *.snap, bun.lockb.

Both EXCLUDE_PATTERNS (main diff) and DIFF_EXCLUDE (re-review delta) updated in lockstep. Repo-specific entries preserved.

Why

Reviewer context is token-budgeted; snapshot serializations and research artifacts are noise there. Reviewers can still Read any excluded file on demand — exclusion only affects what is auto-injected.

Notes

  • Edge case: a PR touching only excluded paths now produces an empty auto-injected diff (reviewer sees "no reviewable changes").
  • Source of truth: team-skills ci/pr-review/skills/setup-cloud-pr-reviewer/assets/claude-code-review.yml.template (same change landing there).
  • Verified: YAML parses; the SPEC.md-keep bash logic is functionally tested in team-skills (test-generate-pr-context.sh green; manual fixture confirmed SPEC.md hunk kept, evidence hunk filtered).

🤖 Generated with Claude Code

Excludes artifact dirs (reports, specs sub-files, stories, projects,
strategy, tech-probes, tmp), test snapshots, and bun.lockb from
auto-injected review context; keeps SPEC.md diffs reviewable via
dynamic per-file excludes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@inkeep-internal-ci

inkeep-internal-ci Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Claude finished @nick-inkeep's task in 5m 59s —— View job


PR Review Complete ✅

  • Phase 1: Analyze context & load workflow reference
  • Phase 2: Generate PR summary
  • Phase 3: Dispatch domain-specific reviewers (DevOps + Standards)
  • Phase 4: Deduplicate & triage findings — all findings assessed as non-actionable or incorrect
  • Phase 5: Create pending review (no inline comments needed)
  • Phase 6: Submit review — APPROVED

Result: Clean CI config change. No actionable findings. Both reviewer findings were discarded (1 pre-existing structural issue not addressable here, 1 factually incorrect claim about git pathspec semantics). Review submitted as formal GitHub approval.

@inkeep-internal-ci inkeep-internal-ci Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review Summary

(0) Total Issues | Risk: Low

Clean, well-implemented CI config change. Both EXCLUDE_PATTERNS and DIFF_EXCLUDE are updated in lockstep. The SPEC.md-keep bash logic is defensive and handles edge cases correctly (IFS= read -r for filenames with spaces, [ -n ] guard for empty lines, 2>/dev/null for missing specs/, || true for no-match, process substitution to avoid subshell scoping).

No Critical, Major, Minor, or Consider findings.

Discarded (2)
Location Issue Reason Discarded
.github/workflows/claude-code-review.yml:100-122,400-421 Duplicated exclude arrays between EXCLUDE_PATTERNS and DIFF_EXCLUDE are a maintenance burden Pre-existing structural issue. The arrays live in separate run: blocks across different workflow steps; sharing them would require serializing through GITHUB_OUTPUT, adding complexity disproportionate to the maintenance risk. Not reasonably addressable alongside this PR.
.github/workflows/claude-code-review.yml:119,420 ':!*.snap' only excludes root-level snapshot files Incorrect analysis. Git pathspec documentation explicitly states that * and ? can match directory separators (unlike .gitignore or shell globbing). Per the git glossary: "Paths relative to the directory prefix will be matched against that pattern using fnmatch(3); in particular, * and ? can match directory separators." The pattern ':!*.snap' correctly excludes .snap files at all depths.
Reviewers (2)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
pr-review-devops 3 0 0 0 0 0 1
pr-review-standards 1 0 0 0 0 0 1
Total 4 0 0 0 0 0 2

Note: DevOps returned 2 INFO-level observations (positive findings confirming correctness) that don't count toward Returned. Standards returned 1 finding that was assessed as factually incorrect (git pathspec * does match directory separators).


✅ APPROVE

Summary: Straightforward, well-commented config sync. The SPEC.md dynamic-exclude logic is a clever workaround for git pathspec's "no re-include after exclude" limitation, correctly implemented with proper edge case handling. The || true guards, 2>/dev/null suppression, and IFS= read -r are all the right defensive patterns. Ship it! 🚢

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