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:
parent
754d104b7a
commit
2b675c11ad
7 changed files with 129 additions and 29 deletions
|
|
@ -117,7 +117,7 @@ The following schemas formalize the YAML sketches already present in `spec/Targe
|
|||
|---|---|---|---|
|
||||
| `entry.id` | string (URN, `trsl:entry:<ulid>`) | Required | Globally unique, monotonically orderable (ULID or equivalent). |
|
||||
| `entry.phase` | string (Phase URN) | Required | Must reference an existing, published Phase Manifest. |
|
||||
| `entry.type` | enum: `development-credit`, `remission-credit`, `credit-reversal`, `remission-correction`, `administrative-correction`, `conversion-checkpoint` | Required | Closed set; not extensible per-project (PRD FR-5). |
|
||||
| `entry.type` | enum: `development-credit`, `remission-credit`, `credit-reversal`, `remission-correction`, `administrative-correction-development`, `administrative-correction-remission`, `conversion-checkpoint` | Required | Closed set; not extensible per-project (PRD FR-5). The two `administrative-correction-*` types were split 2026-07-29 so the corrected target side is explicit in the type name (`specs/TargetLedgerSpecification.md` §2). |
|
||||
| `entry.amount` | decimal | Required | Signed only for reversal/correction types. |
|
||||
| `entry.currency` | ISO 4217 code | Required | Must match `phase.initial_target.currency` or declare an explicit FX rule (PRD open question §14.6). |
|
||||
| `entry.recognized_at` | ISO 8601 timestamp | Required | Settlement time, not invoice time (Rule 4). |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue