feat(engine): add triggered_at to durable event log and and write to it - #4698
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
Benchmark resultsCompared against |
561193b to
c47a31f
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds a triggered_at timestamp to the v1 durable event log entries so the log can act as an outbox, recording when the trigger-side effects have committed, and stamps the field on insert in the current single-transaction write path.
Changes:
- Added
triggered_at TIMESTAMPTZtov1_durable_event_log_entry(schema + migration). - Updated sqlc models/query outputs to include the new field.
- Updated durable event log bulk insert to write
triggered_atat insert time (NOW()).
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| sql/schema/v1-core.sql | Adds triggered_at column to the durable event log entry table (with explanatory comment). |
| pkg/repository/sqlcv1/models.go | Extends V1DurableEventLogEntry model with TriggeredAt. |
| pkg/repository/sqlcv1/durable_event_log.sql.go | Regenerated sqlc output to select/scan triggered_at across relevant queries and return types. |
| pkg/repository/sqlcv1/durable_event_log.sql | Updates bulk insert to include and stamp triggered_at. |
| cmd/hatchet-migrate/migrate/migrations/20260814121436_v1_0_141.sql | Adds goose migration to add/drop the new column. |
Files not reviewed (2)
- pkg/repository/sqlcv1/durable_event_log.sql.go: Generated file
- pkg/repository/sqlcv1/models.go: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Description
Adds a new
triggered_atcolumn to the durable event log (for run / wait entries) which basically lets this work as an outbox, where the trigger logic can stamp it with a timestamp on the (future) second txWill follow this up in a second PR which splits up the writes into two txns
Type of change
What's Changed
Checklist
Changes have been:
🤖 AI Disclosure
No AI