Refuse a client budget limit typed into anything the build reads [#89] - #169
Merged
Conversation
The design system page states five numbers a native client is held to, and they are the pinned token copy's. Nothing stopped a second copy of one of them from being typed into a template or into the prose beside it. That is the failure the row about a typed colour exists for with a different unit, and it is the harder half to see: a wrong colour looks wrong on the page and a wrong millisecond looks like every other millisecond, so the copy goes on being rendered perfectly after the published value moves. A row cannot be told anything except the bytes of one file, so the table is now handed the numbers it compares against. Every other row ignores what it is given, and the table holds the same rows however it is handed, which is what lets the count the gate prints come from a call that supplies nothing. A run reads the copy before it builds the table and refuses a tree whose copy carries no such number, because a row that compared nothing would report ok and read as a tree holding no second copy. How a limit is spelled is now decided in one place, in the token package, and both the page and the row ask there. A page and a row each carrying their own spelling would part company the day either moved, and the row would go on reporting ok over the words the page had started using. Removing the row's decision reds three cases in the suite, and the two spellings, the numbers it leaves alone and its following the copy rather than carrying the numbers each have a case of their own. Signed-off-by: Nils Lehnen <nils77sz@gmail.com> Signed-off-by: Nils Lehnen <30603423+iderex@users.noreply.github.com>
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.
What was wrong
The design system page states five numbers a native client is held to, and they
are the pinned token copy's:
Nothing refused a second copy of one of them written into what the build reads.
The row over a typed token value covers colours, lengths, font stacks and
weights, and a latency ceiling is none of those:
Run at
3f8cf5d, with the sentenceA key press answers under 80 ms on the clients this file is read by.appended tocontent/design-system.txt. The rowabove reports ok over it, and so does the whole run.
That is the same failure the colour row exists for with a different unit, and it
is the harder half to see. A wrong colour looks wrong on the page. A wrong
millisecond looks like every other millisecond, so the copy goes on being
rendered perfectly after the published value has moved, and a client meets a
target the file no longer states.
What this does
A row,
client-budget-numbers-live-in-exactly-one-file, over every tracked filethe build reads to render a page. The same sentence appended to
content/design-system.txt, at the commit this pull request pushes:and with the sentence taken back out:
Three things about the row are worth reading rather than inferring.
It is handed the numbers rather than carrying them. A row is given the bytes of
one file and nothing else, so
Rulesnow takes the numbers the copy carries.Every other row ignores what it is given, and the table holds the same rows
however it is handed, which is what lets the count the gate prints come from a
call that supplies nothing. A row holding the five values in its own source
would be the second declaration of the file it exists to keep as the only one.
A run reads the copy before it builds the table, and refuses a tree whose copy
carries no such number, or one whose limit has no unit or no comparison beside
it. A row handed nothing refuses nothing, and a green mark from it over an empty
set would read as a tree holding no second copy when what it means is that
nobody said what the numbers are. That is the position
gatheralready takesabout the copy existing at all, one step further in.
How a limit is spelled is decided in one place.
tokens.Number.Statedis whatthe page prints and what the row looks for, so the two cannot part company: a
page and a row each carrying their own spelling would leave the row reporting ok
over the words the page had started using. The page's output is unchanged by
that move:
What the row does not reach, stated rather than left to be found. It compares
against the values it was handed, exactly, so a limit written in another unit
walks through:
under 0.037 sis notunder 37 msto it. That is the bound thecolour row declares for itself for the same reason, and it is what keeps the
file rather than the row as the authority for the set. A pattern over any number
with a time unit would refuse a transition duration instead, which is a value
the token file holds none of and the page would legitimately carry.
The other half of the issue is the test asking that a value changed in the
pinned copy move exactly that number on the page. It is in
internal/site, overa fixture copy rather than the real one, and a second case covers the comparison
deciding how the limit is stated.
Closes
Closes #89.
What was run
The
needs-networkset was not asked for, which is the line above, and nothingin this change is about it. No test was skipped, and none of the six headless
constraints is reached by anything here.
The guard is proven by taking it away. With the row's decision replaced by one
that returns nothing:
and with it back:
The cases the row is judged by, each one a statement the others do not make:
and the page half:
The output is unchanged by the change to how the page reaches its spellings:
The fourth condition of the issue was already met and is re-read here rather
than taken from an earlier reading:
The second sentence there describes what was measured on 2026-08-09 and has
since moved, which is recorded on the issue. Nothing in this change edits that
record.
internal/invariant/invariant.gois the file every row lands in, and thischange moves the signature of
Rulesas well as adding a row, so a branch thatadds a row on top of
mainmeets it there. That is disclosed rather thanavoided: the signature is where the values reach a row, and there is no other
route.
The means
Go, which is what the tree is made of, and no dependency is added: the module
graph is still empty. The row carries a refusable property decided by the same
table every other rule is in, its bite is shown above by deleting it, and every
number this body states carries the command that produced it. The spelling
helper is on the token package rather than on the page, because the page and the
row both need it and a value that reaches two callers from one place is what the
whole rule is about.
Who read it
Nobody but me. The ruleset on this branch requires no approving review, so this
is merged by whoever opened it, and the evidence above stands in place of a
second reader rather than beside one.