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
40 lines
2.0 KiB
TOML
40 lines
2.0 KiB
TOML
# The harness that wrote tests/fixtures/old-books, through the Store API of
|
|
# the version that wrote them (main 188c90ea, 2026-10-17), and that version's
|
|
# expected.json (bin/expect). Not a workspace member: point the two paths at
|
|
# a checkout of the writing version (`git archive 188c90ea | tar -x -C
|
|
# wb-main`), then
|
|
# cargo run --bin writer -- OUT (the P0 review's thirteen and control)
|
|
# cargo run --bin extras -- OUT (the edges of chrono and Decimal)
|
|
# cargo run --bin extras2 -- OUT (depreciation for 10000-01; 1,044 drafts)
|
|
# cargo run --bin older -- OUT (x_older_rules, with its JournalWriter)
|
|
# cargo run --bin s5_before -- OUT (p4_s5_before: run against eeee9658,
|
|
# the revision before P4b S5)
|
|
# cargo run --bin p2_1099 -- OUT (p2_vendor_1099: P2's 1099 marks, run
|
|
# against 9c99a0cf, the revision before P3)
|
|
# cargo run --bin p4_before -- OUT (p4_before: run against 25b52580, the
|
|
# revision before P4: hand entries posted
|
|
# late, a reversal, open drafts, a close)
|
|
# cargo run --bin p5_before -- OUT (p5_before: run against b97234ac, the
|
|
# revision before P5: a revised
|
|
# convention, two decisions, two open items)
|
|
# cargo run --bin expect -- OUT (expected.json beside each journal)
|
|
# and copy each journal.jsonl, blobs/ and expected.json into old-books/.
|
|
# x_member_closes was written later, the same way, by main 00226a4c
|
|
# (2026-10-20, before P3's odd cent): `cargo run --bin members -- OUT`
|
|
# (members closes under every rounding rule main wrote; P3 review R-2).
|
|
[package]
|
|
name = "writer"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
|
|
[dependencies]
|
|
ledger-core = { path = "wb-main/crates/ledger-core" }
|
|
ledger-store = { path = "wb-main/crates/ledger-store" }
|
|
chrono = "=0.4.45"
|
|
rust_decimal = "=1.43.0"
|
|
serde_json = "1"
|
|
|
|
[workspace]
|
|
# main's crates (wb-main) keep their own workspace.
|
|
exclude = ["wb-main"]
|