test(core): the adapter's refused hand entries go through a real Store, and payroll is its own source
A hand entry the example says is refused when posted at once was made on a clone of the Ledger and the receipt-gate error hand-built from `evidence::requirement`, as `Store::post_entry_checked` builds it: the adapter, not the engine, produced the refusal. A store journals a draft the moment it is made, so the entry is now made, lined and posted on a rehearsal: the books replayed from their journal into a Store of their own (the journal and blobs copied, opened as any store is), and posted through `post_entry_checked` under a policy, `post_entry` otherwise. The refusal is the engine's own (ReceiptRequired included) and the example's books keep nothing. A payroll run or tax remittance is exempt by its own source, so the engine's "a payroll ..." sentence now reads as bookspec's new `payroll_posting`, not `document_entry`. A draft reversal, which wanderbooks has no path for, is returned as an unsupported-operation error (reported as "another refusal"), not a panic that takes the harness down with it. The claims for B-43 name the new example, entry-only-a-draft-can-be-posted-or- discarded (a posted entry or a discarded draft is no draft), and the rehearsal. Needs bookspec's x-h1c commits (payroll_posting, the new example, the 25.00 threshold example); the pin moves when they land. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d889f2e7fb
commit
56461c1bb6
4 files changed
+100
-33
No files matched your search
@@ -49,9 +49,10 @@ impl Books<'_> {
|
||||
s if s.starts_with("a schedule month's posting") => "schedule_posting",
|
||||
s if s.starts_with("a depreciation run") => "depreciation_run",
|
||||
s if s.starts_with("an asset's disposal") => "asset_disposal",
|
||||
s if s.starts_with("a document's entry") || s.starts_with("a payroll") => {
|
||||
"document_entry"
|
||||
}
|
||||
// A payroll command's posting (a run, or the tax
|
||||
// remittance) is its own source, not a document's.
|
||||
s if s.starts_with("a payroll") => "payroll_posting",
|
||||
s if s.starts_with("a document's entry") => "document_entry",
|
||||
other => {
|
||||
return Err(engine_refusal(
|
||||
RuleId::new(Area::Entry, 5),
|
||||
|
||||
Reference in new issue
Block a user