feat(lab): canonize versioned report template
This commit is contained in:
@@ -127,6 +127,14 @@ There are not two unrelated laboratory-page templates. Mission Core has one
|
||||
|
||||
`compact summary → evidence → result → optional reusable details`.
|
||||
|
||||
The executable product contract is versioned as
|
||||
`missioncore.laboratory-report/v1`. Its canonical summary always contains the
|
||||
four named fields `question`, `approach`, `principalResult`, and `limitation`.
|
||||
Its ordinary result uses the shared `LaboratoryResultSummary` with metrics and
|
||||
the three named conclusions `proved`, `notProved`, and `decision`. LAB feature
|
||||
modules provide typed values; they do not render `laboratory-summary` or
|
||||
`laboratory-result-summary` markup themselves.
|
||||
|
||||
Catalog profile/work selectors precede the template. The compact summary
|
||||
projects the task, method, principal result, limitation, and retained authority
|
||||
from typed LAB data; it does not reproduce the complete engineering report.
|
||||
@@ -140,10 +148,20 @@ The evidence slot has two admitted renderers:
|
||||
- `diagnostic-model` — a specialized visual result such as the LAB E28 L2.6
|
||||
surface/timeline/review viewer.
|
||||
|
||||
An admitted diagnostic viewer may own the result interaction internally when
|
||||
the evidence itself is the review/result instrument, as in E28 and E30. This is
|
||||
not permission to omit the result from a new ordinary LAB report. New bounded
|
||||
`ENNResult.tsx` modules use `LaboratoryResultSummary`.
|
||||
|
||||
If an experiment needs a new chart or control, the reusable result/evidence
|
||||
component is extended and validated. A one-off page that bypasses the template
|
||||
is not accepted.
|
||||
|
||||
Changing slot order, removing a required summary/conclusion field, or changing
|
||||
shared report geometry requires product-owner agreement, a new contract
|
||||
version, migration of all consumers, and an updated architecture test. A
|
||||
single LAB run never changes the v1 anatomy.
|
||||
|
||||
## Publication gates
|
||||
|
||||
A LAB run is catalogued only when:
|
||||
|
||||
@@ -76,6 +76,25 @@ Every LAB uses the same product hierarchy:
|
||||
A LAB provides typed data to these slots. It does not create its own page
|
||||
grammar, toolbar language, status geometry, or decorative card stack.
|
||||
|
||||
The current executable anatomy is frozen as
|
||||
`missioncore.laboratory-report/v1`:
|
||||
|
||||
```text
|
||||
LaboratorySummary
|
||||
question → approach → principalResult → limitation
|
||||
LaboratoryEvidence
|
||||
LaboratoryResultSummary
|
||||
metrics → proved → notProved → decision
|
||||
optional reusable details
|
||||
```
|
||||
|
||||
`LaboratorySummary` requires all four brief fields.
|
||||
`LaboratoryResultSummary` owns the result heading, status, metric grid, and
|
||||
three-part conclusion. A bounded `ENNResult.tsx` supplies typed copy and values
|
||||
to these components and must not reproduce their classes or DOM structure.
|
||||
Changing this anatomy is a template-version decision, not a LAB-specific
|
||||
layout edit.
|
||||
|
||||
### Canonical summary content
|
||||
|
||||
The summary must let an operator understand the evidence before opening the
|
||||
@@ -204,3 +223,5 @@ Before A3 or any subsequent LAB UI change:
|
||||
5. verify every admitted representation answers a named operator question;
|
||||
6. run typecheck, unit tests, production build, and browser interaction QA;
|
||||
7. visually inspect normal and expanded modes at representative viewport sizes.
|
||||
8. verify every bounded `ENNResult.tsx` uses the v1 summary and result
|
||||
components without raw canonical report markup.
|
||||
|
||||
@@ -152,7 +152,7 @@ core/laboratory/eNNContract.ts
|
||||
immutable API/schema adapter
|
||||
|
||||
workspaces/laboratory/ENNResult.tsx
|
||||
concise summary + admitted evidence + result projection
|
||||
typed values for the versioned summary + admitted evidence + result projection
|
||||
|
||||
domain renderer module
|
||||
only when an existing renderer cannot express the evidence
|
||||
@@ -167,6 +167,18 @@ styles/laboratory.css
|
||||
The complete engineering narrative remains in Ops. The product component
|
||||
receives a concise typed projection.
|
||||
|
||||
`components/laboratory/LaboratoryPresentation.tsx` owns the executable
|
||||
`missioncore.laboratory-report/v1` anatomy. `LaboratorySummary` requires
|
||||
`question`, `approach`, `principalResult`, and `limitation`;
|
||||
`LaboratoryResultSummary` requires metrics plus `proved`, `notProved`, and
|
||||
`decision`. A bounded LAB result module cannot own the canonical summary/result
|
||||
DOM or CSS classes. The product UI test discovers every `ENNResult.tsx`
|
||||
automatically and rejects such a fork.
|
||||
|
||||
Legacy/integrated diagnostic viewers may keep a result interaction inside the
|
||||
evidence slot only where that viewer is already the admitted result instrument.
|
||||
This exception does not apply automatically to a new LAB.
|
||||
|
||||
## Local ontology decision
|
||||
|
||||
Mission Core already has three semantic mechanisms:
|
||||
@@ -201,6 +213,9 @@ vocabulary and executable contracts. They do not create a second runtime model.
|
||||
- LAB code and CSS remain outside the central workspace buckets;
|
||||
- central composition files cannot silently return to their previous size.
|
||||
|
||||
`test/laboratoryProductUi.test.mjs` additionally enforces the versioned LAB
|
||||
report fields and shared result component across bounded LAB modules.
|
||||
|
||||
The line limits are ratchets, not quality targets. When a file reaches a limit,
|
||||
split a feature; do not raise the limit to accommodate unrelated behavior.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user