feat: complete v1.7 provable hooks release#19
Conversation
- Fix CHANGELOG duplicate [1.7] section (keep rich version, drop simpler) - Add examples/hooks/lib/normalize-hook-input.sh — cross-runtime payload normalization for Claude Code + Grok (field names + tool-name literals) - Add examples/hooks/startup-gate.sh — SessionStart governance check: repo detection, AGENTS.md verification, active plan, skills currency, hook registration gap; writes drift report to startup-gate-report.md - Add examples/hooks/hook-telemetry-stop.sh — Stop hook that reads fire/block breadcrumbs and bulk-INSERTs session telemetry; configurable via AOF_TELEMETRY_URL + AOF_TELEMETRY_KEY env vars - Add guides/advanced/silent-failure-discipline.md — ADR 0012 pattern: every fail-open hook path must write to .errors.log; self-test command - Add guides/advanced/agents-md-standard.md — three-level AGENTS.md governance contract (identity / routing / procedures + ADR register) - Add INCIDENTS.md #36 (additionalContext not visible to model on session start), #37 (Grok runtime silent bypass), #38 (silent fail-opens) - Update AGENT_FRAMEWORK.md: v1.6 → v1.7, §5.3 matrix, framework structure, version history bullet - Update README: v1.7 references, 38 incidents, new guides + hooks Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 68ea8f818a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| local file="$1" | ||
| local n | ||
| if [ -f "$file" ]; then | ||
| n=$(wc -l < "$file" | tr -d ' ') |
There was a problem hiding this comment.
Append breadcrumbs before counting fire totals
When blocking hooks follow the breadcrumb contract documented for this telemetry hook (bc_write "<hook>-fire" / bc_write "<hook>-block"), the shared breadcrumb-lib.sh overwrites the same session file with > on each write rather than appending. Counting lines here therefore reports at most 1 fire/block per hook per session, so any hook that fires or blocks multiple times will be undercounted and the telemetry will answer the release's “are hooks firing?” question with corrupted counts.
Useful? React with 👍 / 👎.
| } | ||
|
|
||
| json_escape() { | ||
| python3 -c "import json,sys; print(json.dumps(sys.stdin.read()))" <<< "$1" |
There was a problem hiding this comment.
Avoid adding newlines to every telemetry string
For every telemetry row, this helper reads values through a Bash here-string, and <<< "$1" appends a newline before Python reads stdin. That means session_id, hook_name, and machine are inserted as values like "read-gate\n", which will fragment queries/group-bys and make lookups by the expected hook or session name miss these rows whenever telemetry is enabled.
Useful? React with 👍 / 👎.
What changed
Completes the v1.7 release. All checklist items done.
Type
Checklist
# fail-mode:and# blast-radius:headersWhat ships
New files:
examples/hooks/lib/normalize-hook-input.sh— cross-runtime payload normalization (Claude Code + Grok)examples/hooks/startup-gate.sh— SessionStart governance check, writes startup-gate-report.mdexamples/hooks/hook-telemetry-stop.sh— Stop hook, session-end telemetry via configurable env varsguides/advanced/silent-failure-discipline.md— ADR 0012: every fail-open path must logguides/advanced/agents-md-standard.md— three-level AGENTS.md governance contractUpdated:
CHANGELOG.md— [1.7] duplicate removed, full release entryAGENT_FRAMEWORK.md— v1.7, §5.3 matrix, framework structure, version historyINCIDENTS.md— #36-38README.md— v1.7, 38 incidents, new guides + hooksexamples/hooks/README.md— 4 new inventory rowsIncident links