Automations and webhooks for the AT Protocol airglow.run

fix(logs): keep runs that straddle a save on the right side of the update marker #101

Open opened by tyb.there-hugo.dev

Follow-up to #38.

Problem #

The update marker promises that "runs above it ran on the new version, runs below it on an older one". groupLogsByRun places each run by its newest row. A run that started before the save and wrote a row after it, such as one parked at an AI step with runState "in-progress", is placed above the marker even though it started on the old version.

Evidence #

  • lib/automations/update-log.ts:1-4: the marker's contract.
  • groupLogsByRun: groups and orders runs by their newest row.

Expected #

A run is placed by when it started (its first row), or the log shows that it spans the save. The marker's contract holds for every run.

Acceptance criteria #

Sign up or Sign in to add to the discussion.