feat(parser): add in-memory parse-decision trace #94

Closed
opened 2026-07-07 09:26:23 +01:00 by TimCane · 0 comments
TimCane commented 2026-07-07 09:26:23 +01:00 (Migrated from github.com)

Parent: #77 (Phase A, step 6). Invariants live in the epic.

Record why each line was classified, for debugging - test-only.

Anchors

  • ParseDecision model (added scaffold in #89).
  • Selection points: item engine (#92) and bill engine (#93).
  • Existing discard warnings list: ReceiptParser.cs:82 - separate from the
    trace; do not fold decisions into warnings.

Steps

  1. Have each engine attach a ParseDecision (rule name, score, evidence)
    in-memory per line.
  2. Expose the trace to tests only (e.g. an internal result surface), not on the
    wire contract.

Done

  • Corpus 100% green.
  • Corpus tests can assert the deciding rule/score for a fixture.
  • No receipt text or trace written to prod logs (no-PII rule).
Parent: #77 (Phase A, step 6). Invariants live in the epic. Record why each line was classified, for debugging - test-only. ## Anchors - `ParseDecision` model (added scaffold in #89). - Selection points: item engine (#92) and bill engine (#93). - Existing discard `warnings` list: `ReceiptParser.cs:82` - separate from the trace; do not fold decisions into warnings. ## Steps 1. Have each engine attach a `ParseDecision` (rule name, score, evidence) in-memory per line. 2. Expose the trace to tests only (e.g. an internal result surface), not on the wire contract. ## Done - [ ] Corpus 100% green. - [ ] Corpus tests can assert the deciding rule/score for a fixture. - [ ] No receipt text or trace written to prod logs (no-PII rule).
Sign in to join this conversation.
No description provided.