You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(cli): source-guard hardening against real agent behavior (Roadmap Phase 3) #67
Source guard hardening: it's the feature nobody else has — make sure it survives real agent behavior (partial commits, formatter runs, config edits) without false positives.
Context
The source guard (cli/src/source-guard.ts) detects project-source edits made during a verify→fix loop and gives agents a typed signal instead of relying on prompt discipline. Baseline is snapshotted per verify-cycle in .verfix/verify-baseline.json, cleared on a passing run or new commit.
Task
Build a test matrix of real agent behaviors and verify the guard classifies each correctly (legitimate vs. flagged), fixing false positives/negatives found:
Partial commits — agent commits some files mid-loop (baseline clears on new commit: is that the right behavior when the commit contains the source edit the guard should have flagged?)
Config + source in one edit batch — legitimate verfix.config.json/selector edits interleaved with app-source edits
Generated/build output changes (dist/, lockfiles) — should never trip the guard
Branch switches / rebases mid-loop
New untracked source files (agent adds a component rather than editing one)
Acceptance criteria
Standalone test script covering the matrix above (temp git repo fixtures, same pattern as existing cli/test/*.test.ts)
Documented decision per ambiguous case (e.g. mid-loop commits) in code comments or docs
Zero false positives across the matrix; known limitations stated
Activity