paperclip/server
tmartin2113 3b16ac3804
fix(server): use run.id for activity_log in heartbeat invoke/resume (#3424)
## Summary

- The heartbeat invoke and resume endpoints log activity with
`actor.runId` (the caller's auto-generated run ID from JWT), which
hasn't been registered in `heartbeat_runs` yet
- This causes a FK constraint violation: `activity_log.run_id →
heartbeat_runs.id`
- Fix: use `run.id` (the newly created heartbeat_run) instead, which is
guaranteed to exist in the table

## Test plan

- [ ] Trigger a heartbeat invoke via the API — verify no FK constraint
error in logs
- [ ] Trigger a heartbeat resume — verify activity_log row is created
successfully
- [ ] Verify existing activity_log queries still return correct results

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-07-07 18:48:08 -05:00
..
scripts fix(server): use stable tsx/cli entry point in dev-watch 2026-03-28 06:42:03 +07:00
src fix(server): use run.id for activity_log in heartbeat invoke/resume (#3424) 2026-07-07 18:48:08 -05:00
CHANGELOG.md chore: release v0.3.1 2026-03-12 13:09:22 -05:00
package.json build(deps): bump sharp from 0.35.2 to 0.35.3 (#9061) 2026-07-07 13:03:30 -07:00
tsconfig.json Fix root TypeScript solution config 2026-03-09 14:09:30 -05:00
vitest.config.ts refactor(deps-dev): bump vitest from 3.2.4 to 4.1.8 (#7581) 2026-06-05 21:11:32 -07:00