A telephone is ten digits or more, so the strict reading of a party's fields
(any run of nine digits) refused every phone number: the bill-to snapshot's
check, new with the free-text change, refused `503-555-0100` and failed the
window's invoice test. The party's own phone (since D-55) and the tool's
bill-to phone had always been refused the same way; only 7-digit test
numbers hid it.
A phone field (a party's, a bill-to's, the seller's) is now its own class,
read as a reference is: refuse the printed SSN 3-2-4 and EIN 2-7 and nothing
else, since a nine-digit national number is ordinary. A postal address
keeps the strict reading except a ZIP+4 (`98101-1234`, five and four, nine
digits), a postal code. The formation state's entity number is a
registration number (a Washington UBI is nine digits) and is read as a
reference. The tools' table, the engine, and the audit's keys agree; the
audit reads `phone` and `fax` as a phone.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- books ahead of the folder (as after a restore from an older backup) offer a
new backup set beside the old one, at the person's request: books.back_up_now
new_set, back-up --new-set, a button in the Backups window
- a key file lost from a sealed destination stops backups and asks for the
passphrase; plain is written only after an explicit removal, which the record
keeps (a damaged record falls back to what the folder itself holds)
- a restore that is not of the newest backup says so first, in the warning
colour, with both dates and how many backups it passes over
- a folder a sync service keeps (or may) is said in plain words at set-up and
in the window: one computer only, kept offline, a second computer its own
- a drill that finds only an older whole backup fails in words
- a manifest whose proof was cut short is marked unproven and proven by the
next backup, even one with nothing new; a saved backup file is proven whole
before it is given its name
- the proof compares the journal its pieces make with the head the manifest
records before the books open, and lets opening add only after it
- the restore tests are split from backups.rs to keep each under a minute; the
clone-of-an-old-git-backup test builds the working tree without git
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A backup that restores old or wrong books while reporting good is the worst
defect the product can have. A piece already in the destination was taken as
the piece (its name is its hash), the manifest built on the newest backup
whose pieces were the right length, no proof ran after a backup, and the
drill fell back to older manifests and recorded ok with the older head.
- the manifest just written is read back and proven before the backup is
recorded good: every journal and access segment re-hashed, the chain
replayed to its head, vault and keys present, the index, and the stored
files this backup added plus a rotating sixteenth of the others (every
stored file is re-read within 16 manifest numbers; the drill re-hashes all)
- a piece found damaged is written again under a generation suffix beside
the damaged file (never touched), a new manifest names it, and the reader
accepts any generation of a piece whose contents hash right
- the drill passes only on the newest manifest, and only when it reaches the
head of the last backup recorded good; an older whole backup is a failure
that says so with its date
- no consolidation: a manifest names the one before it and only what is new
(a chain of 64, each link proven by the hash its successor holds)
- restore and drill read newest first and stop at the first that proves
- live books that are the beginning of the destination's longer history are
ahead; any other mismatch is diverged or other books
- a new set can begin beside the old (.2), never touching it; set folders
carry a fixed prefix so no book id is a reserved name on Windows
- no hard link is never a reason to replace: only errors that mean the disk
makes no links fall back, to a move that refuses to replace
- sealed pieces are sharded by two digits; header settings are capped at 4x
and bound into the sealed check; find derives one key per distinct setting
- vault scratch files are never backed up as records
- files a sync service has not downloaded read as not downloaded yet
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The count of free-text source clauses falls from 56 to 54: the git form's spec
blocks are gone.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Admin requests set up the backup folder (journaled as the books' own
backup.folder setting, the owner the one who decided) and the passphrase, save
a backup as one file, and say how the backups stand; the Backups window, Save a
backup and Restore (a folder or a file, with the passphrase when it has one) use
them, and the command line has backup-setup, backup-status and backup-save
(the passphrase typed at a terminal, never on the command line).
New dependency: rfd (MIT) in ledger-gui, with pollster, for the system's own
folder and file dialogs (the portal on Linux, native on Windows and macOS). It
adds no other crate to the tree (zbus is already there through the window
toolkit); cargo deny passes and THIRD-PARTY-NOTICES.txt is regenerated.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The Linux packages, the AUR recipe and the rpm metadata no longer depend on
another program for backups (WB-pkg-4 is replaced); the Windows host's PATH no
longer carries Git for Windows; the handbook an assistant reads, the
tool descriptions, the install notes and the site say plain folders. A test
adopts a clone of an old backup as the docs describe.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The store's own verification reads the text an extraction recorded as a stored
file, so a verification that left the stored files out would not prove books
with extracted text. Every proof now builds the books with their stored files,
as a restore does, and a test holds it.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Restore reads a destination folder, a set's folder, or a backup file with an
optional passphrase; the server cuts the books under the store's lock and
writes the folder outside it; the format upgrade proves a local backup in the
book's folder (the same form) before it moves the format. The old backup
(git processes, their locks, the output drain) and every test of it are gone;
what each test protected is held by the new form's tests (table in the
report). Old settings and an old history in a book's folder are said in the
status and left alone.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The tools' table gains a third class, reference, for fields that are
identifiers by nature (18 strings: tags and serials, vendor and customer
references, payment and send references, account codes, file names, an
instrument's label, where a W-9 or W-4 is kept); free text falls from 127 to
109. The refusal names the table's own field and describes a key it does not
know as an unrecognised field, never quoting a key the caller chose. A bank
import matches its rules against the description as the bank wrote it and
journals the masked one, so a rule keyed on a nine-digit reference still
matches. A chart file's account code is a reference.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The two Connect page baselines are re-blessed on the merged code: the
page gained the extension row here and the stopped test clock on main.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
docs/install.md is three short sections for a person installing.
docs/packaging.md records what the installed app is on each system, why
NSIS and the macOS bundle are scripts of our own, how signing is wired
with the owner's secrets, what was left out, and what bundling git
would require (GPL-2.0, separate program, unmodified: notices, source
offer), which stays the owner's decision. WB-pkg-1 to WB-pkg-8 are the
product rules. The Linux packages, the AUR file and the rpm now depend
on git, so the package manager fetches it and a Linux person never meets
the missing-git words.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The release workflow runs on a version tag (which must equal the
program's version) or by hand, never on an ordinary push. Each system
runs the workspace's whole tests, builds its package, signs it only when
the owner's secrets exist (and says so in the run's notices when not),
and checks it: the .deb and .rpm file lists; the Windows program's PE
subsystem is the GUI one, and the installer is run silently, installed
over itself, uninstalled, with a sentinel in the data folder that must
survive; the dmg is opened (never run) and its app checked for both
architectures, the plist, the licences and the signature. A last job
gathers the packages, the licences, a latest.json with the version
number the app's daily look reads, and SHA256SUMS.txt, into a DRAFT
release; a release that is already published is never touched. The apt
and dnf repositories are no longer pushed to by a tag: that is the
manual publish-repos workflow, from a published release.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Windows: a hand-written NSIS script (per user, no administrator prompt,
installs under the profile's Programs folder; one program file; a Start
Menu entry named Wanderbooks with the icon; an uninstaller listed in
Settings > Apps that removes only what the installer put in its own
folder and never names the data folder). The installer asks the person to
quit the app fully before it replaces or removes the program. An optional
Authenticode signing step runs only when its secrets exist.
macOS: the .app is assembled by a script (Info.plist with the bundle
identifier, version, name, Documents-folder purpose string; the one
program at Contents/MacOS/wanderbooks; the licences), signed with the
hardened runtime and an empty entitlements file that says why, put in a
dmg with an Applications shortcut, notarized and stapled when the
owner's Apple identity is given and skipped with a notice when not. The
program is one universal binary (lipo of the two release builds).
Linux: both desktop entries name the window's app id and the icon; the
rpm now installs the icon; the deb, the pacman tarball and the rpm all
carry LICENSE-MIT and LICENSE-APACHE beside the notices.
One version: deploy/packaging/version.sh reads crates/ledger-cli's
Cargo.toml; every script takes it from there. Tests read the scripts and
build a bundle with a stand-in program.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The store's attestation notes and model names, attachment and document
texts and the unlink, withdraw and void reasons are checked before
anything is journaled, like the engine's. Two end-to-end tests changed
their words (not their data): spec_projects expects "tax id" where it
expected "TIN", documents expects "tax id" where it expected
"taxpayer", for the refusal the new check now gives first.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude's desktop extension format is the MCP Bundle: a .mcpb zip with a
manifest.json (manifest 0.3, github.com/anthropics/mcpb). The row's
button makes the company's agent key if there is none and writes
Documents/Wanderbooks/Extensions/wanderbooks-<id>.mcpb: a manifest whose
server is a binary running this program's own stable path as
mcp --book <id>, the 512 px icon and a short README as the entry point.
The package carries no program (the one executable is the installed
one), no key and no path of the data root. The page then says in plain
words where in Claude to pick the file and to keep Wanderbooks open, and
offers to show the file. The manifest is checked against Anthropic's
published schema (a test fixture) and its required fields. The blessed
Connect page pictures change by exactly the new row. The program's
version is now one value set by main for every platform, not only Unix.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Buypass is left out of the compiled-in directory hosts: its directory
could not be confirmed from its own documentation.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The review of P15 B3 found the relay could steer three things it must not.
- A certificate is now checked against the public roots the program
ships, for the app's wildcard, when it is issued and every time it is
read from disk; a lifetime over 100 days is refused (no public
authority issues one), and the renewal is planned no later than two
thirds of the life or 60 days. A kept certificate that fails is
ignored and ordered again. Only a test builds a CertTrust of its own
roots.
- The ACME client sends a request only to a directory on a host compiled
into the app (Let's Encrypt production and staging, Google Trust
Services, ZeroSSL, Buypass, SSL.com): the relay still picks which and
in what order, but cannot name a new host. A kept account is used only
if its directory is on the list too. http is a direct dependency now
(it was a dev-dependency, and already in the tree): the host is read
with the parser the ACME library uses.
- The resolver refuses a certificate at its end, sleeps stop at it, and
the state stops saying "Connected" when it has ended.
- The certificate work waits for the line, so it is for the name the
relay accepted (a first claim that finds the name taken picks another);
web.rs starts the door only once the name is settled.
- A line that held under 60 s does not reset the backoff; one that held
is redialled after 0 to 30 s, so a relay restart is not met by every
app in the same second.
- What the relay and the authority say is shown as a short quoted detail
with control and invisible characters removed, in the app's own words.
- The kept address is read once, not from the key file every frame; the
folder is synced after a private file is renamed into place.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The real books server (a child process on a temp root), its remote door and sign-in,
the app's link, the relay crate's own in-process relay and an in-process
certificate authority: a web caller's TLS through the relay is ended with the app's
certificate, signs in with the person's answer made through the admin socket, and
reads the books; HTTP/2 reaches the door by its authority; the door drops a
connection without the secret; off closes the line and the door and on again is
the same address with the same certificate; a new address refuses the old tokens;
the switches are put back at the next start.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A push to a bare folder repository locks HEAD as well as the branch when it
moves the branch HEAD names. Both locks are left when git is killed, and the
server names both. A newer git (Linux) goes on past a stale HEAD.lock, an older
one (macOS) refuses the push with "cannot lock ref 'HEAD'"; the test removed
only main.lock, so the last backup failed on macOS. The test now removes each
lock the report names (and asserts each is named), as the words tell the owner;
the program already reported both.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The server is told to write WANDERBOOKS_GIT_TIMINGS; when a close is not
`Closed` or takes over 10 s the test prints the slowest ten commands and the
last hundred (when, command, exit, how many ran at once, spawn, ran, pipes,
and how each pipe ended), so the next Windows run shows where the time went.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Every test's books, when dropped, hold no failed call unless the test
injected the fault on purpose (common::expect_failed_calls): a tool that
writes a line and then refuses now fails every test that makes it refuse.
hostile_args gains a guard that drives refused calls over every tool, and
the same arguments with a made-up full tax id in each string in turn, and
asserts the journal is byte for byte what it was after each refusal, with
no trace of the tax id.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Plan P15 unit A5, fix round. Each of these fails without its fix (checked by
disabling the fix): a serve, a command and `close`/`doctor` meeting a closing
server or a command's server (orphan of a killed host, another command's),
a command's own server holding server.lock and books.lock while it works and
refusing the app's start and making `serve` wait, a command's server holding none
of the invoker's environment, pipes or folder, a command racing the app's start,
two commands at once with nothing running, a bridge that held a host following the
app that takes its place, the app asking a host to close, and server.info itself.
Thinned tests, mended: the_host_starts_without_a_scope_when_systemd_run_fails
drove `books create`, which never starts a host, and passed with the fallback
broken; it now drives `serve` and fails with the fallback broken.
with_nothing_running_a_command_runs_its_own_server… asserted
`success || stderr contains "backup"`, which passes on a failure; it asserts the
real outcome (exit 1, "No backups are set up"; a backup that is made is
books_are_backed_up_now_from_the_command_line).
the_bridge_reaches_the_books_serve_holds… has its close after the last lease back
(serve let go, the books close). a_command_leaves_nothing_running_and_serve_closes…
has "a lease arriving within the delay cancels the close" back (a second `serve`
within `close_after` keeps the same host). books_commands_hold_the_books_while_they_run
points to the test of a command's own server.
Moved tests, one line each (what each still protects, read against the diff of
e9a520138):
a_command_leaves_nothing_running_and_serve_closes_after_its_last_holder: nothing
left by a command or a bridge, serve's delay and its cancel (restored).
serve_and_the_bridges_share_one_host_and_one_server: one host, one server, two
`serve`s racing, bridges and a command joining.
the_bridge_answers_initialize_itself_during_a_slow_start, …gives_up_on_books_that_never_open,
a_call_cancelled_at_once_is_never_made, a_signalled_bridge_goes_at_once,
books_made_mid_session_and_bad_requests: still the bridge's waiting on a host whose
server is slow (`serve` with `server_delay`), the same knobs.
books_commands_hold_the_books_while_they_run: commands lease a host that serve holds.
a_command_ends_at_its_deadline_during_a_restart: still a command ending at its
deadline while update.lock is held (`token list`; `books list` reads the folder).
a_bridge_started_without_stderr_keeps_its_descriptors_apart,
the_commands_given_run_as_the_agents_own_token,
an_agent_is_connected_and_reaches_the_books_by_what_it_was_given: unchanged bodies
behind a `serve` that holds the books; the properties are the bridge's and the
token's, not who started the host.
doctor_says_whether_the_books_are_open_and_what_holds_them: asserts the new closed words.
the_host_serve_starts_is_clean_from_a_hostile_serve: the host's scrub, from serve.
the_viewers_new_books_are_made_by_the_server: new books through a server that runs.
update.rs (9 moved): the diff is the harness only (`keep_host`, the request key); their
subjects (restart onto a replaced program, update.lock, staging, verifying, applying
before a host starts) are the host's, which `serve` starts the same way; read in full
for the_host_stages_a_daily_update_and_the_next_start_applies_it (the next start is now
serve's), the others by the diff and a green run.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
An account made through books.add_account with its tax category is the
begun line, account.added, account.tax_set and the closing line: four
lines, not two (WB-format-8).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A refusal is decided before anything is written; a failed call on the
record is for a call that failed part way. Four tools wrote a line and then
refused, so under T1 each left a begun line, its lines and a failed closing
line in the journal for a plain "no":
- books.attach_receipt and books.file_document: bytes already filed are one
file, so filing them again links the existing attachment; a link it
already holds was refused after the earlier links were written. The store
now asks first (Store::check_filing_links).
- books.draft_entry and books.draft_from_template: a no_party_reason that
names a full tax id was refused by the mark, after the draft was made.
Ledger::check_no_party_reason is asked first.
- books.dispose_asset: a receipt named twice was refused at its second
link, after the disposal was posted. The ids are checked for repeats
first.
Each has a test that the journal is byte for byte as it was. No journal
format or frame shape changes.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Plan P15 unit A5, fix round. With nothing running, `books list` reads the folder
and takes no lock (nothing is opened), so it stopped showing which companies wait
for a format upgrade, which a server showed. It now reads what each journal
declares (`ledger_store::declared_format`: no lock, nothing written, the hash
chain not verified, so it says what the books declare and no more) and adds
"; waiting for a format upgrade (`wanderbooks books upgrade ID`)"; a journal that
cannot be read says why on its line. The listing no longer fails when a company's
folder vanishes while it is made (a book put aside meanwhile): a vanished entry is
skipped, not an error (`list_books_inner` used `entry?`).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The journal taken before the refusals was raw (frame lines in) and the one
taken after still dropped frame lines, so the two could never match after
T1. Both are raw now, with no filter for closing lines: a refused call
leaves no begun line, no line, and no closing line with an error text.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A verify that finds nothing to heal writes no journal line, so it has no
call frame (WB-format-8). The rename journey counted a closing line for it
and so expected one line more than the journal holds. The refusals now
compare the raw journal byte for byte, and the counts are what the journal
holds.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Plan P15 unit A5. Nothing but `wanderbooks serve` starts a host, so the tests
that had a bridge or a command start one now have `serve` hold the books (a
`serve` the harness keeps: Home::keep_host), or run a server of their own
(the commands), or are retired. Every test of the three files plan section 6
names, and what became of it:
open_while_held.rs (44 tests)
KEPT, still true for serve (28): closing_the_books_ends_every_lease_and_the_bridge_stays_closed,
closing_during_a_burst_of_posts_through_the_bridge_loses_nothing,
a_killed_host_is_replaced_by_its_holders,
holders_back_off_and_give_up_on_a_host_that_keeps_failing,
the_lease_socket_takes_only_the_owners_intents, a_restart_is_not_a_close,
another_apps_appimage_is_never_run_as_the_host,
the_host_outlives_the_app_scope_that_started_it,
the_bridge_serves_a_client_without_initialize,
the_bridge_recovers_when_the_server_dies_under_it,
a_message_too_large_is_refused_and_the_session_goes_on,
malformed_and_boundary_input_never_ends_the_session,
the_host_starts_without_a_scope_when_systemd_run_fails,
a_scrubbed_app_scope_doesnt_take_the_host_with_it,
doctor_doesnt_hang_on_a_frozen_host, doctor_doesnt_hang_on_a_frozen_server,
serve_hears_ctrl_c_while_it_waits_to_try_again,
every_malformed_message_is_answered, books_that_didnt_open_refuse_plainly,
close_and_list_dont_hang_on_frozen_processes,
the_books_command_takes_its_flags_and_asks_before_adopting,
adopted_books_old_copies_are_put_aside_from_the_command_line,
the_token_commands_and_the_bridge (the bridges there are held by serve
through Agent::start), an_agent_sends_and_saves_files_with_the_commands_it_is_given,
a_backup_is_restored_from_the_command_line,
books_are_backed_up_now_from_the_command_line,
connect_makes_anew_a_token_whose_file_is_gone_and_says_when_an_agent_refuses,
token_check_says_where_the_token_file_stands_and_an_unreadable_one_is_said
(these commands now run a server of their own with nothing running).
MOVED, rewritten for the new shape (15):
a_command_opens_the_books_and_they_close_after_the_last_holder ->
a_command_leaves_nothing_running_and_serve_closes_after_its_last_holder;
openers_share_one_host_and_one_server ->
serve_and_the_bridges_share_one_host_and_one_server (two serves at once
are the race now);
the_bridge_opens_closed_books_and_holds_them_for_the_session ->
the_bridge_reaches_the_books_serve_holds_and_holds_them_for_the_session;
the_host_starts_clean_from_a_hostile_bridge ->
the_host_serve_starts_is_clean_from_a_hostile_serve;
the_bridge_answers_initialize_itself_during_a_slow_start,
the_bridge_gives_up_on_books_that_never_open, a_call_cancelled_at_once_is_never_made,
a_signalled_bridge_goes_at_once, books_made_mid_session_and_bad_requests
(a slow `serve` holds the host; the bridge starts after it holds the root);
books_commands_hold_the_books_while_they_run (serve holds, the commands lease);
a_command_ends_at_its_deadline_during_a_restart (`token list`: `books list`
with nothing running reads the folder and waits for nothing);
a_bridge_started_without_stderr_keeps_its_descriptors_apart,
the_commands_given_run_as_the_agents_own_token,
an_agent_is_connected_and_reaches_the_books_by_what_it_was_given
(Home::keep_host);
doctor_says_whether_the_books_are_open_and_what_holds_them (new closed words).
RETIRED (1): the_viewers_hold_new_books_and_close_the_books. Its viewer
lease (hold_for_viewer) and "Close the books" (close_books) no longer
exist: the app is the host. Covered by ledger-gui serving.rs
(a_tab_opening_asks_the_server_to_open_that_company, a_tab_closing_asks_the_server_to_close_that_company,
closing_the_window_stops_the_server_and_waits_for_it), owner_menu.rs (no
"Close the books" item), and the replacement
the_viewers_new_books_are_made_by_the_server (new_books through a server).
Behaviours retired inside the moved tests, and what covers them: a command
or a bridge starting a host and holding it for the close delay does not
exist (app_server.rs: a_command_with_the_app_running_goes_to_its_server_and_leaves_it_running,
with_nothing_running_a_command_runs_its_own_server_or_says_to_start_wanderbooks,
the_bridge_says_the_app_isnt_running_then_works_once_it_is,
a_command_leaves_nothing_running_and_serve_closes_after_its_last_holder);
the close delay itself is kept for serve's host (same test).
update.rs (16 tests)
KEPT (6): an_update_replaces_the_program_keeps_the_old_one_and_rollback_brings_it_back,
update_is_atomic, failed_update_rolls_back, unsigned_update_refused,
package_managed_install_refuses_update, rollback_refuses_after_a_book_consented_to_a_newer_format,
an_update_never_replaces_another_apps_appimage (the `update` command and
the AppImage guard: no host involved).
MOVED (9): bridge_survives_update, update_waits_for_a_running_call,
a_replaced_appimage_restarts_the_books, the_host_stages_a_daily_update_and_the_next_start_applies_it,
a_daily_update_that_is_not_ours_is_not_staged,
update_installs_the_copy_the_host_staged_without_downloading_again,
a_staged_update_that_was_tampered_with_is_dropped_not_applied,
books_start_says_an_update_waits, the_owner_accepts_a_staged_update_in_the_app:
the host they describe is serve's (restart onto a replaced file,
update.lock, the daily look, the staged copy applied before a host
starts), so the harness's Agent::start has a `serve` hold the books
(Home::keep_host); the bridge's tool calls carry the request_key every
write needs since D-88. RETIRED (0).
translocation.rs (1 test)
KEPT: translocated_app_refuses_to_connect. The refusal stays: an agent's
pointer file records this program's path, which a quarantined download
loses when the app closes, whatever starts the books.
app_server.rs: no test retired. Changed: the_bridge_says_the_app_isnt_running_then_works_once_it_is
(no marker; the words now name `wanderbooks serve`), a refusal touches
nothing (the retired marker). New: a_mark_an_earlier_build_left_is_ignored_and_removed,
a_terminal_ctrl_c_reaches_the_window_and_never_the_server (fails without the
server's own process group: checked by removing it),
a_command_with_the_app_running_goes_to_its_server_and_leaves_it_running,
with_nothing_running_a_command_runs_its_own_server_or_says_to_start_wanderbooks,
a_command_waits_in_words_for_a_server_that_is_still_opening.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Plan P15 3.1: the desktop app is the host. The bridge and every command that
needs the books now find what runs (a host held by serve, the app's server,
or nothing) and never start a host. The permanent run/app-hosted marker is
gone: a root is the app's only while a server runs on it with no host.
- opener: no host and no server is HoldError::NotRunning for every holder
but serve; a server holding run/server.lock with no admin socket yet is
waited for, in words (an opening or finishing server); the admin socket
answering is the leaseless hold on the app's server, marker or none.
- commands: with nothing running, a command that manages the books' files
or reads (list, create, adopt, restore, back-up, upgrade, token, connect)
runs a server of its own, the one the app starts, for the length of the
work and closes it, taking the same server.lock and books.lock; a command
that needs an open company held by Wanderbooks (books open/close, upload,
download) says "Start Wanderbooks first". The format upgrade goes to the
server as an admin request when no host is there. doctor and close say
what runs. hold_for_viewer and close_books are removed.
- bridge: the line to the app is the default with no host; a bridge whose
host went away becomes it. The words an assistant gets name both ways to
start the books (the app, or wanderbooks serve).
- app server: the child is its own process group on Unix (a terminal Ctrl+C
reaches the window alone) and breaks away from a launcher's job on
Windows (a kill-on-close job no longer kills it mid-backup); a stale
marker from an earlier build is removed.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
WB-format-8 now says every reader applies the frame rule because ids are
reused after a failed call, and names the committed accessor and the labels;
WB-format-9 the keyed argument digest, the bounded answer, the in-memory
table for calls that wrote nothing and what a repeat of a long answer is
told; WB-format-10 the vault staged inside the transaction and the honest
words when the closing line is on disk. docs/mcp-interface.md, the receipt
store's frame paragraph and the handbook (contract, tracing figures) say the
same.
Tests follow the new shapes: a call that wrote nothing leaves no line, the
head a write answers is where its own lines end and its closing line follows,
the idempotency table compares events, and the checks that a refusal or a
preview wrote nothing compare the raw journal.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Make the key asks the server first and never replaces: a live key whose copy
is missing here may be in use, so it is said in words and left alone. A
page-made key carries read, write and post, not admin (the connect command
keeps its scopes). Revoke names the key's id, so a stale row cannot end a
newer key of the same name; a revoke that leaves the token file says the key
is dead and where the file is. The copyable command is single-quoted for a
POSIX shell and PowerShell, and refused when cmd.exe would act on a part.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The vault wrote a tax id before its journal line, so a call that failed or
was cut left the new tax id (and lost the old) with no line to say so. A
vault write made for a call is now staged under a name no reader opens
(.staged-TAG, .purging-TAG) and is made final, or dropped, only when the
call closes: a purge is set aside and put back if the call fails. A crash
between the closing line and the settle is finished at the next start by
what the journal says of the call. The readers that check a vault record
against the party's committed vault_record hash (the 1099 and CPA package
paths) therefore only ever see committed records; the filing scan reads
every final record on purpose (more tax ids scanned is safer).
close_call(Done) told the caller none of a call counted when its closing
line was on disk and only SQLite failed. It counted: the store now heals
from the journal where it can, and otherwise says the call counts, stops
taking writes and rebuilds at the next open.
A call whose begin line the projection refused left its frame open, so the
next call began inside it (a corrupt journal): the frame is now closed
failed.
A read arriving between a call's return and its closing line waits for the
close (a call that has written no line leaves reads free), so no read shows
what a call did before it committed.
Tests added through the tools: a call that writes lines and fails, a repeat
arriving while its original runs, the same key under two tokens, a crash
with the ok close on disk and SQLite behind, the vault under a failed and a
crashed call, a key reused for another tax id. The helpers that drop frame
lines no longer back the checks that a refusal or a preview wrote nothing.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A bridge session opened with a key is on the roster; revoking the key
takes the key and its session off, refuses the session's next call and
deletes the token file's copy.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Accounting reasoning: these are financial books reached over the internet,
where a request is retried. A write whose answer is lost and then sent again
must not post twice, a call half done must not be left looking done, and a
failed write must be on the record.
Every tool that can change the books (83 of the 140: three that only read
what is sealed and may answer with a TIN are reads) takes a required
`request_key`, added to its schema in tools/list and taken out of the
arguments before the tool runs, so no tool, preview digest or check changes.
A write without a usable key is refused in words. Write calls take turns,
and each runs as one transaction of the store: opened (or answered from the
books if its key committed: the same tool and arguments return the first
answer and write nothing; other arguments are refused as a misuse of the
key; the access log says `repeat`), then closed with its answer if it
answered ok, or rolled back and closed `failed` if it errored, failed or was
stopped by a close. Books an older version wrote take no write at all until
the owner's go-ahead (D-89): every write is refused with the upgrade remedy;
reads work as ever. `books.import_bank_csv` is one transaction like the rest.
The handbook, docs/mcp-interface.md, the claims (WB-format-8 to 12, and
WB-format-3 amended for D-89) and docs/parity.md say so. Tests that wrote to
old books through the tools now assert the refusal and write after the
upgrade; the shared wire helpers add a fresh key to every tool call (the
journal helpers leave the call frames out, as they left out nothing before),
so no other test changed. The store-level `_waits_for_<feature>` tests still
check each feature's own gate. No figure and no golden moved.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
AppHost holds what the window does with its books server, so what the tests
drive is what the window runs. A server that is alive but not ready is waited
for; a failed start, or a window closed before the child was stored, closes
the child's input and waits for it, so no server runs that nothing manages.
The close first closes each open company, so a closing backup that was not
whole, and a server that exited badly, come back as words. The format
upgrade goes to the server as an admin request (there is no host to ask),
and the companies the window wanted that the server did not open are told.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The server child starts, closes on input close and on the window's death (a
killed stand-in window leaves no server and a whole book), a stop that runs out
of time leaves it closing and says so, a start is refused while a server or host
holds the books; a tab opened or closed opens or closes that company, in order,
with failures said in words; closing the window waits in view and asks the owner
once; the bridge answers 'Wanderbooks isn't running' and 'Company X isn't open'
in one running session, starting no host. Claims for WB-app-1 to WB-app-4 name
them.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>