Four new decision documents covering the pipeline work: layering,
AI review setup (provider prefix, v2 CLI, env-only auth, verdict
gate), release engineering (release-please manifest mode), and the
Snyk pause with the token scope policy. Index grouped, log extended,
open questions updated.
Three layers - pre-commit hooks for cheap deterministic checks, Gitea Actions for thorough checks, an AI reviewer for judgment - and the rule that decides what runs where.
decision
ci
gitea-actions
pre-commit
security
draft
by
at
opencode-go/glm-5.3-flash
2026-10-18T16:05:00Z
by
at
human:noel
not yet
id
resource
title
pr-checker
.gitea/workflows/pr-checker.yml
PR Check workflow
id
resource
title
pre-commit
.pre-commit-config.yaml
Pre-commit guardrails
Decision
Every pull request is checked by three layers, ordered by cost:
Pre-commit hooks (local, seconds, deterministic): gitleaks, file
hygiene, conventional-commit check, actionlint, eslint --fix on staged
files. A commit that fails here never exists.
AI code review (per PR push): opencode with a plan-covered model,
verdict-based, posted as a PR comment.
The split rule: anything that finishes in seconds and auto-fixes goes in
pre-commit; anything slow, network-bound or quota-bound goes in CI; anything
that produces judgment rather than a pass/fail is the AI review. Nothing
slow lives in pre-commit — one slow hook gets bypassed with --no-verify
once and is dead weight forever.
Why
Each layer catches what the previous one cannot. Pre-commit sees the commit
before it exists; CI sees the whole PR on a clean machine; the AI review
sees intent, contracts and cross-file consequences that no linter can. The
ordering also protects the budget: the AI review only runs for code that
already passed the deterministic gates.
What the pipeline bought us in practice
Recorded so the reasoning survives: during the first week the pipeline
caught leaked secrets in history (gitleaks), a review model configured
against the wrong provider account, a Dockerfile-lint job that silently
never ran (hashFiles evaluating empty in the act runner), a review that
completed but exited non-zero, and an attacker-relevant credential
exposure in the review setup — each fixed where it was cheapest.
Failure modes deliberately designed against
Failure seen
Guard now in place
Error logs posted as review comments
Posting gate is the output contract (a VERDICT: line), not the exit code
Vendor container images without arm64 manifests
Binaries installed arch-aware in node:22-bookworm, never vendor CI images
hashFiles() silently empty in the act runner
File discovery via find in a step, not workflow expressions
Silent advisory failures
continue-on-error removed everywhere; a failed check is red
Supply-chain (curl-piped binaries)
Pinned versions, checksums pinned in the workflow
Not verified
That the Snyk job still works when re-enabled — it was disabled while
the free quota was the binding constraint.
That the pipeline behaves on Gitea runner versions other than v0.6.1.
Revisit when
A second repository needs the same pipeline (extract a reusable
workflow include).
The Go plan's usage limits are hit by review traffic.