feat: OpenSpec planning for repo webhook tools #257

Merged
goern merged 0 commits from refs/pull/257/head into main 2026-06-17 07:25:57 +00:00
goern commented 2026-06-17 07:12:45 +00:00 (Migrated from codeberg.org)

Summary

Adds the OpenSpec planning artifacts for repository webhook management (ref #136 — implementation tracked there, not closed by this PR).

  • proposal.md — motivates 6 MCP tools + 2 forgejo:// resource templates for repo hook CRUD
  • design.md — key decisions: operation/hook/ package, URI scheme (hook/hooks), explicit config-key allowlist for secret masking, two-path bounding (tool = unbounded, resource = cap 30)
  • specs/repo-webhook-tools/spec.md — normative requirements + scenarios for all 8 surfaces (list, get, create, edit, delete, test, collection resource, single resource)
  • tasks.md — 20-checkpoint implementation checklist
  • battle-test.md — adversarial review (devils-advocate/opus + proponent/opus): 7 critiques, 6 concede-patch applied, 1 concede-future filed
  • journal.jsonl — turn/artifact log for future grading

Battle-test outcome

All patches applied before this PR:

Critique Verdict Patch
C1 URI inconsistency patch {?page,limit} + singular hook/{id} unified across all artifacts
C2 Invented ceiling-50 patch Dropped; tool = unbounded path, resource = cap 30
C3 Truncation sentinel wording patch Wording now reflects cap+1 reality
C4 Secret: struct-omission ≠ map-key-deletion patch Design D3: explicit config-key allowlist required
C5 Unfalsifiable secret scenario patch Value-tracing SENTINEL assertion
C6 test_repo_hook outbound traffic future Doc: live-delivery warning added; rate guard deferred
C7 Missing malformed-id scenario patch -32602 pinned for hook/abc

Test plan

  • Proposal, design, spec, and tasks are internally consistent (URI strings match across all three artifacts)
  • battle-test.md verdict is "Patch first" with all patches applied
  • openspec validate --all --strict passes (CI gate)
  • No implementation code changed — planning artifacts only
## Summary Adds the OpenSpec planning artifacts for repository webhook management (ref #136 — implementation tracked there, not closed by this PR). - **proposal.md** — motivates 6 MCP tools + 2 `forgejo://` resource templates for repo hook CRUD - **design.md** — key decisions: `operation/hook/` package, URI scheme (`hook`/`hooks`), explicit config-key allowlist for secret masking, two-path bounding (tool = unbounded, resource = cap 30) - **specs/repo-webhook-tools/spec.md** — normative requirements + scenarios for all 8 surfaces (list, get, create, edit, delete, test, collection resource, single resource) - **tasks.md** — 20-checkpoint implementation checklist - **battle-test.md** — adversarial review (devils-advocate/opus + proponent/opus): 7 critiques, 6 concede-patch applied, 1 concede-future filed - **journal.jsonl** — turn/artifact log for future grading ## Battle-test outcome All patches applied before this PR: | Critique | Verdict | Patch | |---|---|---| | C1 URI inconsistency | patch | `{?page,limit}` + singular `hook/{id}` unified across all artifacts | | C2 Invented ceiling-50 | patch | Dropped; tool = unbounded path, resource = cap 30 | | C3 Truncation sentinel wording | patch | Wording now reflects cap+1 reality | | C4 Secret: struct-omission ≠ map-key-deletion | patch | Design D3: explicit config-key allowlist required | | C5 Unfalsifiable secret scenario | patch | Value-tracing `SENTINEL` assertion | | C6 `test_repo_hook` outbound traffic | future | Doc: live-delivery warning added; rate guard deferred | | C7 Missing malformed-id scenario | patch | `-32602` pinned for `hook/abc` | ## Test plan - [ ] Proposal, design, spec, and tasks are internally consistent (URI strings match across all three artifacts) - [ ] `battle-test.md` verdict is "Patch first" with all patches applied - [ ] `openspec validate --all --strict` passes (CI gate) - [ ] No implementation code changed — planning artifacts only
op1st-gitops commented 2026-06-17 07:12:52 +00:00 (Migrated from codeberg.org)

op1st Pipelines as Code/forgejo-mcp-openspec-validate-pr-vmfxt is running.

Starting Pipelinerun forgejo-mcp-openspec-validate-pr-vmfxt 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-openspec-validate-pr-vmfxt -f

op1st Pipelines as Code/forgejo-mcp-openspec-validate-pr-vmfxt is running. Starting Pipelinerun <b>[forgejo-mcp-openspec-validate-pr-vmfxt](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/forgejo-mcp-openspec-validate-pr-vmfxt)</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-openspec-validate-pr-vmfxt) 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-openspec-validate-pr-vmfxt -f</code>
op1st-gitops commented 2026-06-17 07:12:52 +00:00 (Migrated from codeberg.org)

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

Starting Pipelinerun forgejo-mcp-code-scans-gf6vf 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-gf6vf -f

op1st Pipelines as Code/forgejo-mcp-code-scans-gf6vf is running. Starting Pipelinerun <b>[forgejo-mcp-code-scans-gf6vf](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/forgejo-mcp-code-scans-gf6vf)</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-gf6vf) 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-gf6vf -f</code>
op1st-gitops commented 2026-06-17 07:12:52 +00:00 (Migrated from codeberg.org)

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

Starting Pipelinerun forgejo-mcp-on-pull-request-nrmpq 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-nrmpq -f

op1st Pipelines as Code/forgejo-mcp-on-pull-request-nrmpq is running. Starting Pipelinerun <b>[forgejo-mcp-on-pull-request-nrmpq](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-nrmpq)</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-nrmpq) 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-nrmpq -f</code>
op1st-gitops commented 2026-06-17 07:13:22 +00:00 (Migrated from codeberg.org)

op1st Pipelines as Code/forgejo-mcp-code-scans-gf6vf has failed.


Task Statuses:

StatusDurationName
Failed 29 seconds

fetch-source

Succeeded 10 seconds

gitleaks-version


Failure snippet:

task fetch-source has the status "Failed":
{"level":"error","ts":1781680385.9825666,"caller":"git/git.go:53","msg":"Error running git [remote get-url origin]: exit status 2\nerror: No such remote 'origin'\n","stacktrace":"github.com/tektoncd-catalog/git-clone/git-init/git.run\n\tgithub.com/tektoncd-catalog/git-clone/git-init/git/git.go:53\ngithub.com/tektoncd-catalog/git-clone/git-init/git.Fetch\n\tgithub.com/tektoncd-catalog/git-clone/git-init/git/git.go:109\nmain.main\n\tgithub.com/tektoncd-catalog/git-clone/git-init/main.go:52\nruntime.main\n\truntime/proc.go:272"}
{"level":"error","ts":1781680399.4610467,"caller":"git/git.go:53","msg":"Error running git [fetch --recurse-submodules=yes --depth=1 origin --update-head-ok --force 94f57273d51de3f73ce64e2fb627b068e6916489]: exit status 128\nfatal: unable to access 'https://codeberg.org/goern/forgejo-mcp/': gnutls_handshake() failed: The TLS connection was non-properly terminated.\n","stacktrace":"github.com/tektoncd-catalog/git-clone/git-init/git.run\n\tgithub.com/tektoncd-catalog/git-clone/git-init/git/git.go:53\ngithub.com/tektoncd-catalog/git-clone/git-init/git.Fetch\n\tgithub.com/tektoncd-catalog/git-clone/git-init/git/git.go:166\nmain.main\n\tgithub.com/tektoncd-catalog/git-clone/git-init/main.go:52\nruntime.main\n\truntime/proc.go:272"}
{"level":"fatal","ts":1781680399.4611177,"caller":"git-init/main.go:53","msg":"Error fetching git repository: failed to fetch [94f57273d51de3f73ce64e2fb627b068e6916489]: exit status 128","stacktrace":"main.main\n\tgithub.com/tektoncd-catalog/git-clone/git-init/main.go:53\nruntime.main\n\truntime/proc.go:272"}
op1st Pipelines as Code/forgejo-mcp-code-scans-gf6vf has <b>failed</b>. <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-gf6vf">forgejo-mcp-code-scans-gf6vf</a></li> </ul> <hr> <h4>Task Statuses:</h4> <table> <tr><th>Status</th><th>Duration</th><th>Name</th></tr> <tr> <td>Failed</td> <td>29 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-gf6vf/logs/fetch-source) </td></tr> <tr> <td>Succeeded</td> <td>10 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-gf6vf/logs/gitleaks-version) </td></tr> </table> <hr> <h4>Failure snippet:</h4> task <b>fetch-source</b> has the status <b>"Failed"</b>: <pre>{"level":"error","ts":1781680385.9825666,"caller":"git/git.go:53","msg":"Error running git [remote get-url origin]: exit status 2\nerror: No such remote 'origin'\n","stacktrace":"github.com/tektoncd-catalog/git-clone/git-init/git.run\n\tgithub.com/tektoncd-catalog/git-clone/git-init/git/git.go:53\ngithub.com/tektoncd-catalog/git-clone/git-init/git.Fetch\n\tgithub.com/tektoncd-catalog/git-clone/git-init/git/git.go:109\nmain.main\n\tgithub.com/tektoncd-catalog/git-clone/git-init/main.go:52\nruntime.main\n\truntime/proc.go:272"} {"level":"error","ts":1781680399.4610467,"caller":"git/git.go:53","msg":"Error running git [fetch --recurse-submodules=yes --depth=1 origin --update-head-ok --force 94f57273d51de3f73ce64e2fb627b068e6916489]: exit status 128\nfatal: unable to access 'https://codeberg.org/goern/forgejo-mcp/': gnutls_handshake() failed: The TLS connection was non-properly terminated.\n","stacktrace":"github.com/tektoncd-catalog/git-clone/git-init/git.run\n\tgithub.com/tektoncd-catalog/git-clone/git-init/git/git.go:53\ngithub.com/tektoncd-catalog/git-clone/git-init/git.Fetch\n\tgithub.com/tektoncd-catalog/git-clone/git-init/git/git.go:166\nmain.main\n\tgithub.com/tektoncd-catalog/git-clone/git-init/main.go:52\nruntime.main\n\truntime/proc.go:272"} {"level":"fatal","ts":1781680399.4611177,"caller":"git-init/main.go:53","msg":"Error fetching git repository: failed to fetch [94f57273d51de3f73ce64e2fb627b068e6916489]: exit status 128","stacktrace":"main.main\n\tgithub.com/tektoncd-catalog/git-clone/git-init/main.go:53\nruntime.main\n\truntime/proc.go:272"}</pre>
op1st-gitops commented 2026-06-17 07:14:23 +00:00 (Migrated from codeberg.org)

op1st Pipelines as Code/forgejo-mcp-openspec-validate-pr-vmfxt has successfully validated your commit.


Task Statuses:

StatusDurationName
Succeeded 30 seconds

fetch-source

Succeeded 1 minute

validate

op1st Pipelines as Code/forgejo-mcp-openspec-validate-pr-vmfxt 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-openspec-validate-pr-vmfxt">forgejo-mcp-openspec-validate-pr-vmfxt</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>30 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-openspec-validate-pr-vmfxt/logs/fetch-source) </td></tr> <tr> <td>Succeeded</td> <td>1 minute</td><td> [validate](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/forgejo-mcp-openspec-validate-pr-vmfxt/logs/validate) </td></tr> </table>
op1st-gitops commented 2026-06-17 07:14:24 +00:00 (Migrated from codeberg.org)

op1st Pipelines as Code/forgejo-mcp-openspec-validate-pr-vmfxt has successfully validated your commit.


Task Statuses:

StatusDurationName
Succeeded 30 seconds

fetch-source

Succeeded 1 minute

validate

op1st Pipelines as Code/forgejo-mcp-openspec-validate-pr-vmfxt 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-openspec-validate-pr-vmfxt">forgejo-mcp-openspec-validate-pr-vmfxt</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>30 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-openspec-validate-pr-vmfxt/logs/fetch-source) </td></tr> <tr> <td>Succeeded</td> <td>1 minute</td><td> [validate](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/forgejo-mcp-openspec-validate-pr-vmfxt/logs/validate) </td></tr> </table>
op1st-gitops commented 2026-06-17 07:16:59 +00:00 (Migrated from codeberg.org)

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


Task Statuses:

StatusDurationName
Succeeded 1 minute

fetch-source

Succeeded 2 minutes

build-and-test

Succeeded 18 seconds

commit-title-check

op1st Pipelines as Code/forgejo-mcp-on-pull-request-nrmpq 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-nrmpq">forgejo-mcp-on-pull-request-nrmpq</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>1 minute</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-nrmpq/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-nrmpq/logs/build-and-test) </td></tr> <tr> <td>Succeeded</td> <td>18 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-nrmpq/logs/commit-title-check) </td></tr> </table>
goern commented 2026-06-17 07:25:30 +00:00 (Migrated from codeberg.org)

/test forgejo-mcp-code-scans

/test forgejo-mcp-code-scans
op1st-gitops commented 2026-06-17 07:25:35 +00:00 (Migrated from codeberg.org)

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

Starting Pipelinerun forgejo-mcp-code-scans-x5srf 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-x5srf -f

op1st Pipelines as Code/forgejo-mcp-code-scans-x5srf is running. Starting Pipelinerun <b>[forgejo-mcp-code-scans-x5srf](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/forgejo-mcp-code-scans-x5srf)</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-x5srf) 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-x5srf -f</code>
op1st-gitops commented 2026-06-17 07:25:54 +00:00 (Migrated from codeberg.org)

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


Task Statuses:

StatusDurationName
Succeeded 9 seconds

fetch-source

Succeeded 7 seconds

gitleaks-version

Succeeded 8 seconds

gitleaks

op1st Pipelines as Code/forgejo-mcp-code-scans-x5srf 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-x5srf">forgejo-mcp-code-scans-x5srf</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>9 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-x5srf/logs/fetch-source) </td></tr> <tr> <td>Succeeded</td> <td>7 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-x5srf/logs/gitleaks-version) </td></tr> <tr> <td>Succeeded</td> <td>8 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-x5srf/logs/gitleaks) </td></tr> </table>
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!257
No description provided.