Validation package for v1.2.1: fix duplicate requirement ids, add SDS/OQ/risk coverage, machine-verify traceability - #225
Merged
Conversation
…package The chart filing requirements added for 1.2.1 were numbered TT-R137–R142, which collides with the pre-existing cross-cutting TT-R140–R142. Two different requirements shared each of three ids, so any trace through them was ambiguous. The collision survived review because neither document is wrong when read on its own. Renumbered to TT-R150–R155, which is safe to do now: no site has executed an OQ against these ids yet. Section 4 of the SRS also had the new requirements inserted mid-table, leaving TT-R079 orphaned after TT-R142. Restored to numeric order and split the new work into §4.1 (IOTA pipeline) and §4.2 (chart filing). Fills in the rest of the package for the 1.2.1 functionality: - SDS §11–§16 covering migration safety, diagnostics and PHI redaction, the IOTA notification pipeline, chart filing, dependency vulnerability exceptions, and renderer bridge integrity. Appended rather than interleaved so existing §-references in the matrix stay valid. Each section records why the design is as it is — why free text is withheld rather than filtered, why the idempotency key excludes the content hash, why the chart-filing transport is injected rather than resolved internally. - 32 OQ test cases, written as steps a site can actually execute in a non-PHI environment. The one that matters most for R-023: plant a recognisable name in free text, export a default bundle, and search the file for it. - Risk register R-020 to R-027. R-013's mitigation was revised because transactional rollback does not cover a multi-migration sequence that fails after an earlier migration has already committed; the pre-migration copy does. - Two requirements for controls that existed without one: TT-R144 (dependency exception gate) and TT-R145 (bridge and packaging integrity). Co-authored-by: Cursor <cursoragent@cursor.com>
A validation package is only worth what its cross-references are worth, and those decay silently: the documents still render, the build still passes, and the defect surfaces when an auditor walks a trace. The duplicate requirement ids fixed in the previous commit are the case in point — TT-R140 meant two different things across two documents, and reading either document alone gave no hint of it. check-compliance-docs.mjs resolves what the documents claim about each other: requirement ids are unique, every requirement has exactly one matrix row and every row a real requirement, every Mandatory requirement names a verification artifact, and every cited SDS section, OQ case and risk exists. It reports the counts it parsed so a format change that breaks parsing cannot pass vacuously with zero of everything — the test asserts on those counts for the same reason. On its first run it found four requirements with no matrix row (TT-R010, TT-R100, TT-R101, TT-R123). Three are implemented and are now traced; SSO remains deferred and is listed with that status rather than omitted, so the gap is visible on the page instead of inferred from an absence. The matrix preamble previously claimed to map only Mandatory requirements, which is now no longer a caveat it needs. Runs in the standard test group, so the package is checked on the same cadence as the code it describes. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Strix is installed on this repository, but we couldn't run this PR security review because this workspace's trial has ended. Add a card to resume code reviews here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Completes the validation package for the 1.2.1 functionality, and fixes a traceability defect found while doing it.
The defect. The chart filing requirements added in #224 were numbered
TT-R137–TT-R142, colliding with the pre-existing cross-cuttingTT-R140–TT-R142. Three ids each meant two different things, so any trace through them was ambiguous. It survived review because neither document is wrong when read on its own. Renumbered toTT-R150–TT-R155— safe to do now, since no site has executed an OQ against these ids. Section 4 of the SRS also had the new requirements inserted mid-table, orphaningTT-R079; restored to numeric order.The package.
TT-R144andTT-R145for two controls that existed without a requirement: the dependency exception gate and bridge/packaging integrity.Stopping the decay.
scripts/check-compliance-docs.mjsresolves what the documents claim about each other — unique ids, a matrix row per requirement, a verification artifact for every Mandatory one, and resolvable SDS/OQ/risk references. It runs in the standard test group. On first run it found four requirements with no matrix row; three are implemented and now traced, and SSO is listed as deferred rather than omitted so the gap is visible on the page.The checker reports the counts it parsed, and the test asserts on them, so a format change that breaks parsing fails loudly instead of passing vacuously with zero of everything.
Test plan
npm test— 48/48 suites (new:complianceDocs.test.mjs)TT-R129into the SRS; checker failed with the specific id, then passed again on restorenpm run audit— pass, 1 documented exception