feat(store): a record's source can be corrected without touching its words (P5)
Accounting reason: a convention, a decision or an open item carries who
decided it, when and on what authority. When that is recorded wrongly the
honest fix is to say so on the record, not to restate the policy: a policy
revision bumps the convention's revision and reads as a change of the rule,
and a new decision supersedes the old one. A source correction changes only
the authority and says why, so the audit trail shows the words were never
altered.
New event types convention.source_revised, decision.source_revised and
open_item.source_revised {id, source, reason} under the journal feature
source_revisions: an older version would refuse the types, or show the old
source as the record's authority, so it stops at the declaration instead
(rules.md B-27) and books that have not had the owner's upgrade refuse the
write with format_upgrade_pending, journaling nothing. Replay sets the
source and nothing else (the text, the revision and the journal line stay);
the projection updates the rows' existing source columns, so no schema
changed. A correction must be one: other words, the same source, no reason
or an unknown record is refused.
books.set_convention takes reason (the text exactly as it stands),
books.record_decision and books.raise_item take revises with reason. Without
reason the old refusal stands and now says how to correct only the source.
8.0.6: the hand-written lines of the three shapes in
books_written_under_older_rules_still_open; fixture old-books/p5_before,
written by b97234ac (a revised convention, two decisions, two open items, a
draft) through old-books-writer/src/bin/p5_before.rs, opens to that
version's figures, so no figure moved; books_p2_served_cut_over_whole
refuses the correction before consent and takes it after; the fuzzer and the
viewer's journal know the types. The live books refuse the new write until
the owner gives the go-ahead; merging does not need it.
Tests: a_source_only_revision_is_journaled,
a_source_revision_must_change_only_the_source,
source_revisions_wait_for_the_upgrade, source_revisions_is_its_own_feature.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS8WZziDnyxunC23MUxrLp
This commit is contained in:
1 parent
cf73d0bda5
commit
4236f03744
19 files changed
+1188
-13
No files matched your search
@@ -64,7 +64,14 @@ apply is safe — on startup the applier replays every journal line with
|
||||
`attachment.annotated`, `entry.settles` (P6), `entry.draft_state_set`
|
||||
(a draft building or awaiting its evidence: a note on the draft, no
|
||||
figure) and `entry.draft_discarded` (a draft thrown away, with why; the
|
||||
draft's earlier lines stay in the journal) (P4, feature `drafts_v2`)
|
||||
draft's earlier lines stay in the journal) (P4, feature `drafts_v2`),
|
||||
and `convention.source_revised {id, source, reason}`,
|
||||
`decision.source_revised {id, source: {decided_by: [..], decided_on,
|
||||
citation?}, reason}` and `open_item.source_revised {id, source, reason}`
|
||||
(P5, feature `source_revisions`: who decided a convention, a decision or
|
||||
an open item, when and on what, corrected without touching its words;
|
||||
replay sets the source and nothing else, and the projection updates the
|
||||
row's existing source columns, so no schema changed)
|
||||
(plus the A/R, A/P, asset,
|
||||
period, payroll, and class events listed on `JournalLine`).
|
||||
- `payload`: the full domain facts (account fields, entry with lines, blob
|
||||
|
||||
Reference in new issue
Block a user