Report each tick's outcome and the updater's state to the master

The master saw a scheduler's last run time and nothing of what it did. Each
tick now records, per lane, its outcome, a line on what happened (what
fired, or the spread, contract or hold cap that stopped it) and why the
lane's accounts sat it out, counted by reason with a few names each. It
rides the scheduler status as lastTicks.

Each report also carries the auto-updater's state from the files it keeps
and from git: its last check, a failed update waiting to retry, how far the
checkout is behind origin, and tracked files edited by hand, which stop the
fast-forward pull.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Li
2026-09-27 18:31:21 -05:00
co-authored by Claude Opus 5.5
parent db0ad99a76
commit ab3132182a
7 changed files with 253 additions and 21 deletions
+7
View File
@@ -1563,6 +1563,13 @@ function centralClock(now: Date): { day: string; minutes: number; resetMinutes:
* waiting for them to go flat, and skips the open's widest spreads.
*/
export const CME_EVENING_OPEN_MIN = 17 * 60 + 45;
/** An account's reason for sitting a tick out, with its dollar amounts and
* "=number" values folded, so like reasons count together on the master:
* "day done ($12 left of $300)" and "day done ($40 left of $500)" are one. */
export function foldReason(reason: string): string {
return reason.replace(/\$-?[\d,]+(?:\.\d+)?/g, '$…').replace(/=-?\d+(?:\.\d+)?/g, '=…');
}
/** Every-day firms' roll guard ends here (plus the day's delay): they have
* no Tradovate roll to wait for. */
const EVERY_DAY_OPEN_MIN = 17 * 60 + 5;