Repository navigation
feat(cli): --include-pages adds crawled pages with status and rule count to the JSON report #1260 - #1325
Closed
nc9 wants to merge 2 commits into
Closed
feat(cli): --include-pages adds crawled pages with status and rule count to the JSON report #1260#1325nc9 wants to merge 2 commits into
nc9 wants to merge 2 commits into
Conversation
nc9
force-pushed
the
feat/json-pages-1260
branch
2 times, most recently
from
October 30, 2026 07:18
efd0d02 to
c52bef6
Compare
…unt to the JSON report; meta.schemaVersion 1.1 #1260 Signed-off-by: Nik Cubrilovic <[email protected]>
…ges; fix split JSDoc #1260 Signed-off-by: Nik Cubrilovic <[email protected]>
nc9
force-pushed
the
feat/json-pages-1260
branch
from
October 30, 2026 09:45
c52bef6 to
1580719
Compare
Contributor
Author
|
Landed in v0.0.144 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 #1260 (the pages list;
executedRulesstays open, see below)Opt-in
pageslist in the JSON report, per the decision on the issue (Nik, 2026-10-29): off by default, fieldsurl,status,ruleCount, capped with atruncatedmarker beyond a documented limit, report schema minor version bump, docs.What changed
squirrel audit -f json --include-pagesandsquirrel report -f json --include-pages:pages: [{ url, status, ruleCount }], pluspagesTotalandpagesTruncated. Without the flag the report has none of the three keys, so existing consumers and size are unchanged.ruleCount= distinct rules with at least one non-skipped check stored under the page (one indexedGROUP BYinSQLiteStorage.getRuleCountsByPage, no checks materialized; site-scope results are not counted). Computed when the report is rebuilt from the store, soreport --include-pagesgives the same numbers.JSON_REPORT_PAGES.maxEntries = 2000in core-contractslimits.ts(about 200 KB worst case). One over the cap: 2000 entries,pagesTotalthe real count,pagesTruncated: true.meta.schemaVersion: "1.1"to every JSON report (1.1 = the version that addedpages; a report without it reads as 1.0). That one field is the only change to a default report; please confirm that is what "minor version bump" meant.report --inputhas no pages to read back and says so (same pattern as--include-passed).auditandreport.Not in this PR (the issue's wider ACs)
The issue body also asked for
finalUrl,outcome(ok,http-error,rate-limited,error,skipped) with a reason, and a top-levelexecutedRules. The recorded decision narrowedpages[]tourl,status,ruleCount, so those are not built; the AC checkboxes for them stay unticked. Pages with no stored response (connection error, a 5xx that survived retries, rate-limited) are not pages in the store and are not listed; I observed a 500 from the test site absent from the list, and the docs say so. If outcomes for those are still wanted, that is a follow-up (they are only known as crawl stats, not per URL).Tests
packages/report/tests/json-pages-1260.test.ts: off by default, rows, empty crawl, at the limit vs one over, no extra row fields, schemaVersion.apps/cli/tests/cli/audit-include-pages-e2e.test.ts: real CLI against a local site (ok pages and a 404): audit lists statuses and a positiveruleCount,report --include-pagesreads the same list from the store, no flag means no pages key, a non-JSON format warns and still prints.scripts/test-suites.ts --run report, 1032 pass), cli report, json, include-passed, reconstruct and completion tests, cli lint, format:check and tsgo, tsgo on report and crawler,make validate.Docs:
docs/cli/audit.mdx(flag row, "Pages list"),docs/cli/report.mdx,docs/configuration/output.mdx(schema and versioning). Skill: no change needed.Review round
Per-page rule counts are now computed only for
--include-pages(a flag onreconstructReport, plumbed from audit and report; a test asserts a default report never callsgetRuleCountsByPage). I did not add an index: with the flag only, the GROUP BY cost applies to the opt-in run. The split JSDoc is fixed.