Skip to content

Benchmarks cache verification ​

Validated on December 2, 2026. No production image was published or deployed.

The publisher now preserves HTML build mtimes independently of sitemap content dates. This prevents a new build with changed asset hashes from incorrectly validating stale HTML. The explicit state version 15213fd67e7a7dee preserves compatibility with the pre-fix script and inspected public state. Fingerprint/date semantics and the mass-change guard remain unchanged. Future rule changes must explicitly update the version. HTTP caching continues to use standard nginx ETag/Last-Modified validation; no custom HTML hash or runtime cache script is introduced. Regression scripts are not copied into the runtime image.

The internal nginx error page now returns Cache-Control: no-store while retaining X-Content-Type-Options: nosniff. Successful asset caching, canonical URLs, routes, redirects, and sitemap generation are unchanged. The companion edge change is in https://github.com/TerminusLab/bytetrade-website/pull/63.

Validation ​

  • python3 site/deploy/test_apply_lastmod.py: 12 tests passed. The asset-only rebuild test verifies identical sitemap dates and preserved build mtimes with the existing state version. Publisher tests now run before the manual image build workflow.
  • Old/new publishers processed copies of the same local build snapshot with the same downloaded public state and fixed clock: sitemap.xml and sitemap-state.json were byte-identical across 21 URLs; all 24 HTML files were unchanged and input mtimes were retained. The snapshot contains unpublished content, so the existing mass-change override was used only for this isolated comparison; no production guard was changed.
  • site/deploy/check-image.sh against local nginx and that snapshot: all 35 routes passed, plus missing CSS/JS no-store, security headers, success asset caching, canonical and sitemap checks.
  • The companion website tests/cache/reload.cjs test used old/new Benchmarks publishers, the tracked origin/edge configurations, and Chromium's real HTTP cache. It reproduced stale HTML 304 plus cached CSS/JS 404, then one ordinary reload restored styling, scripts, and interaction after applying both fixes. Cookies, localStorage, sitemap output, successful asset caching, and valid unchanged HTML 304 behavior were preserved. No cache clearing or hard reload was used.

These checks use a local browser fixture and local build snapshots. They do not establish behavior at every production CDN location or exercise the complete application. A future rollout needs a rebuilt image, the companion edge configuration, targeted invalidation of existing CDN errors, and production verification. The subsequently supplied server configuration confirms that Benchmarks passes through origin cache headers and uses upstream 10.200.16.100:3055. The companion PR now preserves that routing, timeouts, and successful/redirect Cache-Control and Expires headers; only error cache headers change. The observed four-hour live error TTL must be traced to backend/CDN rules, not the former repository placeholder configuration.