feat: port triage pipeline from arena-forge #258

Open
goern wants to merge 3 commits from arena-forge into main
goern commented 2026-06-17 08:05:27 +00:00 (Migrated from codeberg.org)

Summary

  • Port the coding-agent-pipeline triage pipeline from goern/arena-forge to forgejo-mcp
  • Adds persona manifest + prompt (.castra/personas/triage.yaml, .castra/prompts/triage.md)
  • Adds JSON schemas for the IN/OUT contract (schemas/)
  • Adds Tekton pipeline, 3 tasks, repository CRD, and .tekton/triage.yaml PaC PipelineRun pointer
  • Adds pipeline scripts: prepare_context.py, pi_run.py, apply_decision.py
  • Adds ops scripts: seal-secrets.sh, configure-webhooks.py
  • Reuses existing arena-forge-forgejo-read/write and arena-forge-pipeline-agent secrets on nostromo

How it works

Fires on /triage comments from repo collaborators on PRs. The pipeline:

  1. prepare-context — re-verifies author against live Forgejo API, builds input.json
  2. agent-run — runs pi + ca-leash with read-only credentials, emits decision.json
  3. apply-decision — validates decision against schemas, applies labels + comment via write token

The agent holds no write credentials; only the trusted apply step does.

What's left (operator tasks)

  • Step 6 (webhook): CODEBERG_TOKEN=... python scripts/configure-webhooks.py goern/forgejo-mcp done
  • Step 1 (OpenSpec): coding-agent-pipeline OpenSpec change not ported — not needed to run the pipeline

Test plan

  • Comment /triage on a PR in goern/forgejo-mcp
  • Verify a PipelineRun is created in op1st-pipelines
  • Verify the triage decision is applied (labels + comment) on the PR
## Summary - Port the `coding-agent-pipeline` triage pipeline from `goern/arena-forge` to `forgejo-mcp` - Adds persona manifest + prompt (`.castra/personas/triage.yaml`, `.castra/prompts/triage.md`) - Adds JSON schemas for the IN/OUT contract (`schemas/`) - Adds Tekton pipeline, 3 tasks, repository CRD, and `.tekton/triage.yaml` PaC PipelineRun pointer - Adds pipeline scripts: `prepare_context.py`, `pi_run.py`, `apply_decision.py` - Adds ops scripts: `seal-secrets.sh`, `configure-webhooks.py` - Reuses existing `arena-forge-forgejo-read/write` and `arena-forge-pipeline-agent` secrets on nostromo ## How it works Fires on `/triage` comments from repo collaborators on PRs. The pipeline: 1. **prepare-context** — re-verifies author against live Forgejo API, builds `input.json` 2. **agent-run** — runs `pi` + `ca-leash` with read-only credentials, emits `decision.json` 3. **apply-decision** — validates decision against schemas, applies labels + comment via write token The agent holds **no write credentials**; only the trusted apply step does. ## What's left (operator tasks) - Step 6 (webhook): `CODEBERG_TOKEN=... python scripts/configure-webhooks.py goern/forgejo-mcp` ✅ done - Step 1 (OpenSpec): `coding-agent-pipeline` OpenSpec change not ported — not needed to run the pipeline ## Test plan - [ ] Comment `/triage` on a PR in `goern/forgejo-mcp` - [ ] Verify a PipelineRun is created in `op1st-pipelines` - [ ] Verify the triage decision is applied (labels + comment) on the PR
op1st-gitops commented 2026-06-17 08:05:33 +00:00 (Migrated from codeberg.org)

op1st Pipelines as Code/forgejo-mcp-code-scans-hdcpf is running.

Starting Pipelinerun forgejo-mcp-code-scans-hdcpf in namespace op1st-pipelines

You can monitor the execution using the op1st Pipelines as Code PipelineRun viewer or through the command line by
using the tkn CLI with the following command:

tkn pr logs -n op1st-pipelines forgejo-mcp-code-scans-hdcpf -f

op1st Pipelines as Code/forgejo-mcp-code-scans-hdcpf is running. Starting Pipelinerun <b>[forgejo-mcp-code-scans-hdcpf](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/forgejo-mcp-code-scans-hdcpf)</b> in namespace <b>op1st-pipelines</b> You can monitor the execution using the [op1st Pipelines as Code](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/forgejo-mcp-code-scans-hdcpf) PipelineRun viewer or through the command line by using the [tkn](https://tekton.dev/docs/cli/#installation) CLI with the following command: <code>tkn pr logs -n op1st-pipelines forgejo-mcp-code-scans-hdcpf -f</code>
op1st-gitops commented 2026-06-17 08:05:33 +00:00 (Migrated from codeberg.org)

op1st Pipelines as Code/forgejo-mcp-on-pull-request-bxncf is running.

Starting Pipelinerun forgejo-mcp-on-pull-request-bxncf in namespace op1st-pipelines

You can monitor the execution using the op1st Pipelines as Code PipelineRun viewer or through the command line by
using the tkn CLI with the following command:

tkn pr logs -n op1st-pipelines forgejo-mcp-on-pull-request-bxncf -f

op1st Pipelines as Code/forgejo-mcp-on-pull-request-bxncf is running. Starting Pipelinerun <b>[forgejo-mcp-on-pull-request-bxncf](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/forgejo-mcp-on-pull-request-bxncf)</b> in namespace <b>op1st-pipelines</b> You can monitor the execution using the [op1st Pipelines as Code](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/forgejo-mcp-on-pull-request-bxncf) PipelineRun viewer or through the command line by using the [tkn](https://tekton.dev/docs/cli/#installation) CLI with the following command: <code>tkn pr logs -n op1st-pipelines forgejo-mcp-on-pull-request-bxncf -f</code>
op1st-gitops commented 2026-06-17 08:05:59 +00:00 (Migrated from codeberg.org)

op1st Pipelines as Code/forgejo-mcp-code-scans-hdcpf has successfully validated your commit.


Task Statuses:

StatusDurationName
Succeeded 13 seconds

fetch-source

Succeeded 9 seconds

gitleaks-version

Succeeded 12 seconds

gitleaks

op1st Pipelines as Code/forgejo-mcp-code-scans-hdcpf has <b>successfully</b> validated your commit. <ul> <li><b>Namespace</b>: <a href="https://detailurl.setting.custom-console-url-namespace.is.not.configured">op1st-pipelines</a></li> <li><b>PipelineRun:</b> <a href="https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/forgejo-mcp-code-scans-hdcpf">forgejo-mcp-code-scans-hdcpf</a></li> </ul> <hr> <h4>Task Statuses:</h4> <table> <tr><th>Status</th><th>Duration</th><th>Name</th></tr> <tr> <td>Succeeded</td> <td>13 seconds</td><td> [fetch-source](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/forgejo-mcp-code-scans-hdcpf/logs/fetch-source) </td></tr> <tr> <td>Succeeded</td> <td>9 seconds</td><td> [gitleaks-version](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/forgejo-mcp-code-scans-hdcpf/logs/gitleaks-version) </td></tr> <tr> <td>Succeeded</td> <td>12 seconds</td><td> [gitleaks](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/forgejo-mcp-code-scans-hdcpf/logs/gitleaks) </td></tr> </table>
op1st-gitops commented 2026-06-17 08:08:04 +00:00 (Migrated from codeberg.org)

op1st Pipelines as Code/forgejo-mcp-on-pull-request-bxncf has successfully validated your commit.


Task Statuses:

StatusDurationName
Succeeded 13 seconds

fetch-source

Succeeded 2 minutes

build-and-test

Succeeded 17 seconds

commit-title-check

op1st Pipelines as Code/forgejo-mcp-on-pull-request-bxncf has <b>successfully</b> validated your commit. <ul> <li><b>Namespace</b>: <a href="https://detailurl.setting.custom-console-url-namespace.is.not.configured">op1st-pipelines</a></li> <li><b>PipelineRun:</b> <a href="https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/forgejo-mcp-on-pull-request-bxncf">forgejo-mcp-on-pull-request-bxncf</a></li> </ul> <hr> <h4>Task Statuses:</h4> <table> <tr><th>Status</th><th>Duration</th><th>Name</th></tr> <tr> <td>Succeeded</td> <td>13 seconds</td><td> [fetch-source](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/forgejo-mcp-on-pull-request-bxncf/logs/fetch-source) </td></tr> <tr> <td>Succeeded</td> <td>2 minutes</td><td> [build-and-test](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/forgejo-mcp-on-pull-request-bxncf/logs/build-and-test) </td></tr> <tr> <td>Succeeded</td> <td>17 seconds</td><td> [commit-title-check](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/forgejo-mcp-on-pull-request-bxncf/logs/commit-title-check) </td></tr> </table>
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin arena-forge:arena-forge
git switch arena-forge

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff arena-forge
git switch arena-forge
git rebase main
git switch main
git merge --ff-only arena-forge
git switch arena-forge
git rebase main
git switch main
git merge --no-ff arena-forge
git switch main
git merge --squash arena-forge
git switch main
git merge --ff-only arena-forge
git switch main
git merge arena-forge
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
agentic-forges/forgejo-mcp!258
No description provided.