fabro/lib
Bryan Helmkamp 6e38ad27fb
Order position-keyed platform records by their firing, not their clock
A checkpoint record is stamped by the server and Petri's records by the
worker, so ordering the stream by recorded_at could put a stage's
checkpoint after the next stage's route. A platform record that carries
a Petri position now goes right after its firing's finish: before the
firing's first routing.resolved in the pass (the next firing's
visit.started hangs off that record), else after the firing's last
event, else, when the firing finished in an earlier pass, before the
first event of a later firing. The hook writes the record after the
driver appended the attempt's finish, but the driver's store writer
flushes on its own schedule, so the record can be committed before its
firing's step.finished; such a record is held back, with every platform
record after it, until the finish is in the stream, or the run finished.
The fold now remembers which firings finished. Unit tests cover the
placement, the earlier-pass case, an unpositioned record, the hold and
its release; the CLI read-back scenario is stable over eight runs.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-18 02:15:53 -04:00
..
apps Merge branch 'petri-integration-tools' into petri-integration 2026-09-18 02:02:51 -04:00
components Order position-keyed platform records by their firing, not their clock 2026-09-18 02:15:53 -04:00
foundation Merge branch 'petri-integration-api' into petri-integration 2026-09-18 01:39:53 -04:00
packages/fabro-api-client Merge branch 'petri-integration-api' into petri-integration 2026-09-18 01:39:53 -04:00