feat: Cursor harness support (2.5.58) #623
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 | |
| # Deterministic PR gate for the v2 line. Runs the fast contract checks | |
| # (dist byte-parity, typecheck, lint) and the credential-free test tiers | |
| # (smoke + unit). The integration tier is deliberately excluded: it drives | |
| # the live Claude Agent SDK via AWS Bedrock and would either need repo | |
| # secrets or silently pass-by-skip here, so a green run stays meaningful | |
| # without it. See docs/reference/09-testing.md for the tier map. | |
| on: | |
| pull_request: | |
| branches: | |
| - v2 | |
| # Run on PR open, on every push to the PR branch (synchronize), and on | |
| # reopen. This is GitHub's default set for `pull_request`; declared | |
| # explicitly so the re-run-on-modify behavior is unambiguous. | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| # One in-flight run per PR ref; supersede older pushes to the same PR. | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check: | |
| name: Contract checks (parity + typecheck + lint) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 | |
| with: | |
| bun-version: '1.3.14' | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| # `bun run check` = package.ts --check (dist drift guard) && typecheck | |
| # (all three tsconfigs) && biome lint. Fails CI on a hand-edited or stale | |
| # dist, a type error, or a lint warning. | |
| - name: Run contract checks | |
| run: bun run check | |
| test: | |
| name: Tests (smoke + unit) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 | |
| with: | |
| bun-version: '1.3.14' | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| # smoke + unit are the deterministic, credential-free tiers (no AWS / | |
| # Bedrock / live Claude). The runner exits non-zero on any failed file. | |
| - name: Run smoke + unit tiers | |
| run: bun tests/run-tests.ts --smoke --unit --parallel 8 | |
| changelog-guard: | |
| name: Changelog completeness | |
| # pull_request only: the guard diffs against the PR event's base commit, | |
| # which does not exist on workflow_dispatch (github.base_ref is empty there). | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| # Need the PR base commit on disk to diff CHANGELOG headings against. | |
| fetch-depth: 0 | |
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 | |
| with: | |
| bun-version: '1.3.14' | |
| # Fail if this PR removes any `## [x.y.z]` heading that exists on the | |
| # base branch. Complements tests/unit/t68 (which guards version⇄changelog | |
| # sync and heading uniqueness, but not deletion of an existing entry). | |
| # Diff against the FROZEN base commit the PR event fired from | |
| # (pull_request.base.sha), NOT origin/<base_ref>: the branch ref moves as | |
| # v2 accrues new entries while this PR is open, which would make the guard | |
| # falsely report those newer entries as "removed" on any re-run. | |
| - name: Guard against deleted CHANGELOG entries | |
| run: bun scripts/ci-changelog-guard.ts "${{ github.event.pull_request.base.sha }}" |