Unblock the web staging deploy - #18
Merged
Merged
Conversation
web/package.json depends on `eyecons` as a git dependency, so `npm ci`
cannot install it from the lockfile alone — it clones the repo and
resolves that project's own floating devDependencies against the live
registry. A recent publish put eslint 10 in that tree alongside plugins
whose peer ranges stop at 9, and npm 10's arborist walks the resulting
graph into a null node:
npm error Cannot read properties of null (reading 'edgesOut')
Nothing in this repo moved; the registry did. Reproduced locally against
an unchanged web/package-lock.json: npm 10.9.4 fails, npm 11.14.1
installs cleanly.
CI stayed green through this because ci.yml runs Node 20 while the deploy
job runs Node 22 for wrangler — different bundled npm, so the deploy is
the only job that sees the bug.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015TnncCnVNhggoZ9QLQiqeW
The staging deploy succeeded and then failed its own propagation check:
staging propagation verification timed out:
live CSP does not match the pinned staging policy
The worker served `img-src 'self' blob: data: https:` — the `https:`
that "Allow approved remote document images" added — while the verifier
still held a hand-copied `img-src 'self' blob: data:`. The deployment was
healthy; only the copy was stale.
This is the second time the duplicate list has rejected a good deploy;
the first was the script-src preflight hash, which is why the hash alone
was already being read from source. Take the whole policy from
buildContentSecurityPolicy() instead, so the check cannot drift from the
worker again. That makes the script import TypeScript, so it runs under
tsx (already a devDependency, already used by the live-test scripts).
Verified against the deployed staging worker: derived and live policies
match on all 14 directives.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015TnncCnVNhggoZ9QLQiqeW
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The staging deploy has been failing for reasons unrelated to any code change. Two separate breakages, both in the deploy pipeline itself.
1.
npm cicrashes under Node 22's npmweb/package.jsondepends oneyeconsas a git dependency, sonpm cicannot satisfy it from our lockfile — it clones the repo and resolves that project's floating devDependencies against the live registry. A recent publish put eslint 10 in that tree next to plugins whose peer ranges stop at 9, and npm 10's arborist walks the result into a null node:Nothing in this repo moved; the registry did. Reproduced locally against an unchanged
web/package-lock.json— npm 10.9.4 fails, npm 11.14.1 installs cleanly.CI stayed green through all of this because
ci.ymlruns Node 20 while the deploy job runs Node 22 for wrangler. Different bundled npm, so the deploy job is the only one that sees it.Fix: pin npm 11 in the deploy job.
2. The deploy's own CSP check was stale
With installs working, the worker deployed successfully and then failed its own post-deploy verification:
The worker served
img-src 'self' blob: data: https:— thehttps:added by "Allow approved remote document images" — while the verifier held a hand-copiedimg-src 'self' blob: data:. The deployment was healthy; only the copy was stale.This is the second time that duplicated list has rejected a good deploy (the first was the script-src preflight hash, which is why the hash alone was already read from source). Fix: derive the whole expected policy from
buildContentSecurityPolicy(), the same function the worker serves it from. That makes the script import TypeScript, so it runs undertsx— already a devDependency, already used by the live-test scripts.Verification
one document and its asset dependenciesmanifest rule is present in the live bundle and the oldexactly one entryrule is gone.Follow-up worth filing
The
eyeconsgit dependency makes every install non-hermetic — the lockfile pins its commit, but not the transitive tree npm resolves from itspackage.json. This will break again. Vendoring the generated icons, or depending on a published version, would make installs reproducible.Also worth aligning
ci.ymlto Node 22 so CI actually exercises the version the deploy uses; that gap is what let this reach a dispatch.🤖 Generated with Claude Code
https://claude.ai/code/session_015TnncCnVNhggoZ9QLQiqeW