Repository navigation
fix(rules): in-page About and Contact sections work in the streaming engine #1236 - #1237
Conversation
…e so the streaming engine sees them #1236 Signed-off-by: Nik Cubrilovic <[email protected]>
|
Review of #1237. The fix is sound and the engine-level test is the right kind of test. I read the diff and the code around it; I did not run the tests.
I also checked the following:
I found no critical or high issues. |
…can, time out both rules #1236 Signed-off-by: Nik Cubrilovic <[email protected]>
|
Round 1. Medium: a one-page site on a legacy collected snapshot (no inPageSections on any page) is now skipped with the --refresh hint, as links/broken-anchors does; multi-page sites keep the plain warning; unit tests for both. Low: a timeout is reported against both rules; the [id] scan is capped at 5000 elements. Nit: added a no-# links case and the legacy-record cases. |
|
Reviewed the diff. The fix is sound: the section signal is collected while the DOM is live, v1 and streaming share
No blocking issues. |
Closes #1236.
#1208 read
ctx.site.pages[].parsed.document, which the streaming engine (CLI and cloud) does not give site rules, so a real audit still said 'No About page found'. The in-page section signal is now collected page-time while the DOM is live:CollectedPageSignal.inPageSectionsholds the first About and first Contact section per page (id, word count, page has mailto/tel/form), bounded like the other records (fragment anchors capped at 500, no DOM kept).findInPageSection(ctx, kind)readsctx.collectedSignalswhen present and keeps the DOM path for v1 (both call the samebuildInPageSectionSignal).Engine-level test
packages/audit-engine/tests/inpage-sections-streaming-golden.test.ts: a one-page crawl stored in SQLite, run throughrunStreamingRulesand the v1 pipeline. Fixture passes both rules with the section messages; thin About is info; a stray id with no fragment link warns;crawl/single-page-sitefires with 3 sections (it already did on main). Verified: on origin/main code the fixture and thin tests fail on the streaming path, with the fix all 4 pass.Gates:
--run rules8090 pass; all 22 audit-engine*golden*tests pass by path in groups (the combined--run audit-enginedied with exit 143 / 70 under the lock wrapper twice, with no failing test; golden-baseline passes alone, 6 pass); rules and audit-engine typecheck;make validate. Manual: CLI from this branch (bun run src/cli.ts) on the one-page fixture with the two rules: passed 2, warnings 0.Squirrelscan agent skill: no change.