Repository navigation
chore: delete pkg/api, twelve routes nothing served (#367) - #396
Merged
Merged
Conversation
559 lines of handlers and 999 lines of tests declaring /health, /health/components, /health/live, /health/ready, /status, /status/operations, /status/operations/, /status/history, /metrics, /api/v1/mounts, /api/v1/mounts/ and /info — with zero importers outside the package. A running mount's real HTTP surface is /metrics from internal/metrics and /health from internal/health. Nothing users could reach is gone, because nothing users could reach was ever there. Deleted rather than left waiting for a caller, because a declared-but-unserved surface is worse than an absent one: it produces documentation that cannot be checked against behavior. It already had. The six fabricated endpoints #336 had to correct in the docs playground looked plausible precisely because a package in this tree declared their shapes, and a reviewer comparing the docs to the code would have found the routes and stopped there. Docs follow the deletion rather than being left to drift: - docs/index.md's "not yet wired up" row is replaced with a note saying it was deleted and why, so the reasoning survives the row. - docs-platform's sidebar had a 'REST API' -> /api/rest entry pointing at a page that has never existed. Removed, with a comment saying what a mount does serve. - docs/ARCHITECTURE_EVOLUTION.md's Phase 2 diagram shows a "REST API" box. That file is explicitly a proposal and its header already lists where it diverges from the code, so the divergence is added to that list rather than the diagram being quietly redrawn. The pkg/api 73 floor is out of .coverage-floors — required, not tidying: the gate fails on a floor whose package produces no profile lines ("a floor nothing measures is a gate that has quietly stopped gating"). Verified by running scripts/coverage-gate.sh over a real profile: 36 packages at or above their floor, exit 0. Worth stating plainly: those 999 lines of tests are why the floor was as high as it was. A package can be well tested and still not be part of the product, and coverage cannot tell the difference. Closes #367
scttfrdmn
force-pushed
the
chore/367-delete-pkg-api
branch
from
August 9, 2026 01:14
ddb5a34 to
aae5c40
Compare
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.
Closes #367.
What is deleted
pkg/api— 559 lines of handlers, 999 lines of tests, zero importers outside the package:Twelve declared routes:
/health,/health/components,/health/live,/health/ready,/status,/status/operations,/status/operations/,/status/history,/metrics,/api/v1/mounts,/api/v1/mounts/,/info.A running mount's actual HTTP surface is two endpoints —
/metrics(internal/metrics/collector.go) and/health(internal/health/checker.go). Nothing users could reach is gone, because nothing users could reach was ever there.Why deleted rather than kept waiting for a caller
A declared-but-unserved HTTP surface is worse than an absent one: it produces documentation that cannot be checked against behavior. It already had. The six fabricated endpoints #336 had to correct in the docs playground looked plausible precisely because a package in this tree declared their shapes — a reviewer comparing docs against code would have found the routes and stopped there. That is the failure mode being removed, not just the line count.
Docs follow the deletion
Rather than deleting a row and leaving the reasoning to be rediscovered:
docs/index.md— the "not yet wired up" row forpkg/apiis replaced with a paragraph saying it was deleted and why. The table is a list of things that may be wired up; this one will not be.docs-platform/.vitepress/config.js— a sidebar entry'REST API' → /api/restpointed at a page that has never existed anywhere in the tree (a dead link independent of this deletion). Removed, with a comment naming what a mount does serve.docs/ARCHITECTURE_EVOLUTION.md— the Phase 2 diagram has a "REST API" box. That file's header already states it is a design sketch and lists where it diverges from the code, so this divergence joins that list. The diagram is not redrawn: proposing a WebDAV/REST surface is a reasonable thing for a proposal to do, and silently editing a drawing to match today would make the file less honest, not more.The CHANGELOG's other
pkg/apimentions are historical release records and are left alone — they describe what shipped at the time, which is the one thing a changelog must not revise.The coverage floor was required, not tidying
.coverage-floorshadpkg/api 73. Removing it is not housekeeping —scripts/coverage-gate.shfails on a floor whose package produces no profile lines:Verified by running the gate over a real profile rather than reasoning about it: 36 packages at or above their floor, exit 0, no
FAILlines, and theno floor setlist unchanged.Worth recording: those 999 lines of tests are the reason the floor was as high as it was. A package can be well tested and still not be part of the product, and coverage cannot tell the difference.
Verification
go build ./...— clean (nothing imported it)gofmt -l .,go vet ./...,golangci-lint run— cleango test -race ./...— full suite, exit 0./scripts/coverage-gate.sh coverage.out .coverage-floors— exit 0npx [email protected] docs/index.md docs/ARCHITECTURE_EVOLUTION.md— 0 issues