From 591f18a559ea3c1864095009f442a805fe3b3a4c Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Sun, 17 May 2026 04:16:46 +0100 Subject: [PATCH] ci: add templated k9iser-regen trigger (mirrors boj-build.yml) Triggers boj-server's k9iser-mcp cartridge to regenerate generated/k9iser/*.k9 centrally instead of ad-hoc hand-commit (the drift class behind k9iser#8 / idaptik#77). Guarded on k9iser.toml presence; fire-and-forget until the BoJ REST runtime ships, exactly like boj-build.yml today. Refs hyperpolymath/k9iser#8. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/k9iser-regen.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/k9iser-regen.yml diff --git a/.github/workflows/k9iser-regen.yml b/.github/workflows/k9iser-regen.yml new file mode 100644 index 0000000..d92bec7 --- /dev/null +++ b/.github/workflows/k9iser-regen.yml @@ -0,0 +1,28 @@ +# SPDX-License-Identifier: AGPL-3.0-or-later +# Triggers central K9-contract regeneration via boj-server's k9iser-mcp +# cartridge, so generated/k9iser/*.k9 are produced centrally instead of +# being run ad hoc and hand-committed (the drift that broke Dogfood Gate +# estate-wide — hyperpolymath/k9iser#8). Mirrors boj-build.yml. +# Fire-and-forget until the BoJ REST runtime ships (Elixir rewrite). +name: K9iser Regen Trigger +on: + push: + branches: [main, master] + workflow_dispatch: +permissions: + contents: read +jobs: + trigger-k9iser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: Detect k9iser manifest + id: detect + run: | + if [ -f k9iser.toml ]; then echo "present=true" >> "$GITHUB_OUTPUT"; else echo "present=false" >> "$GITHUB_OUTPUT"; fi + - name: Trigger BoJ Server (k9iser-mcp) + if: steps.detect.outputs.present == 'true' + run: | + curl -X POST "http://boj-server.local:7700/cartridges/k9iser-mcp/invoke" -H "Content-Type: application/json" -d "{\"repo\": \"${{ github.repository }}\", \"branch\": \"${{ github.ref_name }}\", \"tool\": \"k9_generate\"}" + continue-on-error: true