Commit Graph
1219 Commits
Author SHA1 Message Date
swaitsandClaude Fable 5.2 e127d260a7 Merge branch 't3/fix-windows-working-picture-shapes': the working picture no longer depends on the frame count
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:36:26 -07:00
swaitsandClaude Fable 5.2 f2eb0d29f0 test(gui): the assistants pictures run on a stopped clock and compare shapes rounded to a hundredth
The working mark's arc (connect.rs paint_mark) and every ui.spinner() turn
with the frame time, and the number of frames run before a picture depends
on how long threads take, so the arc's phase differed from machine to
machine. The window now runs on a clock that stands still, a second capture
a few frames later must match, and the shape text is rounded so a sin/cos
last-digit difference is not a changed picture. All assist_*.shapes are
re-blessed (the hash text changed; the pictures did not, but the arc sits at
phase 0).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:36:11 -07:00
swaitsandClaude Fable 5.2 90f663ed54 feat(app): the window tells when a newer version exists and where to get it (P15 C1)
Update is an ordinary app update: the newer package installed over the
old one. The program's part is to say one exists. Once a day, on a
thread of its own, it reads one small file a release publishes
(latest.json: only a version number is taken from it; where to get the
update is a fixed address in the program) and notes the answer in the
data root's updates folder. A higher x.y.z shows a standing notice with
a button that opens the download page and the words that books, keys
and connections stay. Check for updates does the same look at once on
every platform; where a program may replace itself with a signed release
it also stages one as before. A macOS app is never replaced one file at
a time (that breaks its signature): it is treated as managed, and says
to drag the new app over the old. Window prose names the product
Wanderbooks.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:35:17 -07:00
swaitsandClaude Fable 5.2 2bc442f795 feat(app): the Connect page's Claude desktop app row writes a one-click extension (P15 C1)
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>
2026-11-21 15:31:21 -07:00
swaitsandClaude Fable 5.2 5d4a5c90c7 docs(delegation-log): the fixes after GitHub's run on 8a6d731c3
check / check (cli) (push) Canceled after 0s
check / check (gui-tests) (push) Canceled after 0s
check / check (gui-unit) (push) Canceled after 0s
check / check (lint) (push) Canceled after 0s
check / check (rest) (push) Canceled after 0s
portable-macos / portable (macos-latest) (push) Canceled after 0s
portable-windows / portable (windows-latest) (push) Canceled after 0s
two-user / two-user (push) Canceled after 0s
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:30:01 -07:00
swaitsandClaude Fable 5.2 ef1d6e573a Merge branch 't3/fix-github-check-failures': what GitHub's run on 8a6d731c3 found
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:27:38 -07:00
swaitsandClaude Fable 5.2 145a6c4070 fix(mcp): redirects_fit folds its lengths, so kernel-only has no Iterator::sum outside the kernel
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:23:01 -07:00
swaitsandClaude Fable 5.2 479d3a5c5e feat(store): a missing git says how to get it, for this system; a Mac's git stub is not a git (P15 C1)
Backups run the system's git, which the program does not carry (it is a
separate GPL program: bundling it is the owner's decision). The error a
backup reports with no git now says so in plain words and how to get one
on Windows (Git for Windows, winget), macOS (the command line tools, or
Homebrew) and Linux (the package manager); backups stay off until then
and nothing else changes. On a Mac without the developer tools,
/usr/bin/git is a stub that opens Apple's installer and fails: it no
longer counts as found. Git for Windows' per-user folder is searched too.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:19:35 -07:00
swaitsandClaude Fable 5.2 3b02e70794 feat(app): the Windows program opens no console window; the window is named Wanderbooks (P15 C1)
The installed program is one executable that is the window, the books
server's child and the assistants' bridge. Built for the Windows GUI
subsystem, a Start Menu launch shows no console; console.rs gives a
command run in a terminal its words back and never replaces a pipe an
assistant handed the bridge. The two console programs the window starts
(the agent's own list, the system's opener) get CREATE_NO_WINDOW. The
window title is the product name; the storage id and the Linux app id
stay lowercase so nothing already kept moves.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:18:18 -07:00
swaitsandClaude Fable 5.2 d2384dfe7c docs: free text meets a tax id's shapes, bank files mask, chart files refuse (WB-partner-15)
The claim on BS-partner-2 gains a marked CHOICE (the owner, 2026-11-21:
shapes on free text, strict on party fields, masking on bank imports) and
the product rule WB-partner-15 with the downsides accepted; the tool
interface, the handbook sections an assistant reads (parties and TINs,
files in and out, attestations and audit) and the two import tools'
descriptions say what is refused, what is masked and what the audit
names.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:14:02 -07:00
swaitsandClaude Fable 5.2 030b41d662 test(cli): a close that stops git waits for git to get to its ref update, and 'is it gone' is asked of ps, not of /proc
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:11:13 -07:00
swaitsandClaude Fable 5.2 a44744253d docs(delegation-log): B3
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:10:06 -07:00
swaitsandClaude Fable 5.2 0c6b6586fc test(core): every Ledger command that takes free text refuses a tax id; a replay never does
Entry and reversal descriptions, period names, account codes, document
memos, references, duplicate reasons, line descriptions, the company's
printed details (free text) against the customer's (a party's: any nine
digits), asset descriptions, serials and tags, schedule and recurring
descriptions, draft notes, discard and no-party reasons, receipt
annotations. An invoice number, a ZIP+4, a ten-digit PO and a serial pass.
A journal line an earlier version took replays whatever it holds
(BS-entry-4).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:09:08 -07:00
swaitsandClaude Fable 5.2 fcc9220de7 test(import): a bank file masks a tax id's shape and names its line; a chart file refuses, naming row and column
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:08:15 -07:00
swaitsandClaude Fable 5.2 ed2dea9a8e fix(mcp): the test knob's held-lines are each one write, so two timers never run their names together
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:08:03 -07:00
swaitsandClaude Fable 5.2 943566bebd test(fuzz): the HTTP door fuzzer gives a tool call a request key, so a write tool is reached and not only refused
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:06:49 -07:00
swaitsandClaude Fable 5.2 98b1adb754 feat(import,store): bank files mask, chart files refuse, the audit finds an old line
A bank file's description cell is not typed by a person and often carries
a nine-digit reference, so books.import_bank_csv no longer meets a refusal
for one: a number that reads as a tax id is kept masked to its last four
digits (•••-••-1234) and the answer says how many values and on which
lines (masked_count, masked, masked_note). A chart file is typed by a
person: a cell that looks like a tax id refuses the file, naming its row
and column, never the number. The store's own attachment, unlink, withdraw
and void texts meet the same check. books.audit gains tax_id_in_journal: a
journal line an earlier version took whose text field looks like a tax id
is named by line and field, never the number; the books open and replay
as they are and the journal is never rewritten (BS-entry-4).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:05:19 -07:00
swaitsandClaude Fable 5.2 0759089790 Merge branch 't3/p15-b3-web-assistants': the app's side of the relay (P15 B3)
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>
2026-11-21 15:05:16 -07:00
swaitsandClaude Fable 5.2 b0fe3decdc docs(spec): the claims and the plan say what the B3 review changed
Adding a brand-new certificate authority needs a release of the app: it
contacts only directory hosts compiled into it, and believes only
certificates that chain to the public roots it ships, because a relay that
could name any host or authority could make every app send requests where
it likes. The secret label is seen by the relay, the vendor's resolvers and
the network path (the sign-in is the lock); the relay cannot read the
traffic, the assistant's own company reads what it is sent. Certificate
log watching is still not built, so a relay misusing its DNS control to get
a certificate for a name would not be detected.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:03:48 -07:00
swaitsandClaude Fable 5.2 703b4f97c2 docs(host): a doc comment linked to a private item, which the docs lint refuses
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:03:48 -07:00
swaitsandClaude Fable 5.2 1b1d86622a fix(gui): one line when connected, and the Connect page says who can read what
Once web assistants are connected the three progress lines (address,
certificate, connected) collapse to a green dot and "Connected"; they are
shown while connecting and when a step is the trouble. The page no longer
says nobody can read what passes through, which was not true: the relay
that carries the connection cannot, but the assistant's own company reads
what it is sent.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 15:01:41 -07:00
swaitsandClaude Fable 5.2 f9caf713a7 fix(host): turning a company off is only off when the books server said so
turn_off sent RemoteAllow{false} and ignored any reply but an error, so a
refusal left the company reachable while the window said off, and with
another company on the line and the door stayed up. Now anything but the
server's success keeps the company shown as on, with the reason in words;
a server that cannot be reached at all closes the whole line and door
(the safe side) and says so. The door is also started only once the relay
has accepted the name (the settled address), and production uses the
public roots as its certificate trust.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 14:59:57 -07:00
swaitsandClaude Fable 5.2 b90df7158a fix(link): the app believes only public authorities, only their hosts, and only while a certificate lasts
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>
2026-11-21 14:59:57 -07:00
swaitsandClaude Fable 5.2 7327d04897 feat(mcp): one check of every write tool's text for a tax id, from a table of its strings
Every string a write tool takes (423 across 78 tools) is classed in
text_fields::TABLE: 127 free text (refused when it looks like a tax id),
27 party fields (refused at any run of nine digits, as the engine does),
and 269 exempt for a named reason (vault input, lookup key, id, amount,
date, vocabulary, last four digits, bank pattern, link, a structured value
the engine reads). The check runs in call_tool before the tool or any
write, for previews too, and a refused call writes nothing (WB-format-10).
A test fails when a write tool has a string the table does not class, or
the table names one no tool takes. A string the table does not know is
free text. Annotations on a receipt (payee, source, note ...) meet the
engine's check as well.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 14:57:58 -07:00
swaitsandClaude Fable 5.2 548901ce7d feat(core): the engine refuses free text that looks like a tax id
Entry and reversal descriptions, write-off and void reasons, document
memos, references, duplicate reasons and line descriptions, asset
descriptions, serials and tags, period names, account codes, schedule and
recurring descriptions and payroll employee names now meet the one
free-text detector in the Ledger command itself (FreeTextHoldsTin), so a
caller other than the MCP layer cannot journal a tax id (BS-partner-2).
Replay never refuses (BS-entry-4). Draft notes, discard reasons, no-party
reasons and send references and notes move from the strict nine-digit
reading to the shapes (parties::check_note), as the owner chose on
2026-11-21; party fields, names and recipients keep the strict reading.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 14:51:47 -07:00
swaitsandClaude Fable 5.2 ff58b055ce feat(core): one detector for free text, with Unicode separators, masking and words
holds_printed_tin now reads the Unicode dashes, dots, spaces and numerals
between an SSN's 3-2-4 or an EIN's 2-7 groups (a replay keeps reading the
narrow form, BS-entry-4). mask_printed_tins keeps the last four digits of
each number found; check_free_text and tin_refusal give the one refusal in
words: which field, that it looks like a tax id, where a tax id goes
(books.set_tin or a W-9), never the number. Property tests: every grouping
with every listed separator is found, nine digits alone are found, ten or
more digits, invoice and phone numbers, amounts and dates pass.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 14:47:33 -07:00
swaitsandClaude Fable 5.2 38e95e9ea6 test(gui): the window says assistant, so the tests that read its words say it too
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 14:46:04 -07:00
swaitsandClaude Fable 5.2 657766ae5a docs: two doc links name a private item, so rustdoc -D warnings refuses them; plain code text now
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 14:41:39 -07:00
swaitsandClaude Fable 5.2 1a07eba93d docs(delegation-log): the Mac and Windows fix
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 14:37:27 -07:00
swaitsandClaude Fable 5.2 fd779a6f1a Merge branch 't3/fix-windows-close-macos-lock-tests': git's output is read when git has ended; the lock test removes every lock named
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 14:37:03 -07:00
swaitsandClaude Fable 5.2 14c1a26bfc docs(spec): WB-link-1 to 6, WB-assist-6, WB-app-6 for the app's side of the relay (P15 B3)
The claims for the identity, the line, TLS at the app, certificates, the states in
words and the per-company switch, the Connect page's web half and the first run;
parity.md, the architecture table and the plan's follow-ups (what B3 left out and
why: certificate-log watching, steps for products nobody tried, the key for
key-only products, a real relay and authority).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 13:40:00 -07:00
swaitsandClaude Fable 5.2 db953c7b5b test(cli): web assistants end to end through an in-process relay (P15 B3)
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>
2026-11-21 13:40:00 -07:00
swaitsandClaude Fable 5.2 13a3f1b519 feat(gui): the web half of the Connect page and the first run (P15 B3)
The Connect page gets "On the web": a switch "Allow web assistants" per company,
off by default; three lines of progress in plain words (getting an address,
getting a certificate, connected) with a spinner on the one under way; once it
works, the address for the company with Copy; the three steps for Claude on the
web that the plan stands behind (Settings, Connectors, Add custom connector,
paste, sign in and match the code); and, for ChatGPT and any other assistant,
"we haven't tested this yet" rather than steps nobody tried. What goes wrong is
in words and says whether the window and the assistants on this computer are
affected. A new address is asked for twice.

The first time a company is open and the server says no assistant was ever
connected, the Connect page opens by itself, once, remembered per installation.
The owner trait gains web_state, web_turn_on, web_turn_off and web_new_address;
an owner that does not offer them shows no switch. The tabs tests start with the
first run already done, since they are about tabs.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 13:40:00 -07:00
swaitsandClaude Fable 5.2 861ed57d82 feat(host): web assistants per company, joined to the remote door (P15 B3)
WebAssistants is the switch per company: turning one on makes the link's address,
starts the books server's remote door at it (the door listens on 127.0.0.1 and
gives the app its per-start secret), offers the company, and hands the link the
door; turning off withdraws the company and, with none left, closes the line
first and then the door. A new address stops the door, makes a new label, and
restarts the door at the new issuer, so every token made at the old address is
refused. The switches are kept in a private file and put back for the companies
that are open at the next start. Nothing is half-on after a failed step.

The line runs in the window's process (the viewer owner holds it), so it ends
with the window and never outlives the books it offers. THIRD-PARTY-NOTICES.txt
is regenerated with scripts/notices.sh: the app now links instant-acme, the relay
crate's client side and hickory-proto.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 13:40:00 -07:00
swaitsandClaude Fable 5.2 0f9420aa30 test(link): the ACME client against an in-process authority (P15 B3)
The real instant-acme client speaks RFC 8555 to a small authority written in the
test: account, order, DNS-01 proof read from the relay's own DNS, finalize with
the client's CSR, download, an account binding when the relay gave one and none
when it did not, a renewal that names the certificate it replaces, the
authority's renewal window, and a refusal in the authority's own words.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 12:59:46 -07:00
swaitsandClaude Fable 5.2 9898e56950 feat(link): the app's side of the relay: identity, line, TLS at the app, certificates (P15 B3)
The app keeps one durable address https://<secret>.<four-words>.wanderbooks.link:
an Ed25519 key, a four-word name the app picks, and a 32-character base-36 secret
label (about 165 bits), all in private (0600 / owner-only) files in the data
root's link/ folder. One name per installation, as plan section 5 says; each
company is a path under it.

The line (yamux over TLS 1.3, the relay crate's own client) runs in the app's own
process, not in the books server child: a window that dies takes its sockets with
it, so the line can never keep a door open for books that closed. It reconnects
with full-jitter backoff, pings every 30 s (the relay drops a line silent for
180 s), re-dials at once after a wall-clock jump (a sleep), and says in words
what is wrong: no internet, the relay down, a busy relay, a wrong clock, a name
the relay lost.

TLS ends in the app with its own certificate (rustls, ALPN h2 and http/1.1),
served only for the app's exact host name, then the plain stream goes to the
remote door on 127.0.0.1 after the door's per-start secret and the relay's PROXY
header. The private keys are never sent to the relay.

Certificates are ordered by ACME DNS-01 (instant-acme, behind an Issuer trait so
tests use an in-process authority) for the wildcard under the app's name, from
the relay's authority list in its order (a not-usable one is skipped, a failing
one falls to the next), stored, reused across restarts, and renewed at the time
the authority's renewal information suggests, else two thirds through the life.

New dependencies: instant-acme 0.8 (Apache-2.0; ring, hyper-rustls, time and
x509-parser features, no aws-lc-rs), x509-parser 0.18 and webpki-root-certs 1
(already in the tree), time and async-trait for tests.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 12:57:51 -07:00
swaitsandClaude Fable 5.2 91a654101d test(cli): the owner removes every lock the words name, the HEAD lock too
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>
2026-11-21 12:44:36 -07:00
swaitsandClaude Fable 5.2 c30e381678 test(cli): the open/close hammer says what every git command did when a close is slow or refused
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>
2026-11-21 12:44:36 -07:00
swaitsandClaude Fable 5.2 17624bfd40 fix(store): a git's output is taken when git has ended and the pipes hold nothing, not after a fixed wait on a pipe that has no end
run_with waited up to 10 s for each of stdout and stderr to reach end-of-file
after git exited. On Windows a pipe has no end while any process holds a copy
of its write end: std makes the child's end of each pipe inheritable when it
makes the pipe and starts every child with all inheritable handles, so a
process started at the same moment (a `taskkill` that stops another git while
a close's own last backup begins) keeps the pipe open until it ends. Each
command then cost up to 20 s, and the close's last backup passed its 60 s
bound (the open/close hammer on Windows: 106 s).

The reader now takes what git wrote as soon as git has ended and the pipe
holds nothing (PeekNamedPipe on Windows, poll(2) on Unix, the reader seen
blocked in its read for 100 ms), and never loses a byte already in the pipe;
the 10 s wait stays only as the last resort. `taskkill` goes through
lock::spawn, and on Windows spawns are exclusive, so no child takes a copy of
another's pipe ends. WANDERBOOKS_GIT_TIMINGS=<file> appends one line per git
command (ran, spawn, pipes, how each pipe ended) for runs nobody can watch.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 12:44:36 -07:00
swaitsandClaude Fable 5.2 a9fec9ee27 fix(spec): WB-app-5 names a file and a test in words the claims check accepts
run/server.info is made at run time, so it is not a path in the tree;
the test is named by its file and what it shows.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 12:37:20 -07:00
swaitsandClaude Fable 5.2 610e41d1d1 Merge branch 't3/wanderbooks-app-hosted-bridge': nothing on the desktop starts a detached host (P15 A5)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 12:32:59 -07:00
swaitsandClaude Fable 5.2 8a6d731c32 docs(delegation-log): refusals write nothing
check / check (cli) (push) Canceled after 0s
check / check (gui-tests) (push) Canceled after 0s
check / check (gui-unit) (push) Canceled after 0s
check / check (lint) (push) Canceled after 0s
check / check (rest) (push) Canceled after 0s
portable-macos / portable (macos-latest) (push) Canceled after 0s
portable-windows / portable (windows-latest) (push) Canceled after 0s
two-user / two-user (push) Canceled after 0s
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 12:31:55 -07:00
swaitsandClaude Fable 5.2 bf977b1bc7 Merge branch 't3/mcp-refusals-write-nothing': a refused call writes nothing; four tools checked before writing
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 12:30:50 -07:00
swaitsandClaude Fable 5.2 a61df668ef docs: the holder of the books is read from what the server says (WB-app-1, 2, 3, 5)
Plan P15 unit A5, fix round. The claims for WB-app-2, 3 and 5 and the invariants
of opener.rs, app_server.rs, commands.rs, bridge.rs, serving.rs and ledger-mcp
local.rs say: a server says what started it and whether it is closing
(run/server.info), only the app's is "the app", a command's server and a closing
one are waited for in words inside one `open_wait`, a command racing a start joins
it, a command's own server starts clean (and why the app's own child does not),
a bridge that held a host follows the app, `books list` shows the upgrade pending,
and the app's notice for a host that holds the books has a button.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 12:30:26 -07:00
swaitsandClaude Fable 5.2 3f2ab70219 test(cli): a broad guard that a refusal writes nothing
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>
2026-11-21 12:30:26 -07:00
swaitsandClaude Fable 5.2 da0ed04bb3 test(cli): what holds the books is known; the thinned tests say what their names say
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>
2026-11-21 12:30:26 -07:00
swaitsandClaude Fable 5.2 a0fee420cd test(cli): the tax-policy journey counts the call's frame lines
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>
2026-11-21 12:30:25 -07:00
swaitsandClaude Fable 5.2 38612ab553 fix(mcp,store,core): four refusals are decided before the call's first line (P15 T1, D-88)
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>
2026-11-21 12:30:25 -07:00
swaitsandClaude Fable 5.2 bb83bed92a docs(delegation-log): B1 and A5's review
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 12:22:38 -07:00
swaitsandClaude Fable 5.2 2275c34e86 fix(store,host): books list with nothing running says which books wait for a format upgrade
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>
2026-11-21 12:19:58 -07:00