A table is not a control
DROP TABLE users was being allowed.Two weeks ago we published a post about a test with a blind spot: reachability.conformance.test.ts asserts that each enforcement control is referenced from shipped code, and its coverage is a hand-typed list, so it can only find the instances someone remembered. We said the next unwired module would be found the way that one was — by someone asking what the list is missing.
This time we asked a slightly different question, and it was a better one. Not is this control called? but can any real input actually trip it?
That question has a different blast radius, because a control can be perfectly wired, perfectly tested, and still be unreachable — not because nothing calls it, but because nothing can ever satisfy its condition.
The demonstration
A write-category tool. An operator policy that allows it. Input:
{ "sql": "DROP TABLE users" }
Verdict: allow. Reason string: medium-risk allowed by policy.
No approval. No human. The risk matrix lists category 6, Action reversibility, as a floor. The floor did not fire, and nothing else in the decision point checks reversibility at all.
Same for TRUNCATE audit_log. Same for unlink. The reason rm -rf was always caught is that it sits separately on the catastrophic-command denylist — not because the reversibility floor was doing anything.
One below the line
The first cause is arithmetic, and it is the kind of thing that reads as correct in review.
The risk engine assigns the request's tier cap to a primary category, then adds secondary category detail — network, financial, reversibility, exfiltration — each written as Math.min(cap, 7). The comment above it says the detail is "capped so it stays in-band," which is a real and sensible goal: category detail should not inflate the composite score past the band its tier belongs to.
The floor trigger is 8.
So every secondary category was pinned at most one point below the threshold that matters. By construction, no secondary category could ever trip a floor. Only the primary escaped, because the primary got the uncapped value.
Two floors were affected. Category 6, reversibility. And category 12, data egress — which is not only a floor but a hard-deny. A hard-deny that nothing could trigger.
The cap and the trigger are correct in isolation. Keeping detail in-band is right. A floor at 8 is right. They were written months apart and the interaction between them is the defect — which is why neither looked wrong to anyone reading either one.
The deeper cause: we had two of them
Fixing the cap did not fix the demonstration. DROP TABLE was still allowed.
Because the real problem was in the decision point, and it was worse. Simplified, combine() ran in this order:
injection → deny
policy says deny → deny
tier is critical → ask (floor)
policy says ask → ask
tier is low → allow
policy says allow → allow ← returns here
...then, finally, the floor checks
An explicit allow policy returned before any floor was consulted. Writing one allow-rule for a tool disabled every category floor and every hard-deny for that tool, at any tier below critical. Not weakened — skipped.
And here is the part that is genuinely uncomfortable. The scorer already contained a function that gets this right:
/** Fold the assessment + operator policy + Risk Tolerance into a verdict.
* Order is load-bearing: injection and floors are resolved BEFORE the
* tolerance ceiling, so no value of `tolerance` can ever auto-run a
* floor or a critical action. Fails CLOSED. */
export function verdictFor(...)
That docstring is an accurate description of the invariant we wanted. The function has no shipped caller. Only the module barrel re-exports it.
So there were two implementations of one policy. The one nobody called was correct. The one in production had the hole. In a codebase whose stated rule is one scorer, one reducer, this was a second reducer — and it survived because the first one was never invoked and therefore never got the chance to disagree out loud.
What happened when we tried to just use the good one
The obvious fix is to delete the duplicate and call verdictFor. We tried copying its ordering faithfully, including hardDeny → deny.
Three existing tests failed immediately. All three asserted the same thing: that a destructive-but-legitimate command like rm -rf ./build escalates to a human rather than being refused outright.
The reason is the interaction again. The risk engine gives the tier cap to the primary category, and for an exec tool the primary category is 8 — which is a hard-deny category. So every critical-tier exec trips hardDeny as a matter of course. Denying on it would make every destructive shell command unapprovable, which contradicts a deliberate design position: some destructive actions are legitimate and a human should get to say yes.
Two modules that each looked correct, written to the same spec, that had never been run against each other. The incompatibility only became visible at the moment we tried to make one call the other.
So we did not collapse them. Floors now resolve above policy-allow — which fixes the hole — and a floor forces an ask, including for hard-deny categories, which preserves the existing design. The honest consequence, which is now a comment in the source rather than a thing we know and haven't written down: on the decision path, the hard-deny list does not deny. It asks. The outright refusals that do exist come from purpose-built checks elsewhere — the catastrophic denylist, secret paths, the network guard, boundary containment, scope deviation.
Reconciling the two properly is a scoring change with a wide blast radius. It is not in this fix. What is in this fix is a parity test that pins them together: when an assessment carries a floor, the decision point must not allow. The duplication is the defect; the test is the guard until the duplication goes.
Why we didn't just remove the cap
The one-line fix is to stop capping floor categories. We didn't, and the reason is a trade worth stating.
The regex that sets category 6 includes the bare word delete. Uncapping would force an approval on any request whose input mentions deleting something — including a note that says "delete this paragraph later." Our own hardening backlog already lists approval fatigue as an open item: a reflexive click on a crowded queue approves an irreversible action.
Trading a silent allow for a reflexive click is not a fix. It moves the failure somewhere harder to see.
So the signal is split by strength. drop table, truncate, unlink, rm -rf, shred, mkfs, dd if= — no benign reading in a tool argument — reach the floor trigger. delete, overwrite, bare rm stay in-band as composite signal only. A test pins the split in both directions, so neither a future tidy-up that widens it nor one that narrows it passes quietly.
Category 12 we deliberately did not fix the same way, and disclosed instead. Its producing pattern includes POST and attachment, and a hard-deny is unappealable — a false positive there is catastrophic rather than annoying. A real exfiltration producer needs taint tracking: classified data actually crossing an egress boundary, not a keyword match. That is written down as a gap with a named prerequisite, which is the most we can honestly claim today.
A constant that passed its own test
Third finding, smaller, and the most familiar shape.
The deletion assessor returned reversible: true. Not computed — the literal.
It was accurate. The only effect path in governed deletion is a move to trash, so a permitted delete genuinely is recoverable. And it is still the same defect as the hardcoded disclosure flag we wrote about in v0.27.0: a field that cannot be false carries no information. It reported "reversible" for hard-denied paths that have no effect to reverse, and it would have gone on reporting it the day somebody added a permanent-delete branch, with nothing to notice.
There was a test asserting it. The test passed. It only ever checked a case where true was the right answer — which is how a constant survives a suite for eight months. It is derived now, and the falsifying cases are in the suite alongside a test that the field takes both values at all.
One finding we withdrew
Worth including, because a post that only lists confirmed hits is selling something.
An early version of the floor suite reported that writing to /etc/passwd was allowed. That looked alarming for about a minute. The probe had granted write: ['/'] as the boundary — the whole filesystem — so /etc/passwd was inside the operator's own grant and containment was right to pass it. Bad probe, not a defect.
"The test found something" and "the system is broken" are different claims, and a suite about floors is exactly where conflating them would be expensive. The corrected probe is in the file with a comment explaining the mistake.
The artifact worth keeping
The fixes matter less than the suite we had to build to find them. It drives the whole decision point with real tool calls and asks, per floor: does some input actually trip this? Every answer is a demonstration rather than a flag.
And it records, per row, which mechanism really decides — because the answer surprised us:
#1 file/storage → boundary containment, not the floor
#6 reversibility → the category floor (the only one)
#8 execution → the catastrophic denylist
#11 credentials → the secret-path check
#29 self-modification → tier escalation by filename
#10 oversight → nothing. no producer anywhere.
#12 egress → partial; internal hosts only
Of seven declared floors, exactly one is carried by the floor mechanism the matrix advertises. The others are enforced — where they are enforced — by purpose-built checks that never consult a category score, and two are gaps.
That is not a disaster: the protections mostly exist, and the purpose-built checks are good. But the matrix's floor column reads like one uniform control and is, in production, four different ones plus two holes. Nothing in the codebase said so until now, and a count that cannot drift is pinned by a test, so the day someone wires a real producer for category 10 the claim above has to be rewritten rather than left to rot.
Categories 5, 10, 26, 29 and 35 have no producer anywhere. They are rows in a table and documentation of intent. Saying that plainly costs us something in a governance product, and the alternative costs more.
What this one generalises to
The v0.27.0 lesson was: green tests are not evidence of an enforced control. The follow-up was: a reachability test is only evidence for the controls it was told about.
This adds a third clause, and it is the sharpest of them. A control can be wired, tested, and still unreachable — because reachability of the code is not reachability of the condition.
Every floor here was referenced from shipped source. The reachability suite was satisfied. The scorer's own tests fed it a category at 10 and watched the floor fire correctly, so the scorer was satisfied too. Both were right. Neither could see that no input in the real world could put a 10 in that slot.
The test that finds this class is the one that drives the whole system from the outside with an input a user could actually send, and asks whether the thing you claim happens, happens. We had a lot of tests. We did not have that one for floors, and the floors are the strongest claim the risk model makes.
Three fixes, two disclosures, one withdrawn finding. The withdrawn one is in the suite as a comment, the disclosures are in inventories that fail when they go stale, and the serious fix had a test that failed first.