Home / Projects / Orchestrata Ultimate / Decisions / ADR index / ADR-0101
ADR-0101: ADR-0100 rested on a wrong reading of the commit hook; the real hook's stages are measured first and placement is decided on the numbers; none of ADR-0100's rules execute
| field | value |
|---|---|
| Status | Accepted — Accepted (ruling, Mohamed, 2026-10-13 21:05, verbatim: "agreed, next") |
| Date | 2026-10-13 |
| Register | factory (docs/adr, 4-digit ids) |
| Source | docs/adr/0101-adr-0100-rested-on-a-wrong-reading-of-the-commit-hook-the-real-hook-stages-are-measured-first-and-placement-is-decided-on-the-numbers-none-of-adr-0100-s-rules-execute.md — permalink at a3366b648 (unchanged on master since that commit) |
| Wiki register entry | ADR-0101 (wiki status: Accepted) |
The record
Status: Accepted (ruling, Mohamed, 2026-10-13 21:05, verbatim: "agreed, next") · Date: 2026-10-13 · Supersedes ADR-0100 (its Context described a hook chain that git commit does not run; its four rules therefore target the wrong mechanism and are withdrawn before any of them was executed)
Context
ADR-0100 was accepted at 18:40 on a Context that said: fifteen pre-commit hooks run per commit; two of them, unified-code-review (three model reviews) and prolog-gate (scripts/gate.py run), are slow; builders checkpoint with --no-verify to avoid them. A premise check against the repository after acceptance found that chain is not what runs. Verified at master ee4c5ba17:
| ADR-0100 said | What the repository does |
|---|---|
fifteen hooks from .pre-commit-config.yaml run on every commit |
git commit runs scripts/hooks/pre-commit. It has three stages: a secrets check, ruff --fix on staged files, and scripts/gate.py review-staged. The pre-commit framework config (.pre-commit-config.yaml, 19 hook ids) is not installed as the git hook and does not run on commit. |
unified-code-review runs three model reviews per commit |
gate.py review-staged (gates/commit_review.py) runs two deterministic reviewers per staged file, scripts/code-review.py and scripts/test-review.py, each under a 600 s timeout, and src/orchestrata_ultimate/prolog/commit_review.pl derives the verdict. scripts/code-review.py runs zero model reviews. The framework config's entry even points at a root code-review.py that does not exist. The builder's "3 reviews, no blocking findings" was this deterministic per-file review. |
prolog-gate runs gate.py run per commit |
gate.py run is a whole-tree run with no ledger and is not in the git hook. The "exceeded the 280 s limit and was killed" line came from a builder invoking it directly, not from a commit. |
| RUL-007 is one of the fifteen | RUL-007 is scripts/hooks/commit-msg, a separate git hook. The git sentinel is a pytest plugin, not a commit hook. |
deploy/ship-merge-master.sh is where a batch gate could run |
The ship script runs no hooks today; nothing in it reads a ledger. RUL-008 mandates review before commit; no slice-review script exists. |
The costs ADR-0100 set out to move were measured on the wrong mechanism, and the hooks it proposed to remove from .pre-commit-config.yaml do not run on commit, so removing them changes nothing. Builders' --no-verify checkpoints are real, but the time they avoid is the deterministic review-staged stage, whose per-file wall has never been recorded.
Decision (proposed)
- ADR-0100 is superseded in full. None of its four rules execute: no entry leaves
.pre-commit-config.yamlon its account,deploy/ship-merge-master.shgains no gate run, noscripts/review_slice.pyis written. The per-commit hook stays exactlyscripts/hooks/pre-commitas it is at ee4c5ba17. - Measure before placing.
scripts/hooks/pre-commitrecords one line per commit toreports/precommit-walls.ndjson(append-only, union-merged like codetools' iteration log): commit sha, staged file count, and the wall of each stage (secrets, ruff, review-staged) with the per-file reviewer walls inside review-staged. The hook's exit code and verdict are unchanged; the line is written whether the commit passes or fails. - Placement is decided on ten measured commits. When the ledger holds ten real builder commits, a new ADR decides where the review-staged stage runs (per commit, per slice at hand-back, or per batch) from the recorded walls; until then the question is open and the status quo holds, including the existing practice that a WIP checkpoint may use
--no-verifyonly when the slice's final commit runs the full hook. - An ADR's Context names its mechanisms. Every mechanism an ADR's Context claims (a hook, a script, a config entry, a timeout) is cited by path and, where it matters, line, checked against the tree at the sha named in the ADR, in the same way the briefs' VERIFIED blocks are since 2026-10-13. A Context that cites nothing is not ready to be ruled on.
Alternatives rejected
- Execute ADR-0100 as written. Its hook removals touch a config that does not run; its ship-script gate adds a whole-tree run to the one place that is currently cheap; it would be effort on a diagnosis that is wrong.
- Correct ADR-0100's Context in place. Accepted bodies are immutable (ADR-0046/0047); a correction is a superseding ADR.
- Drop the review-staged stage now because builders bypass it. Its wall is unmeasured and RUL-008 requires review before commit; removing it without numbers repeats ADR-0100's mistake.
Consequences
- ADR-0100's register row and wiki entry read
Superseded by ADR-0101; its body is untouched. - One small slice: the hook gains the ledger line (rule 2). It is a bounded, measurable task suitable for a first assignment to a non-Anthropic builder (Kimi, Qwen Max, DeepSeek), as Mohamed admitted on 2026-10-13.
- Builder briefs' DONE WHEN keep "through the real pre-commit"; the hand-back review step ADR-0100 described is not introduced.
- The premise-check rule (rule 4) joins the coordinator's checklist alongside the briefs' VERIFIED block.
Provenance
Premise check run by the coordinating session after ADR-0100's acceptance (fact sheet of 2026-10-13 evening against master ee4c5ba17: scripts/hooks/pre-commit lines 47 to 85, scripts/gate.py review-staged, gates/commit_review.py, scripts/code-review.py, .pre-commit-config.yaml hook ids, scripts/hooks/commit-msg, deploy/ship-merge-master.sh). Memory rule "premise check before dispatch" (2026-10-13) extended to ADR Contexts. Mohamed, 2026-10-13: "then fix any issues then start working on the original goal and you may assign to kimi, qwen max and deepeseek too". Drafted by the coordinating session; awaiting Mohamed's ruling.
Related ADRs
Rulings cited
- RUL-007: RUL-007 — No AI attribution in commits, tags, or PRs
- RUL-008: RUL-008 — Review before every commit
Specs cited
None (or no spec page exists for the ones named).