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

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

Problem

All three workflows (pr_check, build_stage, build_release) clone recipe-platform at the head of main and install @recipe/contract from it. Platform main already carries the contract for spec 002 (shopping list overview with item previews), which this repo does not implement yet. Since that merge, tsc -b fails in CI:

src/mappers/tests/CompactShoppingListMapper.test.ts(8,5): error TS2322: ... Types of property 'openItemsPreview' are incompatible.

That is why the latest stage build and the open PR checks are red, and it 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.
  • Each workflow gets a step checkout_pinned_platform_contract between pull_platform and install_platform_contract. It reads repo/contract.ref, fails if the file is missing or empty, and runs git -C recipe-platform checkout --detach "$ref". The clone stays a full clone, so any commit on any pushed platform branch is reachable.
  • CLAUDE.md documents the rule: CI builds against the pin, not platform main; 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.

Pinned commit

c69d1e3be45f716404d891be07776395ffda629b — the last commit on platform main before the spec 002 contract was merged.

Verification

Against the pinned contract: npm run build, npm run lint (0 errors, 2 existing warnings) and npm run test (372 tests) pass. Against platform main, the same stage code fails npm run build with the error above. No UI changed.

🤖 Generated with Claude Code

## Problem All three workflows (`pr_check`, `build_stage`, `build_release`) clone `recipe-platform` at the head of `main` and install `@recipe/contract` from it. Platform `main` already carries the contract for spec 002 (shopping list overview with item previews), which this repo does not implement yet. Since that merge, `tsc -b` fails in CI: ``` src/mappers/tests/CompactShoppingListMapper.test.ts(8,5): error TS2322: ... Types of property 'openItemsPreview' are incompatible. ``` That is why the latest `stage` build and the open PR checks are red, and it 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. - Each workflow gets a step `checkout_pinned_platform_contract` between `pull_platform` and `install_platform_contract`. It reads `repo/contract.ref`, fails if the file is missing or empty, and runs `git -C recipe-platform checkout --detach "$ref"`. The clone stays a full clone, so any commit on any pushed platform branch is reachable. - `CLAUDE.md` documents the rule: CI builds against the pin, not platform `main`; 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. ## Pinned commit `c69d1e3be45f716404d891be07776395ffda629b` — the last commit on platform `main` before the spec 002 contract was merged. ## Verification Against the pinned contract: `npm run build`, `npm run lint` (0 errors, 2 existing warnings) and `npm run test` (372 tests) pass. Against platform `main`, the same `stage` code fails `npm run build` with the error above. No UI changed. 🤖 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 1m3s
d30deae2ae
CI cloned recipe-platform at the head of main, so a contract merged there
for a feature this repo does not implement yet broke every build. The
workflows now check out the commit named in contract.ref after cloning.

Pinned: c69d1e3be45f716404d891be07776395ffda629b, the last platform main
commit before the spec 002 contract.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
araemer merged commit 8dfb1b2a4c into stage 2026-10-03 17:36:24 +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-app!55
No description provided.