Repository navigation
Conversation
…pt limit in truncated; keep an empty cut section #1408 Signed-off-by: Nik Cubrilovic <[email protected]>
nc9
force-pushed
the
feat/tech-truncation-1408
branch
from
October 31, 2026 03:13
7f1c1ca to
a89ba48
Compare
Merged
Contributor
Author
|
Landed in v0.0.148 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 #1408. #1392 is in v0.0.147 (main b94a3a8); this is rebased onto it and is one commit.
Two limits upstream of tech detection decided what it could see and neither was reported; and a cut that hid everything showed nothing.
script-too-large. A first-party script the crawl dropped for being over its 5 MB fetch cap (SCRIPT_TOO_LARGE_ERROR, now one constant inscript-fetcher.ts) is counted intechnologies.truncated, once however many pages reference it.buildTechInputsreads it from the script'serror.script-limit. The audit fetches a share of the page count (10 to 50) and tech detection reads those.PreFetchedAssets.scriptsNotRead(referenced first-party scripts minus the ones the rules got) is passed throughdetectLocalTechnologiesandrunCloudTechDetectintobuildTechInputsand counted once, on the home page's input. Both reasons are skipped whenbundle_bytes = 0(bundle reading turned off by the user).detectLocalTechnologiesstill returns null for an uncut empty scan (so a weak guess never clears synced tech), but returns the empty section withtruncatedwhen a cap or the budget cut it short. Every format shows it (text, markdown, console, html, llm and xml attribute, json); an empty uncut section stays hidden. The audit command does not sync such a section to the dashboard (an emptyitemslist there means "found nothing" and clears the stack an earlier scan found); the hosted side needs the same rule (note on squirrelscan/repo#3697).docs/cloud/technologies.mdx,output.mdx) name both reasons; the fetch cap and script count are documented as upstream limits.meta.schemaVersionstays 1.3: the new reasons are additions to thetruncatedfield feat(tech-detect): local scan reads bundles whole up to 8 MB, reports truncation, linear comment scan #1387 #1392 introduces.Tests:
tech-script-gaps-1408.test.ts(8: counted once, not counted with a body or another error, off withbundle_bytes = 0, limit count on the home page only, adds up), report tests for the new reasons and for empty sections with and without a cut (every renderer), cli tests for the local and cloud results and the null-when-uncut case, and an e2e (tech-truncated-1408-e2e.test.ts): twelve scripts with the firebase config in the eleventh (limit 10: two counted, firebase not found) and a 6 MB bundle with a Supabase call at 3 MB (counted, not found). Gates: tsgo in audit-engine, report, core-contracts and cli, cli lint and format,make validate, changelog guard.Skill: no change beyond squirrelscan/repo#3698 (already filed for #1392).
nik