Shaurya Singh

← writing

Declared Is Not Consumed

Consumption is never inherited from declaration. A gate that confirms the declaration is honest, correct, and silent on whether the thing is alive.

shipped · gate doctrine

shipped · reachability clause refuted, then green on a later pack; the duplicate-key fix measured 40 lum of the night gap and did not close it — no automated declared-vs-consumed trace exists in this build

Eight rows were defined. Zero rendered. Four runs in a row. And the gate watching those rows reported, correctly, truthfully, with no bug in it anywhere: eight rows defined.

That is the whole problem in one sentence, and it cost four renders to see, because the audit was aimed at wrongness. The failure was inertness.

There is a piece in this corpus about a red gate having at least two diseases — the subject regressed, or the instrument rotted while the subject stayed fine. This is the mirror of it. The instrument is in perfect health, reporting a true fact with a straight face. The subject is dead, and the fact reported is not the fact that would have told anyone.

the default is inert

Consumption is never inherited from declaration. It is a separate fact requiring its own proof. A config key, a row appended to a registry, an asset dropped in a catalogue — none earns the assumption that something downstream arrives at it.

Be exact about what kind of claim that is, because the sloppy version is tempting and I reached for it first. “Most declarations are inert” is a claim about a distribution I have not measured. “A declaration carries no evidence about its own consumption” is a claim about what you may assume before checking, and the answer is nothing. The second is what I mean, and it is stronger: it does not weaken when a surface turns out mostly healthy.

Every ordinary gate I build asserts the declaration. Does the key exist. Does the row parse. Is the field present. Each has a clean answer, a cheap check, and a green light. None touches whether any code path arrives at the thing.

The city-desk piece on this site treats “named consumer” as a bookkeeping field, and its honesty tail already logged the gap this essay closes: it did not know how named consumers translate a passed falsifier battery into rendered behaviour, and called the translation step undocumented. This is one instance of that step, a layer down, in code. Naming a consumer is a promise. Proving the consumer reads you is an experiment: break the reachability on purpose and confirm the gate goes red.

eight rows defined, zero frames rendered

A render pipeline runs packs of frames; one pack, la_packet, carried eight rows someone had defined and cared about. Four consecutive runs — r45 through r48 — rendered zero la_packet frames. Not failed frames. Zero. Nothing attempted.

Meanwhile the static gate covering that pack said eight rows defined, and it was right. They were appended to the pack variable $P roughly 240 lines after $P had already been consumed by its invocation. The consumer took whatever $P held at that moment and moved on. The rows landed in a variable nobody would read again.

Ordering, the most boring bug class there is. What makes it worth an essay is that every signal told the truth. The gate was correct. The file was correct. The rows were correct.

Three of the four runs completed clean. The fourth did not: r48 died unsalvaged, its waiter hung, terminated after three hours — and that belongs in the story because it is the opposite of helpful. A run that dies has an obvious reason to have produced no packet frames, and the obvious reason was the wrong one. A loud fault in the same window as the silent one gave it cover. The real evidence was a negative: output missing across three runs that had no excuse.

The fix has two halves and only the second is doctrine. First half: give the packet its own variable and invocation, ordered first among the pixel packs, so a later append cannot outrun its consumer. That is a repair. Second half:

owner_packet_test  →  + reachability clause
refuted by: append a row after the consumer; the gate must red

The gate stopped asking whether eight rows were defined and started asking whether the rows it can see are ones a consumer will still reach. Someone then appended a row after the consumer on purpose and watched it turn red. It has since been exercised on real work: owner_packet_test exited 0 on a later run carrying the fixed packet, twelve of twelve clauses green with rows-reachable among them, and passed whole on a later pack with thirteen rows rendered.

None of the refute-your-own-instrument doctrine is new here. This site already shipped it under its own title, argued on a similarity scorer: a control you have never watched fail is not a control yet. I am not re-deriving it. What is new is narrower and worse. A scorer that has never been convicted still emits numbers you can argue with. A green consumption gate and an empty consumption gate emit the same artefact — one green line — with no second signal to hold it against. Not that this family gets hit hardest; the one audit I have that counted instrument defects across nine lenses found them roughly even, not concentrated. The claim is structural, not distributional.

Defined is not rendered. That was the line in the log, and it is the short form of the whole claim.

the key that silently won

That was the loud version. Here is the quiet one.

A function called deriveCondition returned a condition object for the renderer. It had two sky: keys — one carrying the real hemisphere-light intensity, 0.55 at noon and 0.05 at night, the other the sky dome spec. In JavaScript the later key silently wins. So applyDerived read intensity: undefined, and the renderer defaulted the hemisphere light to white at 1.0. Day and night, since the line was written.

There was a validator on that path. It checked that the field existed, never the value the consumer read. Presence was the assertion; presence was satisfied; the field was verifiably there — on the object that got thrown away.

Concede the obvious before drawing anything from it. A duplicate key in an object literal is not invisible to ordinary tooling: it is a hard error in TypeScript and a default rule in the standard recommended lint config. It survived because that check was not switched on in this path, not because no such check exists. The sweeping version I was tempted to write is false too — unused locals and dead code are routine compiler diagnostics, and bundlers do declared-versus-consumed analysis every time they tree-shake. The defensible claim is narrower: no ordinary tool asks the consumption question of data rows — entries in a registry, a catalogue, a pack. Those are values, not code. A row nothing reads is not an unreachable branch, and nothing files it as an error.

This surfaced as a number, once a gate existed that could produce one. A pack-only gate, grade_standard_test, measures anchor frames against luminance and emissive-punch envelopes taken from the art standard I set, not the taste of whoever is rendering that day. Noon passed: luminance 91 against a 66–106 band. Night came back at luminance 181 against a 31–60 band, punch 1.2 against a floor of 3.2. A navy sky over a noon-bright street.

That is not a subtle defect and I will not sell it as one. Three to six times over the ceiling, punch at a third of its floor, a frame that contradicts itself. The gate convicted it on its first run, and anyone looking with a number would have. The true statement is about the instrument roster, not the defect: nobody had built the check that could see it, and a wrong night reads as an art decision until something measures it.

The repair was to rename the light-shaped key to hemi so the collision cannot recur, and to make the validator throw on a non-finite intensity instead of nodding at a present field. Here the clean single-cause story has to go, because the record does not support it. The same lighting pass fixed a second, independent bug in the same symptom: the exterior sun-bounce kept 67% of its strength after its sun had dropped to 4%, and was changed to scale with the solar factor. Two causes, one too-bright night, repaired in one breath — so the conviction never isolated the duplicate key. It convicted a frame, which is all a frame-level envelope can do. With the duplicate-key fixes in, the night measured 138.7 luminance against a 178.7 baseline: forty moved, still nowhere near the band. The band was not reached until a later run with a working exposure sweep, where a night-rain frame landed at 50.5 with punch 6.28 — the project’s first night-envelope pass.

One more thing the record forces against my own framing: the fix that prevents recurrence, the rename, sits at the declaration site, while the doctrine I draw points at the consumption site. The rename is the local cure; the doctrine is the general lesson, and it is four words. Assert the value, not the field.

The packet case was a declaration nothing reached. This is a declaration something reached and read as undefined. The same assumption failing twice.

executed but not delivered

There is a third face of this, one abstraction up, and it costs money. An asset can be selected, submitted, drawn, and paid for, and still deliver nothing to the frame. The negative-control law in that lane names it: a green suite is invalid if an invisible 2× cost fails to convict. A suite that cannot convict that is not measuring delivery. It is measuring that the machine got warm.

Claim the inverse rather than pretend the instrument is new. The red-gate essay already used cost-versus-pixels as a detector in this same lane: a forced-LOD parser bug caught because the forced renders came back byte-equal in cost to the base frame — cost that refused to move where pixels should have. This is the same instrument pointed the other way, cost that moves where pixels do not. The standing refusal in that lane gives no mechanism credit to a hidden unconsumed beam. It is in the file. Nothing structural reads it. It is a texture with an ambitious name.

the only honest gate

Two rules come out of it, and the first is not the whole test.

A consumption gate is not honest until someone has broken the reachability and watched it go red. Not “the gate exists.” Not “the gate is green.” Someone has to have made the declaration unreachable — appended the row after the consumer, forced the tier — and confirmed the instrument noticed.

What that proves is exactly one thing: the gate reds on that break shape. It does not extend to others for free, and the duplicate-key case is one it sails straight past. There the consumer does reach the declaration, reads it, and gets undefined. Reachability intact, value gone. A gate refuted only against append-after-consumer stays green through the entire life of that bug, which is what it did.

So the second rule exists because the first is insufficient: assert the value the consumer reads, not the field the declaration site wrote. Two different objects in any system with a transformation between them, and every system has one.

Separate the law from the clause, because they carry different weight. The law is that consumption must be refuted rather than asserted — this corpus’s existing rule, stated for a new subject. The clause is one implementation, written for a pack with exactly one consumer at one nameable invocation point. The law does not depend on the clause generalising, and as far as I know the clause does not.

Neither rule is clever and both are cheap. They are hard only because the ergonomics of writing code push the other way: you type the thing, you see it in the file, and the gate agrees with you.

nine hundred and two

Here is the number that says this is not two anecdotes. A cost-truth audit of the same build named 902 rows unconsumed. Not broken. Not wrong. Declared, valid, parseable, reaching nothing. The same pass recorded 2,601 selector rows as agreeing — and I leave that verb where the record left it, because the record does not say what they agree about.

Two things travel with those numbers, because dropping them would be the cherry-pick this corpus exists to prevent. The audit was 65% closed when the counts were taken, and it names the families it had not reached — kerbVehicle, stateTrooper — so even the 65% comes with a to-do list attached.

I cannot tell you what fraction of that surface the 902 represents. The two counts measure different predicates and nothing joins them into one population; dividing one by the other would manufacture a ratio the build never measured. The size of the surface is UNKNOWN. The 902 is a count, not a rate — and it is the number one manual pass found, not the number that exists.

what I don’t know yet

There is no automated declared-versus-consumed trace in this build; the 902 were named by hand, by people reading code. That makes the number a floor with an unknown ceiling.

The reason there is no trace is not the one I was about to write. I was going to say the blocker is false positives — a static trace cannot see dynamic or reflective reads, would report live rows as dead, somebody would delete one, and the tool would cause the outage it was built to prevent. That risk is real and I have not bounded it. But it is a hypothesis, and I nearly published it while omitting a measurement from another of my own lanes that points the other way. On a display-only guard there, full import-graph reachability was tried first and was wrong in the opposite direction: in a connected graph almost everything is reachable, so the guard fired constantly, and one that fires constantly gets baselined into uselessness. It was replaced with re-export taint run to a fixpoint, which works. So a mechanism exists in my own work, the one real attempt failed by over-reaching rather than under-reaching, and the obstacle I named first was the one I had never measured instead of the one I had. Whether taint-to-a-fixpoint ports to a data-row surface is UNKNOWN.

I do not know whether the reachability clause generalises past the one gate it shipped in. It works there because that pack has exactly one consumer with a nameable invocation point. Several consumers, conditional ones, or consumers in another process do not obviously admit it, and I have not tried.

I do not know how much of the night the duplicate key actually owned. Forty luminance moved when it was fixed and the band was still far away; a second bug was repaired in the same pass; a later exposure sweep did the rest. A frame-level envelope convicts frames, not lines. Anyone reading that receipt as a clean demonstration that value-checks beat presence-checks — including me, in the first version of this — reads more isolation into it than it contains.

I do not know how many more duplicate-key-class bugs are live. That one was found because a gate produced a number that disagreed with an envelope, and most of my validators are still presence checks — every one able to host the identical bug and report green while it does. I have not audited them, so the count is UNKNOWN, which is the only number I am entitled to write.

— Unreach It and Watch It Red

← back to writing