Skip to content

docs: reference PR #699 in the SW precache-admission CHANGELOG entry - #700

Merged
qnbs merged 1 commit into
mainfrom
docs/changelog-699-pr-reference
Sep 10, 2026
Merged

docs: reference PR #699 in the SW precache-admission CHANGELOG entry#700
qnbs merged 1 commit into
mainfrom
docs/changelog-699-pr-reference

Conversation

@qnbs

@qnbs qnbs commented Sep 10, 2026

Copy link
Copy Markdown
Owner

User description

Purpose

Resulting-main's `docs:check` failed after #699 merged: the `[Unreleased]`
CHANGELOG section never referenced PR #699 (its squash-commit subject or
number), which `scripts/check-doc-metrics.mjs` requires for every merged
feat/fix/perf commit. Same completeness gate that previously caught #678
(fixed by #679) and #684 (fixed by #685).

Fix

Added a `### Fixed` entry under `[Unreleased]` describing #699's actual
change (the SW precache-admission-gate lifecycle fix plus the
duplicate-manifest-request fix it required), referencing "PR #699."

Validation

  • `node scripts/check-doc-metrics.mjs` — passes.
  • Full local admission gate (`pnpm run ci:prepush`, run automatically by the
    pre-push hook) — passes.

Summary by Sourcery

Record the service-worker precache reliability fixes from PR #699 in the unreleased changelog.

Bug Fixes:

  • Document the service-worker precache admission lifecycle fix so failed precaches cannot activate or claim clients with incomplete caches, and prevent duplicate precache requests from causing installation failures.

Documentation:


Summary by cubic

Adds the missing PR #699 reference to the [Unreleased] CHANGELOG entry so docs:check passes again.

  • The new ### Fixed entry documents the service-worker precache-admission lifecycle fix and the duplicate-manifest-request deduplication.

Written for commit 9d52b67. Summary will update on new commits.

Review in cubic


CodeAnt-AI Description

Document the service-worker precache reliability fixes from PR #699

What Changed

  • Added an unreleased changelog entry explaining that failed precaches can no longer activate or take control of pages with incomplete caches
  • Documented the safeguard that prevents cache cleanup and client claiming when precache admission is incomplete
  • Documented deduplication of overlapping precache files to prevent installation failures while preserving update detection

Impact

✅ Fewer broken service-worker updates
✅ Reduced risk of pages losing offline fallbacks
✅ Clearer release notes for precache reliability changes

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Summary by CodeRabbit

  • Bug Fixes

    • Improved Progressive Web App update reliability by preventing incomplete service workers from activating or taking control.
    • Added safeguards during activation to ensure only fully prepared workers become active.
    • Prevented duplicate precache entries while preserving cache version information.
  • Documentation

    • Added an unreleased changelog entry documenting the service-worker lifecycle improvements.

Resulting-main's docs:check failed because the [Unreleased] section never
referenced PR #699's squash-commit subject or number, the same completeness
gate that previously caught #678 and #684.
@codeant-ai

codeant-ai Bot commented Sep 10, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 9d52b67 Sep 10, 2026 · 19:48 19:50

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @qnbs, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 12 hours and 51 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@codeant-ai

codeant-ai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
worldscript-studio Ready Ready Preview Sep 10, 2026 7:49pm UTC

@sourcery-ai

sourcery-ai Bot commented Sep 10, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds an Unreleased/Fixed CHANGELOG entry for PR #699, covering the service-worker precache admission failure handling and duplicate precache request fix, so docs metrics and the full pre-push gate pass.

File-Level Changes

Change Details Files
Documented PR #699 in the unreleased changelog to satisfy the documentation completeness check. CHANGELOG.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codeant-ai codeant-ai Bot added the size:S This PR changes 10-29 lines, ignoring generated files label Sep 10, 2026
@codeant-ai

codeant-ai Bot commented Sep 10, 2026

Copy link
Copy Markdown

🏁 CodeAnt Quality Gate Results

Commit: 9d52b672
Scan Time: 2026-09-10 19:50:55 UTC

✅ Overall Status: PASSED

Quality Gate Details

Quality Gate Status Details
Secrets ✅ PASSED 0 secrets found
Duplicate Code ✅ PASSED 0.0% duplicated
SAST ✅ PASSED No security issues
Bugs ✅ PASSED Rating S: No bugs
IAC ✅ PASSED No IAC issues

View Full Results

@codescene-access codescene-access Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No application code in the PR — skipped Code Health checks.

See analysis details in CodeScene

Quality Gate Profile: The Bare Minimum
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Essentials

Run ID: 165ac60c-fc22-4a67-8767-3240cb6cd892

📥 Commits

Reviewing files that changed from the base of the PR and between 39bb4ba and 9d52b67.

📒 Files selected for processing (1)
  • CHANGELOG.md

Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.


📝 Walkthrough

Walkthrough

The changelog adds an Unreleased entry for service-worker installation and activation protection, plus runtime precache URL deduplication that preserves manifest revision hashes.

Changes

Service-worker hardening documentation

Layer / File(s) Summary
Unreleased changelog entry
CHANGELOG.md
Documents installation failure propagation, activation admission checks, and runtime precache URL deduplication with revision tracking.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 9d52b

This change documents existing service-worker fixes without altering runtime behavior, so no merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 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 describes the main change: updating the CHANGELOG to reference PR #699 for the SW precache-admission fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/changelog-699-pr-reference

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

@codeant-ai

codeant-ai Bot commented Sep 10, 2026

Copy link
Copy Markdown

CodeAnt Nitpicks

1 code suggestion

1. The heading labels this PR #699 change as (#525), so readers may attribute the fix to the wrong pull request despite the later reference.

Inconsistent naming · CHANGELOG.md:26

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 1 file

Re-trigger cubic

@codecov

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@qnbs
qnbs merged commit a1ade67 into main Sep 10, 2026
42 checks passed
@qnbs
qnbs deleted the docs/changelog-699-pr-reference branch September 10, 2026 20:14
qnbs added a commit that referenced this pull request Sep 10, 2026
…e gate

- isReferencedByPrLabel used (?!\d) as its trailing boundary, so a malformed
  near-miss like "PR #705alpha" or "PR #705_internal" satisfied the gate.
  Widened to (?!\w), a full word boundary, matching the existing post-merge
  checker's own boundary discipline.
- extractBulletEntries appended any non-blank line to the current bullet as
  a soft-wrap continuation, including a Markdown heading with no blank line
  before it — so a heading like "### Notes: PR #700" right after an
  unrelated bullet could satisfy the gate. Now flushes the current entry on
  a heading line before the continuation check.

Also fails closed (instead of silently skipping) when a pull_request event
payload is missing its numeric "number" field, rather than treating that
the same as a genuinely absent pull_request event.

5 new regression tests (word-boundary near-misses x2, heading-continuation
bypass, doubling as the mutation-tested proof for both fixes).
qnbs added a commit that referenced this pull request Sep 10, 2026
#705)

* fix(ci): require pre-merge CHANGELOG PR-reference for governed changes

scripts/check-doc-metrics.mjs's completeness gate only enforces a PR-number
reference in CHANGELOG.md's [Unreleased] section AFTER squash-merge, once the
commit is on main and its subject already carries "(#N)" — pre-merge, a
branch's own not-yet-squashed commits are (correctly) exempted from that
check. This has left a recurring blind spot: nothing stops a governed PR from
merging without ever adding the entry, even though its real PR number is
already knowable via the GitHub API before merge. It has recurred three times
(#678->#679, #684->#685, #699->#700), each requiring a same-pattern follow-up
PR to add the missing reference after the fact.

Adds a new, independent pre-merge admission gate
(.github/workflows/pr-changelog-reference.yml +
scripts/check-pr-changelog-reference.mjs) that fails a governed (feat|fix|
perf) PR's CI unless CHANGELOG.md's [Unreleased] section already references
it as "PR #<N>", using the PR number from GitHub's own event payload — not
inferred from commit history. Deliberately stricter grammar than the
existing post-merge bare "#NNN" matcher, since pre-merge there is no
squash-appended "(#NNN)" to anchor on. Mirrors pr-text-attribution.yml's
base-ref self-grading pattern (runs the checker from the PR's base ref, with
a documented one-time bootstrap fallback) so a PR cannot weaken the check
that grades it. The existing scanUnreleasedTruth machinery in
check-doc-metrics.mjs — governing local pre-push behavior and the historical
post-merge/branch-local exemption — is untouched.

Complements, but does not implement, issue #675's broader deterministic-
identifier-contract scope (replacing the unnumbered-commit slug-match
fallback) — this gate only closes the narrower pre-merge admission gap for
PRs that already have a real, known PR number, which is the common case.

13 regression tests plus real-text fixtures reproducing all three historical
incidents (#678/#679, #684/#685, #699/#700) in tests/unit/checkPrChangelogReference.test.ts.

* docs: reference PR #705 in the CHANGELOG PR-admission gate entry

* test: reduce duplication in checkPrChangelogReference regression tests

CodeScene flagged the new test file's code health below 10.00 due to
repeated per-test literal boilerplate. Factored a shared fixture builder and
consolidated closely related cases into it.each() tables — same 18 assertions,
same coverage, no behavior change to the checker itself.

* docs: sync README test-count metrics after test-file refactor

* fix(ci): scope CHANGELOG PR-reference check to actual bullet entries

The check previously tested the whole raw [Unreleased] section text, so a PR
number mentioned only in prose (e.g. a reviewer note directly under a
### heading, not inside a real release-note bullet) could satisfy admission
without ever adding a genuine changelog entry. Scoped to parsed bullet
entries (joining soft-wrapped continuation lines, mirroring
check-doc-metrics.mjs's splitUnreleasedEntries) so only a reference inside an
actual bullet counts.

Mutation-tested: reverted to whole-section matching, confirmed exactly the
new prose-bypass regression test failed, restored.

* fix(ci): close two review-found bypasses in the CHANGELOG PR-reference gate

- isReferencedByPrLabel used (?!\d) as its trailing boundary, so a malformed
  near-miss like "PR #705alpha" or "PR #705_internal" satisfied the gate.
  Widened to (?!\w), a full word boundary, matching the existing post-merge
  checker's own boundary discipline.
- extractBulletEntries appended any non-blank line to the current bullet as
  a soft-wrap continuation, including a Markdown heading with no blank line
  before it — so a heading like "### Notes: PR #700" right after an
  unrelated bullet could satisfy the gate. Now flushes the current entry on
  a heading line before the continuation check.

Also fails closed (instead of silently skipping) when a pull_request event
payload is missing its numeric "number" field, rather than treating that
the same as a genuinely absent pull_request event.

5 new regression tests (word-boundary near-misses x2, heading-continuation
bypass, doubling as the mutation-tested proof for both fixes).

* fix(ci): strip comments before locating the [Unreleased] heading

getUnreleasedSectionText searched for the heading in the raw changelog, then
stripped HTML comments from the extracted section afterward. A commented-out
template containing a literal "## [Unreleased]" line earlier in the file
could hijack the section-boundary search — slicing off the opening "<!--"
before comment-removal ran left the fake section's own placeholder content
unstrippable, so a bogus "PR #<N>" inside the comment could satisfy the gate
while the real [Unreleased] section had no reference at all.

Strips comments from the whole document up front instead, before any
heading/section parsing. Regression test reproduces the exact scenario;
mutation-tested by reverting to the old order and confirming exactly that
test fails.

* fix(ci): reject malformed PR metadata and generalize bullet-continuation scoping

- isValidPrMetadata (extracted for testability) now rejects a non-integer,
  zero, or negative PR number, and a missing/blank title, instead of only
  checking typeof number === 'number' (which admits NaN and negative values).
  Fails closed instead of silently exit-0'ing on a malformed event payload.
- extractBulletEntries's heading-only flush was one instance of a broader
  bug class: any flush-left non-bullet line (blockquote, code fence, hr) was
  still absorbed as a continuation. Replaced with the general rule this
  project's own CHANGELOG entries already follow: a continuation line must
  be indented. A flush-left line that isn't a new bullet ends the current
  entry, without enumerating every Markdown block type individually.

New regression tests for both, plus a blockquote-continuation case
mirroring the heading one. Mutation-tested: each fix reverted individually,
confirmed exactly its own tests fail, restored.

* refactor(ci): extract isIndentedContinuation to simplify extractBulletEntries

CodeScene flagged extractBulletEntries' compound boolean condition as too
complex. Named predicate, no behavior change — all 32 existing tests pass
unmodified.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant