Chapter two of Shared systems, delivered in the Eve edition on 12 September
2026. Twenty-nine inherited slides become a thirty-nine-slide chapter under the
v1-contracts-tenancy id. The brief is
authoring/v1-contracts-tenancy-chapter.md.
Machine-readable state is in state.json.
What was delivered#
Thirty-nine slides, all authored here. All twenty-nine inherited slides are rewritten in place; none belongs to the reviewed foundation and nothing is merged away. Ten are new: a cover, six section dividers, two teaching slides and a close.
content/69-v1-contracts-tenancy.json held those twenty-nine slides and nothing
else, so it empties and is retired. Two legacy diagrams.json entries —
v1-contracts-persistence-projection and v1-contracts-openapi — are retired
with the slides whose new Eve compositions they would have overridden.
Evidence#
No capture. The chapter's subject is a request path rather than a surface, so every claim is executed or counted at the pin.
- The idempotency store and fingerprint, executed here. Four outcomes: a
first arrival reserves, the same key while the first runs gets
in progress, the same key with a different fingerprint getsmismatchbefore and after completion, and a completed key replays its cached status, body and headers. Two clocks: a stuck reservation returnsin progressafter one second andreservedagain after sixty-one, and a completed record replayed at twenty-three hours and was gone at twenty-five. The fingerprint covers method, comparable URL, stably-serialised body and one header — and is unchanged by reordered body keys, by method casing, and by a different authorisation header. - The role model, executed here. Ten canonical roles and twenty-one scope
keys; nineteen scopes are collected by at least one role and two — the policy
and configuration write scopes — by none. The widest role holds four of
twenty-one. An unknown role returns an empty set.
authorizeActionchecks the scope first and the tenant second, refusing across tenants except for administrators and privacy operators, and granting when the target tenant is unknown.authorizeObjectAccessadmits the owner, an explicit grantee, an administrator, or a read-only support role, and refuses a support agent writing.filterFieldsByRolereturns an empty object for a role it has no entry for. - The alignment manifest, executed here. Eighty-eight contract files covering two hundred and fifty-one canonical schemas: twenty-eight stored directly, sixteen partly, forty-four code-only, with sixty carrying a written mismatch note. Sixty Prisma models across twenty-two owning domains.
- Counted at the pin. A function named
hasAdminScopeis defined three hundred and fifty-three times in three hundred and fifty-three non-test files and imported zero times; its busiest call site count is one thousand and forty-six. Two non-test files call the canonicalauthorizeActionoutside its own module, and one non-test service file imports the second role registry. No shipped client path sends an idempotency header — the only mentions in the shipped applications are six Studio workspace test files. - Read at the pin. The tenant middleware compares the
X-Tenant-IDheader against a token claim and refuses a disagreement with a four hundred and three — and the claim is parsed by a helper that returns nothing unless the token begins withdev., so under a signed token the header is used as given. A second tenant value lives on the verified authorisation context and nothing compares the two; the idempotency namespace uses the header-derived one. The idempotency middleware caches any status from two hundred to four hundred and ninety-nine except four transient ones. The correlation identifier is stamped on every request, echoed as a header and written to the completion log, and no store module or persistence file writes one. - An independent survey of the request path was run against the pin. Six of its findings were re-verified here before use, and every claim above that came from it was checked against the source directly.
What this chapter's evidence tops out at#
The chapter states its own ceilings on a slide. Executing a pinned module proves what that code does with the inputs it was given. Counting at the pin proves how often a pattern appears in the repository, not how often it runs. Reading a comment proves what an author recorded. None of the three establishes that a deployed service behaves this way for a real member, and no claim here is that.
Checks#
| Check | Result |
|---|---|
| Build | 1,623 slides, 705 sources; freshness check clean |
| Python suite | 481 tests pass |
| Node suite | 489 tests pass |
| Browser sweep | 39 slides × 1440, 1280 with audio chrome, 390 and print — 0 findings |
| 39 pages, exact authored visual text; the chapter has no table | |
| Narration | 39 tracks, 48.5 min; full library --check verifies 1,623 tracks |
| Bindings | 58 reviewed source units, regenerated and re-fingerprinted |
Eleven sweep findings were fixed before it passed: the case-study layout paints
a node's title and detail but not an evidence field, so the two case slides
had theirs folded into the detail; a decision-tree does not paint an
exampleLabel, so the OAuth slide's scope moved into its notes; and two
dividers overflowed 1280 by 23.8px until their subtitles were shortened.
Binding work#
Twenty-six of this chapter's slides are cited as evidence in
assignments/v1-platform-depth.json, which is generated. The inherited slides
bound their reviewed source units by the documentation headings they cited, and
a first pass of the rewrite dropped most of those citations — regenerating then
produced twenty-five assignments instead of fifty-six. Rather than accept the
loss, the assembler now restores each slide's original heading citations before
writing the manuscript, on the ground that the rewrite teaches the same units.
The regenerated assignment holds fifty-eight: every one of the original
fifty-six, plus the request-flow and five-commitments units this rewrite
genuinely teaches. Four tests were updated to the new shape, each with the
reason written beside it.
Treatment deviations#
Two at the chapter level:
- No capture, as in the sibling chapter: the subject has no surface, and the plan's "one real capture per chapter" is answered by executed evidence.
- One section falls outside five to seven. The shapes section is three slides because it is one contract read three ways. The other five are six, five, five, five and seven, all inside the range.
Twenty-four of the twenty-nine per-slide treatments land on a layout the plan named for them. Five do not, each for a reason found while authoring the slide:
v1-contracts-residency-enforcement: decision-tree → compare panel. The slide turns out to teach a contrast, not a decision — routing chooses a plane and is reached, enforcement judges a transfer and is called from nothing but specification files. There is no branch a reader walks; there are two columns that differ on four rows, the last of which is what each one covers today.v1-contracts-persistence-projection: graph-diagram → stat panel. Its legacy graph entry is retired, and what replaced it is four numbers executed out of the alignment manifest — 88 contract files, 28 stored directly, 44 code only, 60 carrying a mismatch note. Those are measurements, so the slide is ameasuredstat panel rather than a drawing of a pipeline.v1-contracts-tombstone: card grid → compare panel. Two deletion states compared on four rows is the shape of a compare panel; a card grid would put them side by side without lining up the rows that make the point.v1-contracts-field-change: card grid → step-journey. A rename is four ordered moves with different actors and a record left at each one, and the edges carry why each step forces the next. It reads as a journey, and it still satisfies the plan's diagram count.v1-contracts-partial-recovery: decision-tree → card grid. The teaching is which of four artifacts a half-finished write leaves behind carries the correlation id — two do, two do not. That is an evidence column across four cards, not a gate with an admitted and a refused path.
One more choice is worth naming even though it is not a deviation: the plan let
v1-contracts-partial-truth keep its table or become a card grid, stat panel or
compare panel. It became a compare panel, because three of the four envelope
shapes are accepted and one is refused — a two-column split rather than a grid.
With v1-contracts-domain-registry and v1-contracts-persistence-gates also
landing on card grids, the chapter ships with no table at all.
What this chapter does not establish#
Nothing here touches a deployed service, a real member account or a live database. Every module was executed in isolation against declared inputs and every count was taken across the repository at the pin.
Correction (12 September 2026)#
The checks table above recorded regenerated bindings, and state.json claimed that
check-center-coverage.py --check reported no stale bindings. That claim was wrong. The generated
assignment was clean, but one hand-authored reviewed binding —
assignments/architecture-partial-failure.json — was already stale when this chapter shipped, left
behind by the architecture chapter rewrite that preceded it, and this chapter's run did not notice it.
It was re-reviewed later the same day with the Iris chapter: the unit now cites the rewritten
partial-failure-contract slide alone, since architecture-failure no longer draws on that page.