Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .console/log.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,7 @@ truth; pre-push catches regressions before they hit GitHub.

- Added CLAUDE.md to .gitignore
- Added .custodian/tmp*.yaml to exclude custodian audit temp files

## 2026-05-23 — Standardize pre-push hook

- Updated `.hooks/pre-push` to the auto-discovering boundary-artifact variant (auto-locates PrivateManifest/dist artifact; extra custodian-multi fallback path).
22 changes: 20 additions & 2 deletions .hooks/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,27 @@
set -e

repo_root="$(git rev-parse --show-toplevel)"
workspace_root="$(cd "$repo_root/.." && pwd)"

if [ -z "${REPOGRAPH_BOUNDARY_ARTIFACT_FILE:-}" ]; then
shopt -s nullglob
for candidate in \
"$workspace_root"/PrivateManifest/dist/boundary_disclosure_artifact.json \
"$workspace_root"/*/dist/boundary_disclosure_artifact.json \
"$workspace_root"/*/policy/boundary_disclosure_artifact.json
do
if [ -f "$candidate" ]; then
export REPOGRAPH_BOUNDARY_ARTIFACT_FILE="$candidate"
break
fi
done
shopt -u nullglob
fi

if [ -z "${REPOGRAPH_BOUNDARY_ARTIFACT_FILE:-}" ] || [ ! -f "$REPOGRAPH_BOUNDARY_ARTIFACT_FILE" ]; then
echo "[custodian-pre-push] missing REPOGRAPH_BOUNDARY_ARTIFACT_FILE; failing closed"
echo " Generate artifact from PrivateManifest first and export REPOGRAPH_BOUNDARY_ARTIFACT_FILE"
echo " Generate artifact from PrivateManifest first:"
echo " python -m private_manifest.export_boundary_artifact --graph-root graph --out dist/boundary_disclosure_artifact.json"
exit 1
fi

Expand All @@ -17,7 +34,8 @@ fi
for candidate in \
"$custodian_multi" \
"$repo_root/.venv/bin/custodian-multi" \
"$repo_root/.warehouse-venv/bin/custodian-multi"
"$repo_root/.warehouse-venv/bin/custodian-multi" \
"$workspace_root/Custodian/.venv/bin/custodian-multi"
do
if [ -x "$candidate" ]; then
custodian_multi="$candidate"
Expand Down
Loading