Skip to content

Validation package for v1.2.1: fix duplicate requirement ids, add SDS/OQ/risk coverage, machine-verify traceability - #225

Merged
NeuroKoder3 merged 2 commits into
mainfrom
docs/validation-package-v1.2.1
Aug 2, 2026
Merged

Validation package for v1.2.1: fix duplicate requirement ids, add SDS/OQ/risk coverage, machine-verify traceability#225
NeuroKoder3 merged 2 commits into
mainfrom
docs/validation-package-v1.2.1

Conversation

@NeuroKoder3

Copy link
Copy Markdown
Owner

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-R137TT-R142, colliding with the pre-existing cross-cutting TT-R140TT-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 to TT-R150TT-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, orphaning TT-R079; restored to numeric order.

The package.

  • SDS §11–§16 — migration safety, diagnostics and PHI redaction, the IOTA notification pipeline, chart filing, dependency vulnerability exceptions, renderer bridge integrity. Appended rather than interleaved so existing §-references stay valid. Each section records the reasoning behind the design, not just its shape: why free text is withheld rather than filtered, why the idempotency key deliberately 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 — including the adversarial one for the no-PHI claim: plant a recognisable name in free text, export a default bundle, 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.
  • TT-R144 and TT-R145 for two controls that existed without a requirement: the dependency exception gate and bridge/packaging integrity.

Stopping the decay. scripts/check-compliance-docs.mjs resolves 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)
  • Negative test: injected a duplicate TT-R129 into the SRS; checker failed with the specific id, then passed again on restore
  • ESLint clean, typecheck clean
  • npm run audit — pass, 1 documented exception
  • Confirmed no remaining references to the old chart-filing ids outside the documented renumbering notes

NeuroKoder3 and others added 2 commits August 1, 2026 19:00
…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-security

strix-security Bot commented Aug 2, 2026

Copy link
Copy Markdown

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.

@NeuroKoder3
NeuroKoder3 merged commit 2c821e5 into main Aug 2, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant