Skip to content

feat(decision): R31 wave-diff semantic checks + R51 fallback matrix test - #12

Merged
trac41799 merged 5 commits into
mainfrom
feat/decision-r31-wave-diff
Sep 29, 2026
Merged

trac41799 merged 5 commits into
mainfrom
feat/decision-r31-wave-diff

Conversation

@trac41799

Copy link
Copy Markdown
Owner

What

Closes the last two unmet decision-layer ("Jev") acceptance criteria.

R31 — semantic checks on the wave's collected diff

  • New wave_executor::collect_wave_diff: each agent worktree's git diff HEAD plus untracked and gitignored secret-named files (a committed .gitignore usually hides .env). Streamed/bounded (20 000 chars overall, 4 096/file, ≤200 files), symlinks and heavy dirs skipped, change-free worktrees emit nothing.
  • finalize_wave_with_verify made live and wired into verify_and_finalize_wave_cmd → deterministic + semantic checks run on the wave diff, not the project tree (as the AC requires). verify_project_cmd no longer feeds a project-tree diff; removed verification::collect_worktree_diff.

R51 — offline-fallback matrix test

  • New decision_fallback_tests (#[cfg(test)]) drives the injectable transport seam with an always-failing backend: core primitives, deployment verify (deterministic only), KG typing (LLM type preserved), contradiction (jaccard fallback), and that a fallback records a decision_usage row.

Verification

Gate Result
cargo test (MSVC) 223 lib + 42 integration = 265 passed / 0 failed
npm test 341 passed
npx tsc --noEmit clean
npm run lint 0 errors (13 warnings)
pytest local-daemon/tests/test_router.py 28 passed

Adversarial review (3 passes, all addressed)

  • Unbounded diff accumulation → streamed/bounded; --exclude-standard dropping gitignored .env → pathspec-limited ignored-secret pass; the file cap starving the secret filter → filter before count + secrets scanned first; symlinks skipped; case/.envrc missed → :(glob,icase)**/.env*; spurious secrets call for change-free worktrees; docs no longer overstate coverage.
  • Accepted (not fixed): blocking git/ureq on the async runtime — same class as accepted risk R-2 (tracked there).

Honest scope: R51's tests cover the transport-seam consumers only; the remaining rows rely on their implementation fallbacks (stated in spec.md and the test-file header). git diff HEAD misses changes an agent already committed. The collected diff (incl. secret-named file bodies) is egressed to the configured backend to be judged — documented in decision-contract.md §Privacy.

Docs: spec.md (R31/R51 ACs + Delivery), architecture.md (§5 #9, §8 R-7/R-13), review-round9.md.

@vercel

vercel Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
source-forge Ready Ready Preview Sep 29, 2026 1:20pm UTC

@trac41799
trac41799 force-pushed the feat/decision-r31-wave-diff branch from f2680c7 to 0215b45 Compare September 29, 2026 13:20
@trac41799
trac41799 merged commit a141ba0 into main Sep 29, 2026
8 checks passed
@trac41799
trac41799 deleted the feat/decision-r31-wave-diff branch September 29, 2026 13:24
- R31: collect_wave_diff (agent worktree diff + untracked files); make
  finalize_wave_with_verify live and run deterministic + semantic checks on the
  wave diff via verify_and_finalize_wave_cmd; verify_project_cmd no longer feeds
  a project-tree diff (AC forbids it); drop verification::collect_worktree_diff
- R51: decision_fallback_tests integration module (offline backend -> documented
  fallbacks) using the injectable transport seam
- plan_entities/detect_and_record_contradictions -> pub(crate) for the seam
- docs: spec R31/R51 ACs, architecture §5/§8, review-round9.md
- bound collect_wave_diff incrementally (20k/4k/200, size+symlink skips)
- collect gitignored secret-named files (a committed .gitignore hides .env)
- skip change-free worktrees (no spurious secrets call)
- R51: assert the fallback records a decision_usage row; spec AC wording/coverage
- docs: privacy/egress note, git-diff-HEAD limitation, review-round9
…ter; F2/F3)

- F1: run looks_secret/noise filters BEFORE the file cap (regression test with 250
  ignored files + a secret .env)
- F3: stream the tracked diff (bounded) and pathspec-limit the ignored listing
  (a plain --ignored list is 10k+ lines)
- F2: stop claiming unit-test coverage for non-seam consumers; state inspection
- nits: R31 AC mentions gitignored secret files; doc counts updated
- F4 (blocking on async runtime) accepted with rationale, tracked with R-2
…(round 9 pass 3)

- pathspecs use :(glob,icase) and **/.env* so .envrc/.ENV are collected
- scan gitignored secrets before untracked files (no starvation by a file flood)
- drop needless mut; docs/test list updated
Rebasing an open PR onto a moved origin/main requires updating the branch; the
prohibition targets main/shared branches, not your own PR head.

This branch was successfully deployed

1 active deployment
Preview — 0215b45c Deployed Sep 29, 2026 by vercel[bot]
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