Skip to content

Pin pip-core to @3.9.2 (drop @latest)#43

Merged
jonasneves merged 1 commit into
mainfrom
pin-pip-core-version
May 25, 2026
Merged

Pin pip-core to @3.9.2 (drop @latest)#43
jonasneves merged 1 commit into
mainfrom
pin-pip-core-version

Conversation

@jonasneves
Copy link
Copy Markdown
Member

Summary

docs/pip/assistant.js imported pip-core via @latest, which jsdelivr edge-caches for ~12 hours. A fresh pip publish doesn't reach the dashboard until the edge revalidates — observed today when pip-core 3.9.2 was published but the dashboard kept loading 3.9.1, breaking /model + Enter behavior despite the fix being live on npm.

Pin the exact version in the URL (Stripe / AWS pattern). The URL is immutable bytes — what the dashboard asks for is what it gets, no edge TTL lag. Cost: a per-release URL bump here. Worth it — pip-core updates already touch the dashboard's pre-commit hook (sw.js VERSION stamp), so the bump rides on a normal commit, not a separate workflow.

Bumping in the future

When a new pip-core ships:

  1. Update PIP_CDN_URL in docs/pip/assistant.js to the new @x.y.z
  2. Commit + push (pre-commit hook re-stamps sw.js)
  3. Dashboard picks up immediately, no edge-cache wait

Test plan

  • make smoke (41/41)
  • Dashboard loads pip-core@3.9.2 (verify in Network tab — the URL itself shows the version)
  • /model + Enter opens the provider picker (the fix this whole excursion was about)

@latest is convenient but jsdelivr's edge-caches it for ~12h, so a
fresh pip release doesn't reach the dashboard until the edge
revalidates. Pinning the version in the URL makes the bytes immutable:
the dashboard runs exactly the pip-core it asked for, no waiting on
edge TTL or browser cache lag.

Cost: a per-release URL bump here. Worth it — every pip-core update
also touches the dashboard's pre-commit hook (sw.js VERSION stamp),
so the bump rides on a normal commit, not a separate workflow.
Copilot AI review requested due to automatic review settings May 25, 2026 11:49
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Pins the dashboard’s pip-core CDN import to a specific released version to avoid jsDelivr @latest edge-cache lag that can leave the dashboard temporarily loading an older build after a publish.

Changes:

  • Pin PIP_CDN_URL in docs/pip/assistant.js from @latest to @3.9.2, with explanatory rationale for future bumps.
  • Update the service worker cache VERSION stamp in docs/sw.js (asset-hash bump) so clients receive the updated dashboard assets promptly.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
docs/sw.js Bumps the SW cache version string so the updated dashboard assets roll out.
docs/pip/assistant.js Pins pip-core jsDelivr URL to @3.9.2 to eliminate @latest propagation lag.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jonasneves jonasneves merged commit 9f70a4b into main May 25, 2026
1 check passed
@jonasneves jonasneves deleted the pin-pip-core-version branch May 25, 2026 12:07
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.

2 participants