THE FOLD / CHEAT / GOD MODE / THE FAKE CONTEXT
THE FAKE CONTEXT
the states reality will not hand you on demand
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
David’s pack reports 42/42 selftest checks against a fake PluginContext. The fake is not a shortcut — it is the only way some of those checks can exist at all. A real context walks a state machine driven by outside events, and the states you most need to test are exactly the ones the real world hands you least often: the rare branch, the odd ordering, the failure that shows up once a month. A fake can simply be set to that state. The cost, which has to be said out loud, is that a fake will also hold states the real machine can never occupy, and a test passing in an impossible state has proved nothing.
LIT verified live: driving the real context with realistic event odds for 200,000 steps visits 18 of the 20 live states, with 6 hard or impossible to reach on demand — 2 never appeared at all and 4 only rarely, the rarest turning up 4 times, roughly once in 50,000 steps; a fake can be set to any of the 24 states, so covering all of them costs O(states) instead of waiting O(1/p); and 6 of the 24 are unreachable in the real machine at all.
LIT verified live: driving the real context with realistic event odds for 200,000 steps visits 18 of the 20 live states, with 6 hard or impossible to reach on demand — 2 never appeared at all and 4 only rarely, the rarest turning up 4 times, roughly once in 50,000 steps; a fake can be set to any of the 24 states, so covering all of them costs O(states) instead of waiting O(1/p); and 6 of the 24 are unreachable in the real machine at all.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) tests the pack against a fake and says so in the README rather than burying it, which is the right way round — the number 42/42 means something quite different depending on what it was measured against, and hiding the substrate would make the figure decorative. Seated at GOD MODE: the ability to be in any state you like, without earning it.
AVAN (AI) built the counterweight into the same page as the benefit, because a sphere that only argued for fakes would be advocacy rather than measurement. The machine here has 4 states with no incoming edges by construction, so they are unreachable in reality and freely settable in the fake — and the page reports that alongside the win. That is the honest shape of a test double: it converts a waiting problem into a modelling problem. You stop paying for rare events and start paying for the risk that your model of the state space is wrong, and the second cost is quieter, which is precisely what makes it worth naming.
AVAN (AI) built the counterweight into the same page as the benefit, because a sphere that only argued for fakes would be advocacy rather than measurement. The machine here has 4 states with no incoming edges by construction, so they are unreachable in reality and freely settable in the fake — and the page reports that alongside the win. That is the honest shape of a test double: it converts a waiting problem into a modelling problem. You stop paying for rare events and start paying for the risk that your model of the state space is wrong, and the second cost is quieter, which is precisely what makes it worth naming.
3 ONE DIMENSION
Visit counts across 200,000 real steps. Some states are simply never handed to you.
4 TWO DIMENSIONS · INTERACTIVE
Wait for the real machine, or just set the fake and move on.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: the reachable machine, with the impossible states floating clear of it.
AVAN’s addition (the inverse-companion): the forward reading is “a fake makes rare states testable.” The inverse is that a fake changes what the test is evidence about. Against the real object, a passing test says the system survived a situation that genuinely arose. Against a fake, it says the system survives a situation as I have described it — and the description is now part of the thing under test, silently. Read backwards, every test double moves a portion of your uncertainty out of the code and into your model of the world, where no assertion will ever fail. That trade is usually worth making. It is never free, and the invoice does not arrive at the same time as the benefit.
LIT driving the real context with realistic event odds for 200,000 steps visits 18 of the 20 live states, with 6 hard or impossible to reach on demand — 2 never appeared at all and 4 only rarely, the rarest turning up 4 times, roughly once in 50,000 steps; a fake can be set to any of the 24 states, so covering all of them costs O(states) instead of waiting O(1/p); and 6 of the 24 are unreachable in the real machine at all
FIG The counterweight is built into the same page as the benefit, because a sphere that only argued for fakes would be advocacy rather than measurement. The machine has 4 states with no incoming edges by construction — unreachable in reality, freely settable in the fake — and the page reports that alongside the win. A test double converts a waiting problem into a modelling problem: you stop paying for rare events and start paying for the risk that your model of the state space is wrong.
FIG The counterweight is built into the same page as the benefit, because a sphere that only argued for fakes would be advocacy rather than measurement. The machine has 4 states with no incoming edges by construction — unreachable in reality, freely settable in the fake — and the page reports that alongside the win. A test double converts a waiting problem into a modelling problem: you stop paying for rare events and start paying for the risk that your model of the state space is wrong.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of GOD MODE · David Lee Wise (ROOT0), with AVAN