Context
A repo-wide deadcode ./cmd/... triage (2026-07-14, alongside #745/#746/#747) found, beyond mechanically-deletable symbols, several production-unreachable subtrees kept alive only by their own tests. These need owner/product decisions, not routine cleanup — some look like shelved features, one may indicate missing input validation.
Subtrees needing a decision
| Subtree |
~LOC |
What it is |
Recommendation |
internal/tee/coco.go + internal/tee/verify.go (+MarshalReport) |
577+ |
Entire CoCo (Confidential Containers) install/check + TDX/SNP/Nitro attestation-verification machinery. The tee package itself is live (ParseTEEType/NewKey/Attest), but this whole half is orphaned (from monetization M1-M3, b2bc258). |
Biggest item — decide: is confidential-compute verification still on the roadmap? Kill or wire in. |
internal/inference/client.go |
239 |
Encrypted-replies HTTP client (EnableEncryptedReplies, pubkey fetch, RoundTripper). Staged feature, never wired. |
Decide with the TEE item — they're the same story. |
internal/inference/detect.go (ProbeEndpoint/ScanLocalEndpoints/DetectServerType/ParseModelsResponse subtree) |
345 |
Local inference-server auto-detection — apparently superseded by the discovery path actually used at stack up. Verify which scan path autoDetectLocalProviders really uses before killing. |
Confirm supersession, then kill. |
internal/validate/validate.go (whole package) |
134 |
Generic CLI input-validation helpers (Namespace, WalletAddress, ChainName, Price, Path, NoControlChars) — built, tested, never wired to any command. |
⚠️ Check first whether the CLI is missing input validation these were meant to provide; wiring in may beat deleting. |
internal/openclaw/wallet.go, wallet_backup.go, wallet_resolve.go |
~1200 |
OpenClaw-specific wallet import/backup/namespace-resolution — shadowed by the live hermes package equivalents (same names, different packages). |
Kill after verifying no OpenClaw runbook still documents these paths. |
internal/openclaw/openclaw.go overlay-sync cluster |
— |
SyncOverlayModels root removed in #747; unit-tested helpers (rankModels, patchAgentModelsJSON, patchOverlayModelList) remain, now with no prod caller. |
Wire in (model changes → overlay sync?) or kill helpers + tests. |
internal/erc8004/client.go superseded methods |
~150 |
Register/RegisterDetailed/SetAgentURI/SetMetadata/NewClient — cleanly superseded by the ...WithOpts(Detailed) variants prod calls. |
Kill (with their tests) — textbook superseded API. |
internal/x402/chains.go ResolveAssetInfo/BuildV1Requirement, internal/x402/tokens.go TokenSupportedOnChain, internal/x402/serviceoffer_source.go RouteRulesForOffer |
~200 |
Superseded x402 helpers; RouteRulesForOffer is pinned by a cross-package golden test (moderate blast radius). |
Kill the first three; decide on RouteRulesForOffer with the golden-test owner. |
internal/hermes/hermes.go hermesExecArgs |
— |
Doc comment self-identifies as "legacy argv-builder signature". |
Kill. |
Not debt (deadcode false positives, verified): internal/images test-support exports ("exported for tests" by design), internal/ui.NewForTest, internal/enclave.LoadKey/DeleteKey (cross-package test setup), all legacy/deprecated-commented migration code (actively functioning compat paths).
Mechanical zero-reference deletions and stale flow-script fixes were applied in #747. Full triage table lives in that PR's history.
Context
A repo-wide
deadcode ./cmd/...triage (2026-07-14, alongside #745/#746/#747) found, beyond mechanically-deletable symbols, several production-unreachable subtrees kept alive only by their own tests. These need owner/product decisions, not routine cleanup — some look like shelved features, one may indicate missing input validation.Subtrees needing a decision
internal/tee/coco.go+internal/tee/verify.go(+MarshalReport)teepackage itself is live (ParseTEEType/NewKey/Attest), but this whole half is orphaned (from monetization M1-M3, b2bc258).internal/inference/client.goEnableEncryptedReplies, pubkey fetch, RoundTripper). Staged feature, never wired.internal/inference/detect.go(ProbeEndpoint/ScanLocalEndpoints/DetectServerType/ParseModelsResponse subtree)stack up. Verify which scan pathautoDetectLocalProvidersreally uses before killing.internal/validate/validate.go(whole package)Namespace,WalletAddress,ChainName,Price,Path,NoControlChars) — built, tested, never wired to any command.internal/openclaw/wallet.go,wallet_backup.go,wallet_resolve.gohermespackage equivalents (same names, different packages).internal/openclaw/openclaw.gooverlay-sync clusterSyncOverlayModelsroot removed in #747; unit-tested helpers (rankModels,patchAgentModelsJSON,patchOverlayModelList) remain, now with no prod caller.internal/erc8004/client.gosuperseded methodsRegister/RegisterDetailed/SetAgentURI/SetMetadata/NewClient— cleanly superseded by the...WithOpts(Detailed)variants prod calls.internal/x402/chains.goResolveAssetInfo/BuildV1Requirement,internal/x402/tokens.goTokenSupportedOnChain,internal/x402/serviceoffer_source.goRouteRulesForOfferRouteRulesForOfferis pinned by a cross-package golden test (moderate blast radius).RouteRulesForOfferwith the golden-test owner.internal/hermes/hermes.gohermesExecArgsNot debt (deadcode false positives, verified):
internal/imagestest-support exports ("exported for tests" by design),internal/ui.NewForTest,internal/enclave.LoadKey/DeleteKey(cross-package test setup), alllegacy/deprecated-commented migration code (actively functioning compat paths).Mechanical zero-reference deletions and stale flow-script fixes were applied in #747. Full triage table lives in that PR's history.