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
2 changes: 2 additions & 0 deletions institutio/governance/gates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ gates:
paths: ["cli/**"]
tier: heavy
serialize: true
timeout_seconds: 1500
ci_job: "pr-gate.yml:pr-gate"
owner: verify
note: "Env-scrubbed and no-modal: ambient persona tokens and editor configuration must not leak into test behavior. Serialized machine-wide (2026-07-15 host-thrash: two concurrent lawful verify.py runs each launched this full suite in parallel with the Backblaze crawl — the 1,200-test suite is a host-exhausting gate like the node/web estate; queueing is strictly cheaper than thrashing). -n auto is WITHIN-run xdist fan-out and orthogonal to that cross-run flock: one run at a time, that run uses the cores."
Expand All @@ -481,6 +482,7 @@ gates:
paths: ["web/api/**", "cli/**"]
tier: heavy
serialize: true
timeout_seconds: 900
ci_job: "pr-gate.yml:pr-gate"
owner: verify
note: "web/api imports limen — a cli change implicates the API suite too. Serialized machine-wide with pytest-cli (same 2026-07-15 rationale)."
Expand Down
8 changes: 7 additions & 1 deletion scripts/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,12 @@ def run_gate_wave(

def execute(gate_id: str) -> tuple[bool, float]:
started = time.monotonic()
# A gate row may declare its own deadline (GATES registry `timeout_seconds`) — heavy
# serialized suites like pytest-cli cannot finish inside the wave default (the
# 2026-07-30 300s regression made every cli-touching PR unmergeable). The row can
# only EXTEND the wave default, never shrink it.
row_timeout = (gates[gate_id] or {}).get("timeout_seconds")
gate_deadline = max(timeout_seconds, float(row_timeout)) if row_timeout else timeout_seconds
Comment on lines +526 to +527

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Validate registry timeout overrides as finite bounded numbers

Validate timeout_seconds in scripts/check-gates.py before consuming it here. The registry schema checker currently accepts this new field without checking its type or range, so a future value such as a string crashes the wave before producing a gate receipt, while YAML .inf creates an unbounded process deadline. That defeats the repository requirement that every gate have a finite deadline; require a positive finite number within an explicit ceiling.

AGENTS.md reference: AGENTS.md:L139-L143

Useful? React with 👍 / 👎.

print(f"WAVE {wave_name}: START gate={gate_id}", flush=True)
with output_paths[gate_id].open("w+b") as output:
try:
Expand All @@ -528,7 +534,7 @@ def execute(gate_id: str) -> tuple[bool, float]:
registry,
changed,
output=output,
deadline=started + timeout_seconds,
deadline=started + gate_deadline,
output_limit_bytes=output_limit_bytes,
cancel_event=cancel_event,
)
Expand Down
Loading