Skip to content

Preserve opening pages at the document root - #466

Merged
suguanYang merged 3 commits into
mainfrom
fix/wangbinqi/page-memory-root-prefix
Oct 22, 2026
Merged

suguanYang merged 3 commits into
mainfrom
fix/wangbinqi/page-memory-root-prefix

Conversation

@suguanYang

Copy link
Copy Markdown
Contributor

Summary

Page Memory previously processed only TOC or PDF-outline chapter ranges, omitting opening pages before the first anchored chapter. Preserve those pages, including printed TOCs, directly at the existing document root using the filename-only path. Existing chapter paths and ranges remain unchanged; no additional /Root chapter is introduced.

Keep prefix ownership intact through scope calculation, title refinement, single-child collapse, and staged artifact reloads. Update the glossary and document the post-release reprocessing workflow for affected demos.

Verification

  • 102 focused Worker contracts passed, including regressions observed failing before the repair:
    .venv/bin/pytest apps/worker/tests/contract/test_page_memory* \
      apps/worker/tests/contract/test_profile_skeleton_anchor_wiring_contract.py -q
  • Ruff passed on the page-memory modules, changed stage scripts, and contracts. Pyright passed on the five changed application modules with zero errors or warnings.
  • Captured-profile replay used actual PDFs, real rasterization, node assembly, and ZIP schema conversion. Meta covered 9/9 pages with pages 1–4 at the document root. SpaceX produced pages 1–19 at the document root; combined with its unchanged original body chunks, coverage was 407/407 pages.
  • Replay substituted page-tag responses and did not rerun model providers or publish document revisions. Full repository CI is reported by the PR checks.

Deployment Notes

  • Worker behavior changes; no database migration, environment variable, or public API schema change is required.
  • Existing parsed results remain unchanged. After deployment, reparse affected demo sources through maintainer ingestion, retain historical revisions, and verify page coverage and downstream revision selection.
  • This repair covers opening pages. Existing TOC policy within chapters and no-TOC fallback behavior are preserved.

Checklist

  • Contract tests were added or updated for the behavior change.
  • Relevant documentation and domain terminology were updated.
  • No database migration is required.
  • Logs and validation paths avoid exposing credentials or user data.
  • User-visible behavior, verification limits, and deployment impact are described.

@suguanYang
suguanYang merged commit 0f1a287 into main Oct 22, 2026
6 checks passed
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.

1 participant