docs(dn): append task 6 fix evidence
This commit is contained in:
parent
33be75b821
commit
927c09bbb2
1 changed files with 57 additions and 1 deletions
|
|
@ -96,4 +96,60 @@ Result: passed.
|
|||
|
||||
Implementation commit: `75a1d85c875c43f66232aaec448ff6fa1f904523`.
|
||||
|
||||
Report commit: recorded by the commit that adds this report.
|
||||
Fix-round implementation commit: `33be75b82153cc602aa7838942ea670588cf920c`.
|
||||
|
||||
## Fix Round 1
|
||||
|
||||
Review findings addressed:
|
||||
|
||||
- `NoteSegment` now carries optional supplier name and registration evidence;
|
||||
`segmentPages` copies it from the first page and fills missing values from
|
||||
continuations. The legacy runner loads entity data whenever any note has a
|
||||
PO, supplier name, or registration evidence.
|
||||
- Site-scoped PO loading now projects only real fields, including
|
||||
`processing_status` and excluding the nonexistent `status`; the runner test
|
||||
asserts the bound site filter and projection.
|
||||
- The staged schema migration additively/idempotently adds optional supplier
|
||||
`registration_number` and `vat_number` fields. `SupplierRecord`, the pure
|
||||
resolver type, and the loader use those exact fields. No migration was
|
||||
applied.
|
||||
- Fuzzy candidates are capped at 20 but retain score, threshold, rank, and
|
||||
margin even below threshold; they remain suggestions and never auto-resolve.
|
||||
The resolver now uses the exported `rankPoMatches` primitive.
|
||||
|
||||
Fix-round RED command:
|
||||
|
||||
```text
|
||||
npx vitest run src/lib/dn-pipeline/resolve-entities.test.ts src/lib/dn-pipeline/segment.test.ts src/lib/dn-pipeline/run.test.ts
|
||||
```
|
||||
|
||||
Result before fixes: 5 failed, 52 passed. Failures covered dropped segment
|
||||
fields, the invalid `status` projection, skipped supplier-only loading, and
|
||||
discarded below-threshold fuzzy evidence.
|
||||
|
||||
Fix-round GREEN and regression commands:
|
||||
|
||||
```text
|
||||
npx vitest run src/lib/dn-pipeline/resolve-entities.test.ts src/lib/po-matching.test.ts src/lib/dn-pipeline
|
||||
```
|
||||
|
||||
Result: `Test Files 14 passed (14)`, `Tests 210 passed (210)`.
|
||||
|
||||
```text
|
||||
python3 scripts/pb-add-dn-staged-ingestion.py --self-test
|
||||
```
|
||||
|
||||
Result: `self-test: index replacement and idempotence passed`.
|
||||
|
||||
```text
|
||||
python3 scripts/pb-add-dn-staged-ingestion.py --dry-run
|
||||
```
|
||||
|
||||
Result: offline preview completed with `DRY RUN. No schema changes written.`
|
||||
|
||||
```text
|
||||
npm run typecheck
|
||||
git diff --check
|
||||
```
|
||||
|
||||
Both passed. No production PocketBase writes were made.
|
||||
|
|
|
|||
Loading…
Reference in a new issue