🔧 chore(deps): veda's mutation gate runs agnipariksha 0.8.5

Merged
AT
11d ago
+6-6

Slice: #411
State: #422

What

veda's root pin moves from @veda-hq/agnipariksha 0.7.9 to 0.8.5, released from #420 (tag v0.8.5). 0.8.5 brings --pushed-refs, with cli.ts passing its own mutation lane.

On its own this changes nothing about the gate's verdicts: the hook still runs --tracked-only --base "$base", which 0.8.5 judges as 0.7.9 did. The installed bin, run with --pushed-refs and an empty stdin, prints "the push carries no commit (up to date, or deletions only) - nothing to judge" and exits 0.

For Alok: the hook change, to commit yourself

Agents do not edit .githooks/ (veda#235). The hook line needs 0.8.5: 0.7.9 refuses --pushed-refs as an unsupported argument, so it must land with this pin or after it, never before. Once this merges, the change below is the whole of what is left of #411.

.githooks/pre-push, the mutation stage:

 dvara_stage mutation
-"$root/node_modules/.bin/agnipariksha" --tracked-only --base "$base" || exit 1
+"$root/node_modules/.bin/agnipariksha" --tracked-only --pushed-refs --base "$base" <<< "$refs" || exit 1

$refs already holds git's ref lines: the hook reads them for niyam's stage.

scripts/githooks.test.mjs: the stand-in also records its stdin, and the assertions name the flag and the ref line.

-  writeFileSync(join(repo, 'node_modules', '.bin', 'agnipariksha'), '#!/bin/sh\necho "agnipariksha $*" >> "$AGNIPARIKSHA_CALLS"\n[ -z "${AGNIPARIKSHA_REFUSE:-}" ]\n');
+  // It also records its stdin, where the hook hands it git's ref lines (--pushed-refs).
+  writeFileSync(join(repo, 'node_modules', '.bin', 'agnipariksha'), '#!/bin/sh\necho "agnipariksha $*" >> "$AGNIPARIKSHA_CALLS"\ncat >> "$AGNIPARIKSHA_CALLS.stdin"\n[ -z "${AGNIPARIKSHA_REFUSE:-}" ]\n');
     // The first push has no origin/main yet, so the gate diffs against HEAD.
-    assert.equal(readFileSync(agniparikshaCalls, 'utf8'), 'agnipariksha --tracked-only --base HEAD\n');
+    assert.equal(readFileSync(agniparikshaCalls, 'utf8'), 'agnipariksha --tracked-only --pushed-refs --base HEAD\n');
+    // git's ref line for the push, handed over on stdin.
+    assert.equal(readFileSync(`${agniparikshaCalls}.stdin`, 'utf8'), `refs/heads/main ${git(repo, 'rev-parse', 'HEAD').stdout.trim()} refs/heads/main ${'0'.repeat(40)}\n`);
-    assert.equal(readFileSync(agniparikshaCalls, 'utf8').split('\n').at(-2), 'agnipariksha --tracked-only --base origin/main');
+    assert.equal(readFileSync(agniparikshaCalls, 'utf8').split('\n').at(-2), 'agnipariksha --tracked-only --pushed-refs --base origin/main');

With the flag on, the hook refuses a push of a ref other than the checked-out HEAD, or one made with a tracked file differing from HEAD, before any mutant runs. The refusal says to check out that ref, or to commit or stash the change. git push origin --delete <branch> and an up-to-date push judge nothing and go through.

The root README's package table still says agnipariksha is v0.7, as it already did at 0.8.4. README.md is a code-owner path, so this pull request leaves it alone rather than hold the merge for your review. If you want, fold this line into the hook commit:

-| [`@veda-hq/agnipariksha`](packages/agnipariksha) | अग्निपरीक्षा, trial by fire | Mutation gate: wiring and policy on top of Stryker | v0.7: lanes from `agnipariksha.json` and the `arid-nodes` Stryker plugin; what it judges is in [its README](packages/agnipariksha#readme) |
+| [`@veda-hq/agnipariksha`](packages/agnipariksha) | अग्निपरीक्षा, trial by fire | Mutation gate: wiring and policy on top of Stryker | v0.8: lanes from `agnipariksha.json`, `--pushed-refs` for a pre-push hook, and the `arid-nodes` Stryker plugin; what it judges is in [its README](packages/agnipariksha#readme) |

🤖 Generated with Claude Code