Quality / templates

Report Templates

Report Template Library — evidence

ICH E3 encoded as data — the 16-section skeleton, assembly slots, 14.x numbering, and the auto-generated 16.1.9 provenance appendix.

54reviewed requirementstemplates.md
69test recordsjs-unit · r-unit
0failing69 passing
100%requirement coverage54/54 evidenced

Requirements

IDAreaRequirementEvidence typeResult
RPT-MODEL-001The model carries all sixteen ICH E3 top-level sections, numbered 1 to 16, with E3's own headings.1 passing
RPT-MODEL-002The Section 14 substructure reproduces E3: 14.1 demographic, 14.2 efficacy, 14.3 safety, and 14.3.1 to 14.3.4 (AE displays, death and SAE listings, narratives, abnormal laboratory listings). 14.3.3 is modelled as prose, because in E3 it is.1 passing
RPT-MODEL-003Section 16 carries the full appendix structure: 16.1.1 to 16.1.12, 16.2.1 to 16.2.8, 16.3.1 to 16.3.2 and 16.4.1 passing
RPT-MODEL-004Section 16.1.9 (Documentation of Statistical Methods) is declared as accepting generated provenance content — the slot E3 reserved in 1995 that open.csr fills mechanically.1 passing
RPT-MODEL-005Section numbers and slugs are each unique, every number is well formed, and every subsection names a parent that exists in the model.1 passing
RPT-MODEL-006Every declared content type comes from the closed vocabulary text, in_text_display, post_text_index, generated_provenance; a structural heading declares none.1 passing
RPT-MODEL-007Section level, parent and document ordering are derived from the dotted number, so 9.10 sorts after 9.2 and no ordering metadata is stored redundantly.1 passing
RPT-ASM-001Every slot targets a section that exists in the document model and that accepts the content the slot supplies.1 passing
RPT-ASM-002Every text block named by a slot exists in the Text Library.1 passing
RPT-ASM-003Section 14 display numbers are assigned from post_text order at build time and appear nowhere in the source; reordering a slot renumbers the displays without touching a slug.1 passing
RPT-ASM-004An assigned display number that would collide with a section number in the document model fails the build, because such a collision makes every cross-reference in the document ambiguous.1 passing
RPT-ASM-005A display may occupy at most one post-text position, and no two displays may be assigned the same number.1 passing
RPT-ASM-006A slot naming an unknown section, an unknown text block, or content the section does not accept is rejected with the reason.1 passing
RPT-ASM-007The demonstration assembly claims only the sections it populates, names the study, its data cut-off and its analysis set, and states its scope limits — including the absence of efficacy data (design D12).1 passing
RPT-ASM-008The assembler places in_text display variants in narrative sections and post_text variants only under Section 14, and assigns each post-text display its derived number.1 passing
RPT-ASM-009A display placed both in-text and post-text renders both variants from the same ARD file — one analysis, two renderings, never re-authored.1 passing
RPT-ARD-001Every display in the assembly resolves to a real ARD — the pipeline output pointed at by outputs/<slug>/current.json where one exists, a committed fixture otherwise — and the assembled document records which, so a report built from fixtures can never be mistaken for one built from a pipeline run.1 passing
RPT-PROV-001Section 16.1.9 is generated from the provenance envelope of every ARD in the report: specification and display hashes, input dataset hashes with row counts and source package versions, the R and package versions, and the source commit. It is generated, never authored.1 passing
RPT-OUT-001assemble() emits docs/assembled/csr.json in the documented opencsr/csr/v1 shape: study, template, flat sections, display index, text blocks, provenance appendix and gate report.1 passing
RPT-OUT-002The section list is flat and in document order, and every section that names a parent names one that is present — the site builder can nest it without a second pass.1 passing
RPT-OUT-003A build with any structural error, unresolved binding, unresolved cross-reference or numeric-fidelity violation reports ok: false and exits non-zero; the shipped configuration builds clean.1 passing
RPT-OUT-004The assembled document contains the full E3 skeleton, with sections the demonstration does not fill marked unpopulated rather than dropped — the numbering is what makes the artifact recognisable as a CSR.1 passing
RPT-OUT-005docs/assembled/csr.html contains resolved values and never a raw binding token or an unresolved marker.1 passing
RPT-OUT-006csr.html is self-contained: no external host, no script, no external stylesheet, no font or image fetched at view time.1 passing
RPT-OUT-007The rendered document shows the assigned display numbering, the per-block gate report and the generated provenance appendix, so a reader can see the evidence for the numbers beside them.1 passing
RPT-LIB-001The library holds more than one template object, discovered from disk rather than enumerated in code: a directory under library/templates/ containing a sections.yaml is a template object.1 passing
RPT-LIB-002A template id resolves to its own document model, its own assembly and its own output basename. ich-e3 keeps writing docs/assembled/csr.{json,html}, so the site build and every published link are unchanged by the library becoming plural.1 passing
RPT-LIB-003An unknown template id fails loudly and names the ids the library actually holds, rather than falling back to the default and assembling the wrong document under the right name.1 passing
RPT-LIB-004Gates judge the document being assembled, not the whole Text Library: a block written for the full E3 report may cross-reference Section 16.2.1 without failing a synopsis model that has no Section 16. A library block that this build did not assemble is reported as a warning, so "not gated" can never pass for "gated and clean".1 passing
RPT-SYN-001library/templates/e3-synopsis/sections.yaml is a structurally valid document model under the same schema and the same validator as the CSR model.1 passing
RPT-SYN-002The model carries ICH E3 Annex I's own synopsis fields, numbered 1 to 12 in E3's order, with E3's field names.1 passing
RPT-SYN-003The generated provenance appendix is declared on the synopsis model's own section rather than borrowed from E3 Section 16.1.9, because a synopsis has no Section 16. Sections 13 and 14 are open.csr's additions and are marked as such in the model.1 passing
RPT-SYN-004Efficacy fields are declared in the model and left unclaimed by the assembly, so they appear as headings marked unpopulated rather than being dropped (design D12).1 passing
RPT-SYN-005The synopsis assembles green against CDISCPILOT01 — every gate passes, no build error, and at least twenty of its sections are populated.1 passing
RPT-SYN-006The same display carries a different number in each document from one unchanged specification: Table 14.1.1 in the report and Table 13.1 in the synopsis, because identity is the slug and the number is a build-time assignment (design D6).1 passing
RPT-SYN-007Both documents resolve the same named values, from the same store, to the same numbers, and both re-derive every value against the committed ARDs. Two documents about one study cannot disagree about a quantity.1 passing
RPT-PKG-001library/templates/display-package/sections.yaml is a structural restriction of the full ICH E3 model: every section it declares carries the number, title, slug and content declaration it has in ich-e3, unchanged, and it declares fewer of them.1 passing
RPT-PKG-002The package carries no prose: its assembly claims no text block, the assembled document places none, and every block in the shared Text Library is reported as ungated by this build rather than silently skipped.1 passing
RPT-PKG-003Every display carries the same assigned number in the package as in the full report — Table 14.1.1 in both — because both assemblies declare the same post-text structure and neither writes a number down. Two documents that declare the same structure agree; the synopsis, which declares a different one, differs (design D6).1 passing
RPT-PKG-004The generated provenance appendix is E3's own Section 16.1.9, not a section invented for this document: E3 already reserves that appendix for the documentation of statistical methods.1 passing
RPT-PKG-005Sections 14.2 (efficacy) and 14.3.4 (abnormal laboratory values) are declared and left unpopulated rather than dropped, because open.csr produces no efficacy or laboratory display for this study; Section 14.3.3 is omitted instead, because it is narrative and this document carries none.1 passing
RPT-PKG-006The package assembles green against CDISCPILOT01 — every gate passes, no build error, all six displays resolve to a committed ARD.1 passing
RPT-ABR-001library/templates/e3-abbreviated/sections.yaml is a structural restriction of the full ICH E3 model under the same schema and the same validator: seventy-five sections against the full report's one hundred and nineteen, each unchanged in number, title, slug and content declaration.1 passing
RPT-ABR-002The efficacy-analysis apparatus is absent — Section 11.4 and all fifteen of its subsections, the discussion of design choice (9.2) and the efficacy-specific measurement sections (9.5.2 to 9.5.4) — while the analysis sets, the baseline characteristics, the safety evaluation and the discussion remain. That single cut is what makes the report abbreviated.1 passing
RPT-ABR-003The abbreviated report introduces no new prose: every text block its assembly names is one the full report already assembles, and the Text Library holds no block written for this document.1 passing
RPT-ABR-004Every cross-reference in the reused prose resolves against the abbreviated model, because the model retains every section the retained prose points at — 16.2.1, 16.2.3, 16.2.4, 16.2.7, 16.1.9, 14.2 and 12.3.2 among them.1 passing
RPT-ABR-005The abbreviated report assembles green against CDISCPILOT01, populates only sections the full report also populates, and assigns every display they share the same number — the two documents differ in their document model, not in what they say.1 passing
RPT-ABR-006Every display the abbreviated report carries is the full report's display object — same slug, same committed ARD file, same assigned number — and every display it does not carry is absent because this model declares no section to put it in. A display withheld from a section the model *does* declare is reported, so "carries fewer displays" can never quietly become "disagrees about what to show".1 passing
RPT-LIB-005Every template object the library holds assembles green against the same study in one run, and each re-derives its named values against the committed ARDs. CI assembles them all with --all: a template that is never assembled is a directory, not a template.1 passing
RPT-LIB-006No file under scripts/ names the third or fourth template object. A template object is discovered from disk by the assembler, the loader and the site build, or the framework is not generic — adding one costs two YAML files and no code.1 passing
RPT-LIB-007All four documents resolve the same named values, from the same store, to the same numbers. Four documents about one study cannot disagree about a quantity.1 passing
RPT-LIB-008Every display the TFL Library holds is carried by at least one template object. A display specified, given a committed ARD and wired into nothing reaches no reader, and only a run over the whole library can see it — so --all fails on it, which is what CI runs.1 passing
RPT-LIB-009Each assembled document names the library displays it does not carry, in gates.warnings and on gates.displayCoverage. Carrying a subset is legitimate and stays a warning; being silent about it is not, for the same reason an unassembled text block is reported (RPT-LIB-004).1 passing
RPT-LIB-010The coverage comparison goes red on the case it exists for, not only green on the case that already passes.1 passing

Test records

ResultSuiteTestRequirementsFile
passjs-unitAbbreviated clinical study report RPT-ABR-001: the model is a strict restriction of the full ICH E3 model (#34)RPT-ABR-001tests/unit/assemble-template-subsets.test.js
passjs-unitAbbreviated clinical study report RPT-ABR-002: the efficacy-analysis apparatus is absent, the analysis sets remain (#34)RPT-ABR-002tests/unit/assemble-template-subsets.test.js
passjs-unitAbbreviated clinical study report RPT-ABR-003: it introduces no new prose (#34)RPT-ABR-003tests/unit/assemble-template-subsets.test.js
passjs-unitAbbreviated clinical study report RPT-ABR-004: the reused prose resolves every cross-reference against this model (#34)RPT-ABR-004tests/unit/assemble-template-subsets.test.js
passjs-unitAbbreviated clinical study report RPT-ABR-005: it assembles green and says the same things as the full report (#34)RPT-ABR-005tests/unit/assemble-template-subsets.test.js
passjs-unitAbbreviated clinical study report RPT-ABR-006: it reuses the full report's displays, and drops one only with its section (#45)RPT-ABR-006tests/unit/assemble-template-subsets.test.js
passjs-unitAssembled CSR document model RPT-ARD-001: every display resolves to a real ARD, and the source is recorded as outputs or fixture (#1)RPT-ARD-001tests/unit/assemble-document.test.js
passjs-unitAssembled CSR document model RPT-ASM-008: in-text displays land in narrative sections and post-text displays only under Section 14 (#1)RPT-ASM-008tests/unit/assemble-document.test.js
passjs-unitAssembled CSR document model RPT-ASM-009: the same display appears in-text and post-text from a single ARD (#1)RPT-ASM-009tests/unit/assemble-document.test.js
passjs-unitAssembled CSR document model RPT-OUT-001: assemble() emits the documented csr.json shape (#1)RPT-OUT-001tests/unit/assemble-document.test.js
passjs-unitAssembled CSR document model RPT-OUT-002: the section list is flat, in document order, and every child names a parent that is present (#1)RPT-OUT-002tests/unit/assemble-document.test.js
passjs-unitAssembled CSR document model RPT-OUT-003: the build has no errors and every gate passes (#1)RPT-OUT-003tests/unit/assemble-document.test.js
passjs-unitAssembled CSR document model RPT-OUT-004: the full E3 skeleton is present, with unpopulated sections flagged rather than dropped (#1)RPT-OUT-004tests/unit/assemble-document.test.js
passjs-unitAssembled CSR document model RPT-PROV-001: Section 16.1.9 is generated from the ARD provenance envelopes, not authored (#1)RPT-PROV-001tests/unit/assemble-document.test.js
passjs-unitAssembled CSR document model TXT-APPR-005: draft generated blocks are excluded from the assembled report but still reported (#1)TXT-APPR-005tests/unit/assemble-document.test.js
passjs-unitAssembled CSR document model TXT-TRACE-001: every rendered block carries its resolved bindings back to an ARD row (#1)TXT-TRACE-001tests/unit/assemble-document.test.js
passjs-unitAssembled CSR document model TXT-XREF-003: every cross-reference in the assembled document resolved (#1)TXT-XREF-003tests/unit/assemble-document.test.js
passjs-unitAssembled CSR rendering RPT-OUT-005: csr.html is written and contains resolved numbers, never a raw binding (#1)RPT-OUT-005tests/unit/assemble-document.test.js
passjs-unitAssembled CSR rendering RPT-OUT-006: csr.html is self-contained — no external host, script or stylesheet (#1)RPT-OUT-006tests/unit/assemble-document.test.js
passjs-unitAssembled CSR rendering RPT-OUT-007: the rendered document shows the numbering, the gate report and the provenance appendix (#1)RPT-OUT-007tests/unit/assemble-document.test.js
passjs-unitAssembly configuration RPT-ASM-001: every slot targets a section that exists and accepts the content it is given (#1)RPT-ASM-001tests/unit/assemble-template.test.js
passjs-unitAssembly configuration RPT-ASM-002: every text block named by a slot exists in the Text Library (#1)RPT-ASM-002tests/unit/assemble-template.test.js
passjs-unitAssembly configuration RPT-ASM-003: 14.x numbers are assigned from post_text order, not written in the source (#1)RPT-ASM-003tests/unit/assemble-template.test.js
passjs-unitAssembly configuration RPT-ASM-004: an assigned display number that would collide with a section number fails the build (#1)RPT-ASM-004tests/unit/assemble-template.test.js
passjs-unitAssembly configuration RPT-ASM-005: a display may not occupy two post-text positions, and positions may not repeat (#1)RPT-ASM-005tests/unit/assemble-template.test.js
passjs-unitAssembly configuration RPT-ASM-006: a slot pointing at an unknown section, an unknown block or the wrong content type is rejected (#1)RPT-ASM-006tests/unit/assemble-template.test.js
passjs-unitAssembly configuration RPT-ASM-007: the assembly claims only sections the demonstration populates, and declares its scope (#1)RPT-ASM-007tests/unit/assemble-template.test.js
passjs-unitFour documents, one library RPT-LIB-005: every template object in the library assembles green against the same study (#34)RPT-LIB-005tests/unit/assemble-template-subsets.test.js
passjs-unitFour documents, one library RPT-LIB-006: a new template object costs no change in scripts/ (#34)RPT-LIB-006tests/unit/assemble-template-subsets.test.js
passjs-unitFour documents, one library RPT-LIB-007: all four documents resolve the same named values to the same numbers (#34)RPT-LIB-007tests/unit/assemble-template-subsets.test.js
passjs-unitFour documents, one library RPT-LIB-008: every display the TFL Library holds is carried by a template object (#45)RPT-LIB-008tests/unit/assemble-template-subsets.test.js
passjs-unitFour documents, one library RPT-LIB-009: each document reports the library displays it does not carry (#45)RPT-LIB-009tests/unit/assemble-template-subsets.test.js
passjs-unitFour documents, one library RPT-LIB-010: the coverage check reports an uncarried display rather than passing it (#45)RPT-LIB-010tests/unit/assemble-template-subsets.test.js
passjs-unitICH E3 Annex I synopsis document model RPT-SYN-001: sections.yaml is a structurally valid document model (#28)RPT-SYN-001tests/unit/assemble-templates-plural.test.js
passjs-unitICH E3 Annex I synopsis document model RPT-SYN-002: the model carries E3 Annex I fields 1 to 12 in E3 order (#28)RPT-SYN-002tests/unit/assemble-templates-plural.test.js
passjs-unitICH E3 Annex I synopsis document model RPT-SYN-003: the provenance appendix is declared on the synopsis model, not borrowed from E3 16.1.9 (#28)RPT-SYN-003tests/unit/assemble-templates-plural.test.js
passjs-unitICH E3 Annex I synopsis document model RPT-SYN-004: efficacy fields are declared and left unpopulated, not omitted (D12) (#28)RPT-SYN-004tests/unit/assemble-templates-plural.test.js
passjs-unitICH E3 Annex I synopsis document model RPT-SYN-005: the synopsis assembles green against CDISCPILOT01 (#28)RPT-SYN-005tests/unit/assemble-templates-plural.test.js
passjs-unitICH E3 document model RPT-MODEL-001: sections.yaml carries all sixteen top-level ICH E3 sections in order (#1)RPT-MODEL-001tests/unit/assemble-template.test.js
passjs-unitICH E3 document model RPT-MODEL-002: the Section 14 substructure matches ICH E3, including 14.3.1 to 14.3.4 (#1)RPT-MODEL-002tests/unit/assemble-template.test.js
passjs-unitICH E3 document model RPT-MODEL-003: Section 16 carries 16.1.1 to 16.1.12, 16.2.1 to 16.2.8, 16.3 and 16.4 (#1)RPT-MODEL-003tests/unit/assemble-template.test.js
passjs-unitICH E3 document model RPT-MODEL-004: 16.1.9 is the auto-generated provenance slot (#1)RPT-MODEL-004tests/unit/assemble-template.test.js
passjs-unitICH E3 document model RPT-MODEL-005: section numbers and slugs are unique and every subsection has a defined parent (#1)RPT-MODEL-005tests/unit/assemble-template.test.js
passjs-unitICH E3 document model RPT-MODEL-006: every content type comes from the closed vocabulary (#1)RPT-MODEL-006tests/unit/assemble-template.test.js
passjs-unitICH E3 document model RPT-MODEL-007: section level, parent and document ordering derive from the dotted number (#1)RPT-MODEL-007tests/unit/assemble-template.test.js
passjs-unitPost-text display package RPT-PKG-001: the model is a strict restriction of the full ICH E3 model (#34)RPT-PKG-001tests/unit/assemble-template-subsets.test.js
passjs-unitPost-text display package RPT-PKG-002: the package carries no prose at all, and the build says so (#34)RPT-PKG-002tests/unit/assemble-template-subsets.test.js
passjs-unitPost-text display package RPT-PKG-003: every display carries the same number as in the full report (#34)RPT-PKG-003tests/unit/assemble-template-subsets.test.js
passjs-unitPost-text display package RPT-PKG-004: provenance lands in E3’s own 16.1.9, with nothing invented (#34)RPT-PKG-004tests/unit/assemble-template-subsets.test.js
passjs-unitPost-text display package RPT-PKG-005: empty display slots are declared and unpopulated, not dropped (#34)RPT-PKG-005tests/unit/assemble-template-subsets.test.js
passjs-unitPost-text display package RPT-PKG-006: the package assembles green against CDISCPILOT01 (#34)RPT-PKG-006tests/unit/assemble-template-subsets.test.js
passjs-unitReport Template Library — plural RPT-LIB-001: the library holds more than one template object, discovered from disk (#28)RPT-LIB-001tests/unit/assemble-templates-plural.test.js
passjs-unitReport Template Library — plural RPT-LIB-002: a template id resolves to its own model, assembly and output basename (#28)RPT-LIB-002tests/unit/assemble-templates-plural.test.js
passjs-unitReport Template Library — plural RPT-LIB-003: an unknown template id fails loudly rather than falling back to the default (#28)RPT-LIB-003tests/unit/assemble-templates-plural.test.js
passjs-unitReport Template Library — plural RPT-LIB-004: gates judge the assembled document, and an ungated library block is reported (#28)RPT-LIB-004tests/unit/assemble-templates-plural.test.js
passjs-unitSynopsis content TXT-SYN-001: the synopsis quotes the study through named values and invents nothing (#28)TXT-SYN-001tests/unit/assemble-templates-plural.test.js
passjs-unitTwo documents, one library RPT-SYN-006: the same display carries a different number in each document, from one spec (#28)RPT-SYN-006tests/unit/assemble-templates-plural.test.js
passjs-unitTwo documents, one library RPT-SYN-007: both documents resolve every named value to the same number (#28)RPT-SYN-007tests/unit/assemble-templates-plural.test.js
passr-unitDSP-ALL-001: every display renders a table that actually contains numbers (#1)DSP-ALL-001test-displays.R
passr-unitDSP-ALL-002: every display declares a regulatory identifier and a source line (#1)DSP-ALL-002test-displays.R
passr-unitDSP-EOS-001: the completion-status rows partition each treatment group (#1)DSP-EOS-001test-displays.R
passr-unitDSP-EOS-002: the early-termination reasons partition the early terminations (#1)DSP-EOS-002test-displays.R
passr-unitDSP-EOS-003: a p-value appears on exactly the rows the analysis plan names (#1)DSP-EOS-003test-displays.R
passr-unitDSP-EOS-004: every percentage is based on the treatment group, not the discontinuations (#1)DSP-EOS-004test-displays.R
passr-unitDSP-POP-001: the population rows match the study's own flags in ADSL (#1)DSP-POP-001test-displays.R
passr-unitDSP-POP-002: completion rows use COMP24FL and the complement of DISCONFL (#1)DSP-POP-002test-displays.R
passr-unitDSP-POP-003: the display reads the packaging that states the flags it reports (#1)DSP-POP-003test-displays.R
passr-unitDSP-POP-004: planned and actual treatment agree for every subject (#1)DSP-POP-004test-displays.R
passr-unitDSP-REF-001: both displays publish the figures the pilot's own report printed (#1)DSP-REF-001test-displays.R

Traceability

No generated output yet, so the data → ARD → display chain is empty.

Provenance

Generated
2026-08-27T12:13:10.376Z
Environment
os Darwin 23.6.0 · node v24.14.0 · r 4.3.3
CI run
Not recorded for this evidence set