Background
The laddr-import plan (PR #24) left this Validation criterion unchecked:
…with a Notes line claiming "those routes are owned by read-api and aren't built yet." That's not accurate at the time the PR was opened — read-api (PR #22) merged at 17:50 UTC; laddr-import's PR opened at 22:29 UTC. The /api/projects/:slug and /api/people/:slug endpoints existed.
What to do
Add an end-to-end test that:
- Runs the importer against
apps/api/scripts/fixtures/laddr-fixture.sql into a createTestRepo() + createTestPrivateStore().
- Boots
buildApp({ overrideEnv: { CFP_DATA_REPO_PATH: <the test repo path>, ... } }).
- Picks 100 random imported records (or all of them if the fixture has fewer); for each, asserts
GET /api/projects/<slug> and/or GET /api/people/<slug> returns the documented response shape.
- Ticks the validation criterion in the plan.
Note: plans are frozen after merge, so the tick happens in this issue's PR via a small docs amendment under "Notes" rather than rewriting the criterion. Add a line like "Validation criterion 9 (slug reachability) closed out via Issue #N's tests; see [link]."
Why bother
Closes the loop on a real validation gap. The import is one-shot — wrong slug → wrong URL forever. The test costs ~5min to write and pays for itself the first time it catches a slugify mistake.
Background
The
laddr-importplan (PR #24) left this Validation criterion unchecked:…with a Notes line claiming "those routes are owned by
read-apiand aren't built yet." That's not accurate at the time the PR was opened —read-api(PR #22) merged at 17:50 UTC;laddr-import's PR opened at 22:29 UTC. The/api/projects/:slugand/api/people/:slugendpoints existed.What to do
Add an end-to-end test that:
apps/api/scripts/fixtures/laddr-fixture.sqlinto acreateTestRepo()+createTestPrivateStore().buildApp({ overrideEnv: { CFP_DATA_REPO_PATH: <the test repo path>, ... } }).GET /api/projects/<slug>and/orGET /api/people/<slug>returns the documented response shape.Note: plans are frozen after merge, so the tick happens in this issue's PR via a small docs amendment under "Notes" rather than rewriting the criterion. Add a line like "Validation criterion 9 (slug reachability) closed out via Issue #N's tests; see [link]."
Why bother
Closes the loop on a real validation gap. The import is one-shot — wrong slug → wrong URL forever. The test costs ~5min to write and pays for itself the first time it catches a slugify mistake.