chore(ci) Build against the platform commit pinned in contract.ref #26

Merged
araemer merged 1 commit from contract-pin into stage 2026-10-03 17:36:37 +00:00
Owner

Problem

All three workflows (pr_check.yaml, build_stage.yaml, build_release.yaml) clone recipe-platform at the head of main and build @recipe/contract from it. Platform main already carries the contract for spec 002, which recipe-backend does not implement yet. Builds against main therefore no longer compile, which blocks the production release.

Mechanism

  • New file contract.ref in the repo root: one line, the full hash of the platform commit this repo builds against. It travels with the code, so every branch and tag names its own contract.
  • Each workflow gets one new step, checkout_pinned_platform_contract, between pull_platform and install_platform_contract:
      - name: checkout_pinned_platform_contract
        run: |
          ref="$(tr -d '[:space:]' < repo/contract.ref)"
          test -n "$ref"
          git -C recipe-platform checkout --detach "$ref"

The step fails when contract.ref is missing or empty. The platform clone stays a full clone, so any commit on any pushed platform branch is reachable.

  • CLAUDE.md documents the pin: a feature that needs a newer contract moves the pin on its feature branch; the release script requires recipe-backend and recipe-app to pin the same commit.

Nothing else in the workflows changed.

Pinned commit

c69d1e3be45f716404d891be07776395ffda629b — the last commit on platform main before the spec 002 contract (merge of recipe-platform#34; the next commit on main is the merge of #35, which adds the spec 002 contract).

Verification

Locally, against a platform checkout at the pinned commit: npm install, npm run build (clean) and npm test (56 files, 557 tests passed). The PR check of this PR is the proof that the checkout step works in CI.

🤖 Generated with Claude Code

## Problem All three workflows (`pr_check.yaml`, `build_stage.yaml`, `build_release.yaml`) clone `recipe-platform` at the head of `main` and build `@recipe/contract` from it. Platform `main` already carries the contract for spec 002, which `recipe-backend` does not implement yet. Builds against `main` therefore no longer compile, which blocks the production release. ## Mechanism - New file `contract.ref` in the repo root: one line, the full hash of the platform commit this repo builds against. It travels with the code, so every branch and tag names its own contract. - Each workflow gets one new step, `checkout_pinned_platform_contract`, between `pull_platform` and `install_platform_contract`: ```yaml - name: checkout_pinned_platform_contract run: | ref="$(tr -d '[:space:]' < repo/contract.ref)" test -n "$ref" git -C recipe-platform checkout --detach "$ref" ``` The step fails when `contract.ref` is missing or empty. The platform clone stays a full clone, so any commit on any pushed platform branch is reachable. - `CLAUDE.md` documents the pin: a feature that needs a newer contract moves the pin on its feature branch; the release script requires `recipe-backend` and `recipe-app` to pin the same commit. Nothing else in the workflows changed. ## Pinned commit `c69d1e3be45f716404d891be07776395ffda629b` — the last commit on platform `main` before the spec 002 contract (merge of recipe-platform#34; the next commit on `main` is the merge of #35, which adds the spec 002 contract). ## Verification Locally, against a platform checkout at the pinned commit: `npm install`, `npm run build` (clean) and `npm test` (56 files, 557 tests passed). The PR check of this PR is the proof that the checkout step works in CI. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
chore(ci) Build against the platform commit pinned in contract.ref
All checks were successful
/ test (pull_request) Successful in 1m13s
9dcc5d1e34
CI cloned recipe-platform at the head of main. Platform main already carries
the contract for spec 002, which this repo does not implement yet, so builds
no longer compiled. All three workflows now check out the commit named in
contract.ref before installing the contract, and fail if the file is missing
or empty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
araemer merged commit 8b2ddc950a into stage 2026-10-03 17:36:37 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
araemer/recipe-backend!26
No description provided.