Repository navigation
chore(tooling): fast local hooks; CI runs the suites - #9126
Conversation
On a shared 48-core host at load 70-230, the commit hooks re-ran whole suites that CI already runs as the gate. Pre-commit ran the root unit suite and, for any change under server/src, docs or schemas, the full server unit suite (~1,070 files; its budget had grown 240s -> 600s -> 1500s), and timed out or failed on unrelated load-sensitive tests. Pre-push ran the storyboard matrix, ~3 minutes idle and hours under load. Agents were asking for --no-verify on most commits. - pre-commit: image quality, the dynamic-import, format-identity and callApi state-change guards, and typecheck (~15s). - pre-push: version sync, changeset policy and docs checks as before; the storyboard matrix runs only with ADCP_RUN_STORYBOARD_MATRIX=1. - npm run verify:local runs the root and server tests affected since origin/main (vitest --changed) plus typecheck; --full runs the full suites, with precommit-server-unit.cjs gaining a --full switch. - The playbook's Local Hooks section describes the split. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated path requires human/CODEOWNERS review.
This is a tooling-only PR (local git hooks sped up, full suites deferred to CI) across 5 files. The reviewer found no Critical/High/Medium findings, correctly confirmed no changeset is required (no protocol/schema/wire change), and verified the pre-push opt-in inversion, package.json precommit trim, --full argv handling, and the new verify-local.cjs logic.
However, .agents/playbook.md matches the gated path glob .agents/**, so gated_paths: true, and review_decision is REVIEW_REQUIRED (not APPROVED). Per decision table row 2, the hard approval gate is not satisfied and the outcome must be escalate regardless of the clean diff.
Escalation reasons
.agents/playbook.mdis under a hard approval gate (.agents/**) andreview_decisionisREVIEW_REQUIRED. Human/CODEOWNERS approval is required before merge.
No blocking findings exist; the escalation is purely due to the unsatisfied gated-path approval requirement.
Why human review
- .agents/playbook.md is under the hard approval gate (.agents/**) and review_decision is REVIEW_REQUIRED — human/CODEOWNERS approval required.
- This PR touches a path under a hard, non-overridable approval gate (.agents/playbook.md (modified) matches
.agents/**) and the current GitHub review decision is 'REVIEW_REQUIRED', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.
Brings in 23 commits from main, among them the 3.2.12 hosted registration, the @adcp/sdk 17.0.0-beta.31 bump (adcontextprotocol#9132), the inventory-tenant creative library (adcontextprotocol#9116, adcontextprotocol#9143), the macOS runner tools for the release tests (adcontextprotocol#9138) and the hook split in adcontextprotocol#9126. The hooks stay as this branch has them: pre-commit runs the root suite, the staged-file-scoped server suite, the checks and the node:test files as one vitest run under a 120 s budget, and pre-push runs the storyboard queue under 180 s. With the shared workers, caches and queue, both fit in about 200 s on an M4 Pro, so this branch keeps the suites in the hooks. adcontextprotocol#9126's additive pieces stay: npm run verify:local and precommit-server-unit.cjs --full. Resolution ledger: - mechanical: package-lock.json -> main's (identical to main after the merge). - semantic: - package.json -> this branch's precommit script, plus main's verify:local. - .husky/pre-push (auto-merged) -> this branch's storyboard block; the matrix runs when its sources change, ADCP_SKIP_STORYBOARD_MATRIX=1 skips it. - .agents/playbook.md -> this branch's Local Hooks text, plus a verify:local paragraph; main's auto-merged hook description removed. - scripts/precommit-server-unit.cjs -> union: main's --full switch runs this branch's single-run full plan. - scripts/verify-local.cjs -> main's, with its header no longer saying the hooks run only fast checks. - server/tests/unit/training-agent-inventory-tenants.test.ts -> union: main's new cases with this branch's static import and state resets. - tests/cdn-artifacts, changesets-fence, maintenance-release-publication, release-publication-ordering -> union: this branch's git-env isolation, main's runnerPath() as the one GNU-tools mechanism; this branch's tests/helpers/gnu-tools.cjs and its shims are removed as unused.
Why
The commit hooks re-run whole test suites that CI already runs as the gate, on a shared 48-core dev host at load 70–230:
server/src,docs/,static/schemas/sourceorpackage.json, it also ran the full server unit suite, about 1,070 files. That suite's budget had already grown from 240 s to 600 s to 1500 s, and it still timed out or failed on unrelated load-sensitive tests (stripe-client,exact-inference, the compliance gate suites,creative33-buyer,hosted-compliance-echoed-release). Each of those passed when run alone.The result: commits took 20–30+ minutes, pushes took hours, and agents asked for
--no-verifyon most commits.Running only the related tests doesn't fix it: a one-file training-agent change still selects 97 of 1,070 server test files through vitest's import graph, and a typical change 247.
What
ADCP_RUN_STORYBOARD_MATRIX=1npm run verify:local(new). Runs the root and server tests affected by your changes sinceorigin/main, using vitest--changed, thentypecheck.--since <ref>changes the base.--fullruns the full suites.scripts/precommit-server-unit.cjsgains--full, soverify:local --fullruns the whole sharded server suite, with its serial re-run of load-sensitive failures, whatever is staged.CI is unchanged. It still runs the canonical and server unit shards, the type check and the storyboard matrix on every PR, and stays the gate.
Verification
npm run precommit: 16 s, passes.tests/precommit-server-unit.test.ts: 17/17.verify:localruns the affected tests. An unknown argument exits 2 with a message.sh -n .husky/pre-push: clean.No changeset: tooling only.
🤖 Generated with Claude Code