# P1-0b correction status

**Date:** 2026-08-05

**Branch:** `feature/document-type-settings`

**Scope:** documentation only. Relative to the branch's upstream baseline, the branch changes
exactly nine paths: the repository guidance (`AGENTS.md`); the five active P1-0 drafts
(`docs/p1-0-claude-extraction-contract.md`, `docs/p1-0-codes-taxonomy-archive.md`,
`docs/p1-0-discard-purge-lifecycle.md`, `docs/p1-0-schema-mapping.md`, and
`docs/p1-0-user-ai-roles-responsibilities-policy.md`); the design-freeze summary
(`docs/p1-0-design-freeze-summary.md`); this correction status (`docs/p1-0b-status.md`); and the
development plan (`docs/project-todo.md`). There was no prototype access or remeasurement and no
`src/`, `tests/`, migrations, database, live-system, P1-1, push, merge, rebase, or deployment
action.

The correction pass used `docs/p1-0-corrections.md` and the generated
`docs/p1-0-vocabularies.md` as the controlling authorities. Counts and conclusions remain those
recorded at `9359c67`, re-confirmed at `6146004`; neither prototype revision was accessed during
this assignment. Structural findings are corrected where the repository contains authoritative
inputs. Row-level seed work remains partial and blocks P1-0 completion.

## Correction register

| Correction | Applied in |
|---|---|
| C1 | `p1-0-schema-mapping.md` §4/§8; `p1-0-codes-taxonomy-archive.md` §1 — SourceKeyHash, ordered junction, SourceBMCode, and removal of the scalar movement FK |
| C2 | `p1-0-schema-mapping.md` ENTITM; `p1-0-design-freeze-summary.md` decision 18 — JSON CodeName storage and derived rendered EC surface |
| C3 | **Partial** — separate EffectiveFrom/EnforcementStartsAt, go-live seed, and persisted grandfathering are specified; immutability versus transactional recompute remains explicitly unresolved |
| C4 | all six drafts where affected; especially mapping conventions, DOCTYP/DOCEFL/DOCFLG/DOCRQE/BNKREC, contract literals, and taxonomy — generated domains, exact literals, Waived, conditional fields, one-row applies-to expansion, distinct priority/status types, nullable CaptureQuality |
| C5 | `p1-0-discard-purge-lifecycle.md` §5–§7; summary decision 13 — capture event retained without extraction or DOCLOG |
| C6 | `p1-0-schema-mapping.md` DOCRQE/DOCFLG and Roles policy — openness-only constraint; RECREV retains its own pinned lifecycle |
| C7 | `p1-0-schema-mapping.md` DOCFLG; codes §1 — 12-hex md5-12 plus discriminator and no cross-algorithm comparison |
| C8 | `p1-0-schema-mapping.md` ENTBNK — correct comma-join model, defined child tables, and fail-closed duplicate-source action |
| C9 | **Partial** — Duplicate/External is Include/ArchiveOnly with real EntryCode/archive behavior; captured-only coverage and exact Invoice-Receipt/Payroll-Receipt are specified, but the 19 tuples/DT codes are absent |
| C10 | `p1-0-schema-mapping.md` §6 and codes §1 — header key without PaymentSequence; deterministic detail sequence and permanent detail codes |
| C11 | **Partial** — EF0000000 sentinel and non-null instance mapping are specified; complete DOCEFL seed evidence is absent |
| C12 | **Partial** — Monthly-only governed detector shape is specified; exact EFCode/complete DOCEFL seed row is absent |
| C13 | `p1-0-schema-mapping.md` DOCFLG and codes §1 — complete FL natural key, DetectedAt tiebreaker, stable/non-sequential identity |
| C14 | `p1-0-schema-mapping.md` DOCFLG/DOCRQE/RECREV, `AGENTS.md`, Roles policy, and summary decision 15 — successor-or-controlled-reason invariant |
| C15 | **Partial** — RelatedParty relational shape and dual-condition Information/Non-Blocking rule are specified; literal CLCodes and complete DOCEFL seed row are absent |
| C16 | `p1-0-codes-taxonomy-archive.md` §3, mapping BNKACC/ArchiveNameLedger, and summary decision 8 — split fiscal directories, controlled bank token, company-scoped ledger keys |
| C17 | `p1-0-schema-mapping.md` §6 and summary decision 12 — controlled snapshot upsert and named reject trigger make governing-period monotonicity executable |
| C18 | `p1-0-schema-mapping.md` BNKMOV/BNKREC/§7/§8/acceptance and summary metric note — reproducible 55.9% view; ReferenceOnly CHECK+FK; company/type-safe bank evidence; shared MatcherProposal path and constraint trigger |
| C19 | `p1-0-user-ai-roles-responsibilities-policy.md` and summary decision 19 — Sibyla scope, human-engagement carve-out, RECREV distinction, named threshold and duplicate-settlement triggers |

`docs/project-todo.md` marks supported C1–C19 correction-register entries complete and
C3/C9/C11/C12/C15 partial. No P1-0 sign-off or P1-1 item was checked.

## Derived work

- DOCTYP's target shape is specified, but not the complete pinned 19-row seed. Duplicate/External
  uses ArchiveOnly and preserves the real EntryCode; it is not D5 ReferenceOnly.
- DOCEFL includes the authoritative EF0000000 shape and partial Monthly/related-party rule shapes.
  Complete seed rows are blocked. AppliesToTable expansion now preserves SourceOrdinal.
- `BNKMOVReconciliationRate` defines and exposes numerator, denominator, and rate. P1-11 acceptance
  is 55.9% ±0.1%; 94.6% is explicitly identified as a differently defined prototype metric.
- SourceKeyHash uses a valid PostgreSQL pgcrypto SHA-256 generated expression over UTF-8 SourceKey
  bytes and stays NULL for NULL SourceKey. P1-1 must preflight `pgcrypto`/`digest(bytea, text)` and
  fail closed before migration if unavailable; no migration code was added.
- BankInputEvidence now uses composite company FKs and an OfficialBankStatementEvidence anchor tied
  to DOCLOG/DOCARC classification, route, and retained disposition.
- Every matcher is forced through MatcherProposal/SubmitMatcherProposal. Rejection identity and
  the RejectPreviouslyRejectedProposal lookup exclude MatcherKind: it remains audit metadata, so a
  company/source/candidate rejection from matcher A blocks matcher B and is covered by an explicit
  cross-matcher acceptance case.

## Deferred by assignment

- Residual-triage A and B items remain deliberately out of scope. A1 did not make C1 physically
  impossible: the existing source-fiscal identity statement was left in place while only the
  bank-generated index and referential model changed. No triage-A/B item is treated as a P1-0b
  blocker.
- Optional triage-C cleanup was not taken as a separate pass. Changes overlapping mandatory C4
  derived work (notably nullable CaptureQuality and distinct BNKREC/BNKMAT semantics) were applied
  because C4 itself requires them.
- No flow diagram was redrawn. The summary now identifies v14 as current and withdraws the earlier
  over-claim about v13.

## Luís — decided on his behalf, nothing blocked

**Corrected 2026-08-05.** This section previously read "Still needs Luís", which invited exactly
the misreading it produced: a reader took it as a list of gates. It is not. Per the header of
`p1-0-corrections.md` and the close of `FDR-to-Sibyla-decisions-for-Luis-v2.md`, **nothing on the
.NET side is blocked on Luís.**

- **Decided on his behalf against pinned data, applied, reversible only if he objects:** C1, C2,
  C3's go-live seed (without treating either unresolved change mechanism as selected), C4, C12,
  C19, and the pinned singular `Receivable` spelling.
- **Actions in his own repository, not decisions:** merge five duplicate ENTBNK source pairs while
  retaining both Flag notes; classify the three residual DOCFLG collisions retained by the
  DetectedAt tiebreaker. C13's tiebreaker already lets the import pass; C8 fails closed knowingly.
- **A reconciliation of two metrics, not an input:** the definition behind the prototype's 94.6%
  figure. Sibyla's 55.9% is explicitly defined and does not wait for it.

## Unresolved design choice

- C3 remains partial. Before P1-1, decide either that `EnforcementStartsAt` is immutable after
  import/first use or that changes transactionally recompute all affected persisted
  `IsGrandfathered` verdicts with audit. This pass deliberately selects neither option.

## Proposed C20+

**Proposed C20 — the generated vocabulary annex is not a row-level seed annex.** Authoritative
repository inputs are missing:

- all 19 exact DOCTYP tuples, including each DTCode and every source field;
- the complete DOCEFL seed rows, including exact EFCodes/fields for the Monthly gap and
  related-party rules;
- the literal ITMCLS CLCodes for `Banks / Financing` and `Revenue / Intercompany`; and
- the exact BTCode and complete 14-field BNKMAT governance row required by D6.

The annex gives only marginal domains/counts. The repository search found no verbatim row-level
source elsewhere. No prototype was accessed, and no code or row was invented. The exact D6 BNKREC
target status remains the already-authoritative `Matched — ledger reference, no entry`; it is not
claimed as a pinned literal.

## Verification

- `git diff --check`: PASS.
- Known-bad scan: PASS after contextual review, limited to the active normative P1-0 drafts
  (`AGENTS.md` and the five drafts listed in Scope). There is no active unhyphenated `Invoice
  Receipt`, `SourceTextHash char(64)`, control-header `PaymentSequence=1`, or positive `DocLogId`
  design. The sole `NonBlocking` hit says to reject that spelling; `Receivables` is only the
  required archive directory/prose label, while DOCTYP DocClass uses pinned singular `Receivable`;
  `PaymentSequence` is on PAYDTL/RCVDTL and explicitly absent from control headers; `DocLogId` hits
  reject or preserve superseded text rather than introducing that key. The generated annex's
  present-tense historical review notes were intentionally not edited because the annex is
  generated; they are outside this limited active-draft claim.
- Scope scan: PASS for the branch diff relative to its upstream baseline; the exact nine changed
  paths and their documentation categories are recorded in Scope. No `src/`, `tests/`,
  `database/`, or `migrations/` path changed.
- `dotnet build GOTT.Sibyla.slnx`: PASS — 0 warnings, 0 errors.
