Repository navigation
SUPPLY-001C — Upgrade Firebase web SDK to the final 11.x compatibility set #202
Description
Officer impact: No officer screen or procedure should change. This update replaces a vulnerable website dependency while preserving the same sign-in, account, Firestore, Functions, App Check, Analytics, and local-emulator behavior.
Officer documentation: None — this is a dependency-only compatibility boundary. Root security and operations records must still say exactly what was tested and whether anything was published.
Deployment evidence: None at issue creation. Closure must report the dependency graph, tests, merge, website publication, Firebase deployment, provider configuration, and production behavior as separate states. A green source workflow does not prove the updated website is live.
Problem
On exact main caae31ff427e91325d34a6c901faf81ad1dc49df, firebase declares ^10.7.1 and resolves to 10.14.1. A fresh Node 20 production audit reports 19 advisories: 1 critical, 5 high, 12 moderate, and 1 low. The Firebase/Firestore production graph reaches protobufjs@7.4.0, while the critical advisory covers versions through 7.6.2. Firebase 10 also brings the vulnerable undici@6.19.7 line into several client packages.
Firebase's official version 11 release notes say that v11 requires Node 18 or newer, emits ES2017 rather than ES5, and removes undici and node-fetch from its Node bundles: https://firebase.google.com/support/release-notes/js#version_1100_-_october_21_2024 . This repository already standardizes on Node 20 and modern browsers.
Atomic outcome
Upgrade exactly one Firebase web-SDK compatibility boundary:
firebase@11.10.0, the final stable 11.x release;@firebase/rules-unit-testing@4.0.1, the matching Firebase 11 test peer;- one clean compatible lock graph with the production protobuf path at
7.6.3or newer.
Do not jump to Firebase 12, add a direct protobuf workaround, run a forced audit rewrite, or mix Firebase Admin/Functions upgrades into this issue.
Security and compatibility invariants
- The website keeps the existing modular Firebase API. No provider, project, emulator, Auth, Firestore, Functions, Analytics, or App Check configuration changes.
- Browser development/test remains fail-closed to the Auth, Firestore, and Functions emulators.
- App Check remains Enterprise-only and does not initialize on the initial private action/callback route.
- Analytics remains suppressed on private callback/capability routes.
- No Firebase 10 package remains in the application client graph, and the rules test package has a valid Firebase 11 peer.
- The production graph contains no critical advisory and no unexplained new high advisory.
- The lockfile contains only registry-resolved package metadata and integrity values. No override or direct transitive pin is added unless ordinary compatible resolution fails and a separately reviewed scope amendment is posted.
- No secret, production record, real member, mailbox, payment, or provider call is used.
Scope
package.jsonpackage-lock.json- minimum exact status updates in
SECURITY.md,OPERATIONS_RUNBOOK.md,GITHUB_ISSUES.md, andGITHUB_ISSUE_SLICES.md
Existing runtime and test source are verification targets, not initially owned edit paths. If a real API incompatibility appears, stop, post the exact failure, and split or explicitly amend scope before editing runtime behavior.
Acceptance criteria
-
firebaseis exactly11.10.0and@firebase/rules-unit-testingis exactly4.0.1. - A fresh Node 20 lockfile install succeeds with no invalid peer dependency.
-
npm ls firebase @firebase/rules-unit-testing @grpc/proto-loader protobufjs --allshows one valid Firebase 11 client/test graph and production protobuf7.6.3or newer. - Before/after production audits are recorded; the root production audit has no critical finding and no unexplained new high finding.
- Focused Firebase resource tests prove emulator isolation, Enterprise App Check, callback startup suppression, and callback Analytics suppression.
- Full frontend Jest, SPA callback, Firestore Rules emulator, Functions, artifact/workflow safety, non-mutating lint, and diagnostic production build checks pass.
- The optimized bundle diff is reviewed for unexpected server modules, credentials, or major unexplained growth.
- Root security/operations/issue documentation states exact source/test/merge/live status without claiming the website, Firebase, or provider was changed.
Dependencies and coordination
- Catalogued dependency CI-001A is complete through CI-001A — Repair the deterministic frontend test baseline #103.
- SAFETY-001 — Preserve callbacks and fail closed on local Firebase isolation #99/CI-001B1A — Run SPA callback safety tests in hosted CI #126 provide the emulator/callback baselines.
- OBS-001A2 — Disable unapproved Firebase Analytics collection #139 provides Analytics suppression tests.
- ABUSE-001A1 — Use reCAPTCHA Enterprise for browser App Check #159 provides Enterprise App Check source/tests.
- SUPPLY-001B — Patch React Router 6 and resolve future flags #192 completed the separate React Router patch and released package/lock ownership.
- SUPPLY-001D owns the later Firebase Admin/Functions upgrade; do not edit
functions/package*.jsonhere. - SUPPLY-001G owns future dependency/secret scanning, audit policy, SBOM, and update automation; do not make this issue a general supply-chain workflow change.
Explicitly out of scope
- Firebase 12, Firebase Admin/Functions SDK upgrades, CRA replacement, dependency bot/scanner workflows, audit-exception policy, SBOM, provider console changes, project migration, deployment, production data, or live verification.
- Claiming the old development-tool graph is fully clean if Firebase CLI or another dev-only package retains a separate advisory.
Claim protocol
Creation is not a claim. Before editing, assign the issue, post CLAIMED by <canonical agent> at <UTC>; branch <branch>, and re-read live comments. Keep the change to this one compatibility boundary.
Activity
daliu commentedon Jul 14, 2026
CLAIMED by /root at 2026-07-14T01:27:19Z; branch codex/issue-202-firebase-11; exact base caae31f. Ownership is package.json, package-lock.json, and minimum SUPPLY-001C status hunks in SECURITY.md, OPERATIONS_RUNBOOK.md, GITHUB_ISSUES.md, and GITHUB_ISSUE_SLICES.md. Existing runtime/tests are verification-only unless a posted scope amendment is required. No Functions packages, runtime, workflow, provider, deploy, or officer files are owned.
daliu commentedon Jul 14, 2026
SCOPE AMENDMENT — compatibility red proof: with
firebase@11.10.0and@firebase/rules-unit-testing@4.0.1, all 4 Rules suites / 348 cases fail before rule evaluation because the Firebase 11 tester expects nativefetch, while the repository’s Jest 27 Node VM does not expose the Node 20 fetch globals. The emulator is still exact loopback127.0.0.1:8080; no provider call occurred. Add ownership oftests/firestore-rules/jest.config.jsplus newtests/firestore-rules/node20-environment.jsonly. The custom environment will copy the host Node 20 nativefetch,Headers,Request,Response, andFormDatainto the Jest sandbox, fail closed if any required primitive is absent, and make no Rules/runtime/provider change. The 348-case suite is the fail-before/pass-after proof. No other test or runtime source is added to scope.daliu commentedon Jul 14, 2026
SCOPE AMENDMENT (comment-only accuracy): add
tests/firestore-rules/jest.setup.jssolely to replace the stale Firebase 10/undici explanation with the verified Firebase 11 native-fetch/Jest-VM boundary. No executable line in that file changes.daliu commentedon Jul 14, 2026
EXTRACTION FINISHED — 2026-07-14T01:35:55Z
Final exact source head:
30e560bd1492c1ba2f691ad0f7216a00bf59184fExact base:
caae31ff427e91325d34a6c901faf81ad1dc49dfFinal diff SHA-256:
df343d36a6dc7cb2bb4577dabf52d89b580bd67e3748b67e5caa6ea13034022eNine owned paths only. Local Node 20 proof is complete: focused Firebase/Auth/App Check 71/71, frontend 198/198, Firestore Rules 348/348, Functions 1,077/1,077 applicable unit tests, SPA callback 11/11, workflow/release safety 42/42, frontend lint exact baseline, Functions lint, and diagnostic build. Root production audit changes 19 findings (1 critical, 5 high) to 6 (0 critical, 3 high). Clean base/head builds reproduce
main.fdd058b4.js252.12 kB tomain.56edbdb7.js260.41 kB CRA gzip and 18,836 to 19,016 KiB overall. Built-output server/credential signature scan returned no paths. The new Rules environment uses Node 20 native web APIs and loopback emulator tests only.Three independent reviewers approve the final exact head. Their review corrected stale-cache bundle figures and two inaccurate test comments before approval. Exact-head hosted checks are running.
No website publication, Firebase deployment, provider configuration, production data access, or live behavior occurred.
SUPPLY-001C: upgrade Firebase browser SDK to v11 (#203)
daliu commentedon Jul 14, 2026
COMPLETE / CLAIM RELEASED — 2026-07-14T01:47Z
PR #203 was admin-squash-merged to
mainas exact commit2c7332ca547ba98a57863a6f2f41849ffb386e9ffrom independently approved source head30e560bd1492c1ba2f691ad0f7216a00bf59184f.Exact-head CI run
29299213783passed frontend lint/build/tests/SPA/release validation, Functions lint/tests, Firestore Rules, commerce-journal emulator, and artifact scrubber. Post-merge CI run29299296970passed the same five jobs on the exact merge commit. All acceptance checkboxes are complete, the in-progress label is removed, and the nine-path claim is released.Security result: root production audit 19→6; critical 1→0; high 5→3. Clean-build evidence is
main.fdd058b4.js252.12 kB →main.56edbdb7.js260.41 kB CRA gzip and 18,836 → 19,016 KiB overall. Six root and nine Functions production findings remain open; dev-only older protobuf/undici tool paths remain explicitly documented.Deployment truth: source changed, tests passed, and code merged. A temporary Netlify PR preview was ready. No production website publication or exact
runmprc.comrevision was verified; no Firebase deployment occurred; no outside-provider setting or production data changed; live behavior was not tested. Those remain separate protected-release outcomes.