-
Notifications
You must be signed in to change notification settings - Fork 0
M1 foundations: roadmap governance + smoke scripts + deterministic graph commit digest #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
cd3769b
5e2089e
b9ada84
8e8927e
cfc999d
6f85477
a9616ba
e4f6aab
38a938a
e86ff33
c75e136
8c4cf1e
807804d
b8a768d
11abd9d
786b766
364ba43
f853ec4
ad03a04
225e16b
dd9717c
b0e95be
6a4c741
105ec9d
1a2cbdb
c9891cc
e66f400
13abb5f
2a9054d
9226f56
a2cb7a7
c6c6285
9c3749d
73715f6
6893422
f7fa74c
b2cc335
72d1d47
8a0c978
4fa251b
6beba86
22039be
76b8ce4
6f5b3d4
2583a5b
336f354
de232d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,24 @@ | ||||||||||||||||||||
| #!/bin/sh | ||||||||||||||||||||
| set -eu | ||||||||||||||||||||
|
|
||||||||||||||||||||
| # Only run the roadmap DAG updater when a ROADMAP README is staged. | ||||||||||||||||||||
| # | ||||||||||||||||||||
| # Rationale: | ||||||||||||||||||||
| # - Updating Mermaid styling is derived output; avoid paying the cost on commits | ||||||||||||||||||||
| # that don't touch roadmap docs. | ||||||||||||||||||||
| # - When roadmap docs *do* change, we want DAG styling to match checkbox reality. | ||||||||||||||||||||
|
|
||||||||||||||||||||
| staged_files="$(git diff --cached --name-only --diff-filter=ACMR)" | ||||||||||||||||||||
|
|
||||||||||||||||||||
| echo "$staged_files" | grep -E -q '^(docs/ROADMAP/README\.md|docs/ROADMAP/M[0-9]+-[^/]+/README\.md)$' || exit 0 | ||||||||||||||||||||
|
|
||||||||||||||||||||
| echo "pre-commit: updating ROADMAP DAG statuses from checkboxes..." | ||||||||||||||||||||
|
|
||||||||||||||||||||
| python3 scripts/update_roadmap_dags.py | ||||||||||||||||||||
|
|
||||||||||||||||||||
| # Stage any updates produced by the script. | ||||||||||||||||||||
| git add -u docs/ROADMAP | ||||||||||||||||||||
|
|
||||||||||||||||||||
| # Sanity check: ensure the updater is now clean. | ||||||||||||||||||||
| python3 scripts/update_roadmap_dags.py --check >/dev/null | ||||||||||||||||||||
|
Comment on lines
+22
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sanity check runs AFTER staging, allowing inconsistent state. The 🔎 Fix: Validate before staging python3 scripts/update_roadmap_dags.py
+# Sanity check: ensure the updater produced valid output
+python3 scripts/update_roadmap_dags.py --check >/dev/null
+
# Stage any updates produced by the script.
git add -u docs/ROADMAP
-
-# Sanity check: ensure the updater is now clean.
-python3 scripts/update_roadmap_dags.py --check >/dev/nullThis ensures validation passes before modifying the staging area. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||
|
|
||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |||||||||||
|
|
||||||||||||
| # macOS cruft | ||||||||||||
| .DS_Store | ||||||||||||
| __pycache__/ | ||||||||||||
| .AppleDouble | ||||||||||||
| .LSOverride | ||||||||||||
| Icon\r | ||||||||||||
|
|
@@ -43,6 +44,9 @@ xcuserdata/ | |||||||||||
| *.fdb_latexmk | ||||||||||||
| *.synctex.gz | ||||||||||||
|
|
||||||||||||
| # Generated PDFs (built by docs/tex Makefile targets) | ||||||||||||
|
Comment on lines
+47
to
+48
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CRITICAL: Overly broad PDF ignore pattern will hide potentially important files. The pattern
🔎 Proposed fix: Scope PDF ignore to build output directories-# Generated PDFs (built by docs/tex Makefile targets)
-*.pdf
+# Generated PDFs (built by docs/tex Makefile targets)
+/docs/tex/**/*.pdf
+/target/**/*.pdfIf you need to ignore PDFs in additional specific locations, add them explicitly. Never use a root-level wildcard for common file extensions that might be legitimate documentation assets. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||
|
|
||||||||||||
| # Rust build artifacts | ||||||||||||
| target/ | ||||||||||||
| **/*.rs.bk | ||||||||||||
|
|
||||||||||||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CRITICAL: Auto-staging generated changes bypasses user review.
This pre-commit hook automatically stages generated DAG updates (
git add -u docs/ROADMAP) without user review or confirmation. This is problematic because:Security/Compliance Risk: Per project learnings, pre-commit hooks are part of security and compliance. Auto-staging untrusted generated output could introduce malicious or incorrect content.
Bug Amplification: If
update_roadmap_dags.pyhas a bug, corrupted changes are silently committed.Audit Trail: Users may not notice what was auto-generated, making it harder to debug issues later.
Unexpected Behavior: Users expect pre-commit hooks to validate, not modify their commits.
Based on learnings: "Treat pre-commit hooks as part of security and compliance; fix underlying issues rather than bypassing hooks with
--no-verify"🔎 Recommended approaches (pick one)
Option 1: Fail instead of auto-stage (force explicit user action)
Option 2: Prompt for confirmation (requires tty)
Option 3: Document and accept risk (least recommended)
Add prominent comment explaining the auto-staging behavior and rationale.
📝 Committable suggestion
🤖 Prompt for AI Agents