Make an operation's cost envelope readable before it is trusted, as four named facts: the collections it touches, the indexes it uses, the maximum number of rows it can return, and which fields leave the database in its result. The envelope is derived from the declaration, not written by hand alongside it, so it cannot disagree with the operation it describes.
This is the decision surface for everything else in the external-operations group: installing an operation is a consent, and consent to an unreadable thing is not consent. It belongs to 1.0.0 rather than after it because the envelope is a public shape — SAPE-11 lists it and SAPE-12 documents it, and changing the four facts after strangers have read them is a compatibility break on a surface that was published.
Measured 2026-09-20. One of the four facts already exists inside the engine:internal/store/compose.go:99hasfunc (s *Store) ceiling(operation Operation, within *costs) (int, error), and the comment above it atcompose.go:43-50proves by induction over depth that a composed operation's ceiling is the limit it declares, with a test named in the text. Butceilingis lowercase — it is not reachable from outsideinternal/store, and nothing surfaces it. The other three facts — collections, indexes, escaping fields — have no equivalent anywhere:Catalogueatinternal/store/explore.go:195is two slices,Collections []SpecandOperations []Operation, and neither carries a derived cost.
pipelines/tasks/0071 measured this same gap from the external-operations side and reaches
the identical conclusion: for KindDeclaration external operations (the recommended v1
shape — a signed bundle of declarations, no third-party code), three of the four facts are already
enforced at declaration time, by code that exists — Operation.Collection
is mandatory and checked by validateOperation; Operation.Index/From/To narrow
a scan and nothing else can smuggle one in; and the row ceiling is exactly the ceiling()
this ticket is about, already coerced at declaration time by N5
(internal/store/ops.go:788-798). The fourth fact, escaping fields, has no equivalent today
for any operation, declared or external — 0071 calls this "a real gap, and it has been there
since before external operations." Exporting Ceiling(name string, version int) (int, error)
and folding it into WhatIsHere is 0071's proposed shape for criterion 1 below, and it is a
re-export of a function that already exists and is already tested — not new arithmetic.
compose.go already proves,
checked at depth greater than one. An operation whose steps call other operations reports the sum, not
the top-level limit.Explore. Those are typed by an operator who already
proved the server's secret.