« Phase 17 · Warmup · Lab 01
The Hitchhiker's Guide to the Composed Platform
Fast orientation. Read this in fifteen minutes, then go build the lab.
Table of Contents
- The one-sentence version
- The map
- The eleven steps, in a table
- Three assertions you can only make here
- The vocabulary
- What each layer denies
- Four outcomes, not two
- The seam checklist
- Reading the demo output
- If you only remember five things
The one-sentence version
Sixteen phases built sixteen mechanisms that each pass their own tests; this phase composes them into one request path and then attacks the composition, because the failures that matter live between components that are individually correct.
The map
┌──────────────────────────────────┐
Teams / API ────────► │ 1 CHANNEL session │
└───────────────┬──────────────────┘
┌───────────────▼──────────────────┐
│ 2 CONTROL PLANE admission │ ← default deny
└───────────────┬──────────────────┘
┌───────────────▼──────────────────┐
│ 3 KNOWLEDGE barrier → clearance
└───────────────┬──────────────────┘
┌───────────────▼──────────────────┐
│ 4 GUARDRAILS ① retrieved text │ ← taint marked here
└───────────────┬──────────────────┘
┌───────────────▼──────────────────┐
│ 5 MODEL class → residency → budget
└───────────────┬──────────────────┘
┌───────────────▼──────────────────┐
│ 6 DELEGATION chain APPENDS │
└───────────────┬──────────────────┘
┌───────────────▼──────────────────┐
│ 7 GUARDRAILS ② the taint rule │
└───────────────┬──────────────────┘
┌───────────────▼──────────────────┐
│ 8 ACTION GATEWAY contract → │
│ key → dual control → execute │
└───────────────┬──────────────────┘
9 outcome · 10 evidence · 11 telemetry
The guardrail chain appears twice. If your architecture diagram has one guardrail box, you have drawn the components and not the flow.
The eleven steps, in a table
| # | Step | Denies when | Emits |
|---|---|---|---|
| 1 | channel | — | session |
| 2 | control plane | unregistered · suspended · stale evaluation · bundle past the hard stop | policy_decision (even on denial) |
| 3 | knowledge | barrier · desk scope · clearance | retrieval |
| 4 | guardrails ① | injection score ≥ 0.85 (non-blocking) | guardrail |
| 5 | model | no route satisfies classification + residency + budget | inference |
| 6 | delegation | a cycle in the chain | delegation |
| 7 | guardrails ② | side-effecting + tainted + unapproved | guardrail |
| 8 | action gateway | unknown tool · no idempotency key · < 2 approvers · read-only mode · circuit open | approval, action |
| 9 | outcome | — | — |
| 10 | evidence | an artifact is missing (and it is named) | — |
| 11 | telemetry | — | the hash-chain head |
Three assertions you can only make here
1. Defence depth is a number. How many distinct layers denied this request? ≥ 2 required for anything irreversible. A depth of 1 is a finding that requires an explanation, not an automatic failure.
2. A control is never on the degradation ladder. Quality may degrade; safety may not. Checked at platform construction so a bad rung fails at start-up, not mid-incident.
3. The output of a run is an evidence pack. Generated along the path, not assembled at the end. Complete, or it names the missing artifact.
None of the three is a property of any single component, which is why none of the sixteen previous labs could assert them.
The vocabulary
| Term | Means |
|---|---|
| seam | a place where two correct components meet and the property lives in neither |
| defence depth | the count of distinct layers that acted against a request |
| acting vs halting | a control can remove a document without stopping the request |
| blocking denial | a denial that halts; the subset that determines the outcome |
| taint | a marker that content came from retrieval, and propagates to anything derived from it |
| fail static | on control-plane loss: last known-good bundle + alarm + hard stop |
| the ladder | the ordered list of capabilities shed under load |
| rung | one entry on it, flagged is_control |
| the join key | the trace id, on every artifact, stamped in one place |
| the six pins | base model, prompt, policy, tool set, guardrails, retrieval snapshot |
| declared degradation | what you predicted before injecting the failure |
What each layer denies
The most useful thing to be able to recite, because "what does it deny?" is the question that separates a platform diagram from a box diagram.
| Layer | Denies |
|---|---|
| control plane | an agent that is not registered, not active, or whose evaluation is stale |
| knowledge | a document behind a barrier the viewer does not hold, outside their desk, or above their clearance |
| guardrails ① | a retrieved document that scores at or above the injection threshold |
| model | a route that breaches classification, residency or budget — including the fallback |
| identity | a delegation that would create a cycle |
| guardrails ② | a side-effecting action derived from tainted content without human approval |
| action gateway | an unregistered tool, a missing idempotency key, fewer than two distinct approvers |
| integration | nothing — it defers; an open circuit degrades rather than denies |
Four outcomes, not two
| Outcome | Means | Operator action |
|---|---|---|
COMPLETED | it worked | none |
DEGRADED | it answered at a lower rung, or a dependency deferred the action | check the dependency |
ESCALATED | a human must decide (dual control, taint rule) | route it to that human |
DENIED | policy refused | check the policy, not the platform |
Collapsing DEGRADED and DENIED into "error" is the most common instrumentation mistake in this
design, and it costs you both a correct availability SLI and a correct on-call signal.
The seam checklist
Run this against any distributed design, not just this one:
- What travels the whole way? (identity, tenant, classification, trace id, region, freshness)
- Where could each of them stop?
- Is anything built before the value it depends on is resolved? (cache keys and tenants)
- Does the fallback path pass through the same gates as the primary?
- Is the join key stamped in one place, or by each emitter?
- Can a control become a degradation rung without anything noticing?
- Is any step retried by a layer that does not know whether it is idempotent?
- Does a denial leave a record?
Reading the demo output
python solution.py prints twelve sections. What to look at:
- The happy path —
COMPLETED, depth 0, evidence complete. Depth 0 on a legitimate request is the point: controls that fire on everything are not controls, they are outages. - Defence depth — six attacks and one control case. Look at A-01:
depth=2, layersguardrails+action_gateway. That second layer only appears because the gateway's checks run after an earlier block. Then look at A-07, the legitimate request: depth 0, permitted. - Chaos — seven cases, each showing declared vs actual. Four of the seven still produce a usable answer.
- The ladder — five rungs,
is_control=Falseon every one, and the refusal when a control is added. - Idempotency — two calls, one execution, same reference.
- The budget — headroom, not just pass/fail.
If you only remember five things
- The interesting failures live in the seams. Component tests cannot see them; something has to own the composition.
- Defence depth is a number, and ≥ 2 for irreversible. Measure it or stop saying "layered".
- A control is never on the degradation ladder. Shed traffic, not controls.
- Fail static — last known-good, alarm, hard stop.
- The run's output is an evidence pack, generated along the way, and it names what is missing.