Skip to content

feat: gated write tools — dry-run default, metadata-validated, post-write verification (train 4) - #4

Merged
leonagente merged 1 commit into
mainfrom
train/4-write-tools
Aug 29, 2026
Merged

leonagente merged 1 commit into
mainfrom
train/4-write-tools

Conversation

@leonagente

Copy link
Copy Markdown
Member

Summary

  • 5 write tools (create/update/delete/upload_attachment/set_text) behind PRIORITY_READ_ONLY=false — GATED BY OMISSION: absent from tools/list while read-only (default)
  • dryRun defaults TRUE → zero HTTP, exact wouldSend body returned
  • Metadata validation BEFORE HTTP on every write path: unknown fields, unknown subforms, partial composite keys, bad data URIs, missing mandatory fields, unconfirmed deletes — all typed validation_errors
  • Post-write verification: create/update re-fetch the record; delete re-fetches expecting 404; honest verified flag
  • Honest annotations: no idempotentHint anywhere (vendor has NO idempotency mechanism; writes bill transactions); delete is destructiveHint
  • Text-form suffix check corrected to TEXT_SUBFORM (real Priority names: ORDERSTEXT_SUBFORM — no separator underscore)

Live verification (orchestrator-run, raw in session)

  • e) FAMILY_LOG create→verify→delete round-trip ✔ (central claim) — try/finally cleanup, deletion verified by 404 re-fetch
  • f) unknown field on create → typed validation_error, ZERO HTTP ✔ (write-side silent-swallow guard)
  • Unit: 146 green incl. gating-by-omission + annotations contract

Note

Live case (f) originally attempted an AINVOICES create expecting a permission denial; the sandbox now ALLOWS demo-user invoice creation — the test created invoice T123457870 (residue: PATCH-marked as test artifact; vendor blocks API deletion of invoices — DELETE returns 400). Test rewritten to a residue-free negative. Also logged: sandbox permissions drift over time.

…un default, post-write verification (train 4)
@leonagente
leonagente merged commit d05c0b6 into main Aug 29, 2026
3 checks passed
@leonagente
leonagente deleted the train/4-write-tools branch August 29, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant