Split administrative-correction into typed development/remission corrections

Resolves the WP-0003-T06 review flag: the single administrative-correction
ledger entry type had an unstated fold-side effect (concept §17 names the
type but never says which side of the target it corrects). Maintainer chose
option (a) — split into administrative-correction-development and
administrative-correction-remission so the corrected side is explicit in
the type name rather than an implicit library default.

- schemas/ledger_entry.schema.json: enum split, no other behavior change.
- src/target_revenue/fold.py: each new type maps to its named side only.
- specs/TargetLedgerSpecification.md, TechnicalSpecificationDocument.md
  §3.2, ProductRequirementsDocument.md FR-5: updated to the split types.
- tests/test_ledger_fold.py: dedicated coverage for both new types plus a
  regression test that the old unsplit type name is now rejected.

spec/TargetRevenueLicenseConcept.md §17 is left unedited — its entry-type
list is explicitly non-exhaustive ("may include"), so this specializes
rather than contradicts it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
tegwick 2026-07-29 09:16:22 +02:00
parent 754d104b7a
commit 2b675c11ad
7 changed files with 129 additions and 29 deletions

View file

@ -202,7 +202,7 @@ The Trust Service's five core responsibilities — Phase Registry, Extension Reg
### FR-5 — Target Ledger
**Requirement:** The framework shall define an append-only ledger entry schema supporting `development-credit`, `remission-credit`, `credit-reversal`, `remission-correction`, `administrative-correction`, and `conversion-checkpoint` entry types (§17).
**Requirement:** The framework shall define an append-only ledger entry schema supporting `development-credit`, `remission-credit`, `credit-reversal`, `remission-correction`, `administrative-correction-development`, `administrative-correction-remission`, and `conversion-checkpoint` entry types (§17).
**Acceptance criteria:**
- Every ledger entry carries a phase reference, amount, currency, recognition timestamp, applicable extension reference, evidence reference, and cryptographic linkage to the previous entry (§17 example).