Skip to content

Trim what the descriptor move left stale, drop the model-tier generator - #792

Merged
xmap merged 1 commit into
mainfrom
trim-post-descriptor-move
Sep 9, 2026
Merged

Trim what the descriptor move left stale, drop the model-tier generator#792
xmap merged 1 commit into
mainfrom
trim-post-descriptor-move

Conversation

@xmap

@xmap xmap commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Summary

Follow-up review after moving 93 descriptors to xmap/descriptors: checked deployments/, scripts/, and docs/deployments/ for anything sized for the old fleet that's 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]. Also found beamlines_note declared twice (a duplicate YAML key), both versions describing a multi-maturity spread across beamlines that are gone — replaced with one line pointing at xmap/descriptors. facility.sectors is 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 is deployment_tier: pilot, not model), same for the non-stages walk page_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 the site_by_code lookup 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-nonexistent model_tier kwarg.
  • 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 public docs/catalog/ pages — historically accurate, just no longer independently verifiable from inside cora alone. Flagged for a separate decision.

Test plan

  • uv run pytest apps/api/tests/unit/deployments — 110 passed
  • uv run pytest tests/unit tests/architecture (CI's exact fast-lane command) — 51619 passed, 649 skipped, 0 failed
  • mkdocs build --strict — clean; spot-checked aps/index.md's rendered roster note

🤖 Generated with Claude Code

…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.
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Coverage report

This PR does not seem to contain any modification to coverable code.

@xmap
xmap merged commit fd63f9e into main Sep 9, 2026
19 checks passed
@xmap
xmap deleted the trim-post-descriptor-move branch September 9, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant