Skip to content

feat(qcm): expired and old-capture cameras on the card (QQA-10f) - #39

Merged
joepetjr merged 2 commits into
masterfrom
qqa-10f-expiry
Oct 25, 2026
Merged

joepetjr merged 2 commits into
masterfrom
qqa-10f-expiry

Conversation

@joepetjr

Copy link
Copy Markdown
Contributor

Ported from headlessmode-archive #807 (commit 7af3b6b4), QC U13 camera chain (QC-04), plan row U13. Base master. Closed in the archive, not merged there; this is the port.

What changes: a camera card says when its picture is out of date (validUntil passed) instead of "no picture is published", makes no request for it, and keeps the owner's link; a camera with capturedAt shows how long ago the picture was taken, with the same 30 minute stuck-camera line the Last-Modified age already used. Park cameras get an age line for the first time.

Adapted: camera snapshot schema 2 (archive commit ac5897d8, the parent in that archive PR) is already on master, so this carries only the card change. The img-plan load handler keeps master's picture timeout and also reads the age line. The new browser test removes its Chromium profile through removeProfile; site-coupling.json is regenerated.

Tests (through bin/pytest-slot.sh, logs unpiped):

  • Red on master with this PR's tests only: 85 tests, 76 pass, 9 fail.
  • Green: 85 of 85, then with register, boundary and teardown checks 124 of 124 pass.
  • CI's node step, full (built site, browser tests ran), on this branch before opening: 3074 tests, 3073 pass, 1 fail, 0 skipped, exit 1. Python subset (front matter, content validation, privacy accuracy, headers wiring, a11y config, data contract, public tree): py_rc=0. One failure in the full run: route-measure-browser (a trail's length hedge), a browser test unrelated to this change; re-run alone on the same tree it passes (log r807c.log). The only changed-area tests are all green.

A camera row whose validUntil has passed already lost its picture in
the snapshot reader, but its card still said "No picture is published
for this camera", which is not true. The card now says the picture is
out of date, makes no request for it, and keeps the owner's link.

A camera with a capturedAt now shows how long ago the picture was
taken, with the same 30 minute line for "the camera may be stuck" that
the Last-Modified age already used. Park cameras, which have no header
to read, get an age line for the first time. When both exist on a road
camera, the Last-Modified of the picture just fetched wins; capturedAt
fills in when it is missing or unreadable. A park card that carries a
capture time no longer says the park publishes none.

A browser test serves a schema 2 snapshot to the built page and checks
all three cases against every request the browser makes. Unit tests
cover the age rule and the expired card.

Ported from headlessmode-archive #807 (commit 7af3b6b4). Camera snapshot schema 2 (archive commit ac5897d8, its
parent in that PR) is already on master, so this carries only the card change. The img-plan load
handler keeps master's picture timeout and also reads the age line.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Deploying headlessmode-current with  Cloudflare Pages  Cloudflare Pages

Latest commit: 442da06
Status: ✅  Deploy successful!
Preview URL: https://2b4ea2e8.headlessmode-current.pages.dev
Branch Preview URL: https://qqa-10f-expiry.headlessmode-current.pages.dev

View logs

@joepetjr
joepetjr merged commit e761800 into master Oct 25, 2026
5 checks passed
@joepetjr
joepetjr deleted the qqa-10f-expiry branch October 25, 2026 12:31
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