Repository navigation
feat(cbio): record a durable redacted GS1 evidence artifact (#156) - #189
Closed
shroominic wants to merge 1 commit into
Closed
shroominic wants to merge 1 commit into
shroominic wants to merge 1 commit into
Conversation
A GS1 session left nothing behind: the harnesses printed lines, the app kept the last 250 entries in memory, and the only durable record of a hardware run was a screenshot someone saved by hand. - `cbioSessionEvidenceArtifactViolations` validates a recorded artifact: schema shape, closed outcome/write/error vocabularies, record ranges inside the observed envelope, forward-moving timing, and identity redaction (no Bluetooth address, no long hex run). - `packages/cgm_cbio/tool/record_gs1_evidence.dart` extracts the harness's CBIO-EVIDENCE line, validates it, and writes one artifact plus an INDEX.md row into the evidence directory. - `make cbio-gs1-evidence DEVICE_ID=<serial>` runs one assertion-bearing harness on a device and records it; `CBIO_EVIDENCE_LOG=<file>` re-records an existing run without hardware. The command fails loudly after writing the artifact when the harness fails. - docs/testing/cbio-gs1-evidence.md documents the command, the artifact, the redaction rules, and the safety envelope.
This was referenced Sep 18, 2026
Owner
Author
|
Carried by the GS1 consolidation in PR #209 (branch feature/cbio-gs1, head 3eca4f4). This PR is contained in the consolidated line; the merge that carries it is c85f827. Closing as subsumed by the consolidation - not as won't fix. The per-defect evidence stays in this thread, and the carrying commit above is where the change now lives. |
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.
Closes #156.
A GS1 session left nothing behind: the harnesses printed lines, the app kept the
last 250 entries in memory, and the only durable record of a hardware run was
whatever a human had saved by hand.
Command
HARNESS=,EVIDENCE_DIR=,CBIO_STREAM_SECONDS=andCBIO_APP_PACKAGE=areoptional. The default output directory is
../evidencenext to the repository.Artifact
One file per run,
gs1-session-<utc>-<harness>.json, plus anINDEX.mdrow:schema id, identity (harness path/revision, app package/revision, platform),
outcome, write counts per classified command kind, record counts plus first/last
index and raw value range, notification count, session timing, and counts per
closed error reason.
unitStatusis alwaysunverified.cbioSessionEvidenceArtifactViolationsrejects an artifact with a brokenschema, an unknown outcome/write kind/error reason, a record range or raw value
outside the observed envelope, a non-forward clock, a claimed unit, or an
identity leak (a Bluetooth address in colon or dash form, or a long hex run).
The model has no field that can hold an address or credential material, and the
harness never logs the authentication plaintext.
Stacked on #185 (the assertion-bearing harnesses) because this consumes their
CBIO-EVIDENCEline.Verification
packages/cgm_cbio:dart analyze --fatal-infosclean, 67/67 tests pass(artifact validation and leak-path tests are new).
make cbio-gs1-evidence CBIO_EVIDENCE_LOG=<real device log>wrote artifactsinto
/Users/fungus/dev/openhealth/evidence/from real Pixel 6 runs, and thecommand returned the harness's non-zero status after writing them.