feat: add explicit "all" sentinel to BOOT_SYNC_START_LEDGER_BLOCK#124
Merged
Conversation
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
force-pushed
the
feat/boot-sync-all-sentinel
branch
from
June 19, 2026 16:17
6d8cd02 to
3ab09ab
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an explicit, settable
allvalue toBOOT_SYNC_START_LEDGER_BLOCKso 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_BLOCKnow accepts:all(case-insensitive, trimmed) → sync-all-available (oldestLedger) — the new explicit sentinel.latest, negative, non-numeric) → throws at boot with a valid-forms message.Never falls back to "latest".
parseBootSyncStartLedgeris extracted intostart-ledger.ts(consumed byenv.ts) so the parse rules are unit-testable without all required env present; bothalland empty/absent collapse tonull, taking the sameoldestLedgerpath inresolveBootStartLedger.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.