Skip to content

docs: design record for pinning upstream definitions - #53

Merged
blakebauman merged 1 commit into
mainfrom
docs/design-definition-pinning
Aug 13, 2026
Merged

blakebauman merged 1 commit into
mainfrom
docs/design-definition-pinning

Conversation

@blakebauman

Copy link
Copy Markdown
Member

A tool definition is the instruction set a model acts on and the annotations a policy decides with. fold re-reads it from the upstream on every cache refill and compares it to nothing — grep -rn sha256 finds discovery hashing its own document and nothing else.

So the approval that mattered, someone reading a tool list and accepting the federation, is pinned to nothing. A tool can acquire new instructions after acceptance and be served with the same namespace, the same policy grant, and the same audit trail as the one that was approved. This is the ecosystem's most-published attack and the answers on offer elsewhere are scanners.

The shape

Arithmetic rather than judgement: hash name, title, description, schemas, and annotations in the upstream's own terms; keep the baseline in state.Store so a fleet agrees; report a difference. fold never asks whether a description is malicious, only whether it is the same one — which keeps inline content inspection declined rather than smuggled in through a side door.

Three things the record argues that are worth reading:

Annotations are in the digest deliberately. Once policy depth ships destructive gating, a tool flipping destructiveHint has edited its authorization rather than its documentation — an escalation performed by the party being gated. That record already concedes annotations are a hygiene control for federations you operate; this is the control that makes the hygiene checkable.

The baseline is shared state because of the attack, not for tidiness. A per-instance baseline means every pod trusts what it saw first, so a rolling restart re-pins the whole federation to whatever is current — precisely the moment worth choosing if you are the one changing a definition.

Trust-on-first-use cannot vouch for the first definition, and the record says so plainly rather than letting a reader assume otherwise. What it converts is "the tools are what you approved" from an assumption into a checked fact.

Where it stops, on purpose

Detection (warn) has no open questions. Prevention (block) has one that is the operator's rather than the design's: legitimate change and attack are the same bytes, so blocking needs a way to adopt a new definition, and all four candidates are compromised — reload-adopts closes the detection window on routine config pushes, a fold pin CLI invents a write path into running state, config-declared hashes are GitOps-clean but a hand-copying chore, and no-adoption is brittle to the point of uselessness.

The recommendation is to ship detection and leave blocking unbuilt until someone says detection is insufficient. The record names the choice instead of guessing at it.

Docs only. Added to the roadmap as Horizon 2 item 14.

🤖 Generated with Claude Code

A tool definition is the instruction set a model acts on and the annotations a
policy decides with, and fold re-reads it on every cache refill without
comparing it to anything. The approval that mattered — someone reading a tool
list and accepting the federation — is pinned to nothing, so a tool can
acquire new instructions afterwards and be served with the same namespace,
grant, and trail as the one that was approved. Nothing in the tree hashes what
an upstream advertises.

The answer is arithmetic rather than judgement: hash name, description,
schemas, and annotations in the upstream's own terms, keep the baseline in
state.Store so a fleet agrees and a rolling restart does not silently re-pin,
and report a difference. Content inspection stays declined — a hash cannot be
taught to have opinions — and the whole cost lands on the list-refill path
where json.Unmarshal already is.

Annotations are in the digest deliberately: once policy depth ships
destructive gating, a tool flipping destructiveHint has edited its
authorization rather than its documentation, performed by the party being
gated.

The record stops short of a full plan, which is the point of writing it down.
Detection has no open questions. Prevention does: legitimate change and attack
are the same bytes, so blocking needs an adoption path, and every candidate
either invents a write path into running state or hands operators a
hand-copying chore. That is an operator's call, and it is named rather than
guessed.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@blakebauman
blakebauman merged commit abfb737 into main Aug 13, 2026
7 checks passed
@blakebauman
blakebauman deleted the docs/design-definition-pinning branch August 13, 2026 16:11
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