Skip to content

feat(worker): list scraped pages in the build report pages.files - #4

Merged
driedel merged 1 commit into
mainfrom
feat/build-report-pages-files
Nov 27, 2026
Merged

driedel merged 1 commit into
mainfrom
feat/build-report-pages-files

Conversation

@driedel

@driedel driedel commented Nov 27, 2026

Copy link
Copy Markdown
Owner

What

Extends the per-job build report so clients can list which pages were scraped and became static.

report["pages"] was only {"count": N, "bytes": B}; it now also carries:

"pages": {"count": 2, "bytes": 1234, "files": [{"path": "index.html", "bytes": 1000}]}

Details

  • One entry per HTML file from the pre-optimize workdir snapshot, sorted by site-relative path; bytes is the scraped (original) size, consistent with pages.bytes.
  • The list is capped at 200 entries (_PAGES_FILES_CAP) — the result travels through Redis/the API and is stored by clients, so it must stay bounded. count/bytes still reflect ALL pages.
  • Fail-open and backward compatible: consumers reading only count/bytes are unaffected; top-level report keys are unchanged.

Validation

  • Full pytest suite inside Docker: 151 passed
  • pylint: 10.00/10
  • E2E smoke test on the dev stack with a real signed POST /publish: job result contained pages.files with the scraped page

@driedel
driedel merged commit 7241564 into main Nov 27, 2026
3 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