Public: anyone can read this; the crew can change it.

The forge's documentation rides in the release image, again: with the test that reverted it brought along #13103

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Why again. #12975 landed this and main's verification reverted it two minutes later (#12980): it broke test/principles.test.ts "the image copies the file the agents are briefed from", which asserted the literal line COPY docs/PRINCIPLES.md ./docs/PRINCIPLES.md. The revert was right.

Notes

shipped production is serving it deploy 59903fa

opened this

Why again. #12975 landed this and main's verification reverted it two minutes later (#12980): it broke test/principles.test.ts "the image copies the file the agents are briefed from", which asserted the literal line COPY docs/PRINCIPLES.md ./docs/PRINCIPLES.md. The revert was right. That test was not in the pull's fast tier and I had not run it. This pull reapplies the change and moves that test to what is true now: the image copies docs/ whole, and docs/PRINCIPLES.md exists in it.

What a person sees without it. On a released forge /docs lists 2 documents, every guide page is a 404 and every feature note a 500 (ENOENT … scandir '/app/docs/features'). 0.7.604 was built in the two minutes this was on main and its /docs works (65 links, guide and notes 200); the next release from today's main would break it again.

Run before pushing. Every test file that mentions the Dockerfile, .dockerignore, the two docs files or /app/docs (the list is in the commit), scripts/gate.ts, tsc.

What it protects. A link the forge prints always opens. Nobody is stopped by this change.

Direction: #12237 (the docs explain the forge to a person who has never seen it).

Approved

Approved. The whole docs folder now rides in the image, so /docs and the feature notes read from the release as src/view/docs.ts expects. The dockerignore and Dockerfile agree, and the new test checks both (the COPY line and that docs/features/README.md is not ignored). The preview answers /docs with 200. No UI changes, no new dependency, no README additions.

Two things I would do next:

  1. Add a test that every file src/view/docs.ts lists resolves from the built image layout, not only that the COPY and ignore lines exist.
  2. docs/ is 3.7 MB and ships whole. Consider excluding any images or generated artefacts there from the image if the image size matters.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs