Skip to content

Page type: index and default documents at the site root read as unknown, not homepage #902

Closed

Description

@nc9

isRootPath (packages/page-classifier/src/rules-fallback.ts) treats only "/" or an empty path as a site root, so only those pages get homepage from the URL rule. After #900 the model can no longer label a non-root page homepage, which exposed a gap: pages at the root document names a site serves its home page from now read as unknown.

Evidence

In a fire audit of the bundled page-type head (5,841 pages from never-used domains), the model called 142 non-root pages homepage. A blind judge agreed on 74 of them (52%). Of the 142 paths, 57 were index-style files (/index.html, /index.php, /default.aspx and similar) and 14 were bare locale segments (/en/). The index files were judged homepage on 44 (no-URL judge) and 49 (URL-aware judge) of 57. The locale roots were judged homepage on 8 and 9 of 14. The measurement is on this one sample and does not separate top-level index files from nested ones.

Acceptance Criteria

Activity

  1. added
    enhancement
    size: S
    on Oct 17, 2026
  2. added theissue type on Oct 28, 2026
  3. nc9 commented on Oct 30, 2026

    @nc9
    ContributorAuthor

    Measurement for AC 1, 2 and 4 (PR #1338). Method: 3,000 launch-corpus origins, / against each index, default and home document, hosts that answer any path with the home page excluded, same-page test on title, first H1 and text similarity (no judge), soft-404 and redirected answers set aside.

    • /index.html: 590 pages served in place, 558 the same page as /: precision 0.946, lower 95% bound 0.924. Clears 0.90, so it is the root.
    • /index.php 0.787 (lower 0.701), /index.htm 0.520, index.aspx / index.asp / index.jsp 0.500, every default.* and home.* 0.00 to 0.17. None clears 0.90, so they stay unknown.
    • Bare locale roots (/en/): not measured; they stay as they are.
    • Limits: launch-corpus sample, overlap with the page-type training and audit sets unknown.
      The issue's evidence (index files judged home on 44 to 49 of 57) was on a sample of paths the model had already called homepage; guessing an index path on a random site, as measured here, is a stricter question and only index.html survives it.
  4. nc9 commented on Oct 30, 2026

    @nc9
    ContributorAuthor

    Decision (Nik, 2026-10-30): accept the data-backed narrowing. Only a single-segment /index.html reads as the homepage (558 of 590 same-page = 94.6%, lower 95% bound 92.4%, objective same-page test on 3,000 origins). index.php (79%), index.htm (52%), aspx/asp/jsp (50%) and default.* / home.* (0 to 17%) stay unknown until someone measures more. This deviates from the original acceptance criteria (index/default/home with all extensions; blind-judged sample outside the training set), so the checklist keeps those as open follow-ups.

  5. nc9 commented on Oct 30, 2026

    @nc9
    ContributorAuthor

    Correction to my measurement comment (PR #1338). The 0.946 figure needs a set-aside I should have stated: of 628 /index.html documents served in place, 558 are the same page as / (0.889, lower 95% bound 0.862, under the 0.90 bar). Setting aside 5 error-titled answers gives 558 of 623 (0.896); also setting aside 33 near-empty answers (fewer than 15 distinct words, blank or placeholder pages) gives 558 of 590 (0.946, lower bound 0.924). Script and criteria: ops/scratch/pagetype-902/analyze-index-docs.py. The other document names are lower on every cut. Whether to ship /index.html as the root on these numbers is a judgement call for the maintainer.

    nik

  6. nc9 commented on Oct 30, 2026

    @nc9
    ContributorAuthor

    Verified against main after v0.0.145. Met: criteria 3 (nested documents are not the root), 4 (locale roots unchanged) and 6 (README states the rule). Open as written: criterion 1 (the measured precision is 0.889 uncorrected, 0.946 after setting aside error and near-empty answers, not the 0.90 bar with a blind judge), criterion 2 (only /index.html is a root; the other names did not clear the bar) and criterion 5 (tests cover query, fragment, nested and negatives, but only one name is a root). The accepted narrowing is recorded in an earlier comment; the checklist stays as the open follow-ups.

    nik

  7. nc9 commented on Nov 5, 2026

    @nc9
    ContributorAuthor

    Closing with the scope narrowed to what shipped: the root /index.html document reads as the home page (a0d1309), nested documents and bare locale roots stay as they were, and the names that are not treated as root are pinned by a test (5fbb3c0). The wider set (default.*, home.*, htm, php, asp, aspx, jsp) needs a blind measurement of at least 0.90 on 100 or more unseen pages first, and is tracked in #1605.

    nik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementsize: S

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions