Skip to content

feat: diff-scoped gating via testmap report --diff - #22

Merged
tylerriccio33 merged 1 commit into
mainfrom
feat/diff-scoped-gating
Jul 5, 2026
Merged

feat: diff-scoped gating via testmap report --diff#22
tylerriccio33 merged 1 commit into
mainfrom
feat/diff-scoped-gating

Conversation

@tylerriccio33

Copy link
Copy Markdown
Owner

Summary

  • Add testmap report --diff [REF] (default HEAD): only gates generated features ([tool.testmap.generate]) whose source file changed since REF, instead of the whole repo.
  • New testmap/gitdiff.py computes changed files via git diff --name-only + untracked files.
  • Config now tracks generated_sources (feature -> source file); build_report tags each feature "gated", used by both the exit-code gate and the rendered "Missing:" section.
  • Features with no known source (manual/__features__ entries) always stay gated since they can't be scoped.

Test plan

  • make lint
  • make test
  • make testmap
  • make prek
  • New tests cover: feature->source mapping, Config.in_diff_scope, build_report gating flag, and an end-to-end git-repo fixture proving an untouched legacy gap passes with --diff but fails without it (and re-fails once its source is touched).

🤖 Generated with Claude Code

https://claude.ai/code/session_016WrFcCTi5tb8LPnsn1kTci

Only enforce required kinds for generated features whose source changed
since a git ref, so an agent isn't forced to backfill unrelated legacy
gaps just to make the global gate pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WrFcCTi5tb8LPnsn1kTci
@tylerriccio33
tylerriccio33 merged commit f9b34c2 into main Jul 5, 2026
2 checks passed
@tylerriccio33
tylerriccio33 deleted the feat/diff-scoped-gating branch July 5, 2026 21:41
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