fix(web): refresh mutable resources after deployment (D02) - #95
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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. Comment |
PR Summary by QodoFix stale service-worker resources after deployment
AI Description
Diagram
High-Level Assessment
Files changed (7)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can turn on the rule miner and Qodo learns your standards from review history |
|
|
Exact-final-head review request: The valid Greptile SPA-fallback finding is corrected with behavioral RED/GREEN: actual built HTML with HTTP200 replaced cached locale/piece bytes on 599d1fd; final worker preserves cached C bytes and avoids delivery/cache poisoning. Final focused Chromium15/15 and web1476/1476 passed with skips0; final web build/lint and ADR guard passed. Four executable targeted mutations were killed at intended stale-byte, immutable-network-hit, offline or HTML-preservation assertions; restored GREEN1/1. Complete pre-correction build/lint/hermetic4007/scripts315/eight guards remain correctly attributed to that tested tree. Fresh final-head CI run37294583285 is pending, not credited as success. @qodo Please review this exact final head and report numeric Bugs, Rule violations, Requirement gaps and other actionable findings. Evaluate the committed bounded evidence and narrow scope without assuming author execution is your personal execution. @greptile Please review this exact final head and state numeric blocking and nonblocking actionable counts, including reassessment of the resolved HTML-poisoning finding. Preserve concrete findings and verification limitations; do not force zero. Fable + Astra engineering remediation remains closed. This is Launch Preparation D02, not public-launch certification. The owner performs any merge. |
Exact-final-head reviewBased on the submitted diff, committed evidence, and stated scope:
The service-worker change correctly preserves cache-first behavior for content-hashed assets while revalidating mutable same-origin resources, retaining cached bytes on network failure, and rejecting successful SPA HTML for non-HTML asset URLs. The test also exercises the previously identified HTML-poisoning case. The bounded evidence is appropriately qualified: it does not claim deployed Nginx/cluster acceptance, cross-browser/device coverage, atomic multi-file rollout, or public-launch certification. Those are verification limitations rather than actionable defects in this PR. I have not treated the pending CI run or prior-head results as current-head success. |
|
Exact-final-head review for
The prior SPA-fallback finding is resolved: successful The committed test and evidence cover the corrected fallback case and report the stated focused/build/guard results. Those results were treated as bounded committed evidence rather than independently re-run, and pending or prior-head CI/review results were not counted as current-head success. Documented deployment-topology, browser-coverage, rollout-atomicity, and public-launch boundaries are verification limitations, not defects in this PR. Tip: You can customize Greptile's behavior for this repo with |
|
Independent hierarchy checkpoint for exact head
Final CI remains pending at this checkpoint and is not credited until successful completion. Any subsequent push invalidates these exact-head results. Owner manual merge only; no public-launch certification. |
OUTCOME A — D02 was real and fixedExact final head: Native Chromium reproduced production-reachable locale-init.js and chess SVG returning A bytes after B's worker installed/activated and the page reloaded, while the app-shell icon already returned B. Mutable runtime entries survived under the fixed cache name. The final policy revalidates mutable same-origin resources online, retains hashed cache-first/offline/API/navigation/origin contracts, and protects good cached bytes from successful Nginx SPA fallback HTML. The test also covers asset-only C with unchanged worker bytes. Original worker fails the final test; successful-HTML poisoning separately reproduced RED; four executable targeted mutants fail intended assertions, survivors0/invalid0, restored GREEN1/1. Final-head gates:
Committed bounded evidence and ADR-0158 preserve exact scope and historical checkpoints. PROJECT_STATE's pending wording records the pre-acceptance checkpoint; this head-bound handoff supplies completed gates without another push invalidating them. Fable + Astra engineering remediation remains closed. No deployed-cluster/Nginx certification, non-Chromium/device acceptance, freshness while offline/before worker control, atomic rollout or public-launch approval is claimed. |
The current production worker can keep
/locale-init.jsand/piece/cburnett/*.svgpinned to old bytes after a deployment. A real Chromium test warmed build A, activated build B's worker with the same cache name, and reloaded: installation refreshed the app-shell icon to B while runtime locale/piece resources still returned A.This correction keeps cache-first for Nginx-compatible content-hashed assets and revalidates other same-origin static GET resources online, retaining cached offline fallback. It preserves navigation, API/WebSocket exclusion, origin boundaries and the existing cache name. It also covers an asset-only deployment with unchanged worker bytes and protects cached asset bytes from successful Nginx SPA fallback HTML during a partial rollout.
Validation: full local build/lint; hermetic 4007/4007 across 19 workspaces; scripts 315/315; all eight repository guards; focused Chromium 15/15, retries 0, skips 0. After the review correction, web1476/1476 and four targeted worker mutations passed their intended checks, with zero survivors/invalid and restored GREEN. The final deployment test fails against the original worker; HTML cache poisoning also reproduced RED before its correction. Discovery guards explicitly include the new backend-free browser test. Final-head CI passes Node22/24, PostgreSQL, real-engine, gateway/Redis and complete Chromium268/268 with Lighthouse0.96.
Evidence:
docs/audits/LAUNCH_D02_VERIFICATION_2026-10-05.mdand ADR-0158. PROJECT_STATE preserves its prior header and appends Launch Preparation. Historical audit rows remain unchanged. Fable + Astra engineering remediation remains closed. This does not certify public launch or deployed Nginx/cluster/non-Chromium behavior.Final head
8aaf63c5f7d13f21a2676322ba17aec416246657is verified ready for owner manual merge: all applicable CI green, Qodo Bugs0/Rules0/Requirements0/Other actionable0, exact-head Greptile blocking0/nonblocking actionable0, unresolved threads0, clean worktree and local=remote=PR head with divergence0 0. Supported Gemini 3.8 Flash High and Claude Sonnet 4.6 Thinking both returned genuine 429 quota errors on fresh exact-head attempts; authorized strict Codex self-review found no remaining actionable issue. No independent-model approval is fabricated. Final acceptance and limitations. Owner merges manually; no automatic merge.