Support "approval for all exceptions" edits: add an onException gate … #113
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| check: | |
| name: format · typecheck · lint · knip · test · build · eval | |
| runs-on: ubuntu-latest | |
| # No real secrets in CI: the app validates env at runtime (on Vercel), so the build | |
| # and the dry-run sanity/eval only need to skip the load-time env validation. Without | |
| # this, `next build` throws "Invalid environment variables" and the job fails. | |
| env: | |
| SKIP_ENV_VALIDATION: "1" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Format check (Prettier) | |
| run: pnpm format:check | |
| - name: Typecheck | |
| run: pnpm typecheck | |
| - name: Lint (ESLint — cast/any hygiene) | |
| run: pnpm lint | |
| - name: Dead-code check (knip) | |
| run: pnpm knip | |
| - name: Unit tests | |
| run: pnpm test | |
| - name: Build | |
| run: pnpm build | |
| # The agent calls the Anthropic API (costs tokens, needs a secret), so the | |
| # live pipeline is intentionally NOT run in CI. `pnpm sanity --dry-run` | |
| # exercises the deterministic orchestration logic offline — running every | |
| # seeded invoice through the real match → route → reconcile functions and | |
| # asserting the edge cases route correctly — with zero API calls. | |
| - name: Pipeline sanity (dry-run, no API calls) | |
| run: pnpm sanity --dry-run | |
| # The investigator eval scores the AGENT's recommendation against a labelled | |
| # corpus. The live run needs a key; `--dry-run` validates the corpus + | |
| # scoring offline (a perfect score is expected). Run the real eval locally. | |
| - name: Investigator eval (dry-run, no API calls) | |
| run: pnpm eval --dry-run | |
| # The conversational-edit eval scores whether the model maps an instruction | |
| # to the right WorkflowEditOp. `--dry-run` exercises the corpus + scoring | |
| # offline; the live run (real model, 8/8) is local. | |
| - name: Workflow-edit eval (dry-run, no API calls) | |
| run: pnpm eval:edit --dry-run |