Skip to content
Merged
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
10 changes: 8 additions & 2 deletions scripts/hooks/check_adr_cross_ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@


def _run_git(*args: str) -> tuple[int, str]:
result = subprocess.run(["git", *args], capture_output=True, text=True)
return result.returncode, result.stdout
try:
result = subprocess.run(
["git", *args], capture_output=True, text=True, timeout=15
Comment on lines +25 to +26

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Declare the timeout in the write-surface matrix

This adds a timeout-triggered hard-failure path to an executable scripts/** surface, but the commit leaves the dedicated scripts/hooks/check_adr_cross_ref.py matrix row unchanged, so its declared failure contract still mentions only the ADR status-cascade violation. Update that row to document subprocess timeout handling as required for changes to executable surfaces.

AGENTS.md reference: AGENTS.md:L86-L86

Useful? React with πŸ‘Β / πŸ‘Ž.

)
return result.returncode, result.stdout
except subprocess.TimeoutExpired:
print("ERROR: git command timed out", file=sys.stderr)
sys.exit(1)


def _get_staged_content(path: str) -> str | None:
Expand Down
Loading