Skip to content

Add evidence-integrity reporting, archives, and comparisons - #4

Draft
jeremie5 wants to merge 1 commit into
mainfrom
agent/analysis-integrity
Draft

Add evidence-integrity reporting, archives, and comparisons#4
jeremie5 wants to merge 1 commit into
mainfrom
agent/analysis-integrity

Conversation

@jeremie5

@jeremie5 jeremie5 commented Aug 1, 2026

Copy link
Copy Markdown
Owner

What changed

  • Introduces BLE protocol v3 retained sample_kind evidence so calibration rows cannot be mistaken for airflow-run evidence.
  • Adds strict live/retained evidence selection, provenance manifests, cadence and continuity validation, and deterministic full-resolution SessionReportV1 output.
  • Computes SHA-256 fingerprints from the exact raw, selected-airflow, fault, and report bytes inside the report/archive builders.
  • Adds a bounded Advanced-only local archive with opaque filenames, staged-write recovery, content deduplication, canonical envelope verification, export, and hardened deletion.
  • Adds neutral same-owner saved-session comparisons with explicit contract/coverage limitations and conservative delta suppression.
  • Replaces graph-only sampling with deterministic evidence-preserving downsampling that retains endpoints, extrema, pressure/flow bucket detail, and sparse optional-channel values.
  • Expands documentation, CI, repository hygiene, and regression coverage for evidence validation, reporting, archives, comparisons, and downsampling.

Why

The existing data UI exposed useful traces but did not provide an immutable report artifact, a durable verified evidence bundle, or safe cross-session comparison semantics. Calibration and therapy samples were also indistinguishable in retained CSV, and ordinary graph downsampling could hide short low-flow changes or singleton optional samples.

This change establishes provenance and evidence-integrity contracts before adding broader longitudinal analytics. It deliberately remains experimental and non-diagnostic.

Impact

Builders can save and export byte-verifiable captures, understand exactly which evidence was analyzed, and compare compatible saved captures without evaluative or clinical language. Invalid, sparse, truncated, mixed-source, or incompatible evidence fails closed or has its deltas suppressed.

Archive owner fingerprints remain linkable, unkeyed pseudonyms rather than authentication or strong identity privacy, and the documentation states that limitation explicitly.

Validation

  • node scripts/verify-local.mjs
  • BLE protocol, release-text, documentation-link, Simple-copy, and repository-hygiene checks
  • Clean mobile lockfile install and Expo dependency compatibility
  • Mobile operation-lease, graph-downsampling, live-evidence, session-report, session-archive/comparison, validation, CSV-transfer, and PLX parser tests
  • Mobile TypeScript and Expo web-export smoke
  • Browser QA at desktop and 390×844
  • PlatformIO esp32dev and esp32dev_bench_pwm builds
  • Flash budget: 83,744 bytes and 84,176 bytes remaining, respectively
  • Production audit matches the reviewed baseline: 11 moderate, 0 high, 0 critical

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