Repository navigation
Conversation
Signed-off-by: Ching-Wei Kang <[email protected]>
…, two page budgets ordered by cue tier then document order, window edges marked, counted notes, wider tests #1424 Signed-off-by: Nik Cubrilovic <[email protected]>
nc9
force-pushed
the
fix/integrity-label-windows-1424
branch
from
October 31, 2026 20:37
02f163c to
d52703e
Compare
This was referenced Oct 31, 2026
Merged
Contributor
Author
|
Landed in v0.0.152 as nik |
This was referenced Oct 31, 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.
Refs #1424. Rework of this PR after the review of #1454: it is now William's window commit (
d10665e0, authorship kept; same change as #1454'sa9e04bba) plus one lane commit. Replaces my earlier overlapping-window design.Kept from William's commit
Windows of 300 characters, stride 150, over the first 16,000 normalised characters of each attribute (
aria-label,title,value, logoalt); unread only above 16,000 characters (raw or normalised).Lane commit
brand-specs.tsis the brand data moved out ofsignals.ts, re-exported from it): a window past an attribute's first is read only if the start of a sign-in or brand phrase is in it. The alternatives are built from the auth cues and every lexicon phrase (first word, a short first word joined to the second assign ?in), so a new phrase widens the prefilter by itself. A drift test checks every lexicon phrase, auth cue and provider-button form passes it, and thatdesigners,blog,logisticsdo not.controlsUnread, and the info note is emitted even with no hit. The budgets areintegrityLimits, a mutable object, so a test can exhaust them.Redesign in with Google Workspacecannot read assign in with Google(William's version hit 3 of 460 padding alignments,Login with GoogleMail2 of 460).Tests
integrity-evasions-784.test.ts(35): every attribute (aria-label, title, value, logo alt, input-image alt) with padding on both sides at every offset 0..460; deep and split phrases; a 400-word label; the look-alikes (Redesign in with Google Workspace,Login with GoogleMail,Plugin with Google) at every padding 0..460; William's 16,000/16,001 boundary and NFKC test; the drift guard.integrity-budget-784.test.ts(27, RuleRunner at the default budget): 300 controls with 16 KB U+FDFA labels finish and find the real control; 21,000 cue-bearing decoys (8.6 MB) after the real padded control: found; before it: found or counted unread; 5,000 benign long-label controls before the real one; exhausted budgets (lowered throughintegrityLimits): first-window phrase found, deep phrase found or noted, hostile-only page emitscontrolsUnread.Cost (RuleRunner, brand rule; this branch vs #1454's cut)
The U+FDFA hole is pre-existing and not lowered: at 600 such controls (9.6 MB) the rule is abandoned at the 2 s budget on main and on #1454 too, because the NFKC expansion of 16,000 characters per label costs about 2 s over that many labels. Not part of this change.
Integrity suites (incident corpus 69, evasions, adversarial 36, budget, text-boundary 14, cloaking 8),
streaming-rules-golden,streaming-collector-rules-golden,tsgo, docsmake validate.Skill change: none.
nik