Retire the line-level append-only mechanic (ersatztv#303 H9) in favor of the lifecycle validator built in Tasks 1-5. .claude/hooks/decisions-guard.sh is now a thin fail-open shim around scripts/decisions_validate.py; .husky/pre-commit calls it for the structural (working-tree) checks, .husky/commit-msg drops the old staged/[decisions-edit]-deletion block and keeps only the Co-Authored-By check. The Gitea decisions-guard job is renamed "decisions lifecycle" and now runs decisions_validate.py --base/--head (structural + body-diff + no-vanish) and build_decisions_catalog.py --check (active catalog drift), with actions/setup-python@v5 added since the bare `small` lane doesn't guarantee python3; the old 1800-line consolidation-floor step is removed (replaced by the validator's aggregate active-corpus budget). docs/decisions.md's header is rewritten from append-only to lifecycle framing (metadata schema, statuses, generated catalog, archive, same-PR supersession); [decisions-edit] is re-scoped (not removed) to rationale-prose edits/factual corrections only. docs/ci-cd.md's release ritual and hook/job descriptions are rewritten to match. Also fixes a pre-existing validator false-positive surfaced while sanity-checking against origin/main: Task 6's #303 H9/H3 split (commit d09be57e) renamed the archived record's heading away from the pre-split original, which the validator's heading-based relocation check reads as "removed without an archive copy." Restored the archived heading to match the original text (functionally unchanged — still status: superseded, same key) and updated the two prose cross-references (migration-map.md, release-ci-governance.md) that pointed at the old anchor. PR1 scope only (per brief): does NOT wire the kickoff-guard CI step or touch the kickoff/README/select-queue docs — that's Task 8/PR2. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
13 lines
803 B
Bash
Executable File
13 lines
803 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# ersatztv#521 — the line-level append-only mechanic is retired. Decision integrity is now enforced by
|
|
# the lifecycle validator. `[decisions-edit]` survives ONLY for rationale-prose edits (validator
|
|
# body-diff, CI). This shim runs the structural validator over the working tree; the body-diff/no-
|
|
# vanish checks run in CI where a base/head is available. Fail-open on any tooling trouble.
|
|
set -uo pipefail
|
|
cd "$(git rev-parse --show-toplevel)" || exit 0
|
|
command -v python3 >/dev/null 2>&1 || exit 0 # no python -> fail-open
|
|
PYTHONPATH=. python3 scripts/decisions_validate.py
|
|
rc=$?
|
|
[ "$rc" -eq 1 ] && exit 1 # only a real validation failure blocks
|
|
exit 0 # crashes/other codes -> fail-open
|