Control roles in the journal (books.assign_role, books.roles); the MCP reloads wanderbooks.toml on change and reports settings problems (books.settings, digest); new writes a full commented wanderbooks.toml
check / check (push) Canceled after 0s

- core: ControlAccount keys, Ledger::assign_role/check_assign_role/role_account (rules.md B-23): one account per role, of the role's type, balance sheet roles move only when empty; invoices, bills, payroll, remittance, and closes post to the assigned account; an assigned role frees its default code for renumbering
- store: role.assigned journaled and replayed (strict account_id)
- mcp: settings.rs reloads by content at the start of each request, keeps the last good settings on a broken edit; books.settings with chart problems; digest settings_problems; instructions say when to edit the toml
- viewer: journal text for role.assigned
- cli: full example wanderbooks.toml, tested to load with every example uncommented
- tests: spec_roles.rs (25, spec-blind), store roles.rs (6), MCP reload/problems/roles, settings unit tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GWVo7x3UHw5kwCUaWxiejX
This commit is contained in:
swaitsandClaude Opus 5.5 committed 2026-10-15 10:30:16 -06:00
1 parent efa370dfa3
commit 1771d87e0e
19 files changed
+3044 -132

No files matched your search

+22
View File
@@ -132,6 +132,28 @@ pub fn describe(b: &Books, line: &JournalLine) -> Option<Event> {
.and_then(|v| v.as_u64())
.map(Route::Account),
),
"role.assigned" => {
let role = s(p, "role");
let control = ledger_core::control_account(role);
let purpose = control.map_or(role, |c| c.role);
let mut chars = purpose.chars();
let purpose: String = chars
.next()
.map(|f| f.to_uppercase().chain(chars).collect())
.unwrap_or_default();
let account = p.get("account_id").and_then(|v| v.as_u64());
ev(
icon::TAG,
match account {
Some(id) => format!("{purpose} now posts to {}", b.account_label(id)),
None => format!(
"{purpose} back to its default code {}",
control.map_or("", |c| c.code)
),
},
account.map(Route::Account),
)
}
"account.tax_set" => ev(
icon::TAG,
format!(