Skip to content

fix(classifier): parse homepage URLs safely - #1206

Merged
nc9 merged 1 commit into
squirrelscan:mainfrom
WilliamK112:codex/fix-is-root-path-903
Oct 27, 2026
Merged

nc9 merged 1 commit into
squirrelscan:mainfrom
WilliamK112:codex/fix-is-root-path-903

Conversation

@WilliamK112

Copy link
Copy Markdown
Contributor

Closes #903

What changed

  • replace the hand-written root-path split with the platform URL parser
  • treat backslash-separated web paths as non-root paths
  • fail closed on malformed URL input
  • cover every acceptance case, including root queries/fragments and userinfo

Validation

  • regression test failed on the backslash case before the implementation change
  • bun test ./packages/page-classifier/tests/predict.test.ts (68 pass)
  • bun test ./packages/page-classifier/tests (223 pass)
  • bun run --cwd packages/page-classifier typecheck
  • targeted production-file format and lint checks
  • detect-secrets 1.5.0 scan

Docs: none (CHANGELOG updated). Skill: none.

@nc9
nc9 force-pushed the codex/fix-is-root-path-903 branch from f8a0d7e to 97d788a Compare October 27, 2026 21:52
@nc9
nc9 merged commit 73038b0 into squirrelscan:main Oct 27, 2026
15 checks passed
@nc9

nc9 commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Merged. Thank you @WilliamK112, moving the root check to the real URL parser (and the failing backslash regression test first) closed #903 properly. One note for later: relative and empty inputs now read as non-root, which no caller passes, so a test pinning that would be welcome. (Nik)

nc9 added a commit that referenced this pull request Oct 28, 2026
* origin/main:
  feat(contracts): free plan renders 2 pages at once, up from 1 (#1207)
  ci(deps): daily dependency advisory check files one issue when the release gate fails (#1217)
  docs(rules): the SEO rules page counts 26 structured data rules (#1213)
  build(deps): ignore GHSA-gcqx-w48m-w2h4 (deepmerge via ultracite, dev tooling only) to unblock the release gate (#1216)
  chore(release): v0.0.138 notes and version bump (#1212)
  feat(report,rules): link sections, component-aware findings, fix rollups, Page structure block (#1181)
  fix(classifier): parse homepage URLs safely, backslash paths are not the root (#1206)
  build(deps): ignore GHSA-wx4j-mvgx-mqwp (satori, docs build only) to unblock the release gate (#1210)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Page type: isRootPath reads a backslash URL as the site root

2 participants