Skip to content

Architecture / Decision records / ADR-HIS-089

ADR-HIS-089 Where a slice gate's evidence is kept, how the test scenarios are recorded beside the scenario run, and which failures become fix issues

Status Accepted
Decided 2026-11-27 by session RC-1-S28
Record Drafted 2026-11-27; approved 2026-11-30 by the Enterprise Architecture Board
Where the rule lives docs/implementation_plan/delivery/gate-evidence/<SLICE>/<GATE SESSION>/; the tools in docs/implementation_plan/delivery/gate-evidence/tools/; the first record is gate-evidence/RC-1/RC-1-S28/

Context

Every slice ends with a gate evidence session. It runs the slice gate, collects the evidence in the form PRS section 17.3 requires, reports what fails, and files each failure as a fix issue against the session that owns it (session plan, section 3). The plan has one gate session per slice, and one more per round of fixes (<gate session>-G<n>). RC-1-S28 is the first, so what it does sets the pattern for the others.

Three things were not settled: - Where the record is kept. ADR-HIS-047 has the harness write a scenario run's record to a folder that git ignores. It leaves PRS 17.3's controlled repository to "wherever the gate session keeps it", and the card names no place. The readiness documents have a place of their own (ADR-HIS-088), but the evidence of a run does not. - How the test scenarios of section 15.2 are recorded. The gate's criterion 3 asks for "test results per PRS 17.3" of every test scenario it lists. Most of those scenarios are covered by the units' JUnit, Python and Vitest tests, not by the end-to-end scenario, and the harness records Playwright runs only. - Which failures are fix issues. Some "done when" lines fail because a unit does not do what it should, and a fix session can repair that. Others fail because the plan puts the work in a later slice, because the target cannot be measured without production nodes, or because people must act (a rehearsal, a signature, a waiver). A fix session can do nothing about these.

Decision

  1. The evidence of a gate run lives in docs/implementation_plan/delivery/gate-evidence/<SLICE>/<GATE SESSION>/, one folder per gate session. A second round (RC-1-S28-G2) writes a folder of its own beside the first, which stays unchanged, so each signature refers to the record it was given on. The folder holds:
  2. README.md: the gate report. It gives each "done when" line of the slice and each criterion of the slice gate an outcome (passed, failed, not evidenced, pending a person), the evidence, and the fix issue or the person it waits for;
  3. scenario/: the harness's record of the scenario run, as scenario run --strict wrote it. The files are committed unarchived, so that the pipeline's secret scan and the review read every one: evidence.json, the record's own SHA256SUMS unchanged, and the attachments. scenario/README.md lists each file the sums name that is left out, with its sum and the reason. sha256sum -c --ignore-missing SHA256SUMS shows that what is committed is what the run wrote. Left out are:

    • Playwright traces, which carry the run's bearer tokens, session cookies and sign-in input;
    • the raw unit and container logs, tens of megabytes that no review can read. The lines each case needs, found by its correlation identifiers, are already in its attachments and in evidence.json;
    • evidence.md, whose links into docs/ are relative to the run folder and break anywhere else. evidence.json holds the same record;
    • any file the pipeline's Gitleaks rules flag. Whether a finding is a false positive is a Security Engineer's decision (CLAUDE.md, section 3), not the session's, so the file stays out unless one approves it.

    Before committing, the gate session scans every file of the record with the pipeline's Gitleaks image and default rules, with nested archives read (--max-archive-depth), and reports the findings in its handover. The run's secrets themselves never enter the record (ADR-HIS-047), and the run folder's provisioning files are not copied. The complete record is checked with scenario evidence check --strict in the run folder before anything is left out, and the result is in the folder's README; - tests/: the record of the test scenarios (tests.json, tests.md, SHA256SUMS); - traceability.md: the slice's traceability matrix as this run found it, for the clinical owner to sign (ACC-001). It starts from the readiness session's draft (ADR-HIS-088) and replaces its status column with this run's outcomes.

The folder is published on the documentation site with the readiness documents. Only the gate session writes it. What people give later (the approver, waivers) goes into the folder through a pull request of its own (see Consequences). 2. The test scenarios are recorded from the gate's own build of each folder, as the pipeline builds it. gate-evidence/tools/run_tests.sh builds each folder the slice's requirements live in. A script unit goes through platform/delivery-pipeline/bin/build-test. A Java unit runs the same steps with cleanTest --continue --no-build-cache: every test executes in this run (Gradle's cache otherwise restores results from another worktree's run), and a failing module does not stop the others. A web package also gets Vitest's JUnit reporter. The script keeps each folder's JUnit XML, test/out/results.json and exit status. The folders are tested from a clean checkout of the commit (a git archive export where the working checkout carries state that a pipeline job would not have), and the record says which. gate-evidence/tools/collect_tests.py then writes the record, which has one entry per test scenario of the gate and one per specification workflow of criterion 2. A test belongs to a scenario when the scenario's identifier is in its display name, its covers, or a class-level @Tag of its source (session rule 5). Each entry carries the PRS 17.3 fields as the harness's record does: build (commit and the git tree of each folder), environment, synthetic data, tester, date, outcome, defect references, approver pending and waiver. A scenario no test names is no test, which is a recorded failure. A pass is inconclusive when a folder it rests on failed in a way no named test explains (a test class that did not start, a failed build step). The first outcome is the record: a test run again for diagnosis is reported in the handover, never put in the record. The tools stay in the gate-evidence folder until the harness takes them over as a command of its own (follow-up for e2e/harness). 3. Which failures become fix issues. Each failed line gets one of three dispositions, recorded in the report: - Fix issue, when a session of the slice built the part that fails and could repair it: the unit does not meet an acceptance criterion it was built for, a test fails, or a defect is recorded against it. The issue follows section 3 of the session plan (<gate session>-F<n>, round, owner session, gate line), with the evidence in its body. - Recorded failure for a decision, when no session of the slice can repair it: the plan puts the work in a later slice, the target needs an environment the slice does not have (production nodes, a capacity test bed, a restore), or the test scenario is on no card. These go to the owner who signs the gate, as candidates for an approved, time-bound waiver (ACC-001) or a change to the plan. A Tier 1 scenario cannot be waived (ACC-002). Each is numbered in the report (D1, D2, …) and listed one by one under "Needs a person" in the pull request. Once the gate issue is closed, the list stays tracked in one open issue of the slice, labelled gate-decision and titled Decisions for the signer: slice gate <SLICE>, round <n> (<gate session>). Its title does not begin with a session identifier, so the sync does not take it for a session's issue. The people who decide tick its items off and close it. - Pending a person: rehearsals, reviews and signatures. The session never records one as given. 4. The gate runs on the latest main, brought into its branch before the run, so the record names the build every later slice builds on. The scenarios of the slices it comes after run on the same build (criterion 8).

Consequences

  • Every gate session finds the same three records and the same report layout, and the stage gate reads one folder per slice.
  • The evidence is versioned and reviewed with the plan, as PRS 17.3's controlled repository. A record store, if one is wanted later, can ingest evidence.json and tests.json unchanged.
  • The scenario record keeps the defect references the scenario's cases name, as the run wrote them; the gate session does not edit the scenarios (they belong to the slice's contract and integrate sessions). The report maps each failed case to its fix issue. The test scenario record is written again with collect_tests.py --defects once the fix issues are filed, so each failed entry names its issue.
  • The harness's approve and waive refuse a record with any file missing, so they cannot sign the committed copy. Until the harness accepts a record whose left-out files are listed with their sums (a follow-up for e2e/harness), the signer's decision and any waiver are written into the gate report's sign-off and the traceability matrix, by pull request. A round whose gate fails needs no signature: the signature is given on the round that passes.
  • CLAUDE.md section 2 does not list the folder, as it does not list the readiness folder. It should gain a row for docs/implementation_plan/delivery/gate-evidence/<SLICE>/, owned by the gate sessions of that slice, in a pull request of its own.