Skip to content

site: show the latest publish time in the pkg footer - #39

Merged
BBcan177 merged 2 commits into
mainfrom
issue/3485-pkg-footer-site-updated
Oct 11, 2026
Merged

BBcan177 merged 2 commits into
mainfrom
issue/3485-pkg-footer-site-updated

Conversation

@BBcan177

@BBcan177 BBcan177 commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Adds · Site updated <time class="site-updated" datetime=...>YYYY-MM-DD HH:MM UTC</time> to the pkg footer (all pages), taken from the newest package Published epoch (manifest created, else build-record source_date_epoch) that collect_packages already reads. No render clock, so pages change only on a publish.

Tests (test-first, RED before / GREEN after): test_footer_site_updated_is_the_newest_publish_time (fixture with two catalogues, newest wins, every page) and test_rerender_of_an_unchanged_tree_is_byte_identical. Both failed before the change.

Render proof against git archive origin/main docs: only footers differ; install.sh, catalogues and all non-HTML files byte-identical; stripping the new span makes every HTML page byte-identical to the origin/main render; a second render is byte-identical.

Full suite on clean git archive HEAD export (umask 022): pytest 792 passed; LC_ALL=C shellspec --shell dash 99 examples, 0 failures.

Refs pfBlockerNG/pfBlockerNG#3485

🤖 Generated with Claude Code

https://claude.ai/code/session_013XM3rHnWFhaMd1A767cq36

Summary by CodeRabbit

  • New Features
    • Landing pages and browse listings now show a “Site updated” timestamp based on the newest available package publication time.
    • The timestamp is omitted when no package has a publication time, and remains consistent when pages are regenerated without package changes.

Footer gains " · Site updated <time class="site-updated">" taken from the
newest package Published epoch (never the render clock), so pages change
only on a publish and re-renders of an unchanged tree stay byte-identical.

Refs pfBlockerNG/pfBlockerNG#3485

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013XM3rHnWFhaMd1A767cq36
@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 47 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ef27815d-fcef-4e79-93a6-98602e5d4fe5

📥 Commits

Reviewing files that changed from the base of the PR and between fadbe5e and e0df038.


📒 Files selected for processing (2)
  • scripts/gen_landing.py
  • tests/test_gen_landing.py

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: aca369a4-d2ea-4677-ad35-5fb4eb02369c


📥 Commits

Reviewing files that changed from the base of the PR and between 8d8b5c4 and fadbe5e.



📒 Files selected for processing (2)
  • scripts/gen_landing.py
  • tests/test_gen_landing.py


Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.




📝 Walkthrough
📝 Walkthrough

Walkthrough

Generated landing and browse pages now show “Site updated” using the newest available package publication time. If no package has a publication time, the footer omits it. The timestamp comes from package data, not the render clock.

Changes

Publication timestamp

Layer / File(s) Summary
Footer timestamp rendering
scripts/gen_landing.py
The footer accepts an optional publication epoch. The landing page and browse-page renderers pass it through to the footer.
Epoch selection and page coverage
scripts/gen_landing.py, tests/test_gen_landing.py
write_site selects the maximum non-None package publication epoch and passes it to each page renderer. Tests check the timestamp on rendered pages and verify that rerendering an unchanged package tree produces identical HTML.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant write_site
  participant render_page
  participant render_browse_root
  participant _site_footer
  write_site->>render_page: Pass maximum published_epoch
  write_site->>render_browse_root: Pass maximum published_epoch
  render_page->>_site_footer: Pass updated epoch
  render_browse_root->>_site_footer: Pass updated epoch
Loading

Suggested reviewers: andrebrait



Merge Risk: ⚪ Minimal · up to fadbe

The generated pages show the newest available package publication time, or omit it when none exists. No material merge risk was established.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: displaying the latest package publish time in the site footer.
Docstring Coverage Passed Docstring coverage is 87.50% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 2 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.



✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR



  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the dates at dawn,
The newest bloom goes marching on.
It leaves a time beneath the page,
The same each render, age to age.
No publish? The line stays clear,
The rabbit hops, content and ear.

Comment @coderabbitai help to get the list of available commands.

- N1: footer date text and datetime attribute now identical to the main site
  ("11 Oct 2026, 19:34 UTC", datetime=...+00:00).
- N2: the pkg page script rewrites the footer with the main site's handler
  (toLocaleString with timeZoneName short); the table-time rewrite skips it.
- N3: comment that the footer epoch is the newest package build/source epoch
  (the Published column), which can precede the actual publish.
- Test: the re-render test now moves time.time between renders, so a
  clock-derived footer would fail it.

Refs pfBlockerNG/pfBlockerNG#3485
@BBcan177

Copy link
Copy Markdown
Member Author

Review audit — legs 1+2: contract and correctness

  • Reviewed: fadbe5e. The fixes were re-checked at e0df038.
  • Verdict: no blocking findings.

Evidence:

  • Newest publish: the footer shows the newest publish across all 44 .pkg files, matching the newest channel row.
  • Only HTML changes: in a base-vs-head render, the 26 changed files are all .html; stripping the new span makes them byte-identical to base.
  • Deterministic: rendering under a different time zone is byte-identical, and the render-pkg-site.sh no-op gate still holds.
  • Edge cases: no packages, a channel without an epoch, mixed epoch formats, and non-numeric or hostile values are all handled; the footer span is omitted or the value rejected.

Nitpicks and how they were handled:

  • N1, date format differed from the main site: fixed in e0df038; it is now 11 Oct 2026, 11:35 UTC with datetime=…+00:00.
  • N2, local-time rewrite dropped the zone label: fixed in e0df038. The main site's footer handler (timeZoneName:'short') was added, and the table rewrite skips the footer. In a browser set to America/Toronto it shows "Oct 11, 2026, 07:35 AM EDT"; table times are unchanged.
  • N3, the time is the build/source epoch: a code comment was added.

@BBcan177

Copy link
Copy Markdown
Member Author

Review audit — legs 3+4: test honesty and over-engineering

  • Reviewed: fadbe5e. The fixes were re-checked at e0df038.
  • Verdict: no blocking findings.

Evidence:

  • Red before: both new tests fail on base 8d8b5c4 and pass on head.
  • Mutations: using the oldest instead of the newest epoch, time.time(), broken markup, and naive local time each turn the footer test red.
  • Clock test (round-1 nitpick, fixed in e0df038): the re-render test now moves time.time forward a year between the two renders, so a footer based on the clock fails both tests.
  • Shape: threading one updated value through the render functions is the minimal shape. No dead code.
  • Suite (clean export, umask 022): pytest 792 passed, 114 subtests; LC_ALL=C shellspec --shell dash 99 examples, 0 failures.

@BBcan177

Copy link
Copy Markdown
Member Author

Review audit — Grok (independent second reviewer)

Round Head Verdict
1 fadbe5e PASS, no findings
2 e0df038 PASS, no findings

CI python and shell are green on e0df038. The owner approved the merge.

🤖 Generated with Claude Code

@BBcan177
BBcan177 merged commit f647485 into main Oct 11, 2026
3 checks passed
@BBcan177
BBcan177 deleted the issue/3485-pkg-footer-site-updated branch October 11, 2026 20:01
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