Rewrite adoptsFrom on installed instances and un-park the install/remix live suites - #674
Conversation
`buildInstanceOperation` computed the install planner's `targetCodeRef` and then dropped it, so a copied instance kept the source realm's `adoptsFrom`. Instances whose ref happened to be relative survived by accident, since the relative path stays valid under a folder-preserving copy; ones with an absolute catalog-realm ref stayed pointed at the catalog. Assign the planner's decision instead. That makes the install/remix live suites meaningful, so un-park both. The card listing test now also asserts the installed card's module resolves into the destination realm and no longer into the catalog realm — the assertion that actually pins this bug. Also nests `categories.0` inside `relationships` in the pirate-skill fixture; it sat as a sibling, so the category link was silently not a relationship at all. Depends on cardstack/boxel#5631 for correct base-realm classification: with adoptsFrom now actually rewritten, a base-realm ref that the planner misclassifies becomes a visibly broken module reference rather than dead data. Co-Authored-By: Claude <noreply@anthropic.com>
…re merge Points the boxel monorepo checkout at cs-12078-make-the-catalog-install-planner-rri-native so this PR's own Live Tests job can prove the fix end to end before cardstack/boxel#5631 merges. Must be reverted to the default branch before this PR is merged. Co-Authored-By: Claude <noreply@anthropic.com>
Staging Submissions PreviewThis PR's content is pushed to the staging submissions realm: https://realms-staging.stack.cards/submissions/ Changed folders:
Updated at 2026-07-30 07:55:16 UTC for commit |
There was a problem hiding this comment.
Pull request overview
This PR fixes catalog listing installs/remixes leaving copied card instances’ meta.adoptsFrom pointing at the source (catalog) realm by persisting the install planner’s chosen targetCodeRef, and re-enables the previously parked live acceptance suites that validate the end-to-end behavior.
Changes:
- Write
copyInstanceMeta.targetCodeRefonto the copied resource’smeta.adoptsFromduring instance install. - Unskip the live “listing install” and “listing remix” acceptance suites and add an assertion that the installed card’s module resolves into the destination realm (not the catalog realm).
- Fix a test fixture JSON:API shape issue by nesting
categories.0underrelationships.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| commands/listing-install.ts | Persists the planner’s selected module reference onto copied instances via meta.adoptsFrom. |
| tests/live/catalog-app/listing-install.test.gts | Unskips install suite and asserts installed card resolves into destination realm. |
| tests/live/catalog-app/listing-remix.test.gts | Unskips remix suite to restore end-to-end coverage. |
| tests/helpers/test-fixtures.ts | Fixes fixture relationship structure for categories.0. |
| .github/workflows/ci-test.yaml | Temporarily pins boxel checkout ref for CI live tests (must be reverted before merge). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ert before merge" This reverts commit 994195b.
Companion to cardstack/boxel#5631. Together they close CS-12078 (and the CS-11748 / CS-11780 symptoms).
Why
buildInstanceOperationcomputed the install planner'stargetCodeRefand then discarded it — it never assignedcardResource.meta.adoptsFrom. So a copied instance kept whateveradoptsFromthe source card had:That is the visible half of the bug. This PR assigns the planner's decision.
Why it needs the boxel companion
Because
adoptsFromwas never rewritten, the planner's base-realm misclassification was latent — wrong data that nothing read. The moment this PR starts honoringtargetCodeRef, that misclassification becomes a visibly broken module reference: aSkilladopting@cardstack/base/skillwould get rewritten to a localbase/skill.gtsthat is never written.boxel#5631 makes the planner RRI-native so base-realm refs are classified correctly in all three spellings. The two PRs are only meaningful together, which is why the earlier attempt at this pair (#652 / boxel#5478) was closed in favour of fixing the root cause.
What changed
commands/listing-install.ts— assigncopyInstanceMeta.targetCodeRefonto the copied resource'smeta.adoptsFrom.tests/live/catalog-app/listing-install.test.gts— un-park (5 tests). The card-listing test now also asserts the installed card's module resolves into the destination realm and not into the catalog realm.Author/example.json's ownadoptsFromis an absolute catalog-realm URL in the fixtures, so this is the assertion that actually pins the bug.tests/live/catalog-app/listing-remix.test.gts— un-park (4 tests). These cover the rendering consequence: a brokenadoptsFromkills the playground preview, so'Author - Mike Dane'rendering is a real end-to-end signal.tests/helpers/test-fixtures.ts— nestcategories.0insiderelationshipsin the pirate-skill listing. It sat as a sibling ofrelationships, so the category link was silently not a relationship at all.That's the 9 previously-parked live tests (5 install + 4 remix). They were parked at module level, which is why they never showed up in skip counts.
Note the
Skillcases in both suites are the base-realm path specifically — they are the ones that fail without boxel#5631.Status
boxel#5631 has merged, and the temporary CI pin used to verify the pair pre-merge is reverted (
994195b→ea39ea1) — CI now runs against boxelmain, which contains the planner change. Live Tests were green while pinned to the companion branch (all 10 previously-parked tests ran, 0 failures); the run againstmainis in flight onea39ea1.There are still no unit tests for
buildInstanceOperation— the live suites are its only coverage.🤖 Generated with Claude Code