Repository navigation
Conversation
…the same scripts as with it off; report scriptsEvaluated #1280 Signed-off-by: Nik Cubrilovic <[email protected]>
…mit is lower; preloads fetched as without it; docs and publish test #1280 Signed-off-by: Nik Cubrilovic <[email protected]>
This was referenced Oct 30, 2026
nc9
added a commit
that referenced
this pull request
Oct 30, 2026
…E_PATH (compose note of #1310, as in #1323) Signed-off-by: Nik Cubrilovic <[email protected]>
Contributor
Author
|
Landed in v0.0.143 as nik |
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.
Fixes #1280
Nik's decision: option (a), storage only.
What
With
store_scriptson, the engine still fetches up tostore_scripts_max_scriptsscripts, butfetchPreRulesAssetssplits the rows: the firstscriptRuleLimit(pageCount)(the same limit an audit without the option fetches, 10 to 50, in page order) stay inassets.scriptsfor the rules, and the rest go to a newassets.storedOnlyScripts, which no rule reads.assetCapDropped(which a rule discloses) is computed from the rules' share, so it is the same as with the option off; the storage warning andcrawl_scripts_summaryuse a separatestoredScriptsNotFetched.scriptsToStorestores both groups.AC 2:
meta.scriptsEvaluated(JSON report;<scripts-evaluated count>in LLM output) is the number of first-party scripts the script rules evaluated. Local only, stripped on publish likerulesCache.AC 3:
docs/configuration/storage.mdxhas "It does not change the audit" and the old "can report more findings" sentence is gone;output.mdxdocumentsmeta.scriptsEvaluated; CHANGELOG under Unreleased.Tests (failing first)
apps/cli/tests/audit/store-scripts-results-1280.test.ts: real CLI on one page with 25 scripts, three of them over the 250 KB js-file-size warning size and all past the audit's own share of 10. With and without--store-scripts: identicalissues,scoreandsummary,meta.scriptsEvaluatedis 10 in both, none of the large scripts is flagged, and the stored run still indexes all 25 as stored. On main (engine change stashed) the stored run evaluated 25.Also pass:
store-scripts-1255(CLI),script-fetch-bounds-1255,publish-cap,asset-compression-capture(audit-engine); apps/cli format, lint, tsgo; tsgo in audit-engine, core-contracts, report;make validate.Skill: no change needed. Branched from main separately from #1305 (#1268); both edit
docs/configuration/storage.mdxandapps/cli/src/audit/store-scripts.ts, so expect small conflicts and a second### Fixedblock in the CHANGELOG.Review follow-ups: a store_scripts_max_scripts below the audit's own share is raised to it (a 5-script limit on a 120-script page no longer changes findings or scores); preloaded chunks are fetched exactly as without the option; the test now uses 120 scripts, a limit of 5 and a preload-fetch count check; meta.scriptsEvaluated is documented as scripts given to the rules (including failed fetches), listed in output.mdx, and asserted stripped on publish; the 256 MB / 120 s bound gap is documented. Merge order: #1302, #1305, #1310.
Compose note (after #1305 lands)
CHANGELOG.md: keep both### Fixedbullets.docs/configuration/storage.mdx, "Memory and time" paragraph: keep feat(cli): store_scripts follow-ups: per-reason warning, --no-store-scripts, owner-only files #1268 #1305's soft-bounds text, DROP the sentence "an audit withstore_scriptson can report more findings than the same audit without it" (now false), and reword feat(cli): store_scripts follow-ups: per-reason warning, --no-store-scripts, owner-only files #1268 #1305's "preloaded chunks ... fetched by a separate pass with its own counters" to "fetched the same way as without the option".apps/cli/tests/audit/store-scripts-results-1280.test.ts: addSQUIRREL_CONTENT_STORE_PATH: undefinedto the spawned env, as in test(cli): createTestStorage no longer leaks SQUIRREL_CONTENT_STORE_PATH #1322 #1323.