@cxi-lmai/ci-agent-platform 3.1.0 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/README.md +7 -0
  2. package/package.json +1 -1
  3. package/payload/agents/agent-architect.md +1 -1
  4. package/payload/agents/code-reviewer.md +1 -1
  5. package/payload/agents/codebase-auditor.md +1 -1
  6. package/payload/agents/coder.md +1 -1
  7. package/payload/agents/decomposer.md +1 -1
  8. package/payload/agents/docs-sync.md +1 -1
  9. package/payload/agents/e2e-test-writer.md +1 -1
  10. package/payload/agents/performance-reviewer.md +1 -1
  11. package/payload/agents/release-mr.md +1 -1
  12. package/payload/agents/security-reviewer.md +1 -1
  13. package/payload/agents/test-fix.md +1 -1
  14. package/payload/agents/test-writer.md +1 -1
  15. package/payload/agents-omp/agent-architect.md +1 -1
  16. package/payload/agents-omp/code-reviewer.md +1 -1
  17. package/payload/agents-omp/codebase-auditor.md +1 -1
  18. package/payload/agents-omp/coder.md +1 -1
  19. package/payload/agents-omp/decomposer.md +1 -1
  20. package/payload/agents-omp/docs-sync.md +1 -1
  21. package/payload/agents-omp/e2e-test-writer.md +1 -1
  22. package/payload/agents-omp/migration-reviewer.md +1 -1
  23. package/payload/agents-omp/orchestrator.md +1 -1
  24. package/payload/agents-omp/performance-reviewer.md +1 -1
  25. package/payload/agents-omp/postmortem.md +1 -1
  26. package/payload/agents-omp/release-mr.md +1 -1
  27. package/payload/agents-omp/security-reviewer.md +1 -1
  28. package/payload/agents-omp/test-fix.md +1 -1
  29. package/payload/agents-omp/test-writer.md +1 -1
  30. package/payload/ci-templates/claude-pipeline.gitlab-ci.yml +10 -3
  31. package/payload/ci-templates/github/claude-issue-pipeline.yml +1 -1
  32. package/payload/ci-templates/github/claude-pipeline.yml +2 -2
  33. package/payload/ci-templates/github/claude-test-fix.yml +1 -1
  34. package/payload/ci-templates/scripts/lib/pipeline-common.sh +33 -5
package/README.md CHANGED
@@ -144,6 +144,13 @@ picked, not both. Claude-harness model usage is billed by Anthropic, while
144
144
  omp-harness model usage is billed by OpenRouter. GitLab only for now; GitHub
145
145
  Actions omp support is not shipped yet.
146
146
 
147
+ `omp` is a Bun program, so the GitLab template's `before_script` installs
148
+ `bun` next to it (`npm install -g bun`) — the default `node:22-bookworm` image
149
+ ships no Bun runtime, and without it every agent call fails while the job
150
+ still reports success. A custom `PIPE_CI_IMAGE` needs nothing beyond node +
151
+ npm for that install to work. If the harness binary cannot execute, the job
152
+ now fails immediately instead of going green with no review.
153
+
147
154
  ### What it costs
148
155
 
149
156
  Every pipeline job spends paid model usage, so the defaults are deliberately
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cxi-lmai/ci-agent-platform",
3
- "version": "3.1.0",
3
+ "version": "3.1.2",
4
4
  "description": "Autonomous dev pipeline on plain GitLab CI or GitHub Actions, driven by Claude Code. A labeled issue goes in, an open merge request comes out.",
5
5
  "keywords": [
6
6
  "claude",
@@ -2,7 +2,7 @@
2
2
  name: agent-architect
3
3
  description: Weekly agent-improvement lab. Reads recently merged MRs/PRs, review comments, and stuck-MR postmortems, then proposes improvements to .claude/agents/*.md files as actionable platform issues (auto-filed with the pipeline's ready label). Output is a structured markdown report consumed by the CI script. Never auto-applies changes to CLAUDE.md or .claude/settings.json.
4
4
  tools: Glob, Grep, LS, Read
5
- model: claude-sonnet-5-0
5
+ model: claude-sonnet-5
6
6
  ---
7
7
 
8
8
  You are the Agent Lab for this project's autonomous development pipeline.
@@ -2,7 +2,7 @@
2
2
  name: code-reviewer
3
3
  description: Reviews code for bugs, logic errors, security vulnerabilities, code quality issues, and adherence to project conventions, using confidence-based filtering to report only high-priority issues that truly matter
4
4
  tools: Glob, Grep, LS, Read, Write, NotebookRead, WebFetch, TodoWrite, WebSearch, KillShell, BashOutput, mcp__context7__resolve-library-id, mcp__context7__get-library-docs
5
- model: claude-sonnet-5-0
5
+ model: claude-sonnet-5
6
6
  color: red
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  name: codebase-auditor
3
3
  description: Periodic codebase auditor. Reads project conventions and docs, reads recently merged MR/PR file changes, and produces a focused report of critical convention violations and genuinely new undocumented patterns. Uses confidence-based filtering to report only issues that truly matter.
4
4
  tools: Glob, Grep, LS, Read
5
- model: claude-sonnet-5-0
5
+ model: claude-sonnet-5
6
6
  ---
7
7
 
8
8
  You are the codebase auditor. You produce a periodic report of critical convention violations and genuinely new, reusable patterns worth documenting.
@@ -2,7 +2,7 @@
2
2
  name: coder
3
3
  description: Autonomous implementation agent. Given an issue description, explores existing patterns, implements the feature or fix, writes tests, runs the build in a self-correcting loop (up to 3 retries), and commits. Never pushes.
4
4
  tools: Agent, Bash, Edit, Glob, Grep, LS, MultiEdit, NotebookRead, Read, TodoWrite, WebFetch, WebSearch, Write, mcp__context7__resolve-library-id, mcp__context7__get-library-docs
5
- model: claude-sonnet-5-0
5
+ model: claude-sonnet-5
6
6
  ---
7
7
 
8
8
  You are the autonomous coder agent for this project.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: decomposer
3
3
  description: Decomposes a too-large issue into a dependency-ordered chain of spec-compliant sub-issues. Returns structured JSON with confidence verdict, reason, and fully authored sub-issue bodies ready for creation on the project platform.
4
- model: claude-sonnet-5-0
4
+ model: claude-sonnet-5
5
5
  ---
6
6
 
7
7
  You are the decomposer for the autonomous development pipeline.
@@ -2,7 +2,7 @@
2
2
  name: docs-sync
3
3
  description: Checks whether MR/PR code changes require updates to project docs, CLAUDE.md, or .claude/memory/. On autonomous MRs it applies the updates directly; on human MRs it reports the gaps for a comment.
4
4
  tools: Glob, Grep, LS, Read, Write, Edit
5
- model: claude-sonnet-5-0
5
+ model: claude-sonnet-5
6
6
  color: blue
7
7
  ---
8
8
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: e2e-test-writer
3
3
  description: Generates a single end-to-end (E2E) test spec file for a frontend issue, following the project's configured E2E framework, test directory, fixtures, test-data prefix, cleanup rules, and tags
4
- model: claude-sonnet-5-0
4
+ model: claude-sonnet-5
5
5
  ---
6
6
 
7
7
  You are an end-to-end (E2E) test writer. Given an issue, you produce one E2E test spec file that follows the project's configured E2E framework and conventions.
@@ -2,7 +2,7 @@
2
2
  name: performance-reviewer
3
3
  description: Reviews changed data-access and hot-path code for confirmed scalability regressions such as repeated I/O, unbounded work, excessive loading, and missing batching or pagination
4
4
  tools: Glob, Grep, Read, NotebookRead, WebFetch, TodoWrite, WebSearch, KillShell, BashOutput
5
- model: claude-sonnet-5-0
5
+ model: claude-sonnet-5
6
6
  color: yellow
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  name: release-mr
3
3
  description: Creates a release MR/PR from the integration branch to the production branch with a structured description listing changes, migrations, env changes, and a deploy checklist. Use when the user wants to prepare a release or merge the integration branch into production.
4
4
  tools: Bash, Glob, Grep, Read, TodoWrite
5
- model: claude-sonnet-5-0
5
+ model: claude-sonnet-5
6
6
  ---
7
7
 
8
8
  You are the release MR/PR agent. Your job is to analyze everything that changed on the integration branch since the last release to the production branch, then create (or update) a well-structured release request.
@@ -2,7 +2,7 @@
2
2
  name: security-reviewer
3
3
  description: Reviews code for security vulnerabilities (authentication bypass, authorization flaws, injection, tenant/data isolation leaks, CSRF misconfiguration, sensitive data exposure) using confidence-based filtering to report only confirmed issues
4
4
  tools: Glob, Grep, LS, Read, NotebookRead, WebFetch, TodoWrite, WebSearch, KillShell, BashOutput
5
- model: claude-sonnet-5-0
5
+ model: claude-sonnet-5
6
6
  color: red
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  name: test-fix
3
3
  description: Fixes failing tests in pipeline merge requests. Reads failing test files and their production source classes, determines root cause, fixes implementation or test as needed, verifies compilation, and commits. Never pushes.
4
4
  tools: Agent, Bash, Edit, Glob, Grep, LS, MultiEdit, NotebookRead, Read, TodoWrite, Write
5
- model: claude-sonnet-5-0
5
+ model: claude-sonnet-5
6
6
  ---
7
7
 
8
8
  You are the test-fix agent. Your job is to fix failing tests in a merge request, not to rewrite features.
@@ -2,7 +2,7 @@
2
2
  name: test-writer
3
3
  description: Generates integration and unit tests that increase coverage for new or changed code, following the project's documented testing patterns, with a self-correcting compilation loop
4
4
  tools: Agent, Bash, Edit, Glob, Grep, LS, MultiEdit, NotebookRead, Read, TodoWrite, Write
5
- model: claude-sonnet-5-0
5
+ model: claude-sonnet-5
6
6
  color: green
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  name: agent-architect
3
3
  description: Weekly agent-improvement lab. Reads recently merged MRs/PRs, review comments, and stuck-MR postmortems, then proposes improvements to .claude/agents/*.md files as actionable platform issues (auto-filed with the pipeline's ready label). Output is a structured markdown report consumed by the CI script. Never auto-applies changes to CLAUDE.md or .claude/settings.json.
4
4
  tools: glob, grep, read
5
- model: openrouter/anthropic/claude-sonnet-5-0
5
+ model: openrouter/anthropic/claude-sonnet-5
6
6
  ---
7
7
 
8
8
  You are the Agent Lab for this project's autonomous development pipeline.
@@ -2,7 +2,7 @@
2
2
  name: code-reviewer
3
3
  description: Reviews code for bugs, logic errors, security vulnerabilities, code quality issues, and adherence to project conventions, using confidence-based filtering to report only high-priority issues that truly matter
4
4
  tools: glob, grep, read, write, todo, web_search, mcp__context7__resolve-library-id, mcp__context7__get-library-docs
5
- model: openrouter/anthropic/claude-sonnet-5-0
5
+ model: openrouter/anthropic/claude-sonnet-5
6
6
  ---
7
7
 
8
8
  You are an expert code reviewer specializing in modern software development across multiple languages and frameworks. Your primary responsibility is to review code against project guidelines in CLAUDE.md with high precision to minimize false positives.
@@ -2,7 +2,7 @@
2
2
  name: codebase-auditor
3
3
  description: Periodic codebase auditor. Reads project conventions and docs, reads recently merged MR/PR file changes, and produces a focused report of critical convention violations and genuinely new undocumented patterns. Uses confidence-based filtering to report only issues that truly matter.
4
4
  tools: glob, grep, read
5
- model: openrouter/anthropic/claude-sonnet-5-0
5
+ model: openrouter/anthropic/claude-sonnet-5
6
6
  ---
7
7
 
8
8
  You are the codebase auditor. You produce a periodic report of critical convention violations and genuinely new, reusable patterns worth documenting.
@@ -3,7 +3,7 @@ name: coder
3
3
  description: Autonomous implementation agent. Given an issue description, explores existing patterns, implements the feature or fix, writes tests, runs the build in a self-correcting loop (up to 3 retries), and commits. Never pushes.
4
4
  tools: task, bash, edit, glob, grep, read, todo, web_search, write, mcp__context7__resolve-library-id, mcp__context7__get-library-docs
5
5
  spawns: test-writer, docs-sync
6
- model: openrouter/anthropic/claude-sonnet-5-0
6
+ model: openrouter/anthropic/claude-sonnet-5
7
7
  ---
8
8
 
9
9
  You are the autonomous coder agent for this project.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: decomposer
3
3
  description: Decomposes a too-large issue into a dependency-ordered chain of spec-compliant sub-issues. Returns structured JSON with confidence verdict, reason, and fully authored sub-issue bodies ready for creation on the project platform.
4
- model: openrouter/anthropic/claude-sonnet-5-0
4
+ model: openrouter/anthropic/claude-sonnet-5
5
5
  ---
6
6
 
7
7
  You are the decomposer for the autonomous development pipeline.
@@ -2,7 +2,7 @@
2
2
  name: docs-sync
3
3
  description: Checks whether MR/PR code changes require updates to project docs, CLAUDE.md, or .claude/memory/. On autonomous MRs it applies the updates directly; on human MRs it reports the gaps for a comment.
4
4
  tools: glob, grep, read, write, edit
5
- model: openrouter/anthropic/claude-sonnet-5-0
5
+ model: openrouter/anthropic/claude-sonnet-5
6
6
  ---
7
7
 
8
8
  You are the documentation sync agent.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: e2e-test-writer
3
3
  description: Generates a single end-to-end (E2E) test spec file for a frontend issue, following the project's configured E2E framework, test directory, fixtures, test-data prefix, cleanup rules, and tags
4
- model: openrouter/anthropic/claude-sonnet-5-0
4
+ model: openrouter/anthropic/claude-sonnet-5
5
5
  ---
6
6
 
7
7
  You are an end-to-end (E2E) test writer. Given an issue, you produce one E2E test spec file that follows the project's configured E2E framework and conventions.
@@ -2,7 +2,7 @@
2
2
  name: migration-reviewer
3
3
  description: Reviews database and data migrations for execution failures, unsafe or destructive operations, compatibility risks, and violations of the project's documented migration conventions
4
4
  tools: glob, grep, read
5
- model: openrouter/anthropic/claude-haiku-4-5
5
+ model: openrouter/anthropic/claude-haiku-4.5
6
6
  ---
7
7
 
8
8
  You are a database migration reviewer. Work with the migration technology and
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: orchestrator
3
3
  description: Analyzes issues on the project platform for actionability and scope. Returns structured JSON classifying whether an issue has sufficient detail and fits within one coder agent session.
4
- model: openrouter/anthropic/claude-haiku-4-5
4
+ model: openrouter/anthropic/claude-haiku-4.5
5
5
  ---
6
6
 
7
7
  You are the orchestrator for the autonomous development pipeline.
@@ -2,7 +2,7 @@
2
2
  name: performance-reviewer
3
3
  description: Reviews changed data-access and hot-path code for confirmed scalability regressions such as repeated I/O, unbounded work, excessive loading, and missing batching or pagination
4
4
  tools: glob, grep, read, todo, web_search
5
- model: openrouter/anthropic/claude-sonnet-5-0
5
+ model: openrouter/anthropic/claude-sonnet-5
6
6
  ---
7
7
 
8
8
  You are a performance reviewer. Work with the language, framework, storage
@@ -2,7 +2,7 @@
2
2
  name: postmortem
3
3
  description: Analyzes failed in-progress MRs/PRs and produces structured diagnostics when the pipeline labels an MR as stuck
4
4
  tools: glob, grep, read
5
- model: openrouter/anthropic/claude-haiku-4-5
5
+ model: openrouter/anthropic/claude-haiku-4.5
6
6
  ---
7
7
 
8
8
  You are a diagnostic specialist analyzing failed automated CI fix attempts.
@@ -2,7 +2,7 @@
2
2
  name: release-mr
3
3
  description: Creates a release MR/PR from the integration branch to the production branch with a structured description listing changes, migrations, env changes, and a deploy checklist. Use when the user wants to prepare a release or merge the integration branch into production.
4
4
  tools: bash, glob, grep, read, todo
5
- model: openrouter/anthropic/claude-sonnet-5-0
5
+ model: openrouter/anthropic/claude-sonnet-5
6
6
  ---
7
7
 
8
8
  You are the release MR/PR agent. Your job is to analyze everything that changed on the integration branch since the last release to the production branch, then create (or update) a well-structured release request.
@@ -2,7 +2,7 @@
2
2
  name: security-reviewer
3
3
  description: Reviews code for security vulnerabilities (authentication bypass, authorization flaws, injection, tenant/data isolation leaks, CSRF misconfiguration, sensitive data exposure) using confidence-based filtering to report only confirmed issues
4
4
  tools: glob, grep, read, todo, web_search
5
- model: openrouter/anthropic/claude-sonnet-5-0
5
+ model: openrouter/anthropic/claude-sonnet-5
6
6
  ---
7
7
 
8
8
  You are an expert security reviewer. Your primary responsibility is to identify security vulnerabilities with high precision. False positives waste developer time and erode trust in the review process.
@@ -2,7 +2,7 @@
2
2
  name: test-fix
3
3
  description: Fixes failing tests in pipeline merge requests. Reads failing test files and their production source classes, determines root cause, fixes implementation or test as needed, verifies compilation, and commits. Never pushes.
4
4
  tools: task, bash, edit, glob, grep, read, todo, write
5
- model: openrouter/anthropic/claude-sonnet-5-0
5
+ model: openrouter/anthropic/claude-sonnet-5
6
6
  ---
7
7
 
8
8
  You are the test-fix agent. Your job is to fix failing tests in a merge request, not to rewrite features.
@@ -2,7 +2,7 @@
2
2
  name: test-writer
3
3
  description: Generates integration and unit tests that increase coverage for new or changed code, following the project's documented testing patterns, with a self-correcting compilation loop
4
4
  tools: task, bash, edit, glob, grep, read, todo, write
5
- model: openrouter/anthropic/claude-sonnet-5-0
5
+ model: openrouter/anthropic/claude-sonnet-5
6
6
  ---
7
7
 
8
8
  You are the test-writer agent. Your job is to write tests that increase coverage for new or changed code.
@@ -31,8 +31,9 @@ variables:
31
31
  PIPE_SCRIPTS_DIR: ".claude-pipeline/scripts"
32
32
 
33
33
  # --- CI image (see ci-templates decision note) -----------------------------
34
- # Must provide: node + npm, git, curl. jq and claude-code are installed in
35
- # before_script when missing. The runner scripts talk to the GitLab API with
34
+ # Must provide: node + npm, git, curl. jq, claude-code, and (when
35
+ # PIPE_HARNESS=omp) bun + omp are installed in before_script when missing.
36
+ # The runner scripts talk to the GitLab API with
36
37
  # curl and jq directly, so no glab is needed in the image; glab is only used
37
38
  # interactively, by the install wizard.
38
39
  # Python caveat (E2E finding N-7): node:22-bookworm ships python3 but NOT
@@ -162,7 +163,7 @@ variables:
162
163
 
163
164
  # --- Hidden base job: shared config + runtime variable mapping ---------------
164
165
  # Maps GitLab's CI_ runtime variables onto the PIPE_ names the scripts read, and
165
- # installs claude-code if the image does not ship it.
166
+ # installs the selected harness (and its runtime) if the image does not ship it.
166
167
  .claude-base:
167
168
  image: $PIPE_CI_IMAGE
168
169
  variables:
@@ -193,6 +194,12 @@ variables:
193
194
  fi
194
195
  - |
195
196
  if [ "$PIPE_HARNESS" = "omp" ]; then
197
+ # omp is a Bun program (`#!/usr/bin/env bun`, engines.bun >= 1.3.14)
198
+ # and node:22-bookworm ships no bun, so the installed `omp` shim is
199
+ # unrunnable without it. The `bun` npm package postinstalls the real
200
+ # binary, so no curl|bash and no image change is needed. Deliberately
201
+ # no `|| true`: a missing harness runtime must fail the job loudly.
202
+ command -v bun >/dev/null 2>&1 || npm install -g bun
196
203
  command -v omp >/dev/null 2>&1 || npm install -g @oh-my-pi/pi-coding-agent
197
204
  else
198
205
  command -v claude >/dev/null 2>&1 || npm install -g @anthropic-ai/claude-code
@@ -74,7 +74,7 @@ env:
74
74
  PIPE_GIT_NAME: ${{ vars.PIPE_GIT_NAME || 'Pipeline Bot' }}
75
75
  PIPE_GIT_EMAIL: ${{ vars.PIPE_GIT_EMAIL || 'bot@pipeline.ci' }}
76
76
  PIPE_MODEL_TRIAGE: ${{ vars.PIPE_MODEL_TRIAGE || 'haiku' }}
77
- PIPE_MODEL_CODE: ${{ vars.PIPE_MODEL_CODE || 'claude-sonnet-5-0' }}
77
+ PIPE_MODEL_CODE: ${{ vars.PIPE_MODEL_CODE || 'claude-sonnet-5' }}
78
78
  PIPE_AGENT_ENV_ALLOWLIST: ${{ vars.PIPE_AGENT_ENV_ALLOWLIST || '' }}
79
79
  # Runtime mapping onto the PIPE_ names the scripts read.
80
80
  PIPE_REPO: ${{ github.repository }}
@@ -44,8 +44,8 @@ env:
44
44
  PIPE_COMMIT_REVIEWFIX: ${{ vars.PIPE_COMMIT_REVIEWFIX || 'Fix review findings' }}
45
45
  PIPE_GIT_NAME: ${{ vars.PIPE_GIT_NAME || 'Pipeline Bot' }}
46
46
  PIPE_GIT_EMAIL: ${{ vars.PIPE_GIT_EMAIL || 'bot@pipeline.ci' }}
47
- PIPE_MODEL_REVIEW: ${{ vars.PIPE_MODEL_REVIEW || 'claude-sonnet-5-0' }}
48
- PIPE_MODEL_CODE: ${{ vars.PIPE_MODEL_CODE || 'claude-sonnet-5-0' }}
47
+ PIPE_MODEL_REVIEW: ${{ vars.PIPE_MODEL_REVIEW || 'claude-sonnet-5' }}
48
+ PIPE_MODEL_CODE: ${{ vars.PIPE_MODEL_CODE || 'claude-sonnet-5' }}
49
49
  PIPE_AGENT_ENV_ALLOWLIST: ${{ vars.PIPE_AGENT_ENV_ALLOWLIST || '' }}
50
50
  # Runtime mapping onto the PIPE_ names the scripts read.
51
51
  PIPE_REPO: ${{ github.repository }}
@@ -49,7 +49,7 @@ env:
49
49
  PIPE_COMMIT_COVERAGE: ${{ vars.PIPE_COMMIT_COVERAGE || 'Add coverage tests' }}
50
50
  PIPE_GIT_NAME: ${{ vars.PIPE_GIT_NAME || 'Pipeline Bot' }}
51
51
  PIPE_GIT_EMAIL: ${{ vars.PIPE_GIT_EMAIL || 'bot@pipeline.ci' }}
52
- PIPE_MODEL_CODE: ${{ vars.PIPE_MODEL_CODE || 'claude-sonnet-5-0' }}
52
+ PIPE_MODEL_CODE: ${{ vars.PIPE_MODEL_CODE || 'claude-sonnet-5' }}
53
53
  PIPE_AGENT_ENV_ALLOWLIST: ${{ vars.PIPE_AGENT_ENV_ALLOWLIST || '' }}
54
54
  PIPE_TEST_ARTIFACT: ${{ vars.PIPE_TEST_ARTIFACT || 'test-reports' }}
55
55
  PIPE_REPO: ${{ github.repository }}
@@ -36,13 +36,13 @@ pipe_defaults() {
36
36
  # Model defaults track the active harness. Each PIPE_MODEL_* variable remains
37
37
  # explicitly overridable.
38
38
  if [ "$PIPE_HARNESS" = "omp" ]; then
39
- : "${PIPE_MODEL_TRIAGE:=openrouter/anthropic/claude-haiku-4-5}"
40
- : "${PIPE_MODEL_CODE:=openrouter/anthropic/claude-sonnet-5-0}"
41
- : "${PIPE_MODEL_REVIEW:=openrouter/anthropic/claude-sonnet-5-0}"
39
+ : "${PIPE_MODEL_TRIAGE:=openrouter/anthropic/claude-haiku-4.5}"
40
+ : "${PIPE_MODEL_CODE:=openrouter/anthropic/claude-sonnet-5}"
41
+ : "${PIPE_MODEL_REVIEW:=openrouter/anthropic/claude-sonnet-5}"
42
42
  else
43
43
  : "${PIPE_MODEL_TRIAGE:=haiku}"
44
- : "${PIPE_MODEL_CODE:=claude-sonnet-5-0}"
45
- : "${PIPE_MODEL_REVIEW:=claude-sonnet-5-0}"
44
+ : "${PIPE_MODEL_CODE:=claude-sonnet-5}"
45
+ : "${PIPE_MODEL_REVIEW:=claude-sonnet-5}"
46
46
  fi
47
47
  : "${PIPE_COMMIT_TESTFIX:=Fix test errors}"
48
48
  : "${PIPE_COMMIT_REVIEWFIX:=Fix review findings}"
@@ -246,12 +246,39 @@ pipe_scrub_agent_secrets() {
246
246
  done < <(compgen -e | while IFS= read -r v; do pipe_agent_secret_var "$v" && echo "$v"; done)
247
247
  }
248
248
 
249
+ # --- Harness preflight ------------------------------------------------------
250
+ # Every pipe_run_* invocation ends in `|| true`, so a harness binary that
251
+ # exists but cannot execute used to produce a green job with no review, no
252
+ # marker file and one line on stderr (issue #1: `omp` is a Bun program and the
253
+ # default node:22-bookworm image ships no bun, so `command -v omp` succeeded
254
+ # while every run failed with "/usr/bin/env: 'bun': No such file or
255
+ # directory"). Executing the binary once, before the tolerant invocation,
256
+ # converts any harness-runtime breakage into an immediate job failure.
257
+
258
+ pipe_require_harness() {
259
+ # $1 = harness binary name (claude|omp). Exits the job on failure: a
260
+ # non-runnable harness means no agent can run, so there is nothing left for
261
+ # the caller to recover from.
262
+ local bin="$1" out
263
+ if ! command -v "$bin" >/dev/null 2>&1; then
264
+ pipe_log "FATAL: harness binary '$bin' not found on PATH (PIPE_HARNESS=${PIPE_HARNESS:-claude}); install it in before_script"
265
+ exit 1
266
+ fi
267
+ if ! out=$("$bin" --version 2>&1); then
268
+ pipe_log "FATAL: harness binary '$bin' ($(command -v "$bin")) cannot execute: '$bin --version' failed"
269
+ printf '%s\n' "$out" >&2
270
+ pipe_log "omp requires bun on PATH (npm install -g bun); claude requires node"
271
+ exit 1
272
+ fi
273
+ }
274
+
249
275
  pipe_run_claude() {
250
276
  # $1 = agent label for metrics, $2 = skill invocation (e.g. "/review-mr"),
251
277
  # $3 = allowed tools (optional), $4 = model for the main loop (optional,
252
278
  # e.g. $PIPE_MODEL_REVIEW; subagents keep their frontmatter models),
253
279
  # stdin = extra prompt (optional, usually empty)
254
280
  local label="$1" skill="$2" tools="${3:-Agent,Read,Write,Edit,Glob,Grep,Bash}" model="${4:-}"
281
+ pipe_require_harness claude
255
282
  local stdin_file; stdin_file=$(mktemp)
256
283
  cat > "$stdin_file" || true
257
284
 
@@ -350,6 +377,7 @@ pipe_run_omp() {
350
377
  # frontmatter), stdin = extra prompt (optional, usually empty).
351
378
  local label="$1" skill="$2" tools="${3:-Agent,Read,Write,Edit,Glob,Grep,Bash}" model="${4:-}"
352
379
  local omp_tools; omp_tools=$(pipe_translate_tools_to_omp "$tools")
380
+ pipe_require_harness omp
353
381
  local stdin_file; stdin_file=$(mktemp)
354
382
  cat > "$stdin_file" || true
355
383