chore: remove unused endpoints and dead code paths#236
chore: remove unused endpoints and dead code paths#236hankbobtheresearchoor wants to merge 3 commits into
Conversation
Removes three HTTP endpoints and all their exclusive callee functions:
1. GET /v1/provider/node-earnings — per-node earnings history
- Remove handleNodeEarnings handler
- Remove GetProviderEarnings and GetProviderEarningsSummary from
store interface and Postgres/Memory implementations
- Rewire integration tests to use GetAccountEarnings instead
2. GET /v1/billing/wallet/balance — wallet balance lookup
- Remove handleWalletBalance handler (billings.Ledger().Balance()
still used by other endpoints)
3. GET /v1/runtime/manifest — runtime hash inspection
- Remove handleRuntimeManifest handler
- Remove runtime_manifest:v1 cache invalidation from release handlers
- Runtime manifest infrastructure preserved (SyncRuntimeManifest,
SetRuntimeManifest, knownRuntimeManifest) — still used for
provider runtime verification
None of these endpoints are consumed by the Swift provider or console UI.
|
@hankbobtheresearchoor is attempting to deploy a commit to the EigenLabs Team on Vercel. A member of the Team first needs to authorize it. |
|
I'll take a look at this. |
hankbobtheresearchoor
left a comment
There was a problem hiding this comment.
Review Summary
Clean removal PR — all three endpoints, their handlers, route registrations, and store methods are consistently removed. Build + tests pass.
Two minor cleanup items (see inline):
- 🟡 Orphaned
nodeEarningsResponsestruct in test file - 🟡 Indentation drift in integration test
Vercel failures are the Authorization required pattern (not a code defect).
| t.Fatal("expected at least one provider earning record") | ||
| } | ||
| // Step 8: Verify account earnings were recorded. | ||
| earnings, err := st.GetAccountEarnings(accountID, 10) |
There was a problem hiding this comment.
🟡 Indentation drifted — these lines have an extra tab compared to the surrounding function body. The // Step 8 comment at line 970 is at the correct level, but lines 971-983 are double-indented. Also expectedPayout{ at line 983 is missing a space before the brace (expectedPayout {).
|
🟡 Orphaned type: |
… struct
- Dedent lines in billing_integration_test.go Step 8 block
- Fix missing space before brace in expectedPayout {
- Remove unused nodeEarningsResponse type
|
Done. 51e8a79: fixed indentation drift in billing_integration_test.go Step 8 block plus missing space before brace, and removed orphaned nodeEarningsResponse struct. All tests pass. |
|
@hankbobtheresearchoor Coordinator CI tests failing, please fix and rebase |
|
On it — checking the CI failures and will fix + rebase. |
…eTotalsAndCurrentBalance
|
Fixed gofmt in billing_earnings_test.go. Commit: 67ab3b6. Tests pass. Force-push blocked for rebase — branch is BEHIND but MERGEABLE. |
Summary
Removes three HTTP endpoints that are not consumed by any client — Swift provider, console UI, or external integrations — along with their exclusive callee functions.
Changes
1.
GET /v1/provider/node-earnings— per-node earnings historyhandleNodeEarningshandler (billing_handlers.go)GetProviderEarnings()andGetProviderEarningsSummary()from store interface and both Postgres/Memory implementationsGetAccountEarnings()(account-scoped) instead ofGetProviderEarnings()(node-scoped)TestNodeEarningsUsesLifetimeTotalsInsteadOfLimitedSlicetestTestProviderEarnings_GetByProviderKeyandTestProviderEarnings_NewestFirststore tests; renamesTestProviderEarnings_LimitRespected→TestProviderEarnings_LimitForAccount2.
GET /v1/billing/wallet/balance— wallet balance lookuphandleWalletBalancehandler (billing_handlers.go)billing.Ledger().Balance()is preserved — still used by other endpoints (stripe_payouts.go, consumer.go)3.
GET /v1/runtime/manifest— runtime hash inspectionhandleRuntimeManifesthandler (server.go) and route registrationruntime_manifest:v1cache invalidation from release_handlers.goSyncRuntimeManifest,SetRuntimeManifest,knownRuntimeManifest) kept intact — still in active use for provider runtime verification on registration and challenge revalidationencoding/jsonimport from server.goFiles changed
Verification
go build ./cmd/coordinator— cleango test ./...— all passNeed help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.