Projects: classes as entities, and the sidebar fits short windows
check / check (push) Canceled after 0s

A project is a class with facts (description, status, kind, party,
dates, links, notes) in one project.set event behind the format
feature projects. Four tools (books.add_project, update_project,
projects, project); documents and decisions link to projects; B-37:
on-spec costs are expensed as incurred, repayment is revenue, and the
unrecovered cost is never below zero (Kani). Viewer: a Projects list
and a project page with its figures, by month and by account. The
sidebar measures its footer instead of reserving a fixed 172 px.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T3gXMVt7XJPi6ens1or9Dj
This commit is contained in:
swaitsandClaude Opus 5.5 committed 2026-10-22 03:50:52 -06:00
1 parent 0495726001
commit 321b94562a
71 files changed
+7446 -217

No files matched your search

+22
View File
@@ -1785,6 +1785,28 @@ fn basis_figures_laws() {
);
}
/// `kernel::unrecovered_cost` (rules.md B-37 item 4), for every revenue
/// and expense a line could carry: never below zero; the shortfall when
/// expenses exceed revenue, else zero; never above max(expenses, 0) when
/// revenue isn't negative (expenses may be negative: a reimbursement
/// credited to the expense above its cost).
#[kani::proof]
fn unrecovered_cost_laws() {
let (revenue, expenses) = (any_amount(), any_amount());
let u = kernel::unrecovered_cost(revenue, expenses).expect("no overflow");
assert!(u >= 0);
if expenses >= revenue {
assert_eq!(u, expenses - revenue);
} else {
assert_eq!(u, 0);
}
if revenue >= 0 {
assert!(u <= expenses.max(0));
}
kani::cover!(u > 0, "costs not yet repaid");
kani::cover!(u == 0 && revenue > expenses, "repaid, and more");
}
// ---------------------------------------------------------------------------
// The checker itself
// ---------------------------------------------------------------------------