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)

← ADR-0100 · ADR-0102 →

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)

  1. ADR-0100 is superseded in full. None of its four rules execute: no entry leaves .pre-commit-config.yaml on its account, deploy/ship-merge-master.sh gains no gate run, no scripts/review_slice.py is written. The per-commit hook stays exactly scripts/hooks/pre-commit as it is at ee4c5ba17.
  2. Measure before placing. scripts/hooks/pre-commit records one line per commit to reports/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.
  3. 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-verify only when the slice's final commit runs the full hook.
  4. 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

Consequences

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.

Relations of ADR-0101

Rulings cited

Specs cited

None (or no spec page exists for the ones named).