Skip to content

fix(docs): docs-platform is a documentation site, and now only that - #366

Merged
scttfrdmn merged 2 commits into
mainfrom
fix/docs-platform-entry-points-336
Aug 5, 2026
Merged

scttfrdmn merged 2 commits into
mainfrom
fix/docs-platform-entry-points-336

Conversation

@scttfrdmn

Copy link
Copy Markdown
Owner

Closes #336.

#336 was filed as four package.json keys naming files that do not exist:
main and start and dev pointed at src/server.js, which has no history
in this repository, and lint/format/build named a client/ directory
that has none either. So npm start — the obvious thing to type in a
directory whose manifest calls itself an application — had never worked, for
the whole life of the file.

The question the issue left open was whether the API server was part of the
supported surface. It is not. src/api-server.js was 549 lines of
Express serving a health endpoint, a Docker-backed code-execution sandbox, a
Swagger UI, a socket.io channel and a proxy to ObjectFS, and nothing here
built it, tested it, deployed it, or documented how to start it correctly.

The components are the part worth stating plainly, because they rendered

This is the finding that was not in the issue.

component control it drew where it POSTed
CodeRunner a Run button on 26 code blocks across 3 pages /api/code-runner/execute
ApiPlayground a Send Request button on 3 pages /api-playground/...

Both endpoints existed only in the server nothing ran. So every one of those
buttons was inert on every page it ever appeared on, with nothing to tell
the reader why.

Compare #214: three phantom .vue imports broke vitepress build loudly and
were therefore found. These two compiled, shipped, and failed at the
reader. vitepress build cannot see that difference — a component that
renders and calls a dead endpoint is a successful build. That is recorded in
the docs-site job comment rather than papered over with another job; what a
gate cannot see, it cannot hold.

Six of the seven endpoints the playground offered do not exist in ObjectFS
at all
: /api/v1/metrics, /api/v1/mount, /api/v1/mount/{mount_point},
/api/v1/mounts, /api/v1/storage/objects, and a second health route. A
running mount serves /health and /metrics, at the addresses
monitoring.health_checks.addr and monitoring.metrics.addr configure. The
pages say that now, with the config keys named.

The Dockerfile and compose file were statically impossible

Both go for the same reason, and each was independently unusable:

  • Dockerfile COPYs api/, tutorials/, sdks/ and public/ — none of
    which exist in this directory — so it fails on the first one.
  • docker-compose.yml bind-mounts ./nginx.conf, ./ssl,
    ./prometheus.yml and ./grafana/ across seven services, four more absent
    paths, and pulls objectfs/objectfs:latest, an image this project does not
    publish; releases go to ghcr.io/scttfrdmn/objectfs.

Deployment manifests that actually work are #146's job, which is now their
only home.

471 packages to 79

Thirteen runtime dependencies existed for that one unbuilt file: express,
cors, helmet, compression, morgan, swagger-ui-express,
swagger-jsdoc, socket.io, dockerode, axios, dotenv, prismjs,
yaml. Two of them (prismjs, axios) had no reference anywhere in the
tree even before this change. Seven dev dependencies went too — nodemon,
jest, eslint, prettier, typescript, @types/express, @types/node —
backing test, lint and format scripts that all named absent directories and
that no CI job ran.

  • npm ci: 471 packages → 79
  • npm audit: 0 vulnerabilities
  • the uuid override is gone — the advisory it forced was reachable only
    through dockerode → docker-modem

Verification

  • npx vitepress build . succeeds before and after
  • npm audit clean
  • go test ./internal/config/ passes: the docs-link gate, the symbol gate,
    and TestNPMLockfilesAgreeWithTheirManifests, which is what would
    otherwise catch a trimmed manifest against a stale lockfile at npm ci
    time in whichever job ran first

One thing worth naming: the first draft of the replacement prose on
index.md pointed readers at docs/api-reference.md. That file does not
exist — the HTTP surface is documented nowhere — so the sentence was rewritten
to name /health, /metrics, the two addr keys and configs/example.yaml.
Writing a dead reference into the fix for dead references is exactly the class
of defect this PR removes.

@scttfrdmn
scttfrdmn force-pushed the fix/docs-platform-entry-points-336 branch 2 times, most recently from 70398ce to 1478d76 Compare August 5, 2026 23:03
@scttfrdmn

Copy link
Copy Markdown
Owner Author

Correcting one number in the description above, because it was measured wrong
and it is the headline figure.

The dependency reduction is 689 packages → 130, not 471 → 79. The original
figure came from counting node_modules directory entries rather than what
npm ci reports, and the two differ (npm dedupes, and nested copies are not
top-level directories). Measured properly, installing each side's committed
lockfile in a clean directory:

npm ci reports lockfile packages entries
before 689 739
after 130 180

So the reduction is larger than claimed, not smaller — but "larger" is not the
point; the point is that the number in the changelog is now the one npm ci
prints, which anyone can reproduce with npm ci --no-audit --no-fund in
docs-platform. npm audit reporting zero vulnerabilities is unchanged and was
measured directly.

Fixed in the changelog entry and in docs-platform/README.md; force-pushed.

`main` and `start` and `dev` pointed at `src/server.js`, which has no
history in this repository, and `lint`/`format`/`build` named a `client/`
directory that has none either. So `npm start` — the obvious thing to type
in a directory whose package.json calls itself an application — had never
worked, for the whole life of the file.

The question the issue left open was whether the API server was part of the
supported surface. It is not. `src/api-server.js` was 549 lines of Express
serving a health endpoint, a Docker-backed code-execution sandbox, a Swagger
UI, a socket.io channel and a proxy to ObjectFS, and nothing in this
repository built it, tested it, deployed it, or documented how to start it
correctly.

The two Vue components are the part worth stating plainly, because they were
worse than broken — they rendered. `CodeRunner` drew a "Run" button on 26
code blocks across three pages and POSTed to `/api/code-runner/execute`;
`ApiPlayground` drew a "Send Request" button on three pages and fetched
`/api-playground/...`. Both endpoints existed only in the unrun server, so
every one of those buttons was inert on every page it ever appeared on, with
nothing to tell the reader why. The three phantom components removed in #214
failed at build time and were therefore found; these two compiled, shipped
and failed at the reader. `vitepress build` cannot see that difference,
which is recorded in the `docs-site` job comment rather than papered over
with another job.

Six of the seven endpoints the playground offered do not exist in ObjectFS
at all. A running mount serves `/health` and `/metrics`, at the addresses
`monitoring.health_checks.addr` and `monitoring.metrics.addr` configure. The
pages say that now.

The Dockerfile and docker-compose.yml go for the same reason, and each was
independently unusable: the Dockerfile COPYs `api/`, `tutorials/`, `sdks/`
and `public/`, none of which exist here, so it fails on the first one; the
compose file bind-mounts four more absent paths across seven services and
pulls `objectfs/objectfs:latest`, an image this project does not publish.
Deployment manifests that work are #146's job.

Thirteen runtime dependencies went with the server, two of which (prismjs,
axios) had no reference anywhere in the tree even before this change, along
with seven dev dependencies backing scripts that all named absent
directories and that no CI job ran. `npm ci` installs 79 packages where it
installed 471, `npm audit` reports zero vulnerabilities, and the `uuid`
override is gone because the advisory it forced was reachable only through
dockerode -> docker-modem.

Verified: `npx vitepress build .` succeeds, the regenerated lockfile agrees
with the trimmed manifest per TestNPMLockfilesAgreeWithTheirManifests, and
internal/config's docs-link and symbol gates pass.

Closes #336
@scttfrdmn
scttfrdmn force-pushed the fix/docs-platform-entry-points-336 branch from 1478d76 to b543d28 Compare August 5, 2026 23:06
@scttfrdmn
scttfrdmn merged commit 974a5b0 into main Aug 5, 2026
33 checks passed
@scttfrdmn
scttfrdmn deleted the fix/docs-platform-entry-points-336 branch September 20, 2026 05:25
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.

docs-platform: package.json, Dockerfile and docker-compose all name files that do not exist

1 participant