Skip to content

feat(contract): wire test_diff + test_count_baseline into impl-issue#1621

Merged
nextlevelshit merged 3 commits into
mainfrom
feat/wire-test-guards-impl-issue
Apr 30, 2026
Merged

feat(contract): wire test_diff + test_count_baseline into impl-issue#1621
nextlevelshit merged 3 commits into
mainfrom
feat/wire-test-guards-impl-issue

Conversation

@nextlevelshit
Copy link
Copy Markdown
Collaborator

Summary

  • Add test_diff and test_count_baseline contracts to impl-issue.yaml implement step
  • Both run as rework gates — test deletion or count regression triggers rework loop
  • Wired in both internal/defaults/embedfs/ (shipped) and .agents/pipelines/ (local)

Closes #1583 wiring. Closes #1584 wiring.

Test plan

  • wave run impl-issue on any issue — verify test_diff + test_count_baseline fire in handover
  • Delete a test function mid-run — verify test_diff catches it as rework
  • Verify existing test_suite contract still runs first (fail gate)

Closes #1584. Defense-in-depth alongside test_diff (#1583) + llm_judge
(#1582). Compares COMMITTED tree counts of test declarations: HEAD vs
BaseRef (default HEAD~1). Catches deletions slipping past diff
inspection — file moves, force-pushes, multi-commit sequences.

Language-agnostic: shares TestFilePattern + TestFuncPattern with
test_diff. wave.yaml documents the Go defaults explicitly so non-Go
projects know the knobs.

Tests cover: no-change, addition, deletion, file-move, tolerance
config, no-base-ref / no-git silent pass, Python config.
Without these fields the wave.yaml entries from the same PR fail YAML
unmarshal in TestLoadWaveYAML_PersonaPermissions. Mirrors the contract
fields added in internal/contract/contract.go.
Every impl-issue run now checks for test deletions (test_diff) and
enforces test count baseline (test_count_baseline) as rework gates.
Closes #1583, #1584 wiring gap — contracts existed but were unwired.
@nextlevelshit nextlevelshit merged commit ae6c3d0 into main Apr 30, 2026
10 checks passed
@nextlevelshit nextlevelshit deleted the feat/wire-test-guards-impl-issue branch April 30, 2026 11:29
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.

impl-issue contract: post-commit Test-count baseline check impl-issue contract: source_diff guard for test-file deletion ratio

1 participant