Reject oncology, cancer, drug, and target imports in the UI.

CONTENT-WP-0002-T07 checks every import statement and the navigation labels of both fixtures.

Assistant: grok
Assistant-Session: 01a1346c-fdff-7741-b1af-b7283661554b
This commit is contained in:
tegwick 2026-10-13 23:27:32 +02:00
parent 08a9a787a7
commit f434773fd0
4 changed files with 116 additions and 21 deletions

View file

@ -16,7 +16,7 @@ state_hub_workstream_id: "55c1d92f-fe1a-552a-998d-2d6905fb6b99"
# UI extraction and experience skeleton
Deliver the strongest OnCo-style interaction patterns on generic data. CONTENT-WP-0000 and CONTENT-WP-0001 are finished, so this plan is eligible. T01 through T06 have landed under `ui/`. T06 checks that browse, search, filter, sort, and detail work for both example dataspaces. T07 is next. See `workplans/evidence/CONTENT-WP-0002-ImplementationNotes.md`.
Deliver the strongest OnCo-style interaction patterns on generic data. CONTENT-WP-0000 and CONTENT-WP-0001 are finished, so this plan is eligible. T01 through T07 have landed under `ui/`. T07 rejects an import that names oncology, cancer, drug, or target. T08 is next. See `workplans/evidence/CONTENT-WP-0002-ImplementationNotes.md`.
## Work packages

View file

@ -106,4 +106,17 @@ Checks on 2026-10-13, after T06:
- `npm run typecheck`, `scripts/check_ui_boundary.py`, fixture validation, and the contract and ingest tests passed.
- `next dev` on `127.0.0.1:3400` returned HTTP 200 for `/systems-thinking/`, `/software-architecture/`, `/systems-thinking/concept/feedback/`, and `/software-architecture/concept/coupling/`. Each page contained the other field's name or the record's sources. The server was stopped. Search and sort on those pages were exercised in the UI test, because the filter runs in the browser after the HTML is sent.
Not done: the formal import gate, the provenance gate, or the keyboard and small-screen smoke. A facet key other than `tags` still has no values in these fixtures.
Not done after T06: the formal import gate, the provenance gate, or the keyboard and small-screen smoke. A facet key other than `tags` still has no values in these fixtures.
## T07 — domain import gate
`scripts/check_ui_boundary.py` reads every import, `require`, dynamic `import()`, and CSS `@import` under `ui/`. It fails when the statement names oncology, cancer, drug, or target, including a name such as `CancerIcon`. A property such as `event.target` is not an import and stays allowed. The kind labels and navigation labels in both example fixtures are checked the same way.
`tests/test_ui_boundary.py` rejects sample imports for each forbidden token and accepts the shipped UI.
Checks on 2026-10-13, after T07:
- `python3 -m unittest tests.test_ui_boundary tests.test_contract tests.test_ingest` passed (15 tests).
- `python3 scripts/check_ui_boundary.py` and `python3 scripts/validate_fixtures.py` passed.
Not done: the provenance gate, or the keyboard and small-screen smoke. A facet key other than `tags` still has no values in these fixtures.