Skip to content

Ship docs/ in the image, so /docs is not empty in production - #4

Merged
ralyodio merged 1 commit into
mainfrom
fix-docs-in-image
Aug 31, 2026
Merged

Ship docs/ in the image, so /docs is not empty in production#4
ralyodio merged 1 commit into
mainfrom
fix-docs-in-image

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

/docs/api, /docs/cli, /docs/mcp and /docs/plugins all answer 404 on tsbb.dev right now, from the moment #3 deployed.

.dockerignore excluded docs/, so the built image has no documents to render. The index still answers a healthy 200 — it renders its "This install was deployed without its docs directory" fallback — which is why the deploy looked fine.

docs        200      <- the empty-state fallback
docs/api    404
docs/cli    404
docs/mcp    404

The guard

Nothing that boots the app in a checkout could have caught this: the files are right there, and all ten docs tests passed. So the guard goes on the thing that was actually wrong. test/docs.test.ts now reads .dockerignore and fails if docs/ is excluded — verified by re-adding the line and watching it go red:

✖ ships the documents in the image
  AssertionError: .dockerignore excludes docs, so the built image would serve no documentation

The route also warns at boot when the directory is missing. A documentation site that silently serves nothing is a failure with no symptom anyone would notice from the outside, and it deserves a line in the log.

Testing

146 tests, up from 145. pnpm typecheck clean.

Note CI cannot run — the account is locked over a GitHub Actions billing issue, so every job dies in a few seconds with "The job was not started because your account is locked due to a billing issue." That is unrelated to this change; local runs are the evidence.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SnsZkEBoc39vYSN2hKLAwS

.dockerignore excluded docs/, so the built image had no documents to render:
every /docs/{api,cli,mcp,plugins} page answered 404 in production while the
index rendered its "deployed without its docs directory" fallback and a
perfectly healthy 200. Live on tsbb.dev the moment #3 deployed.

Nothing that boots the app in a checkout could have caught it — the files
are right there — so the guard goes on the thing that was actually wrong.
test/docs.test.ts now reads .dockerignore and fails if docs/ is excluded,
and the route warns at boot when the directory is missing, because a
documentation site that silently serves nothing is a failure with no
symptom anyone would notice from the outside.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SnsZkEBoc39vYSN2hKLAwS
@ralyodio
ralyodio merged commit 30bf2df into main Aug 31, 2026
2 of 3 checks passed
@ralyodio
ralyodio deleted the fix-docs-in-image branch August 31, 2026 20:51
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.

1 participant