MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / fireBase

Function fireBase

src/workspaces/schedule/declaration.ts:75–83  ·  view source on GitHub ↗
(
  when: Schedule,
  lastFiredAtMs: number | null,
  nowMs: number,
  lookbackMs: number,
)

Source from the content-addressed store, hash-verified

73 * seeding from epoch would fire it immediately; the lookback catches an
74 * occurrence that just passed without firing a stale backlog. */
75export function fireBase(
76 when: Schedule,
77 lastFiredAtMs: number | null,
78 nowMs: number,
79 lookbackMs: number,
80): number {
81 if (lastFiredAtMs !== null) return lastFiredAtMs
82 return when.kind === 'cron' ? nowMs - lookbackMs : 0
83}
84
85/** Build a dashboard row for a SCHEDULED issue: its `when` + last-fired marker +
86 * computed next-due (same base-seed as the scanner's due-ness, so the dashboard

Callers 2

isDueMethod · 0.85
snapshotScheduledIssueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected