Skip to content

feat: In Workflows, only run .deepreview rules against git-changed output files - #342

Merged
nhorton merged 5 commits into
mainfrom
fix/quality-gate-review-only-required-outputs
Apr 6, 2026
Merged

feat: In Workflows, only run .deepreview rules against git-changed output files#342
nhorton merged 5 commits into
mainfrom
fix/quality-gate-review-only-required-outputs

Conversation

@nhorton

@nhorton nhorton commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The quality gate was treating all file_path outputs as "changed files" for .deepreview rule matching
  • This caused project-wide review rules (python_lint, python_code_review, etc.) to fire on unchanged reference files passed as outputs (e.g. key_reference_files in exploration steps)
  • Now intersects output file paths with get_changed_files() (git diff) before .deepreview matching — only files that are both step outputs AND actually modified trigger project reviews
  • Step-specific (dynamic) reviews still run against all declared outputs since those are explicitly defined for those files
  • Updated JOBS-REQ-004.5 spec to document the new behavior and failure fallback
  • Updated doc/architecture.md and doc/mcp_interface.md to match
  • Fixed pre-existing DeepSchema violation (missing RFC 2119 keyword in JOBS-REQ-004.3.7)

Test plan

  • test_deepreview_rules_skip_unchanged_output_files — unchanged outputs don't trigger .deepreview rules (JOBS-REQ-004.5.2)
  • test_dynamic_rules_match_all_outputs_regardless_of_git — dynamic rules run on all outputs (JOBS-REQ-004.5.3)
  • test_deepreview_skipped_when_get_changed_files_fails — git failure skips deepreview, dynamic rules unaffected (JOBS-REQ-004.5.4)
  • All 38 quality gate tests pass
  • Lint clean

🤖 Generated with Claude Code

The quality gate was treating all file_path outputs as "changed files"
for .deepreview matching. This caused reviews to run on unchanged
reference files (e.g. key_reference_files in exploration steps).

Now intersects output file paths with actual git-changed files before
matching .deepreview rules. Step-specific (dynamic) reviews still run
against all declared outputs since those are explicitly defined.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@nhorton
nhorton force-pushed the fix/quality-gate-review-only-required-outputs branch from 150cb9d to de84554 Compare April 6, 2026 20:20
@nhorton nhorton changed the title fix: only run .deepreview rules against required step outputs fix: only run .deepreview rules against git-changed output files Apr 6, 2026
nhorton and others added 4 commits April 6, 2026 14:32
…traceability

Update requirements to reflect that .deepreview rules are now matched
only against git-changed output files, and that dynamic rules still
match all outputs. Documents the fallback behavior when get_changed_files
fails. Adds traceability comment to the new test.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reflect that .deepreview rules now match against git-changed output
files only, while dynamic rules still match all output files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pre-existing issue: requirement 7 read as a descriptive statement
without a MUST/SHOULD/MAY keyword, violating the DeepSchema.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
….5.3/4

- Renumber traceability comments (.5.4→.5.5, .5.6→.5.7, .5.7→.5.8)
  to match spec renumbering
- Fix traceability comment format on new test to match project convention
- Add test for JOBS-REQ-004.5.3: dynamic rules match all outputs
  regardless of git status
- Add test for JOBS-REQ-004.5.4: get_changed_files failure skips
  .deepreview matching but dynamic rules still run

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@nhorton
nhorton added this pull request to the merge queue Apr 6, 2026
@nhorton
nhorton removed this pull request from the merge queue due to a manual request Apr 6, 2026
@nhorton nhorton changed the title fix: only run .deepreview rules against git-changed output files feat: In Workflows, only run .deepreview rules against git-changed output files Apr 6, 2026
@nhorton
nhorton added this pull request to the merge queue Apr 6, 2026
Merged via the queue into main with commit 8c3aa09 Apr 6, 2026
5 checks passed
@nhorton
nhorton deleted the fix/quality-gate-review-only-required-outputs branch April 6, 2026 21:30
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