test(cli,store): through the server a refusal writes nothing, a bank file is masked, a chart file refused; the store's own texts meet the check

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>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-21 15:38:14 -07:00
1 parent d2384dfe7c
commit 657daf43da
7 files changed
+298 -4

No files matched your search

+1
View File
@@ -99,6 +99,7 @@ that would fail if it broke:
| A file with full TINs is never written to a path (handed over instead, D-29), and never filed into the books: every file the server read or wrote with TINs (from any session, after a restart, out of a CPA package), by every filing tool | `mcp_journeys.rs` `tin_bearing_files_are_refused_when_given_back_to_be_filed`; `spec_vault.rs` `a_package_is_handed_over_and_never_written`; `tin_files.rs` (tests) `a_tin_bearing_file_is_refused_from_every_session_and_after_a_restart`; unit test `a_recorded_tin_file_is_refused_by_every_reader_of_the_registry` |
| Text filed into the books is refused when it holds a TIN the vault keeps (nine digits, 3-2-4 by hyphen, space or dot, 2-7 by hyphen or space, anywhere) or a stand-alone printed SSN or EIN (123-45-6789, 12-3456789), and only then: a bank export (routing numbers, long references, a date next to an amount) and a longer number holding an SSN shape go in; a locked vault leaves the printed shapes (BS-partner-2) | `tin_files.rs` (tests) `text_with_a_vault_tin_or_a_printed_one_is_refused_and_a_bank_export_is_not`; unit tests `text_holding_a_vault_tin_is_refused_in_every_rendering`, `a_printed_ssn_or_ein_is_refused`, `a_longer_number_holding_a_tin_shape_passes`, `an_ordinary_bank_export_passes`, `binary_bytes_are_not_scanned` |
| Filing is no TIN oracle: text with more than two TIN-shaped numbers ending in a known TIN's last four (the books' TIN and W-9 facts, then the vault's own) is refused before the vault is opened, byte for byte alike whether one is the vault's TIN or none is, the vault open or locked, by every filing tool; one or two such numbers are compared against the vault, one number written many ways counts once, and other last fours never count (BS-partner-2) | `tin_files.rs` (tests) `text_probing_for_a_tin_is_refused_alike_by_every_filing_tool`; unit tests `text_probing_for_a_tin_is_refused_alike_whether_or_not_it_holds_it` (the vault never opened for a probe), `one_or_two_candidates_are_compared_against_the_vault` |
| Free text (a memo, note, reason, description, reference, a class, project or period name, a receipt's words) is refused when it looks like a tax id (nine digits alone, 3-2-4, 2-7, any dash, dot or space, in any Unicode form) and an invoice number, a phone number, a reference of ten digits or more, an amount and a date pass; a party's own fields stay strict; the refusal names the field, says where a tax id goes and never repeats it; every string of every write tool is classed in one table and a new one fails the build; a bank file is kept with the number masked to its last four and the answer says how many and where; a chart file is refused naming row and column; a journal line an earlier version took replays and the audit names it (WB-partner-15) | `tests/free_text_tin.rs` (ledger-core: every grouping, every separator, the allow-list, each command, replay); `text_fields.rs` unit tests `every_string_a_write_tool_takes_is_in_the_table`, `the_table_names_only_strings_the_tools_take`; `server_tests.rs` `a_call_with_a_tax_id_in_free_text_is_refused_unrun_and_writes_nothing`; `bank_csv.rs` and `chart_csv.rs` unit tests; `ledger-store` `tests/audit.rs` `the_store_refuses_text_that_looks_like_a_tax_id_and_journals_nothing`, `integrity_detects_each_seeded_defect`; `ledger-cli` `tests/tin_in_text.rs` |
| The connect text fits its budgets, its lead stands alone, it states the receipt rule enforced (exact threshold in the base currency, required and exempt accounts, reversals) and the parties rule in force, and the company name can't break it (control and format characters) | `handbook.rs` `instructions_budget`, `a_typical_company_gets_the_whole_connect_text`, `the_company_name_is_one_plain_line`; `receipt_policy.rs` `the_rule_told_is_the_rule_enforced`, `a_long_or_odd_account_list_stays_short_and_plain`; a new session is told the settings in force: `a_new_session_is_told_the_settings_in_force` |
| No text the agent is given (whole tool JSON, resources, connect text, handbook, every error template and refusal) points at files, git, GitHub, repo docs, flags or helper commands; descriptions fit 700 characters (listed exceptions, P5; and what git itself said of a failed backup, which `books.backup` passes on to the human as git said it, its paths hidden) | `tool_text_lint`, `tool_descriptions_fit_700_characters`; `ledger-core` `an_unknown_year_threshold_is_never_guessed` |
| Every tool is annotated (openWorldHint false on all but `books.back_up_now`), and the read-only hint is true in behaviour (journal, every file of the books' folder but what every call writes by design: the access log, `ops/` (the viewer's side channel for `books.show`, which is not the books), the books' own backup and the files handed over; the database's rows and the vault unchanged) | `annotations_complete`; `spec_mcp.rs` `read_only_tools_change_nothing` (checked on every call in `Mcp::tool`) |