Repository navigation
fix(docs): docs-platform is a documentation site, and now only that - #366
Conversation
70398ce to
1478d76
Compare
|
Correcting one number in the description above, because it was measured wrong The dependency reduction is 689 packages → 130, not 471 → 79. The original
So the reduction is larger than claimed, not smaller — but "larger" is not the Fixed in the changelog entry and in |
`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
1478d76 to
b543d28
Compare
Closes #336.
#336 was filed as four
package.jsonkeys naming files that do not exist:mainandstartanddevpointed atsrc/server.js, which has no historyin this repository, and
lint/format/buildnamed aclient/directorythat has none either. So
npm start— the obvious thing to type in adirectory 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.jswas 549 lines ofExpress 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.
CodeRunner/api/code-runner/executeApiPlayground/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
.vueimports brokevitepress buildloudly andwere therefore found. These two compiled, shipped, and failed at the
reader.
vitepress buildcannot see that difference — a component thatrenders and calls a dead endpoint is a successful build. That is recorded in
the
docs-sitejob comment rather than papered over with another job; what agate 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. Arunning mount serves
/healthand/metrics, at the addressesmonitoring.health_checks.addrandmonitoring.metrics.addrconfigure. Thepages 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:
DockerfileCOPYsapi/,tutorials/,sdks/andpublic/— none ofwhich exist in this directory — so it fails on the first one.
docker-compose.ymlbind-mounts./nginx.conf,./ssl,./prometheus.ymland./grafana/across seven services, four more absentpaths, and pulls
objectfs/objectfs:latest, an image this project does notpublish; 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 thetree 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 → 79npm audit: 0 vulnerabilitiesuuidoverride is gone — the advisory it forced was reachable onlythrough
dockerode→docker-modemVerification
npx vitepress build .succeeds before and afternpm auditcleango test ./internal/config/passes: the docs-link gate, the symbol gate,and
TestNPMLockfilesAgreeWithTheirManifests, which is what wouldotherwise catch a trimmed manifest against a stale lockfile at
npm citime in whichever job ran first
One thing worth naming: the first draft of the replacement prose on
index.mdpointed readers atdocs/api-reference.md. That file does notexist — the HTTP surface is documented nowhere — so the sentence was rewritten
to name
/health,/metrics, the twoaddrkeys andconfigs/example.yaml.Writing a dead reference into the fix for dead references is exactly the class
of defect this PR removes.