Skip to content

feat: add explicit "all" sentinel to BOOT_SYNC_START_LEDGER_BLOCK#124

Merged
AquiGorka merged 1 commit into
mainfrom
feat/boot-sync-all-sentinel
Jun 19, 2026
Merged

feat: add explicit "all" sentinel to BOOT_SYNC_START_LEDGER_BLOCK#124
AquiGorka merged 1 commit into
mainfrom
feat/boot-sync-all-sentinel

Conversation

@AquiGorka

Copy link
Copy Markdown
Contributor

Adds an explicit, settable all value to BOOT_SYNC_START_LEDGER_BLOCK so iac can carry a real placeholder (BOOT_SYNC_START_LEDGER_BLOCK=all) and flip it to a ledger number at reset time.

BOOT_SYNC_START_LEDGER_BLOCK now accepts:

  • all (case-insensitive, trimmed) → sync-all-available (oldestLedger) — the new explicit sentinel.
  • empty / unset → sync-all (unchanged).
  • non-negative integer → pin that exact ledger (unchanged).
  • anything else (latest, negative, non-numeric) → throws at boot with a valid-forms message.

Never falls back to "latest".

parseBootSyncStartLedger is extracted into start-ledger.ts (consumed by env.ts) so the parse rules are unit-testable without all required env present; both all and empty/absent collapse to null, taking the same oldestLedger path in resolveBootStartLedger.

Tests (stub RPC oldestLedger): all/ALL/all/empty/absent → oldest; 12345 → pin; latest/-1/abc/1.5 → throw. fmt/lint/check/test green. Patch version bump 0.9.0 → 0.9.1.

Accept "all" (case-insensitive, trimmed) as an explicit synonym for the
empty/absent sync-all-available default so iac can carry a real placeholder
and flip it to a ledger number at reset time. A non-negative integer still
pins that ledger; empty/unset still sync-all (unchanged); "latest"/negative/
junk throw at boot with the valid forms. Never falls back to "latest".

Extract parseBootSyncStartLedger into start-ledger.ts (consumed by env.ts)
so the parse rules are unit-testable without all required env present.
@AquiGorka
AquiGorka force-pushed the feat/boot-sync-all-sentinel branch from 6d8cd02 to 3ab09ab Compare June 19, 2026 16:17
@AquiGorka
AquiGorka merged commit 7566c68 into main Jun 19, 2026
7 checks passed
@AquiGorka
AquiGorka deleted the feat/boot-sync-all-sentinel branch June 19, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant