fix(ci): use opencode-go plan model for AI review #5

Merged
Noel merged 14 commits from fix/ai_pr_review into main 2026-10-18 16:24:58 +00:00
14 Commits
Author SHA1 Message Date
Noel Sabia 3e68e630df fix(ci): close the fail-open gate, enforce read-only sandbox
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / ESLint (pull_request) Successful in 35s
PR Check / Typecheck (pull_request) Canceled after 21s
PR Check / Secret scan (gitleaks) (pull_request) Canceled after 0s
PR Check / Dependency audit (pull_request) Canceled after 0s
PR Check / Dockerfile lint (droast) (pull_request) Canceled after 0s
PR Check / AI code review (opencode) (pull_request) Canceled after 0s
Findings validated from review comments 71 and 75:

- [BLOCKER] the no-verdict branch exited \${EXIT_CODE:-1} which is 0
  when opencode succeeded without a verdict - job went green and the
  post step published non-review output. The else branch now exits 1
  unconditionally, the verdict is anchored to the last five lines (the
  prompt itself contains VERDICT lines), and the post step re-verifies
  the contract before posting.
- [BLOCKER] the v1 'permission' object is ignored by the opencode v2
  CLI - shell commands executed in both review runs despite deny. The
  config now uses the v2 'permissions' array with 'shell' as the
  action name, denying edit/shell/webfetch/websearch/external_directory.
- hygiene: droast linting prunes node_modules, audit comment names the
  exact key to re-add, shell blocks verified with sh -n.
2026-10-18 18:24:06 +02:00
Noel Sabia cefdb34d7e feat: merged main into this branch
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / ESLint (pull_request) Successful in 35s
PR Check / Typecheck (pull_request) Successful in 38s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 6s
PR Check / Dependency audit (pull_request) Failing after 8s
PR Check / Dockerfile lint (droast) (pull_request) Failing after 5s
PR Check / AI code review (opencode) (pull_request) Successful in 4m41s
2026-10-18 18:11:34 +02:00
Noel Sabia bb0ab03a97 docs: add OKF_Nuxt decision records and log
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / ESLint (pull_request) Successful in 35s
PR Check / Typecheck (pull_request) Successful in 38s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 5s
PR Check / Dependency audit (pull_request) Failing after 8s
PR Check / Dockerfile lint (droast) (pull_request) Failing after 5s
PR Check / AI code review (opencode) (pull_request) Canceled after 16s
2026-10-18 18:09:45 +02:00
Noel Sabia 9987d6b8e4 chore: add release-please configuration (from release_please_advanced)
- release-please-config.json: node release type, root package,
  plain v-tags, default versioning
- .release-please-manifest.json: track current version (1.0.0)
- package.json: add version field required by the node release type
- release-please.yml: use the config/manifest files
2026-10-18 18:09:45 +02:00
Noel Sabia a3e6aef901 fix(ci): apply review findings round two
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / ESLint (pull_request) Successful in 36s
PR Check / Typecheck (pull_request) Successful in 39s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 6s
PR Check / Dependency audit (pull_request) Failing after 9s
PR Check / Dockerfile lint (droast) (pull_request) Failing after 5s
PR Check / AI code review (opencode) (pull_request) Successful in 4m17s
- droast: chmod +x was lost in the checksum rewrite (would have
  failed with exit 126); checksums now pinned in the workflow
  instead of trust-on-first-use
- permission config migrated to the OpenCode v2 schema (permissions
  array, bash renamed shell, websearch and external_directory denied)
- posting gate is now the output contract (verdict line present)
  instead of the exit code: opencode can exit 1 on benign tool
  denials after a completed review
- find -print -quit instead of piping into head (SIGPIPE, exit 141)
- audit comment now says to re-add continue-on-error
2026-10-18 18:01:13 +02:00
Noel Sabia 85f488a94d fix(ci): address AI review findings (credentials, supply chain)
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / ESLint (pull_request) Successful in 33s
PR Check / Typecheck (pull_request) Successful in 38s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 5s
PR Check / Dependency audit (pull_request) Failing after 9s
PR Check / Dockerfile lint (droast) (pull_request) Failing after 4s
PR Check / AI code review (opencode) (pull_request) Failing after 3m9s
- [BLOCKER] remove opencode.json from the checkout: it held the API
  key in plaintext, readable by the review agent, and a malicious PR
  diff could prompt-inject the agent into quoting it in the publicly
  visible review comment. Env-only auth (verified headless). The
  permission config moves to $HOME/.config/opencode - outside the
  checkout and secret-free.
- [WARN] verify the droast binary against the publisher's
  sha256sums.txt of the same pinned release
- [WARN] pin the opencode v2 installer to 2.0.32

Findings validated with the validate-pr-review skill; findings 4/5
are moot with the blocker fix.
2026-10-18 17:54:06 +02:00
Noel Sabia f8d128705f fix(ci): deny write tools, never swallow review errors
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / ESLint (pull_request) Successful in 34s
PR Check / Typecheck (pull_request) Successful in 37s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 6s
PR Check / Dependency audit (pull_request) Failing after 8s
PR Check / Dockerfile lint (droast) (pull_request) Failing after 4s
PR Check / AI code review (opencode) (pull_request) Successful in 3m9s
- deny edit/bash/webfetch in the generated opencode.json: headless
  permission prompts are the most likely cause of the review agent
  working silently for minutes and then dying; denying write tools
  also makes the reviewer provably read-only
- capture the exit code without triggering 'set -e' ('|| EXIT_CODE=$?')
  so the captured output is always printed before failing - the
  previous version aborted before 'cat' and produced silent failures
2026-10-18 17:34:17 +02:00
Noel Sabia 783c9ccda3 fix(ci): install opencode v2 for the review job
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / ESLint (pull_request) Successful in 34s
PR Check / Typecheck (pull_request) Successful in 37s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 6s
PR Check / Dependency audit (pull_request) Failing after 8s
PR Check / Dockerfile lint (droast) (pull_request) Failing after 4s
PR Check / AI code review (opencode) (pull_request) Failing after 2m43s
The classic installer (opencode.ai/install) ships only OpenCode 1.x
- v1.19.3 on arm64 - which cannot resolve model variants and failed
with ProviderModelNotFoundError for deepseek-v4-pro#max. Use the v2
installer (currently v2.0.32, same version as local dev); verified
working in a fresh arm64 container with key-only auth.
2026-10-18 17:18:54 +02:00
Noel Sabia cf6f209ebf fix(ci): make droast job actually run
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / ESLint (pull_request) Successful in 35s
PR Check / Typecheck (pull_request) Successful in 37s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 5s
PR Check / Dependency audit (pull_request) Failing after 9s
PR Check / Dockerfile lint (droast) (pull_request) Failing after 5s
PR Check / AI code review (opencode) (pull_request) Failing after 12s
The dockerfile-lint job skipped on every PR despite Dockerfiles
existing: the act runner's hashFiles() evaluation returned empty.
Replace it with an explicit file-discovery step. Also run the droast
binary in node:22-bookworm (arch-aware install) instead of the
vendor image, which ships no node and would fail actions/checkout
with exit 127 - same failure mode as the gitleaks image.
2026-10-18 17:11:31 +02:00
Noel Sabia 5f1d64db90 ci: bind opencode API key explicitly via opencode.json
PR Check / Dockerfile lint (droast) (pull_request) Skipped
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / Typecheck (pull_request) Successful in 37s
PR Check / ESLint (pull_request) Successful in 35s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 6s
PR Check / Dependency audit (pull_request) Failing after 9s
PR Check / AI code review (opencode) (pull_request) Failing after 11s
The headless CI container has no stored credentials, so auth depends
entirely on the injected key. Generate an opencode.json at runtime
that binds OPENCODE_API_KEY to the opencode-go provider explicitly,
removing any dependence on env-var-to-provider mapping behavior.
2026-10-18 17:08:46 +02:00
Noel Sabia a6761fae9a ci: make dependency audit blocking, log opencode errors
PR Check / Dockerfile lint (droast) (pull_request) Skipped
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / ESLint (pull_request) Successful in 34s
PR Check / Typecheck (pull_request) Successful in 37s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 5s
PR Check / Dependency audit (pull_request) Failing after 8s
PR Check / AI code review (opencode) (pull_request) Failing after 13s
- audit no longer runs with continue-on-error: a failed audit must
  turn the pipeline red, not pass silently
- opencode review runs with --print-logs so auth and provider errors
  (e.g. invalid API key vs missing Go subscription) appear in the job
  log instead of an opaque exit 1
2026-10-18 17:04:15 +02:00
Noel Sabia 8f36f14720 fix: remove leftover merge conflict marker from pr-checker.yml
PR Check / Dockerfile lint (droast) (pull_request) Skipped
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / ESLint (pull_request) Successful in 35s
PR Check / Typecheck (pull_request) Successful in 37s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 6s
PR Check / Dependency audit (pull_request) Successful in 8s
PR Check / AI code review (opencode) (pull_request) Failing after 11s
2026-10-18 16:58:10 +02:00
Noel Sabia 066bcec47c merge: resolve pr-checker.yml in favour of opencode-go plan model
pr-checker.yml (push) Invalid workflow file
main changed the review model to the default thinking budget; keep
opencode-go/deepseek-v4-pro#max (plan-included, max effort) which
supersedes both earlier variants.
2026-10-18 16:57:46 +02:00
Noel Sabia 8b6bcb6d70 fix(ci): use opencode-go plan model for AI review
PR Check / Dockerfile lint (droast) (pull_request) Skipped
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / ESLint (pull_request) Successful in 34s
PR Check / Typecheck (pull_request) Successful in 38s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 5s
PR Check / Dependency audit (pull_request) Successful in 8s
PR Check / AI code review (opencode) (pull_request) Failing after 13s
The 'opencode' provider prefix points at OpenCode Zen (pay-per-call,
no funds), which failed every review run with 'Insufficient account
funds'. The opencode-go $10 plan covers deepseek-v4-pro with high
and max variants - use opencode-go/deepseek-v4-pro#max.
2026-10-18 16:53:16 +02:00