Commit Graph
3 Commits
Author SHA1 Message Date
Defame1297 da88cd8d32 fix(tests): stop fixture helpers leaking temp dirs into /tmp
Why: new_repo/make_fixture/make_repo created a mktemp dir and appended
it to the cleanup array, but every caller runs them as R="$(helper)".
The append happens in that command-substitution subshell and is lost,
so the EXIT trap removed nothing. Each run leaked one dir per call:
31, 54, 22 and 9 for the four suites, about 1,700 dirs on one day.

Implementation Notes:
- Each suite creates one RUN_TMP root up front with a single
  `trap 'rm -rf "$RUN_TMP"' EXIT`; every fixture is `mktemp -d` under
  it, so cleanup no longer depends on where the helper runs.
- The CLEANUP_DIRS / FIXTURES arrays are gone from these four suites.
- test-check-scope-walkup-sync.sh and test-check-apm-agents-valid.sh
  already register fixtures in the caller and are unchanged.

Assisted-by: Claude Code
2026-11-28 14:40:47 +00:00
Defame1297andClaude Sonnet 5 c008da1876 fix(gates): run the provenance corpus gate from any cwd
The gate took its root from `git rev-parse --show-toplevel || pwd`, so
running it by absolute path from another directory found no skills and
exited 2. Derive the root from the script's own location; the optional
argument still overrides it.

The real-corpus test accepted exit 0 or 1, so it only caught a crash.
It now asserts exit 0. New cases cover a foreign cwd, a skill without
references/sources.md being skipped, several failing skills all being
reported, and an errored skill alongside a failing one.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EGHFJextYtVQseaHPDDhxB
2026-09-21 19:40:34 +00:00
Defame1297andClaude Sonnet 5 a1f9fa9091 feat(gates): sweep the provenance corpus on pre-push
Nothing ran validate-provenance.sh across the real corpus, so the 36
INFOs it reported for Research doc mismatches were found only by a
manual loop, and a FAIL tier would have been inert. Add
scripts/check-provenance-corpus.sh, which runs the validator over every
plugins/*/.apm/skills/*/ that has references/sources.md.

Exit 1 when any skill FAILs, naming them; INFO lines are printed but do
not fail; exit 2 when the gate cannot run (missing validator, validator
exit 2, or no skills found). Registered as a pre-push hook shaped like
check-scope-walkup-sync, documented in docs/spec/gates.md, and pinned in
test-adr0020-contract.sh's list of repo-authored hooks.

Refs: #121
ADR: 0028
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EGHFJextYtVQseaHPDDhxB
2026-09-21 17:29:20 +00:00