Invental/Review lessons/Trust boundaries the server must hold

Trust boundaries the server must hold

Pin an approval to the exact version shown

An approval is only meaningful if it names an immutable thing: pin the exact version id into the approved action, and put the approval gate in the tool's execution path, not in the model's instructions.

01 · Before and afterThe pattern

TypeScript
// before: approve "the draft", execute whatever the draft is later
approve(() => publish(script.currentDraftId));

// after: the approval carries the id the user saw
const shown = script.currentDraftId;
const ok = await askUser({ versionId: shown, env: manifest.env, hosts: manifest.network });
if (ok) await publish(shown);

02 · Run it on your appThe check

When a user approves an AI agent's action, is the approved payload frozen, or can it change before it runs?

If the honest answer is no or not sure, this is worth a look before it reaches production.

Want this checked on your code?

Tell us what you are building and what worries you. We match a senior reviewer to your code and confirm scope before anything starts.

— Get in touch
hi@invental.co ↗
— Or
— What to include

A link or short description of the code or system, what you want checked, your stack, and when you need the answer. No repository access is needed until scope is agreed.

— Or leave a note
We reply within one business day.