Skip to content

refactor(http): drop deprecation-stub routes from the migrated dashboard / entities / events surface - #112

Merged
AquiGorka merged 2 commits into
mainfrom
purge-deprecation-stubs
Jun 8, 2026
Merged

refactor(http): drop deprecation-stub routes from the migrated dashboard / entities / events surface#112
AquiGorka merged 2 commits into
mainfrom
purge-deprecation-stubs

Conversation

@AquiGorka

Copy link
Copy Markdown
Contributor

Follow-up to #106.

Summary

PR #106 migrated every dashboard / entities / events route to the per-PP /api/v1/providers/:ppPublicKey/... shape and left 410 Gone stubs at the old un-scoped paths so callers could migrate. The migration is settled and no caller in any consumer repo still hits the un-scoped paths, so the stubs are dropped — the router now answers 404 (route not found) for those URLs.

What changes

  • Delete the 16 deprecation stubs:
    • 14 in src/http/v1/dashboard/routes.ts (POST /dashboard/pp/delete, GET /dashboard/{channels,mempool,operations,treasury,utxos,transactions,transactions/:id,bundles/:id,audit-export,metrics,council/membership}, POST /dashboard/council/{join,membership})
    • POST /entities (un-scoped) — the entire src/http/v1/entities/routes.ts becomes empty and is deleted
    • GET /events/ws (un-scoped) — the entire src/http/v1/events/routes.ts becomes empty and is deleted
  • Remove the buildEntitiesRouter + buildEventsRouter imports and mounts from src/http/v1/v1.routes.ts.
  • Remove the orphan deprecation comment block + the sibling already-bare-deleted-routes note in src/http/v1/dashboard/routes.ts.
  • Remove the three integration tests that asserted the 410 behavior of the deleted stubs (bundle-admin.test.ts, dashboard-metrics.test.ts, events-ws.test.ts).
  • Bump version to 0.7.3.

The live per-PP handlers (dashboard/*.ts, entities/post.ts, entities/challenge.ts, events/ws-handler.ts) are unchanged and stay mounted via providers/routes.ts.

Test plan

  • deno fmt --check clean
  • deno lint clean
  • deno task test:unit — 64 passed / 0 failed
  • deno task test:integration — 96 passed / 0 failed (99 → 96 is the 3 deleted 410-stub tests, no regressions)
  • Curl every old path against a locally-running build — all 16 return 404 (not 410)
  • Curl per-PP replacement paths (channels, metrics, treasury, entities) — all respond live (401 from jwtMiddleware on the protected ones; the public entities POST hits requirePpExists and answers Provider not found)
  • Grep all consumer repos (provider-console, council-console, network-dashboard, network-dashboard-platform, moonlight-pay, browser-wallet, moonlight-sdk, local-dev) — zero non-test call sites on any of the 16 deleted paths

AquiGorka added 2 commits June 8, 2026 11:08
…ard / entities / events surface

PR #106 migrated every dashboard/entities/events route to the per-PP
/api/v1/providers/:ppPublicKey/... shape and left 410 Gone stubs at the
old un-scoped paths so callers could migrate. The migration is settled
and no caller in any of the consumer repos still hits the un-scoped
paths, so drop the stubs and let the router answer 404 for those URLs.

Removes 14 stubs in dashboard/routes.ts plus the single-stub entities/
and events/ routers (and their mount in v1.routes.ts), the local gone()
helper, the deprecation comment block, and the three integration tests
that asserted the 410 behavior of these specific stubs.

The live per-PP handlers (dashboard/*.ts, entities/post.ts,
entities/challenge.ts, events/ws-handler.ts) are unchanged and stay
mounted through providers/routes.ts.

Follow-up to #106.
@AquiGorka
AquiGorka merged commit 2a04fa2 into main Jun 8, 2026
7 checks passed
@AquiGorka
AquiGorka deleted the purge-deprecation-stubs branch June 8, 2026 15:08
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.

1 participant