refactor: decommission InsForge cloud backend from repo + CI (part of #71)#76
Merged
Merged
Conversation
Part of #71. Removes the repo/CI/web-dev cloud surface. None of this ships in the npm package, so deleting it undeploys nothing — the live InsForge backend is retired separately by rotating its service-role key (a user action on the InsForge dashboard; nothing in this repo held that secret). Scope kept to web/CI/repo per decision; native-app OAuth (Swift/C#) is a separate follow-up on #71. Removed: - dashboard/edge-patches/ — all 18 InsForge Edge functions (ingest, leaderboard*, device-*, account-*, badge/embed svg, public-visibility, profile-likes) and the 3 tests that only guarded them (edge-patch- pricing-sync, badge-svg-render, and two leaderboard-refresh byte-equality cases in model-breakdown.test.js; the live buildFleetData/pricing tests stay). - InsForge creds from all 4 workflows (ci, npm-publish, release-dmg, release-windows) + the stale comments claiming their absence breaks the build or "disables cloud OAuth (isCloudInsforgeConfigured())" — that function was deleted in #72 and nothing reads VITE_INSFORGE_* anymore. - dashboard/vercel.json (deploy that no longer exists), dashboard/.mcp.json (InsForge MCP dev tooling), the /api/auth→InsForge proxy and the insforgeBaseUrl passthrough in dashboard/vite.config.js. - InsForge/service-role/device rows from .env.example; rewrote dashboard/.env.example to the one local (mock) var. - Stale references in SECURITY.md (insforge/ path), CLAUDE.md, the curated-overrides pricing note, the guardrails ignore list, and the leaderboard-absence item in the publish checklist. Verified: dashboard:build succeeds with NO VITE_INSFORGE_* env (proving the "must be present or the build fails" comments were stale), bundle carries no insforge/statuspage host, and ci:local is green end-to-end — dashboard 233/233, root 752 + 4, all validators pass. No secret was ever in the repo (edge functions read INSFORGE_SERVICE_ROLE_KEY from Deno env; CI injected only the public ik_ anon key, now removed too).
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.
Part of #71. Retires the repo/CI/web-dev cloud surface that the now-local-only product used to talk to. Nothing here ships in the npm package, so deleting it undeploys nothing.
Scope per decision: web/CI/repo only. Native-app OAuth (Swift/C#, 76 files) is a separate follow-up on #71.
The actual security action is NOT in this diff
Per #71, the real remediation is rotating/revoking the InsForge service-role key on the InsForge dashboard. That key was never in this repo — edge functions read
INSFORGE_SERVICE_ROLE_KEYfrom Deno env at deploy time; CI only ever injected the publicik_anon key (safe by design, now removed anyway). Confirmed by a repo-wide scan: no service-role value is hardcoded anywhere.Removed
dashboard/edge-patches/— all 18 InsForge Edge functions + the 3 tests that only guarded them (edge-patch-pricing-sync,badge-svg-render, and twoleaderboard-refreshbyte-equality cases surgically removed frommodel-breakdown.test.js— the livebuildFleetData/pricing tests stay).ci,npm-publish,release-dmg,release-windows) + the stale comments claiming their absence "breaks the build" or "disables cloud OAuth (isCloudInsforgeConfigured())" — that function was deleted in refactor: make TokenTracker local-only #72 and nothing readsVITE_INSFORGE_*anymore.dashboard/vercel.json(dead deploy config),dashboard/.mcp.json(InsForge MCP dev tooling), the/api/auth→InsForge proxy and theinsforgeBaseUrlpassthrough indashboard/vite.config.js..env.example; rewrotedashboard/.env.exampleto the one local (mock) var.SECURITY.md(insforge/path),CLAUDE.md, the curated-overrides pricing note, the guardrails ignore list, and the leaderboard-absence item in the publish checklist.Test plan
dashboard:buildsucceeds with noVITE_INSFORGE_*env — proves the "must be present or the build fails" comments were stale. Built bundle carries noinsforge/statuspagehost.ci:localgreen end-to-end: dashboard 233/233, root 752 + 4, all validators pass (copy 626 entries, ui-hardcode ok, guardrails ok, openwiki 0 findings). Test-count drop vsmainis exactly the removed guards for removed code.env:left behind; no secret added.ci:localonubuntu-latest) passes on this PR.Still open on #71 after this