core/rollup.py implements the locked truth table: worst gradeable line wins;
a Plan Type Needed line caps the patient at Action Needed; non-gradeable
lines are displayed but never touch the light; no-graded-lines patients carry
None (no label invented). /api/upload gains additive patients[] (one entry
per patient, nested device lines with doc checklists, citations, timing
flags, dedup display fields) and patient_stats (counts patients, not rows).
Flat records payload untouched until P6. Independent audit: SHIP; its LOW
findings fixed (date coercion on timing keys, empty-rollup guard, severity
divergence documented). 151 tests green.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
core/rules.py format-tolerant readers + stable registry (R001-R004 plan-scoped,
R100-R102 universal per LCD L33822). payer_rules.json wrapped in the same
commit as both engine readers (coupling hazard closed). Every DocItem now
cites the rule that decided it; NOT_EVALUATED cites nothing. Independent
audit: SHIP (registry-drift test added per its L2 finding). 138 tests green.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Readiness verdicts now ride additively on /api/upload and /api/confirm-visit:
- core/worklist_readiness.py: ReadinessIndex — row-to-line membership resolved
through the dedup group key (patient_id, device_type, DOS), never re-derived
from a row's own plan_type (kills a reviewer-reproduced false green)
- RecordOut gains plan_type / readiness_status / readiness_items (additive,
default None); UploadResponse gains readiness_stats (reconciles with rows)
- Minimal plan_type CSV mapping (client-supplied, lowercased+trimmed, never
guessed) per the umbrella reactivation plan; full enforcement lands in P5
- Fixes pre-existing record_lookup miss for order-numbered CSVs; fallback
fields now come from the dedup MergedShipment (latest-non-null, collected
order numbers) so doc_state and the verdict grade from the same values
- confirm-visit normalizes plan_type identically to the CSV path
Verification: 132 tests green (108 baseline + 24 wiring/regression);
adversarial 3-lens review + refutation pass (7 findings confirmed, all fixed,
regression-locked); independent code-auditor verdict SHIP; Pi E2E 33/33.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- docs/build-plans/00-signal-reactivation-plan.md: umbrella re-activation plan
(two-currency logic, critical path, Week1/Week2/backlog sequence with
owners+gates, labABLE-vs-Gaboro call, compliance guardrail, 2026-07-06 findings).
- docs/compliance/fda-cds-exemption-memo-DRAFT.md: attorney-review draft (Fable).
Primary position = Signal is administrative/billing software outside the FD&C
201(h) device definition; CDS-exemption kept as the secondary argument. Citations
grounded against current FDA sources (CDS guidance updated 2026-01-29).
Flags: internal 2026-06-04 whitepaper overstates the CDS claim; attorney of
record unconfirmed (Bittinger/Nixon vs Clyde Mathes).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Captured on Fable before access ends. Two grounded, execute-from starter
templates under docs/build-plans/:
- 01-readiness-model-wiring.md: wire dedup+readiness into the live pipeline
via a post-process orchestrator (avoids the dedup->coverage_calculator
circular import); flags that the normalizer does not yet ingest plan_type,
so every live verdict reads 'Plan Type Needed' until a plan_type column is mapped.
- 02-readiness-model-completion.md: P2-P6 (citation IDs, patient rollup,
device override, plan-type enforcement, frontend nesting).
Readiness+dedup engine verified 57 tests green (2026-07-06); corrects the
stale '73 tests' figure in current-state.md.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Preserves active investor + pilot state (labABLE executed LOI, Robert
Robinson/Gaboro priority path, Puff on hold) into the Signal repo as
the flat auto-memory is retired in favor of the compound + current-state.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merge Pi's parallel update (AIOS map done). Record dedup+verdict commits
(c07d054, 206bf71), auditor-fixed false-green holes, labABLE brief sent, and
the prioritization decision: Signal pauses at this checkpoint while Claude+Kisa
finish the Insight Engine to July 4; Pi advances Signal UX async.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Grade one coverage line's five documentation items on two separated axes the
old code conflated: required_state (from plan_type + payer_rules.json) and
input_state (SUPPLIED | ABSENT). A line is "Clear to Ship" only when EVERY
required item is satisfied by positive evidence — a required item with no data
is NOT_EVALUATED and blocks green, never granted by absence of contradiction.
- plan_type never guessed: None / unmapped / casing-variant -> "Plan Type Needed",
structurally cannot be green; PECOS/PA sit NOT_EVALUATED while universal items
(SWO/visit/diagnosis per LCD L33822) still grade.
- Required-ness reads from payer_rules.json (single source of truth), removing
the latent Python-set-vs-JSON divergence.
- Config-surface fail-safe: a known plan missing/partial in config cannot grade
green (NOT_EVALUATED), and the green gate checks every item.
- Diagnosis accepts a real ICD-10 code as on-file; only explicit negatives gap.
Additive only: not wired into the live pipeline. 27 tests green (full suite 73),
code-auditor reviewed (H1/H2/M1/M2/M3/M4/L1 fixed).
PROVISIONAL, flagged for Pi/Kisa: gap->label mapping (At Risk/Action Needed/
On Track) and the visit-recency scope boundary (timing layer, not readiness).
Spec: docs/readiness-model-brief-2026-06-23.md section 4
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Group normalized shipment rows into deduped shipments and gradeable
coverage lines (patient -> device -> shipment), the structural fix for the
row-keyed worklist bug (six months of orders no longer = six worklist lines).
- Locked dedup key (patient_id, device_type, date_of_service); order_number
is display-only. Monthly resupplies stay separate, not duplicates.
- Client-mapped plan_type carried through, never guessed from payer name;
conflicting plan types in a group route to "plan type needed".
- Quantity merge: sum across distinct component configs, max within a config
(duplicate guard) with a warning breadcrumb on disagreement.
- CGM gradeable this phase; pumps preserved/displayed but not graded.
Additive only: not yet wired into the live pipeline, grading unchanged.
30 tests green (full suite 46), code-auditor reviewed (M1/M2/L1/L2/L3 fixed).
Design: docs/dedup-design-2026-06-24.md, docs/readiness-model-brief-2026-06-23.md
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- dedup: separate client-mapped plan_type (not payer) so CoverageLine never guesses plan type; fix merge_quantities to sum across distinct component configs (blanket-max dropped qty in mixed dup+split groups)
- convex-spike: shipments orderNumber/hcpcs -> arrays (post-dedup multi-value); de-stale dedup note to LOCKED
- ledger: Design Verification section added
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pi made zero file-writes; these plans lived only in its jsonl. Recovered to a
durable doc and logged the audit. Shield persisted (file + TriLane research).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Commit the previously-uncommitted current-state.md (left dirty by an interrupted
wrap-up), gitignore the heavy context recovery files (screenshot/jsonl/snapshot),
and add the consolidated Pi design brief for the shared-state + workflow cleanup.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>