Files
openprose__prose/.github/workflows/ci-examples-gate.yml
irl-dan 66fe7a85e6 ship: OpenProse learning example library (13 examples, offline gate)
Ships the 13 wired tier-1/tier-2 examples under skills/open-prose/examples
with a hermetic offline gate at zero model spend:

- skills/open-prose/examples/{agent-observatory, basic-unit-suite,
  forme-fixpoint, github-star-enricher, implementation-pipeline,
  inbox-triage, masked-relay, monorepo-ci, oblique-weave, renewal-risk,
  research-tree, surprise-cost, tamper-forge}: source .prose.md contracts,
  committed replay/ state-dirs, and co-located deterministic tier-2
  ledger-replay tests driving the real @openprose/reactor reconciler.
- tests/open-prose/examples/intelligent-react-examples-corpus.test.ts:
  tier-1 doc-conformance over the 13 OWNED examples (agent-observatory
  and forme-fixpoint normalized to lead each ### Continuity body with the
  canonical input-driven/self-driven token; gateways stay external-driven).
- tools/eval-harness/: deterministic offline eval checker (10/10).
- vitest.config.ts: aliases @openprose/reactor public subpaths to the
  prebuilt workspace dist; collects example *.test.ts; excludes key-gated
  *.live.test.ts so the gate stays hermetic.
- package.json: adds test:examples (REACTOR_OFFLINE=1 vitest + eval
  harness) and folds it into test.
- .github/workflows/ci-examples-gate.yml: runs the offline gate on
  example/test path changes (no judge key).
- prune: removes the superseded packages/std/examples/{composed-reviewer,
  confident-writer} .prose.md set.

Gates green: pnpm build clean; REACTOR_OFFLINE=1 pnpm test:examples =
17 vitest files / 214 tests + eval-harness 10/10; REACTOR_OFFLINE=1
pnpm test:skill = 14 files / 252 tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 14:16:32 -07:00

72 lines
2.2 KiB
YAML

name: CI - OpenProse Examples Gate
# Runs the DETERMINISTIC, OFFLINE example suite on every PR that touches the
# shipped learning examples, their conformance tests, the eval harness, or the
# shared gate wiring. Three tiers, all at zero model spend (REACTOR_OFFLINE=1):
#
# - tier-1 doc-conformance (tests/open-prose/examples/**)
# - tier-2 ledger-replay (skills/open-prose/examples/**/*.test.ts)
# - eval-harness deterministic checker (tools/eval-harness/eval-harness.test.mjs)
#
# The key-gated LLM judge panel is NEVER run here: REACTOR_OFFLINE=1 forces
# hasOpenRouterKey() to false, and no OPENROUTER_API_KEY secret is wired into
# this workflow, so the judge path stays a passing-skipped no-op.
on:
pull_request:
paths:
- "skills/open-prose/examples/**"
- "tests/open-prose/examples/**"
- "tools/eval-harness/**"
- "vitest.config.ts"
- "package.json"
- "pnpm-lock.yaml"
- "pnpm-workspace.yaml"
- "packages/reactor/**"
- "packages/reactor-devtools/**"
- ".github/workflows/ci-examples-gate.yml"
push:
branches: [main]
concurrency:
group: ci-examples-gate-${{ github.head_ref || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
examples:
name: CI - Examples Gate (offline)
runs-on: ubuntu-latest
timeout-minutes: 15
env:
# Force the offline path everywhere: no network, no model spend, and the
# LLM judge panel stays a passing-skipped no-op (no key resolvable).
REACTOR_OFFLINE: "1"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build reactor + devtools (the example tests replay their dist)
run: |
pnpm --filter @openprose/reactor build
pnpm --filter @openprose/reactor-devtools build
- name: Tier-2 ledger-replay + tier-1 doc-conformance + eval-harness
run: pnpm test:examples