test(snapshots): make byte/snapshot tests hermetic + re-seed baseline
The COL collision-scanner and the CLAUDE.md cascade resolve ~/.claude from process.env.HOME (active-config-reader). Snapshot/byte CLIs were spawned with the developer's real HOME, so they picked up installed plugins/skills and the user CLAUDE.md — making the v5.0.0 + default-output snapshots machine- and time-dependent. They were seeded 2026-05-01 with COL=1 (a real ~/.claude skill collision) and drifted to COL=0 after the polyrepo split: 26 pre-existing failures unrelated to Batch 1. Fix (test-only, no production change): - tests/helpers/hermetic-home.mjs — empty temp HOME, mirroring the pattern collision.test.mjs already uses for the COL unit test. - 7 harnesses spawn CLIs (or call lint()) under the hermetic HOME, so output depends only on committed fixtures. Determinism verified across runs. - Re-seeded all snapshots under hermetic HOME via SEED_SNAPSHOT/UPDATE_SNAPSHOT (added a SEED guard to the frozen v5.0.0 byte tests). Snapshots now reflect the fixture alone (COL=0, fixture-only activeConfig counts). - Also re-seeded the unused env-aware snapshots (manifest/whats-active/ plugin-health), which had baked dozens of real ~/.claude skill/plugin names into the committed repo — privacy cleanup. Full suite: 812/812 green, stable across 3 runs.
This commit is contained in:
parent
4b94da0f11
commit
8216fb4175
20 changed files with 326 additions and 3386 deletions
|
|
@ -5,6 +5,12 @@
|
|||
"verified": [],
|
||||
"regressions": [],
|
||||
"manual": [
|
||||
{
|
||||
"findingId": "CA-CML-001",
|
||||
"title": "Missing recommended sections",
|
||||
"file": "/Users/ktg/repos/ktg-plugin-marketplace/config-audit/tests/fixtures/marketplace-medium/CLAUDE.md",
|
||||
"recommendation": "Add sections for: Project overview, Architecture"
|
||||
},
|
||||
{
|
||||
"findingId": "CA-GAP-001",
|
||||
"title": "No custom skills or commands",
|
||||
|
|
@ -116,14 +122,8 @@
|
|||
{
|
||||
"findingId": "CA-DIS-001",
|
||||
"title": "Tool listed in both permissions.deny and permissions.allow",
|
||||
"file": "/Users/ktg/.claude/plugins/marketplaces/ktg-plugin-marketplace/plugins/config-audit/tests/fixtures/marketplace-medium/.claude/settings.json",
|
||||
"file": "/Users/ktg/repos/ktg-plugin-marketplace/config-audit/tests/fixtures/marketplace-medium/.claude/settings.json",
|
||||
"recommendation": "Remove the redundant allow entries. If you actually want this tool enabled, remove it from the deny list instead. Settings should express intent clearly."
|
||||
},
|
||||
{
|
||||
"findingId": "CA-COL-001",
|
||||
"title": "Skill name \"okr-offentlig-sektor\" used by multiple plugins",
|
||||
"file": "/Users/ktg/.claude/plugins/marketplaces/ktg-plugin-marketplace/plugins/okr/skills/okr-offentlig-sektor/SKILL.md",
|
||||
"recommendation": "Coordinate naming across plugins, or rename one to clarify intent. The shared name forces every reader to disambiguate by source."
|
||||
}
|
||||
],
|
||||
"backupId": null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue