You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(audit-engine): derive the template fan-out signature from what the declared rules read #1373
Follow-up to #585. The tripwire (template-verdict-inputs.test.ts) and the parity golden gate a declaration, but a reviewed UNKEYED read is still allowed, so the fan-out signature is a hand-maintained subset of what declared rules read. Deriving the key from the declared reads would close that, but it would also make clusters finer and fragment them, so it needs the cluster-coverage measurement first.
Acceptance Criteria
The cluster-coverage measurement on the existing estates (gymshark.com and openelectricity.org.au crawls, the fan-out bench) is recorded with the signature derived from the declared rules' reads, against today's
(not applicable: coverage regressed to 22.9% and 0.0%, see the closing comment) If coverage does not regress beyond an agreed bound, the signature is derived from each declared rule's reads and a rule that reads an input outside it fails the parity test
Otherwise the issue is closed with the measurement and the tripwire stays the gate
The engine golden tests show no regression and the docs for rule authors describe the final mechanism
Triage: #585 is closed as superseded by this issue (its scope, the tripwire and the parity golden, shipped; see its close comment). This is now the epic #637's remaining signature sub-issue, listed there. Open criteria are unchanged: the recorded cluster-coverage measurement on gymshark.com and openelectricity.org.au (the --coverage --signature bench mode shipped in f9dfaf9, v0.0.179), the keep-or-change decision, and the rule-author docs for the final mechanism.
No coverage number yet. Both attempts on the openelectricity.org.au corpus (1,405 pages, see #1971) stopped before reporting:
--signature current hit its 10 minute cap at load 22;
--signature derived was running when the maintainer's machine ran out of memory and reset.
From now on, crawls, corpus builds and benches for this issue run in a Daytona sandbox or on Boat, never on a laptop. It stays blocked until one of those runs both signatures. The 1,405-page corpus and its content store stay where #1971 records them.
AC1 measurement, run in a Daytona sandbox (4 vCPU, 8 GB), never on a laptop. Both estates were crawled fresh into a content store inside the sandbox (--level full -m 1500, CLI from source), then the fan-out bench's coverage pass ran on a copy of each project.db. The streamed coverage pass in #2195 makes this fit in 8 GB.
Gymshark stopped at the 1,500-page cap; its sitemap lists 7,408 URLs. Every distinct HTML hash resolves to a stored page.
Coverage, today's signature (current) against one derived from every selector and attribute the declared rules read (derived)
Estate
Signature
Pages
Clusters
Singletons
Coverage
openelectricity
current
1405
17
7
98.8%
openelectricity
derived
1405
1083
1066
22.9%
gymshark
current
1499
21
10
98.6%
gymshark
derived
1499
1499
1499
0.0%
Deriving the signature from the declared rules' reads splits nearly every page into its own cluster. On gymshark not one page would inherit a verdict, and on openelectricity coverage drops from 98.8% to 22.9%. That is the regression AC2 and AC3 ask about. Whether it is within an agreed bound is the maintainer's call; on these numbers the derived signature would remove almost all of the fan-out's benefit.
Notes:
The bench needs --batch 25 on pages this size. The default 200 still peaked at about 6.6 GB RSS on openelectricity.
Peak RSS was about 1.2-1.8 GB per coverage run at batch 25.
Deriving the key from every selector and attribute the declared rules read splits nearly every page into its own cluster. No bound would accept that, so AC2 does not apply.
AC1: the measurement is in the comment above, run in a Daytona sandbox on fresh crawls of both estates, with every page's HTML in the store.
AC4:
The engine golden tests pass on main: test:engine green in the post-merge run at 7013fba.
CONTRIBUTING.md ("Declaring verdictScope: "template"") already describes the mechanism that stays: template-verdict-inputs.test.ts holds each template rule's reads to a reviewed list, rule-verdict-scope.test.ts checks declarations against measured invariance, and template-fanout-parity-golden.test.ts compares fanned-out verdicts with a full run.
Plugin rules are told to stay verdictScope: "page" (docs/configuration/plugins.mdx).
Corpus kept:/Volumes/BACKUP/squirrel-store/bench-corpus-dt/corpus-1373.tgz on the maintainer's corpus disk. That is 680 MB, sha256 07d17bc2a25308100e8a961b1ad6dac2b3769bcfe14429c1d6b4bc6fa000ecbe, holding both project.dbs and the content store.
Activity
perf(audit-engine): signature coverage mode and derived-reads list fo…
nc9 commentedon Nov 12, 2026
Not closed after v0.0.179 (https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.179). The
--coverage --signaturemode of the bench shipped. Still open: the recorded measurement (gymshark, openelectricity), the keep-or-change decision, and the rule-author docs. The change that shipped is f9dfaf9.nik
nc9 commentedon Nov 12, 2026
Triage: #585 is closed as superseded by this issue (its scope, the tripwire and the parity golden, shipped; see its close comment). This is now the epic #637's remaining signature sub-issue, listed there. Open criteria are unchanged: the recorded cluster-coverage measurement on gymshark.com and openelectricity.org.au (the
--coverage --signaturebench mode shipped in f9dfaf9, v0.0.179), the keep-or-change decision, and the rule-author docs for the final mechanism.nik
nc9 commentedon Nov 21, 2026
No coverage number yet. Both attempts on the openelectricity.org.au corpus (1,405 pages, see #1971) stopped before reporting:
--signature currenthit its 10 minute cap at load 22;--signature derivedwas running when the maintainer's machine ran out of memory and reset.From now on, crawls, corpus builds and benches for this issue run in a Daytona sandbox or on Boat, never on a laptop. It stays
blockeduntil one of those runs both signatures. The 1,405-page corpus and its content store stay where #1971 records them.nik
nc9 commentedon Nov 21, 2026
AC1 measurement, run in a Daytona sandbox (4 vCPU, 8 GB), never on a laptop. Both estates were crawled fresh into a content store inside the sandbox (
--level full -m 1500, CLI from source), then the fan-out bench's coverage pass ran on a copy of each project.db. The streamed coverage pass in #2195 makes this fit in 8 GB.Crawl
Gymshark stopped at the 1,500-page cap; its sitemap lists 7,408 URLs. Every distinct HTML hash resolves to a stored page.
Coverage, today's signature (
current) against one derived from every selector and attribute the declared rules read (derived)Deriving the signature from the declared rules' reads splits nearly every page into its own cluster. On gymshark not one page would inherit a verdict, and on openelectricity coverage drops from 98.8% to 22.9%. That is the regression AC2 and AC3 ask about. Whether it is within an agreed bound is the maintainer's call; on these numbers the derived signature would remove almost all of the fan-out's benefit.
Notes:
--batch 25on pages this size. The default 200 still peaked at about 6.6 GB RSS on openelectricity.nik
nc9 commentedon Nov 21, 2026
Closing per AC3: the derived signature would remove almost all of the fan-out's benefit, so today's signature and its tripwire stay the gate.
Deriving the key from every selector and attribute the declared rules read splits nearly every page into its own cluster. No bound would accept that, so AC2 does not apply.
test:enginegreen in the post-merge run at 7013fba.verdictScope: "template"") already describes the mechanism that stays:template-verdict-inputs.test.tsholds each template rule's reads to a reviewed list,rule-verdict-scope.test.tschecks declarations against measured invariance, andtemplate-fanout-parity-golden.test.tscompares fanned-out verdicts with a full run.verdictScope: "page"(docs/configuration/plugins.mdx)./Volumes/BACKUP/squirrel-store/bench-corpus-dt/corpus-1373.tgzon the maintainer's corpus disk. That is 680 MB, sha25607d17bc2a25308100e8a961b1ad6dac2b3769bcfe14429c1d6b4bc6fa000ecbe, holding both project.dbs and the content store.nik
perf(bench): stream the template fan-out coverage pass per batch #1373 (
perf(bench): batch the template fan-out coverage pass by bytes #1373 (#…