Repository navigation
fix(project): report a corrupt authority ledger - #916
Closed
ANIRUDDHA ADAK (aniruddhaadak80) wants to merge 1 commit into
Closed
ANIRUDDHA ADAK (aniruddhaadak80) wants to merge 1 commit into
ANIRUDDHA ADAK (aniruddhaadak80) wants to merge 1 commit into
Conversation
ANIRUDDHA ADAK (aniruddhaadak80)
requested review from
Aayam Bansal (aayambansal) and
Ishaan Gangwani (ishaan1124)
as code owners
October 3, 2026 05:15
|
ANIRUDDHA ADAK (@aniruddhaadak80) is attempting to deploy a commit to the InkVell Team on Vercel. A member of the Team first needs to authorize it. |
ANIRUDDHA ADAK (aniruddhaadak80)
force-pushed
the
o1-pr3-authority-ledger
branch
2 times, most recently
from
October 3, 2026 05:27
ddfef56 to
78ea89e
Compare
ANIRUDDHA ADAK (aniruddhaadak80)
force-pushed
the
o1-pr3-authority-ledger
branch
from
October 3, 2026 05:30
78ea89e to
0d44210
Compare
Member
|
Incorporated, reviewed, and validated in #953, now merged into main. Closing this original PR as superseded by the consolidated change. |
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.
What does this PR do, and why?
read()calledJSON.parse(text)BEFORE the corruption check two lines below it, so a truncated or hand-editedauthority-processes.jsonthrew a bareSyntaxErrorinstead of the file's own message telling the operator the ledger is corrupt and process revocation is being refused.Linked issue
small fix, no issue
How did you verify it?
cd backend/cli && bun test test/project/authority-process-corrupt-ledger.test.tsRegression proof: the truncated-ledger test fails at base with the raw JSON parse error; the structurally-invalid case passes both before and after, proving the change targets only the parse and leaves the existing shape guard alone.
cd backend/cli && bun test test/project/authority-process-corrupt-ledger.test.ts -> 3 pass / 0 fail. The pre-existing authority-process-ledger suite re-runs at 4 pass / 1 skip (Darwin-only) / 0 fail.This does not weaken the fail-closed posture: a corrupt ledger still refuses revocation, it now just says so legibly. The duplicated literal was collapsed into
corrupt(), so the shape-validation throw is textually identical to before.Not verified:
complete()andassertRelocationSafe()also route throughread()and so inherit the fix, but onlyrevoke()is directly exercised by the new test.Two pre-existing conditions in this checkout, reproduced on the untouched base commit and therefore not caused by this change: �un run typecheck (turbo) fails with sgo: command not found, and �un run format:check reports roughly 30 files. I ran sc --noEmit for �ackend/cli and prettier on the files I touched instead; neither appears in the base warning list.
Checklist
I left the first box unticked rather than claiming it: �un run check cannot pass in this checkout because turbo cannot find sgo, and that failure reproduces on the base commit.