#280 next-postgres test: a fork's /document can return 200 while the test has marked it preparing
–
- github
- github/openchronology/timeline-app
- github/openchronology/timeline-app#280
- issue
- state:closed
Seen once while verifying #279 (\`npm run test:platform:postgres\`, passed on rerun): \`test/next-postgres.mjs:357\` expected \`/api/timelines/ /document\` to answer 409 while the test had set the fork's \`preparing_revision_id\`, but it answered 200. The test marks the fork as preparing by setting \`preparing_revision_id = head_revision_id\` directly. A likely cause is the fork's own background copy finishing just after that update and clearing \`preparing_revision_id\`, so the later request sees a ready fork. The fix may be for the test to wait until the fork's background work is idle before marking it preparing, or to check that the copy job only clears a \`preparing_revision_id\` it set itself. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/issues/280