mirror of
https://github.com/boshu2/agentops.git
synced 2026-09-14 15:08:13 +08:00
5d61bf8a3f
Fixes the three gremlins observed 2026-07-18 (bead age-gate-scripts-worktree-gitdir-p62wo): 1. **Gate scripts broke under hook env from linked worktrees** (#919 regression): new scripts/lib/repo-root.sh (GIT_*-scrubbed resolution, BASH_SOURCE anchor, worktree-correct) swept across 32 scripts. Proof: this PR's own push ran the pre-push gates from a linked worktree and passed. 2. **core.bare=true recurrence**: mechanism proven (leaked GIT_DIR + no-arg git init --bare rewrites the SHARED config); writer traced with high confidence to a live Gas City city process (concrete suspect: gascity cmd_rig_test.go runGitInTest, unscrubbed env + no-arg init --bare — fork-side fix filed separately). Defense: new always.git-config-hygiene gate fails fast on core.bare/test identities with the repair command inline (--self-test proves fail-closed). 3. **Test/test@test.com identity leak**: writer convicted — our own pre-push chain leaked GIT_DIR into go test, whose helpers wrote the shared config via git -C (mechanism proven). Cut at both ends: validate-go-fast scrubs env for children; every test git-helper set-site scrubs; check-test-isolation gains a WARN-ratchet rule (baseline 3 → FAIL at 0). Gates: shellcheck rc=0 across 36 scripts; go build/vet clean; 655+379+149 tests; hygiene self-test; both originally-failing validators pass under the repro env.
18 lines
716 B
Bash
Executable File
18 lines
716 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# validate-workflow-install.sh — the named blocking parent for workflow install
|
|
# freshness (ag-wi9w1; gate check ID workflow.install-drift).
|
|
#
|
|
# Thin parent: run check-workflow-drift.sh, then check-bdd-foundry-markers.sh
|
|
# (argless — the repo canonical). Exit non-zero if either fails, propagating
|
|
# their output. Clean machines stay green via the drift check's absent=>SKIP.
|
|
set -uo pipefail
|
|
|
|
# shellcheck disable=SC1007,SC1091
|
|
. "$(CDPATH= cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/lib/repo-root.sh"
|
|
repo_root="$(resolve_repo_root)"
|
|
|
|
status=0
|
|
bash "$repo_root/scripts/check-workflow-drift.sh" || status=1
|
|
bash "$repo_root/scripts/check-bdd-foundry-markers.sh" || status=1
|
|
exit "$status"
|