Repository navigation
Commit faf9ed3
test(vex): golden snapshot of discovery over committed fixtures
Pin the exact output of lockfile discovery over every committed fixture
project, so a behavior change to discovery (or to the lock readers it
shares with the rewriters and vendor::lock_inventory) shows up as a golden
diff to review.
- Corpus: 182 projects under crates/socket-patch-core/tests/fixtures/ —
every redirect case's input/ and expected/ tree, pnpm-hosted, poetry,
pipenv, bun-lockb captures, and each pdm-native lock staged as pdm.lock —
run through the full orchestrator and checked against rule 11's
recognition-covers-refs invariant.
- Rendering (src/vex/discover/testing/golden.rs): every PatchedRef field
(plus lockfile_basis_ok), diagnostics (tempdir root and OS error numbers
normalized), recognized identities, unlocked pins, resolved-elsewhere
entries, and the live hosted / vendored ledger claims. The destructuring
is exhaustive, so a new field fails to compile until the golden covers it.
- Goldens: one JSON per fixture family (redirect-<eco>, bun-lockb,
pdm-native, pipenv, pnpm-hosted, poetry) under
tests/fixtures/vex-discover-golden/, mapping fixture path to output.
Missing and orphaned entries fail.
Regenerate after an intended change with
SOCKET_PATCH_UPDATE_GOLDEN=1 cargo test -p socket-patch-core --lib
vex::discover::testing::golden. Unix only: Windows checkouts convert some
fixtures' line endings.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>1 parent e3d0ca9 commit faf9ed3
15 files changed
Lines changed: 4288 additions & 1 deletion
File tree
- crates/socket-patch-core
- src/vex/discover
- testing
- tests/fixtures/vex-discover-golden
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
120 | 124 | | |
121 | 125 | | |
122 | 126 | | |
| |||
1969 | 1973 | | |
1970 | 1974 | | |
1971 | 1975 | | |
| 1976 | + | |
| 1977 | + | |
1972 | 1978 | | |
1973 | 1979 | | |
1974 | 1980 | | |
| |||
0 commit comments