Files
PaperClipAI/server
DottaandClaude Opus 4.8 7df36ef615 Stop agent doc writes 500ing on a run-id unknown to the local DB (PAP-10583)
An agent presents its live X-Paperclip-Run-Id, which can reference a heartbeat
run that does not exist in this server's DB (e.g. a worktree dev environment
whose DB never recorded the run). That run-id is FK-constrained on
issues.checkout_run_id/execution_run_id, document_revisions.created_by_run_id
and activity_log.run_id, so persisting it raised a FK violation that surfaced as
a 500. Board users were unaffected because they carry no run-id.

Resolve the run-id to null at each FK-bearing write site when the run is unknown:
checkout adoption still grants the assigned agent ownership (without a lock),
document provenance and activity logging degrade run_id to null. In real
deployments the run exists, so the value is persisted unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 03:43:33 +00:00
..
2026-03-12 13:09:22 -05:00