Repository navigation
Issue #1513: feat: convert the seed's overlays and clean it as dev was cleaned - #1520
Conversation
…s cleaned Runs cleanup_export_blockers.py, remove_test_data.py and convert_overlays.py on backup.sql in public and tenant_lif_team, and removes model 16, as dev got in #1388 and #1393. Dumped with pg_dump 18.6, as the seed last was. Tests that need overlays load the unconverted seed, kept as test/fixtures/backup-unconverted.sql (the same blob as the old backup.sql). The rest pin the converted seed; the snapshots are regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…kup.sql backup.sql is no longer a snapshot of V1.1's content. Per the decision on #1513 step 4, no migration converts a fresh environment; the deployment guide now says so and names the scripts that give it the seed's content. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…f V1.1 Comment only. backup.sql still replaces V1.1 locally, but its content has moved past V1.1's; point at the deployment guide's note. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cbeach47
left a comment
There was a problem hiding this comment.
From Claude:
The approach looks right to me. Option (a) costs nothing, since the fixture is the same blob as main's backup.sql (2a3f79b). I also loaded the new dump and checked model 16's removal. In both schemas, no live entity association, attribute association, value set, inclusion or group rule still points at model 16.
There's one thing to sequence with #1468 that doesn't need a change here. overlay_converter.py:211 checks itself with generate_openapi_schema on the overlay, and the fixture's overlay tests call it too. #1468's last PR makes generation refuse NOT_MIGRATED, overlays included. That would stop convert_overlays.py, which demo (step 6) and this PR's fresh-environment note both depend on. So either that PR waits until demo is converted and #1514 replaces the scripts, or the converter calls the generator without the check. I'll note it on #1468.
Three inline comments below.
| - **Deployed envs** run migrations via Flyway (tracked in `flyway_schema_history`). | ||
| - **Local docker-compose** loads `backup.sql` (a pg_dump snapshot of V1.1 content) and then runs every `V1.*.sql` file in the Flyway directory through `psql` — it does *not* use real Flyway and does *not* track history. See `projects/lif_mdr_database/restore.sh`. | ||
| - **Local docker-compose** loads `backup.sql` and then runs every `V1.*.sql` file in the Flyway directory through `psql` — it does *not* use real Flyway and does *not* track history. See `projects/lif_mdr_database/restore.sh`. | ||
| - **A fresh deployed environment doesn't get `backup.sql`.** Flyway builds it from V1.1, which was last copied from the seed in September 2026. V1.1 still has the overlays and the models that #1513 converted or replaced. Applied migrations aren't edited, V1.1 included, so the two stay out of sync until #1514 changes how content ships. To give a fresh environment the seed's content, run `scripts/remove_test_data.py`, `scripts/cleanup_export_blockers.py` and `scripts/convert_overlays.py` against it, as was done on dev. Models 3, 6, 14 and 17 also differ (#1521). |
There was a problem hiding this comment.
From Claude:
The recipe is incomplete. No script removes model 16. Its SQL is only in the PR description, so following this note leaves model 16 live and export refuses it. Model 29 isn't listed either. Could the model-16 SQL go into scripts/ and be listed here? Also, these scripts have only run against backup.sql and dev, never against a database Flyway built from V1.1. The note should say that, unless someone has tried it.
| # The seed as it was before #1513 converted it: models 17 and 18 are still overlays of model 1. Tests of | ||
| # overlay behavior (and of code that still has to handle overlays, on demo or a fresh install from V1.1) | ||
| # load this instead of backup.sql. | ||
| UNCONVERTED_SEED_PATH = Path(__file__).parent.parent.parent.parent.parent / "test/fixtures/backup-unconverted.sql" |
There was a problem hiding this comment.
From Claude:
_load_seed loads a dump and doesn't replay any migrations. So a future V1.12 has to be applied to this fixture as well as to backup.sql. Otherwise the overlay tests run against an older schema than the code expects. Could this comment say so, or could the fixture loader replay V1.2+ the way restore.sh does?
| assert await is_overlay_model(session, 17) | ||
| # What makes a model an overlay is its inclusion rows, not its Type. In the seed, #1513 converted model | ||
| # 17: it is still Type OrgLIF, with no inclusion rows, so it is not an overlay. | ||
| assert not await is_overlay_model(session, 17) |
There was a problem hiding this comment.
From Claude:
The precondition is that 17 is still Type OrgLIF, but only the comment says so. Could it be asserted (SELECT "Type" FROM "DataModels" WHERE "Id" = 17)? #1521 re-imports 17 from dev, and if its Type changes there, this test would still pass without testing anything.
|
From Claude: @bjagg, this corrects the #1468 note in my review above. The plan is that once #1513 lands, overlays no longer exist anywhere. All overlay code then goes, including Two gaps stand in the way of "no overlays anywhere":
Whichever you pick, the deployment note in this PR changes to match. |
…veat, model 17 precondition - deployment.md: a fresh Flyway environment has no supported path to the seed's content until #1514; the scripts were never run against V1.1. - conftest.py: backup-unconverted.sql replays no migrations, so a later migration has to be applied to it too. - test_type_name_does_not_select_the_overlay_path asserts model 17 is Type OrgLIF instead of only saying so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#1520's review added an assertion that model 17 is Type OrgLIF. Here 17 is dev's copy, Type SourceSchema; assert that, and note the OrgLIF case is tested through MODEL_ID. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
From Claude: Thanks, @cbeach47. I pushed 66d62be for the three inline points. Here's where each one landed, and answers to your two questions:
|
cbeach47
left a comment
There was a problem hiding this comment.
From Claude:
@bjagg, thanks. 66d62be covers all three inline points, and CI is green.
One change of direction: demo won't be converted. It's being decommissioned shortly, so dev and demo don't need to stay in sync with this work. What that changes:
- Nothing is left blocking the overlay code's removal. Demo was the only environment still running overlays, and this PR's note says a fresh environment isn't supported until #1514. Once #1513 lands, overlays exist only in V1.1 and in
backup-unconverted.sql. The removal can follow straight after, and the fixture and the script tests go with it. - This PR still says the overlay code is kept for demo. Could the wording follow the new plan?
- Handbook: backend chapter 3 (the "Overlays are on their way out" section, lines 66–92), chapter 7 line 15 and frontend chapter 2 line 128 still say demo is "not yet, #1513". Chapter 7 still gives demo's recipe (add to model 1, then include in 17). Saying demo won't be converted and is being decommissioned would let the overlay recipe go, or shrink to a pointer.
- Comments:
conftest.py:27and the fourtest/scriptsfiles say the scripts run on demo. Saying the fixture lasts until the overlay code is removed would be enough.
- #1513's scope: step 6 and the demo half of step 8 drop out, and "Done means" no longer needs "on dev or demo". #1521's choice of dev's content still holds on its own merits (#1511's file names Ed-Fi v5
1.0), so it doesn't need revisiting.
cbeach47
left a comment
There was a problem hiding this comment.
Static spot checked.
Approving.
Per #1520's review: handbook chapter 3 now says overlays are gone (dev and the seed converted, demo won't be), lists the seed's 18 live models, and replaces the overlay walkthrough with a pointer. Chapter 7's add-a-field step adds to model 17 directly (checked against the seed: 201, field in 17's generated schema). The fixture comments say the unconverted seed lasts until the overlay code is removed, not that the scripts run on demo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-mapping rule Review feedback on #1519: - crosswalk_converter now holds the §2 live-mapping filter once, in _live_mappings, and lists every pair with list_crosswalk_pairs, reached through portability_converter. measure_export_blockers.py uses it instead of its own copy of the joins and Deleted checks (#1468). - The script's docstring says it counts what the converters refuse: through GET /portable/crosswalks, a missing value set is a 404 before the converter runs. Its long line is rewrapped. - Spec §7's seed figures are re-measured after #1520: in public, 1,654 value mappings that aren't deleted, 940 to soft-deleted targets, and 714 live across 6 pairs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
) ##### Description of Change Step 2 of #1513: `scripts/measure_export_blockers.py` now counts crosswalks alongside models and mapping groups, so "no refused model, group or crosswalk" can be measured. The crosswalk converter wasn't on `main` when the script was written (#1442), so it only counted models and groups. **What counts as a crosswalk.** A crosswalk has no row of its own (Portability Spec §7): it's the live value mappings from one value set to another. So the script measures every value-set pair that has at least one live value mapping. The crosswalk converter lists the pairs, as `list_crosswalk_pairs`, with the same live-mapping filter `export_crosswalk` reads (§2): the mapping, both of its values, and its group if it has one. The filter is written once, in `crosswalk_converter._live_mappings`, and the script reaches the list through `portability_converter`. The pair comes from the values, not from the mapping's `SourceValueSetId`/`TargetValueSetId`, which are NULL on most of the seed's rows. Value sets and models aren't filtered, so the count is what `export_crosswalk` refuses: a pair whose value set or model is gone is counted as refused. Through `GET /portable/crosswalks`, a missing value set is a 404 before the converter runs. Each pair runs through `export_crosswalk` the same way models and groups run through their converters: in a savepoint, with refusals counted under their reason and any other exception as `ERROR`. The summary line per schema gains `crosswalks N export, M refused`. **Today's figures.** Nothing is refused yet, so the reason lists don't change: - the seed (`backup.sql`): 6 crosswalks in `public` and 6 in `tenant_lif_team`, all export; - dev (2026-11-15, all 10 schemas, run read-only in the `mdr-api` container): 6 per schema in `public` and 7 of the eval schemas, 10 in eval-5, and 7 in `tenant_lif_team`. All export. The model and group refusals on dev are the two #1513 already lists: model 28 in `tenant_lif_team`, and one group in eval-5 (#1434). ##### Related Issues Refs #1513 ##### Type of Change - [x] New feature (non-breaking change which adds functionality) ##### Project Area(s) Affected - [x] components/ - [x] scripts/ - [x] test/ or e2e/ - [x] Documentation (docs/, READMEs, ARCHITECTURE.md, CLAUDE.md) --- ##### Checklist - [x] commit message follows commit guidelines (see commitlint.config.mjs) - [x] tests are included (unit and/or integration tests) - [x] code passes linting checks (`uv run ruff check`) - [x] code passes formatting checks (`uv run ruff format`) - [x] code passes type checking (`uv run ty check`) - [x] pre-commit hooks have been run successfully ##### Testing `uv run pytest test/scripts/test_measure_export_blockers.py` (needs a local PostgreSQL; 7 passed locally on PG 16.15). New tests: - **The seed test** pins `(6, 6, 0)` crosswalks for `public`. - **`test_measure_counts_a_refused_crosswalk_under_its_reason`:** a crosswalk refusal is counted under its reason and the crosswalk's label, and shows in the summary line. - **`test_crosswalk_pairs_skip_a_pair_with_no_live_mapping`:** in a transaction that's rolled back, four of the seed's six pairs lose their live mappings, each a different way (mapping deleted, source values deleted, target values deleted, group deleted), and only the other two are listed. Removing any one of the three value and group filters from the query fails this test (checked by hand). - **Spec §7:** the seed figures are re-measured after #1520. In `public`, 1,654 value mappings aren't deleted, 940 of them point at soft-deleted target values, and the 714 live ones cover 6 pairs. `tenant_lif_team` has the same 714 and 6. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…move 29 (#1521) ##### Description of Change #1520 is merged, and this branch has `main` merged in, including #1523. Step 1 of #1513, applied to the seed, as [decided](#1513 (comment)): models 3 (CLR v2), 6 (Ed-Fi v5), 14 (CASE) and 17 (StateU LIF) take dev's content, and model 29 (Open Badges v3) is removed. Dev has no separate Open Badges v3; its model 3 covers both. Dev's `public` and `tenant_lif_team` hold the same 3, 6 and 14, byte for byte. For 17, the seed takes `tenant_lif_team`'s version, which the reference mappings were written against. In both of the seed's schemas: 1. **Groups:** the live groups touching those models (23–26, all `→ 17`) are exported and soft-deleted with their rules. 2. **Each model:** the old model is soft-deleted with everything in it. Dev's export of it (`GET /portable/models/{id}` from dev's `tenant_lif_team`, 2026-11-15) is imported, and the two Ids are swapped, so the new content keeps the model's Id (17 is pinned in every compose file's `OPENAPI_DATA_MODEL_ID`) and the old soft-deleted rows move to the new Id. `DataModels.Id` is `GENERATED ALWAYS`, so the swap relaxes it to `BY DEFAULT` and restores it in the same transaction. 3. **Model 29:** soft-deleted with everything in it (`public` only; the seed's `tenant_lif_team` has none). 4. **Groups again:** groups 23–26 are re-imported against the new model 17, all rules resolving (0, 0, 4 and 1), each with its old group's `ActivationDate`, so the local stack translates as before. 5. **V1.11:** dev's model 17 has 35 Reference associations per schema with `Array` true, the V1.7 copies V1.11 (#1471) resets. `restore.sh` replays V1.11 on every local load anyway, so it's applied before the dump, and `backup.sql` holds what a local stack loads. No live crosswalk goes through any of these models. 91 value mappings start at model 3's and 14's values, but each ends at a value of a model 1 value set deleted long ago. **Result** (`scripts/measure_export_blockers.py`): every model and group in the seed exports, 18 of 18 and 6 of 6 in each schema. ##### Behaviour change **Model 17's `Type` is now `SourceSchema`, not `OrgLIF`.** The portable format doesn't carry `Type`, so `import_model` writes `SourceSchema`, which fits ADR data_model/0004. In the local MDR UI, StateU LIF moves from the Org LIF group to the source schemas, and Data Extensions (`GET /datamodels/orglif`) shows nothing. Model 18, converted in place, stays `PartnerLIF`. ##### How it was checked - **Dev parity.** In both schemas, `export_model` on 3, 6, 14 and 17 gives dev's file byte for byte. - **Generated schemas against dev's.** All 16 outputs per model were compared with `GET /datamodels/open_api_schema/{id}` from dev's `tenant_lif_team`, row Ids aside: - The **default schema** (what GraphQL, the Translator and semantic search load) is the same for all four. For 17, the only difference is enum value order (Id order, and the Ids are new). - The other flags differ only where the portable format normalizes legacy element columns (Portability Spec §5.4 and its migration table): - with attribute metadata, attributes' free-text `Array`/`Required` on 3, 6 and 14; - under `public_only`, three child entities of model 17 (`OperationalStatus`, `OrganizationCode`, `Ranges`, whose parents are Private) come out single, because a child entity's legacy `Array` isn't carried; - under `full_export`, `CreationDate`, which the format doesn't carry. - Any import of these files gives the same result, so these aren't regeneration errors. - **The reference transformations now fit the seed.** Checked on a throwaway copy: - `Ed-Fi-v5_StateU-LIF__v1.0.json` (#1517) imports, all 83 rules, into both seed schemas. Before, `public` refused it with `MODEL_MISSING`. - The two old-format outbound files: StateU LIF → Ed-Fi v5 resolves 70 of 70 (44 failed before), and StateU LIF → CLR v2 / OB3 resolves 30 of 32. The other two have no source and target attributes in the file itself. - So the outbound files can now be converted to the portable format from the seed; that's left for a follow-up. - **No dump noise, no schema change.** Same pg_dump 18.6 container as #1520. The DDL, everything but data and `setval` lines, is identical to #1520's, including the 33 `GENERATED ALWAYS` identity columns. - **Every foreign key** in both schemas was checked for orphans after the swap (29 FKs, none). - **The migrations replay cleanly.** Loading the new dump and replaying V1.2–V1.11 as `restore.sh` does changes no row. - **Rows added** are the same in both schemas, dev's four models: 116 entities, 826 attributes, 48 value sets, 1,414 values, 138 entity associations, 1,111 attribute associations, plus the re-imported groups (4) and rules (5). The procedure ran once, on a fresh load of #1520's seed, so the dump's Ids and sequence values don't depend on any dry runs. ##### Tests - **Schema snapshots,** regenerated. Only models 3, 6, 14, 17 (new content) and 29 (removed) changed; every other model's 16 outputs are unchanged from #1520. - **`test_measure_export_blockers`:** 18 of 18 models and 6 of 6 groups in each schema, nothing refused. - **`test_portable_seed_round_trip`:** all 18 models, and every group and crosswalk on them, round-trip byte for byte. - **`test_portable_endpoints`:** no seed model is refused any more, so the not-migrated test sets one of model 3's attributes to `DataType` entity inside the request's session, then rolls it back. - **`test_association_name_seed`:** model 17 joins 4 and 10 as a model whose association `Name` and `Array` aren't derived by the V1.7 rule. They were set on dev: role names such as `awardedByRefOrganization` (#1434), and `Array` edited since #1472. For those models, the test checks only that both are set. - **`test_clone_datamodel_sql`:** runs on the converted seed's 3 (CLR v2 / Open Badges v3) and 14 (CASE). A clone gets no `ContributorOrganization`, so the test sets the source's; that gap is on #1468. - **`test_schema_generation_cycle`:** needs model 29, so it runs on the unconverted seed (`unconverted_db_session`, from #1520), and goes with #1463's guard when #1468 removes the `NOT_MIGRATED` pass. `test/scripts`, `test/bases/lif/mdr_restapi` and `test/components/lif/mdr_services`: 728 passed, 1 skipped (PG 16.15 locally). One fewer than #1520 because model 29 left the snapshot set. After merging `main` (with #1523), the full suite: 1927 passed, 1 skipped. **Docs:** `reference_data/transformations/README.md` now says where the files import against this seed. ##### Related Issues Refs #1513 (the seed is done; demo, step 6, and the migration question, step 4, stay open there), #1511, #1514 ##### Type of Change - [x] Bug fix (non-breaking change which fixes an issue) - [x] Documentation update ##### Project Area(s) Affected - [x] projects/ - [x] reference_data/ - [x] test/ or e2e/ --- ##### Checklist - [x] commit message follows commit guidelines (see commitlint.config.mjs) - [x] tests are included (unit and/or integration tests) - [x] code passes linting checks (`uv run ruff check`) - [x] code passes formatting checks (`uv run ruff format`) - [x] pre-commit hooks have been run successfully ##### Additional Notes - **For the reviewer:** model 17's association `Array` values. Dev stores `Array` true on 123 attribute associations and 101 entity associations whose child's own `Array` is `No`. The generator reads the association, so dev and now the local stack serve those as lists. That's dev's content as decided, but it may not be what was meant; the counts are from the seed's `public`. - **Conflicts:** with #1518 in `reference_data/transformations/README.md` (both edit "Where the portable file imports"), and with #1519 in `test/scripts/test_measure_export_blockers.py`. Whichever merges second resolves. - **What's left in #1513:** apply this on demo (step 6), and Chris's answer on the migration (step 4). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ortable format (#1522) ##### Description of Change **Stacked on #1521** (itself on #1520), so the diff shows only this step. Merge those first; this PR's base then becomes `main`. The two outbound reference groups, StateU LIF → CLR v2 / Open Badges v3 and StateU LIF → Ed-Fi v5, were the last old-format files in `reference_data/transformations/` (#1511). Their groups on dev have never had mappings, so there was nothing to export them from. Since #1521, the seed's models 3, 6 and 17 are dev's `tenant_lif_team` versions, which these files were written against, so they now convert through the seed: 1. Each old file was imported into the seed (`import_transformation_group`, as `POST /transformation_groups/{id}/import` does) as a new 17 → 3 or 17 → 6 group, version `1.0`. 2. That group was exported with `export_mapping_group` (`GET /portable/mapping_groups/{id}`) and replaces the old file under the same name. Both of the seed's schemas give the same two files, byte for byte. All three files in the directory are now portable, so `scripts/import-transformations.sh` loads all three instead of skipping two. **What changed in the content:** - **Rules:** every converted rule has the old rule's name, expression, expression language, target and sources, compared rule by rule (old paths' dotted `UniqueName`s and numeric prefixes reduced to the portable path's segments). That's 70 of 70 for Ed-Fi v5 and 30 of 32 for CLR v2 / Open Badges v3. - **Two rules dropped:** `AchievementSubject.activityStartDate` and `AchievementSubject.result` have no source or target attributes in the old file, and both read `Name.firstName`. The portable format needs a target, and they look like placeholders. - **Group names** follow the `<source>_<target>` pattern every other group uses: `StateU LIF_CLR v2 / Open Badges v3` and `StateU LIF_Ed-Fi v5`. The old files had `StateU-LIF_CLR-v2-Open-Badges-v3__v1.0` and `StateU LIF_Ed-Fi_v5_v1.0`. - **Not carried over:** the old files' `ActivationDate` (2026-06-18). An imported group arrives inactive (#1350), like the inbound file's. No rule had `Notes`, `Alignment` or a contributor to lose. ##### Where they import Checked on throwaway copies of #1521's seed: - **The seed, both schemas:** each file imports with every rule, re-exports byte for byte, and a second import is refused with `GROUP_EXISTS`. - **Dev's `public`:** none of the three files imports, and that includes the inbound file already on `main`. With dev's `public` export of model 17 in place of the seed's, they're refused with 53, 8 and 47 `PATH_INVALID` errors. That StateU LIF has fewer entities than `tenant_lif_team`'s, as the README already says for the inbound file. - **Dev's `tenant_lif_team`:** its models 3, 6 and 17 are the ones the seed now holds, so the paths resolve there. Not imported, since that would be a dev write. One thing to check before running the script there: `GROUP_EXISTS` keys on the two models plus `Version`. If dev already has an empty 17 → 3 or 17 → 6 group at `1.0`, the script reports the file as already installed while that group still has no mappings. ##### Tests - New `test/bases/lif/mdr_restapi/test_reference_transformations.py` runs every portable file in the directory (not recursively, like the script) in both seed schemas. It checks four things: the rule count, the import, the byte-for-byte re-export, and `GROUP_EXISTS` on the second import. 7 passed. - **Mutations:** the old-format Ed-Fi file put back fails 2 tests, and so does a mapping removed from it. ##### Related Issues Refs #1511, #1513 ##### Type of Change - [x] Bug fix (non-breaking change which fixes an issue) - [x] Documentation update ##### Project Area(s) Affected - [x] reference_data/ - [x] test/ or e2e/ --- ##### Checklist - [x] commit message follows commit guidelines (see commitlint.config.mjs) - [x] tests are included (unit and/or integration tests) - [x] code passes linting checks (`uv run ruff check`) - [x] code passes formatting checks (`uv run ruff format`) - [x] pre-commit hooks have been run successfully ##### Additional Notes - **Conflicts:** with #1518 in `reference_data/transformations/README.md`, like #1521. Whichever merges second resolves. - **The diff is mostly the two JSON files:** the old format carried database Ids and nulls on every rule; the portable one names paths only. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Description of Change
Steps 3–5 of #1513, first part:
backup.sqlgets what dev got in #1388 and #1393. In bothpublicandtenant_lif_team:scripts/cleanup_export_blockers.py --apply(Issue #1393: feat: one-time cleanup of the data that keeps models and groups from exporting #1444's rules)scripts/remove_test_data.py --apply(model 25 and the pinned test rows)scripts/convert_overlays.py --apply(models 17 and 18 become self-contained; its self-check passed for models 1, 16, 17 and 18 in all 16 flag combinations, in both schemas)This is Dereck's order from his hand-off. Replacing models 3, 6, 14 and 17 with dev's content and removing 29 (the decision) is the next PR.
What export refuses afterwards (
scripts/measure_export_blockers.py):publictenant_lif_teampublic's 4 refusals are models 3, 6, 14 and 29, all for attributes withDataTypeentity, which the next PR replaces.How the dump was made, and how it was checked
backup.sqlsayspg_dump 18.6 (Debian 18.6-1.pgdg13+2), so everything ran in apostgres:18.6container. The seed was loaded asrestore.shdoes it (backup.sql, then everyV1.*.sqlexcept V1.1).main'sbackup.sqlline for line, except pg_dump 18's random\restricttoken. So every other changed line comes from the steps above.convert_overlays.py's undo records), and the other 174 are model 16's removal (87 per schema). Rows added are exactly the conversion's copies: 37 entities, 157 attributes, 2 value sets, 124 values, 50 entity associations and 229 attribute associations per schema.restore.shdoes, changes no row (the two dumps are equal as sets of lines; a few rows only move position).Model 16's removal
Tests
The converted seed failed 62 tests. Dereck counted 61 before model 16's removal.
Tests that need overlays keep the old seed, as a fixture (Dereck's option (a)).
test/fixtures/backup-unconverted.sqlismain'sbackup.sqlbyte for byte, so it's the same git blob that's already in history and adds nothing to the repository's size. Its tests stay meaningful: the one-time scripts still have to run on unconverted data (demo, step 6), and the overlay code paths still exist for demo.test/scripts:cleanup_export_blockers,convert_overlays,remove_test_dataandmeasure_overlay_conversionload the fixture (23 tests).test/bases/lif/mdr_restapi:conftest.pygainsunconverted_postgresandunconverted_db_session.test_overlay_converter,test_overlay_attribute_list,test_overlay_attribute_inclusionsandtest_base_model_lookupoverrideseed_postgres/test_db_sessionwith them, so their API-client tests run on it too (17 tests).Tests changed for the new seed:
test_v1_7_portability_columns_sql,test_v1_10_element_flags_resync_sql: they relied on the seed's live own-element inclusion rows, which were on models 17 and 18. Each now inserts the inclusion row it checks, with flags that aren't the defaults, so it doesn't depend on the seed.test_schema_generation_element_flags: its precondition was "17 is an overlay". Model 17 is still Type OrgLIF and now has no inclusion rows, so the precondition is inverted, which states the test's point (Type doesn't make an overlay) more directly.test_portable_seed_round_trip: 15 models now export (was 3), so the groups and crosswalks on model 1 round-trip too, byte for byte. The first install's sequences now start at 500 as well as the second's at 1000, so their Ids can't overlap the seed's.test_crosswalk_converter: 6 crosswalks and 714 entries. 343 → 347 was model 25's test value set.test_portable_endpoints: the not-migrated example is model 3, since model 1 now exports.test_measure_export_blockers: the figures above.DataType→string(cleanup);DataModelIdof the 8 attributes the conversion moved, and value 3649'sExtension(cleanup);Extensiontrue→falseandAssociationExtendedByDataModelId17→nullon what are now their own elements, and the order (never the set) ofrequiredlists. Model 18 also losesTestEntity5, test data;Docs: the handbook (backend chapters 3 and 7, frontend chapter 2) now says the local seed is converted and only demo still has overlays.
test/scripts,test/bases/lif/mdr_restapiandtest/components/lif/mdr_services: 729 passed, 1 skipped (PG 16.15 locally). Two fewer than before because models 16 and 25 left the snapshot set.Related Issues
Refs #1513
Type of Change
Project Area(s) Affected
Checklist
uv run ruff check)uv run ruff format)Additional Notes
test/scripts/test_measure_export_blockers.py: Issue #1513: feat: count crosswalks in measure_export_blockers.py #1519 pins 7 crosswalks for the old seed, and this seed has 6. Whichever merges second updates the figure.🤖 Generated with Claude Code