[ENG-3630] Say request-path shielding is applicable, and generate the demo maps - #151
Merged
Merged
Conversation
… demo maps Two things, one subject: what the surface note claims, and where the demo examples come from. The note said "Request-path protection applies to this app". Recognizing code that serves requests establishes which KIND of protection is relevant to those paths; it establishes nothing about whether a guard is installed, fetching rules or enforcing them, none of which a build-time map can see. It now says shielding is APPLICABLE to these paths and states that it is not a claim about a guard being installed. This note is not internal prose — it is copied into `coverage.notes`, and consumers render those verbatim, so the sentence was sitting on a dashboard as a protection status. Nothing pinned any of the three notes, which is how it drifted: the suite now asserts the applicability wording on the server state, the "not deployment attestation" caveat on the static one, the "must not be read as no server side" caveat on unknown, and scans all three for posture claims. `examples-emit` generates the demo maps a platform loads to show what each state looks like, the same way `ladder-emit` generates the ladder fixtures. Four apps: recognised Express routes, a named static generator, a server framework whose routes are registered from a table, and a project declaring both a platform config and a static generator. Hand-written demo data shows a shape the extractor does not emit and goes stale in silence; generated data can be regenerated and diffed. The two states the extractor never emits are deliberately not here. A build with no `serverSurface` and one reporting a state a reader does not know are properties of the consumer's timeline, not of any source tree, so the loader derives them and the index says so. Each app also asserts its state in the ordinary suite, not only when someone is regenerating — an extractor change that moves one turns the demo into a map of something else. Output is byte-identical across runs, which is what makes inspecting the diff a real review step. 1220 tests, typecheck clean. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Comprehensive demo map generation and note wording update with thorough testing. 🎯 Quality: 100% Elite · 📦 Size: Medium 📈 This month: Your 94th PR — above team average · Averaging Excellent |
Contributor
Author
|
/review |
daniloradovic
approved these changes
Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two things on one subject: what the surface note claims, and where the demo example maps come from.
The note was a protection status
surfaceNotesaid, for a recognised server runtime:Recognising code that serves requests establishes which kind of protection is relevant to those paths. It establishes nothing about whether a guard is installed, fetching rules, or enforcing them — none of which a build-time map can see. So the sentence asserted the second thing while measuring the first.
It now reads:
This matters more than internal prose would: the note is copied into
coverage.notes, and consumers render those verbatim. The claim was already on a dashboard, in five stored fixtures, beside a card whose whole design is to avoid exactly that claim.Nothing pinned any of the three notes, which is how it drifted in the first place. The suite now asserts the applicability wording on the server state, the "not deployment attestation" caveat on static, the "must not be read as no server side" caveat on unknown, and scans all three for posture claims (
is protected,is safe,protection applies, …). Restoring the old sentence fails the first of those.The demo maps now have a generator
examples-emitdoes for the demo examples whatladder-emitdoes for the ladder fixtures. Four apps, one per state worth showing:server-runtimeserver-runtime-detectedstatic-buildstatic-build-detectedunknown-unparsed-stackunknownunknown-deployment-declaredunknownThe two
unknownvariants are separate on purpose — their evidence differs, so a consumer deriving a next step from the evidence has something to derive from.Hand-written demo data shows a shape the extractor does not emit and goes stale in silence; generated data can be regenerated and diffed. Output is byte-identical across runs, which is what makes "inspect the diff" a real review step rather than a ritual.
The states the extractor never emits are deliberately not here. A build with no
serverSurface(older than the check) and one reporting a state the reader does not know (newer than it) are properties of the consumer's timeline, not of any source tree — no app produces them. The loader derives both fromserver-runtime.json, and the emitted index says so rather than leaving the next person to wonder why the set looks incomplete.Each app also asserts its state in the ordinary suite, not only when someone is regenerating. An extractor change that moves one would otherwise turn the demo into a map of something else, discovered whenever someone next happened to regenerate.
Verification
1220 tests, typecheck clean (including the template harness). The note change is mutation-tested: restoring the previous wording fails the applicability assertion and nothing else, so that test is load-bearing rather than incidental.
Consumers embedding the old note text in stored fixtures will need to regenerate them after this lands — for the platform's ladder fixtures that is the
ladder-emitstep, and the platform PR carrying them is sequenced behind this one.