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>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-21 14:57:58 -07:00
1 parent 548901ce7d
commit 7327d04897
6 files changed
+1379 -1

No files matched your search

+1 -1
View File
@@ -8755,7 +8755,7 @@ impl Ledger {
&mut self,
annotation: crate::evidence::Annotation,
) -> Result<(), LedgerError> {
self.annotate_attachment(annotation)
crate::parties::replaying(|| self.annotate_attachment(annotation))
}
/// The entries `entry` records settling (`entry.settles`, plan P6).