You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hit twice in two migrations (#4215 Sounds, #4219 Algorithms), caught by hand both times.
What happens
scripts/backfill-component-meta.cjs recomputes composes / role / props for everybase-studio-code record, not just the ones an extraction added. The migration recipe says to run it after an extraction — so a Sounds migration rewrites projectspage, and an Algorithms migration rewrites it again.
The rewrite is not cosmetic. deriveComposes resolves an import to a graph component NAME, and only a record or a provides specifier counts — so ProjectCard, ProjectsRail, ProjectSetupPage and DeleteProjectModal (registered CODE, not records) are dropped from projectspage.composes. projectsGraphSeed.test.ts:99 asserts ProjectCard is present, so the suite goes red — but only if the run happens to include features/planner.
Why it keeps slipping through
The migration gate naturally scopes to the feature being migrated plus src/app — Migrate Glance into the graph (epic #3604) #4185's run did not include features/planner at all, so the identical edit could have landed unnoticed.
The diff is one line in a JSON file among several legitimately-changed records, so it does not stand out in git status.
Both times the fix was git checkout -- on the unrelated records. That is a workaround, not a guard.
Options
Scope the backfill — --only <folder> or a positional path, so an extraction touches only what it extracted. Smallest change, matches how it is actually used.
Fix deriveComposes so a registered platform component still counts as an edge. Arguably more correct — projectspage really does compose ProjectCard — but it changes what composes means graph-wide, and the swimlane layout reads it.
Leave it and assert — a test that the backfill is idempotent over the committed records, so a drive-by rewrite fails loudly instead of silently.
The first is the obvious one; the second is worth a look because the test's expectation and the deriver's rule genuinely disagree about what composes is for.
Acceptance criteria
Running the backfill after an extraction cannot modify records outside it — or, if it does, the difference is intentional and tested.
projectspage.composes stops oscillating between migrations.
Hit twice in two migrations (#4215 Sounds, #4219 Algorithms), caught by hand both times.
What happens
scripts/backfill-component-meta.cjsrecomputescomposes/role/propsfor everybase-studio-coderecord, not just the ones an extraction added. The migration recipe says to run it after an extraction — so a Sounds migration rewritesprojectspage, and an Algorithms migration rewrites it again.The rewrite is not cosmetic.
deriveComposesresolves an import to a graph component NAME, and only a record or aprovidesspecifier counts — soProjectCard,ProjectsRail,ProjectSetupPageandDeleteProjectModal(registered CODE, not records) are dropped fromprojectspage.composes.projectsGraphSeed.test.ts:99assertsProjectCardis present, so the suite goes red — but only if the run happens to includefeatures/planner.Why it keeps slipping through
src/app— Migrate Glance into the graph (epic #3604) #4185's run did not includefeatures/plannerat all, so the identical edit could have landed unnoticed.git status.Both times the fix was
git checkout --on the unrelated records. That is a workaround, not a guard.Options
--only <folder>or a positional path, so an extraction touches only what it extracted. Smallest change, matches how it is actually used.deriveComposesso a registered platform component still counts as an edge. Arguably more correct —projectspagereally does composeProjectCard— but it changes whatcomposesmeans graph-wide, and the swimlane layout reads it.The first is the obvious one; the second is worth a look because the test's expectation and the deriver's rule genuinely disagree about what
composesis for.Acceptance criteria
projectspage.composesstops oscillating between migrations.