Skip to content

ci: verdict pre-push gate blocks only on tier=block, not on review tiers#145

Merged
theagenticguy merged 1 commit into
mainfrom
chore/pr-v-verdict-gate
May 28, 2026
Merged

ci: verdict pre-push gate blocks only on tier=block, not on review tiers#145
theagenticguy merged 1 commit into
mainfrom
chore/pr-v-verdict-gate

Conversation

@theagenticguy
Copy link
Copy Markdown
Owner

Summary

The dogfood verdict pre-push gate (lefthook.yml) ran codehub verdict and let its raw exit code fail the push. But that exit ladder — 0=auto_merge, 1=single_review, 2=dual_review/expert_review, 3=block — is review-routing advice, not a push blocker. A routine multi-community change is a legitimate dual_review and was being refused at push time, which forced --no-verify on every non-trivial PR this session (#138, #140#144).

This wraps the call so it surfaces the verdict output but only fails the push on exit code 3 (block, e.g. a policy violation). Lower tiers print verdict: advisory tier (exit N) — push allowed and exit 0.

The verdict CLI's 0/1/2/3 contract is unchanged — CI still consumes the full ladder for tiered review routing (verdict.test.ts exit-code assertions untouched). This only changes how the local pre-push hook interprets it.

Proof it works

This very PR was pushed without --no-verify — the pre-push hook ran and ✔️ verdict passed (this branch scores auto_merge; a dual_review branch would now also pass).

Test plan

  • Pushed with the pre-push hook active — verdict/typecheck/test gates all green, push succeeded
  • Gate logic: exit 3 → fail, all other exits → allow (verified by simulation + live run)
  • {pnpm} lefthook template + set +e/set -e exit-code capture confirmed
  • CI green

Note: lefthook validate reports a pre-existing priority: schema warning on main — unrelated to this diff (confirmed by validating the pristine main version).

The dogfood `verdict` pre-push gate ran `codehub verdict` and let its raw
exit code fail the push. But that exit ladder (0=auto_merge,
1=single_review, 2=dual_review/expert_review, 3=block) is review-routing
advice, not a push blocker — a routine multi-community change is a
legitimate `dual_review` and was being refused at push time, forcing
`--no-verify` on every non-trivial PR.

Wrap the call so it surfaces the verdict output but only fails the push
on exit code 3 (block, e.g. a policy violation). Lower tiers print an
"advisory tier — push allowed" line and exit 0.

The verdict CLI's 0/1/2/3 contract is unchanged — CI still consumes the
full ladder for tiered review routing. This only changes how the local
pre-push hook interprets it.
@theagenticguy theagenticguy enabled auto-merge (squash) May 28, 2026 19:26
@theagenticguy theagenticguy merged commit 29c7141 into main May 28, 2026
29 of 34 checks passed
@theagenticguy theagenticguy deleted the chore/pr-v-verdict-gate branch May 28, 2026 19:28
theagenticguy added a commit that referenced this pull request May 28, 2026
## Summary

PR-D from the 2026-05-28 tech-debt audit
(`.erpaval/sessions/session-88b46e/verdict-memo.md`). Documentation + CI
hygiene following the two rip-and-replaces (ADR 0015 WASM-only parser,
ADR 0016 lbug-only graph). No runtime code change.

### CI (`ci.yml`) — unify the test install path
The `test` matrix special-cased Node 22 with a native tree-sitter
grammar build (`node-gyp` install + scripts-enabled postinstall +
`OCH_NATIVE_PARSER=1`), while Node 24 already ran `--ignore-scripts` and
passed the full suite. Since parsing is WASM-only on every Node version
and the remaining native deps (`@duckdb/node-api`, `@ladybugdb/core`,
`onnxruntime-node`) ship prebuilds, both lanes now share one `pnpm
install --frozen-lockfile --ignore-scripts` step. Drops the `node-gyp`
install, the dual install steps, and the dead `OCH_NATIVE_PARSER` env
injection.

`mise.toml` — `node-gyp` comment corrected (prebuild fallback for
DuckDB/onnx, not a tree-sitter build dep).

### Docs (17 files) — two stale narratives swept
- **ADR 0015 (WASM-only parsing):** removed "Node 22 native opt-in",
"optional native tree-sitter addon", and native-build-for-parsing
instructions across `install.mdx`, `overview.md`, `install.md`,
`cli.md`, `troubleshooting.md`. Kept genuine DuckDB/onnx native-build
troubleshooting.
- **ADR 0016 (lbug-only graph):** removed `CODEHUB_STORE`, the backend
probe, `graph.duckdb`, and the dual-artifact mtime arbitration from 12
files. The segregated `IGraphStore`/`ITemporalStore` community-adapter
escape hatch is **preserved** (deliberate v1.0 contract).
`--skip-native` help/docs now read `(duckdb / lbug)`.
- **AGENTS.md** storage section had drifted from its "synchronized with
CLAUDE.md" header — brought back to parity (CLAUDE.md was already
correct, untouched).
- **overview.md** ADR-reference table: marked 0013 superseded, added
0015 + 0016 rows.

## Test plan
- [x] `banned-strings` — PASS
- [x] `ci.yml` valid YAML, `mise.toml` valid TOML
- [x] residual `CODEHUB_STORE`/`graph.duckdb` grep hits are all "removed
in ADR 0016" prose (intentional)
- [x] pushed with the pre-push hook **active** (no `--no-verify`) —
`verdict`/`typecheck`/`test` all green
- [ ] CI green (the unified test matrix is the real proof — Node 22 now
runs `--ignore-scripts`)

First PR pushed without `--no-verify` since the verdict-gate fix (#145)
landed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant