Skip to content

Make the generated PWA worker contract fresh-checkout safe - #2402

Merged
Chris0Jeky merged 5 commits into
mainfrom
issue-2382/pwa-worker-contract
Sep 3, 2026
Merged

Make the generated PWA worker contract fresh-checkout safe#2402
Chris0Jeky merged 5 commits into
mainfrom
issue-2382/pwa-worker-contract

Conversation

@Chris0Jeky

@Chris0Jeky Chris0Jeky commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • isolate the generated service-worker contract from ordinary unit and coverage runs so a fresh checkout never assumes ignored dist/
  • add one self-contained generation command for local/nightly use and one built-only command for required CI's existing production build
  • preserve the emitted cache-security contract, including self-contained runtime matchers, prefixed API rejection, no NetworkFirst strategy, and no legacy taskdeck-api-cache

This changes test and workflow ownership only. It does not change production PWA cache policy.

Verification

  • dotnet test backend/Taskdeck.sln -c Release (backend untouched)
  • npm run test:pwa-generated-worker from absent dist/: production worker generated with 142 precache entries; 3/3 passed
  • npm run typecheck: passed
  • npm run lint: passed with 0 errors and 8 pre-existing warnings
  • npm run test:coverage -- --maxWorkers=2: 364 files, 5,378 passed, 3 skipped; thresholds passed
  • node --test scripts/ci/smart-ci/*.test.mjs: 80/80 passed
  • Actionlint bootstrap contract subset: 5/5 passed
  • both changed workflow files parsed successfully; package/workflow ordering assertion passed
  • git diff --check: passed
  • exact-head Codex connector review and fresh-context independent review: no merge-blocking findings
  • hosted exact-head required CI 33698716037, CI Extended/Workflow Lint 33698716014, Smart CI shadow 33698751239, and branch-dispatched nightly 33698730513: passed

Pre-fix reproduction from a clean checkout failed 2/2 with ENOENT for dist/sw.js. One broad coverage run at the Europe/London versus UTC midnight boundary failed five untouched due-date tests; all 100 affected-file tests passed under TZ=UTC, and the single post-midnight full rerun passed.

Documentation

  • docs/STATUS.md updated (no shipped product behavior changed)
  • docs/IMPLEMENTATION_MASTERPLAN.md updated (no roadmap change)
  • docs/TESTING_GUIDE.md updated with the nightly generated-worker validation step after PR docs: record the v0.3 integration wave #2394 released the file

CLAUDE_SYNC_PACKET

Tracking

CI Workflow Validation

  • Confirm exact-head CI Extended/Workflow Lint and required CI
  • Confirm manual nightly-quality.yml dispatch 33698730513 on d612c1fed42fa3650dd94387bb62408ab69496d0

Risk Notes

  • Security impact: keeps the generated no-API-cache worker contract executable on every owning path; no runtime policy change
  • Behavior/regression risk: test/workflow-only; default suites intentionally exclude the build-artifact spec and dedicated commands own it
  • Follow-up tasks: none identified

Copilot AI lite review requested due to automatic review settings September 3, 2026 00:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-03T00:17:44.737423Z d612c1f New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Chris0Jeky
Chris0Jeky merged commit b66da8f into main Sep 3, 2026
42 checks passed
@github-project-automation github-project-automation Bot moved this from Pending to Done in Taskdeck Execution Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Frontend][Testing] Keep generated PWA worker contract runnable without prebuilt dist

2 participants