fabro/.github/workflows/engine-freeze.yml
Bryan Helmkamp 806ac90c98
Freeze the engine half of fabro-workflow to bug fixes
The integration plan's F4.1: once Fabro runs on Petri, the engine half of
fabro-workflow (handler/, lifecycle/, pipeline/execute, graph/routing,
node_handler, retry, condition, context, model_fallback) takes bug fixes
only, and new engine behaviour goes to Petri.

scripts/check-engine-freeze.sh holds the frozen path list, diffs the
branch against a base ref and exits 1 when any frozen file gained lines;
scripts/check-engine-freeze-test.sh proves that on a synthetic
repository. The Engine freeze workflow runs both on every pull request
that touches the crate's src, re-runs on label changes, and fails unless
the pull request carries the `bugfix` label. AGENTS.md and the
fabro-petri README name the freeze, the label and the script.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-18 02:19:29 -04:00

53 lines
2 KiB
YAML

name: Engine freeze
# The engine half of fabro-workflow takes bug fixes only; new engine behaviour
# goes to Petri. A pull request that adds lines under the frozen paths fails
# here unless it carries the `bugfix` label. The frozen paths live in
# `scripts/check-engine-freeze.sh`, which runs locally the same way.
# Labeling re-runs the check so a label added after a failure clears it.
on:
pull_request:
branches: [main]
types: [opened, synchronize, reopened, labeled, unlabeled]
paths:
- "lib/components/fabro-workflow/src/**"
- "scripts/check-engine-freeze.sh"
- "scripts/check-engine-freeze-test.sh"
- ".github/workflows/engine-freeze.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
freeze:
name: Engine half takes bug fixes only
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
# The check diffs against the merge base with the base branch.
fetch-depth: 0
- name: Self-test the check
run: scripts/check-engine-freeze-test.sh
- name: Check the frozen paths
env:
BASE_REF: ${{ github.base_ref }}
HAS_BUGFIX_LABEL: ${{ contains(github.event.pull_request.labels.*.name, 'bugfix') }}
run: |
git fetch --no-tags origin "$BASE_REF"
if scripts/check-engine-freeze.sh "origin/$BASE_REF"; then
exit 0
fi
if [ "$HAS_BUGFIX_LABEL" = "true" ]; then
echo "The 'bugfix' label waives the engine freeze for this pull request."
exit 0
fi
echo "::error::This pull request adds lines to the frozen engine half of fabro-workflow (see the log for the paths). New engine behaviour goes to Petri (lib/components/fabro-petri). A bug fix needs the 'bugfix' label."
exit 1