Skip to content

fix(scrape): ledger-state restore/persist handle first-run (absent branch)#23

Merged
KiranPranay merged 1 commit into
mainfrom
fix-ledger-state-jq
Jul 10, 2026
Merged

fix(scrape): ledger-state restore/persist handle first-run (absent branch)#23
KiranPranay merged 1 commit into
mainfrom
fix-ledger-state-jq

Conversation

@KiranPranay

Copy link
Copy Markdown
Member

The verification run failed at Restore: gh api --jq .content on a 404 emits literal "null"base64 -d "invalid input". Fix: .content // empty / .sha // empty so a missing branch/file yields empty (fresh start / clean create). First-run bug only.

… empty)

`gh api --jq .content` on a 404 emits the literal "null" (non-empty), so the first
run's restore did `base64 -d "null"` -> "invalid input" and failed. Use
`.content // empty` / `.sha // empty` so a missing branch/file yields an empty
string, cleanly starting fresh (restore) and creating the file without a bogus sha
(persist). Guard the unchanged-check on a non-empty remote too.
@KiranPranay KiranPranay merged commit 4f216cf into main Jul 10, 2026
3 checks passed
@KiranPranay KiranPranay deleted the fix-ledger-state-jq branch July 10, 2026 18:44
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