Trim what the descriptor move left stale, drop the model-tier generator - #792
Merged
Conversation
…erator Three follow-ups from moving 93 descriptors to xmap/descriptors, all the same shape: something sized for the old fleet, now sized for one beamline. deployments/aps/site.yaml: - facility.beamlines listed all 10 original APS beamlines; 9 have no descriptor in cora anymore. Trimmed to [2-BM]. - beamlines_note existed twice (a duplicate YAML key, the second silently winning), both versions explaining a multi-maturity spread across beamlines that are now gone. Replaced with one line pointing at xmap/descriptors. - facility.sectors is left alone: it is a physical fact about the real APS ring, true regardless of which beamlines cora has a descriptor for, unlike beamlines/beamlines_note which were specifically about cora's own modeled roster. - added deployments/README.md: nothing in the directory previously explained why only two entries exist. scripts/beamline_pages.py: deleted _render_index, _render_inventory, and _render_beamwalk (191 of the file's 671 lines), the generator for a model-tier beamline's whole reader set. No real descriptor has triggered that path since the move: 2-BM is the only one cora carries, and it is deployment_tier: pilot, not model. The same held for the non-stages "walk" page_layout branch, which no current descriptor uses either. Both were only still reachable through synthetic test fixtures written to keep exercising them. This is the same principle already applied today to the fleet-wide tests, pointed at the generator instead: "CORA's domain model only contains what at least one real deployment forced into it" (docs/deployments/index.md) applies just as well to the code that renders it. Recoverable from git history if a second real deployment ever needs this shape back. scripts/mkdocs_hooks.py: removed the site_by_code lookup built solely to pass facility_label/control_plane into the now-deleted _render_index, and the model_tier=... argument to render_all. apps/api/tests/unit/deployments/test_beamline_descriptor.py: deleted the three tests whose only subject was the removed code (test_stages_layout_dissolves_inventory_into_flat_stage_pages, test_source_ref_renders_as_provenance_link_on_index_not_source, test_walk_layout_keeps_beamline_and_inventory_pages); updated the survivors to drop the now-nonexistent model_tier kwarg. Verified: mkdocs build --strict clean (spot-checked aps/index.md's rendered roster note), `pytest tests/unit tests/architecture` (CI's full fast lane) 51619 passed / 649 skipped / 0 failed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up review after moving 93 descriptors to
xmap/descriptors: checkeddeployments/,scripts/, anddocs/deployments/for anything sized for the old fleet that's now sized for one beamline.deployments/aps/site.yaml:facility.beamlineslisted all 10 original APS beamlines (9 have no descriptor incoraanymore) — trimmed to[2-BM]. Also foundbeamlines_notedeclared twice (a duplicate YAML key), both versions describing a multi-maturity spread across beamlines that are gone — replaced with one line pointing atxmap/descriptors.facility.sectorsis left alone: it's a physical fact about the real APS ring, not cora's modeled roster.deployments/README.md(new): nothing previously explained why the directory holds only two entries.scripts/beamline_pages.py: deleted_render_index/_render_inventory/_render_beamwalk(191 of 671 lines) — the generator for a model-tier beamline's whole reader set. No real descriptor has triggered that path since the move (2-BM isdeployment_tier: pilot, notmodel), same for the non-stageswalkpage_layout branch. Both were only reachable through synthetic test fixtures written to keep exercising them. Same principle already applied to the fleet-wide tests today, pointed at the generator: "CORA's domain model only contains what at least one real deployment forced into it" applies to the code that renders it too. Recoverable from git history if ever needed.scripts/mkdocs_hooks.py: removed thesite_by_codelookup that existed solely to feed the now-deleted_render_index.test_beamline_descriptor.py: deleted the three tests whose only subject was the removed code; updated the survivors to drop the now-nonexistentmodel_tierkwarg.docs/deployments/: checked, already aligned (no stale fleet language on 2-BM's own pages). Adjacent observation, not touched here:catalog/catalog.yaml's Family/Method notes cite specific departed beamlines as graduation evidence (e.g. "Graduated across Diamond i22, i03, i11..."), rendered onto the publicdocs/catalog/pages — historically accurate, just no longer independently verifiable from insidecoraalone. Flagged for a separate decision.Test plan
uv run pytest apps/api/tests/unit/deployments— 110 passeduv run pytest tests/unit tests/architecture(CI's exact fast-lane command) — 51619 passed, 649 skipped, 0 failedmkdocs build --strict— clean; spot-checkedaps/index.md's rendered roster note🤖 Generated with Claude Code