Repository navigation
fix(log): check the sidecar command line before opening the pack - #7
Merged
Merged
Conversation
The module doc and the sidecar_keys doc gave an entry's lookup keys as path= and blob=, but sidecar_keys also keys an included child checkpoint by origin=, so a parent finds every checkpoint of one child log by its origin. Both docs now list the three keys and which changes carry them. The code was right, so there is no failing test; the include test now also finds the two logged checkpoints by origin=.
The binary's doc and the book promise status 2 for a command line it does not take, but run opens DIR/.sidecar/pack and takes its lock before it looks at the command, and main tells a usage error from a store error by the wording of the message. An unknown command or a missing argument leaves a new sidecar beside the project, and a non-numeric tree SIZE, include without --trusted, or a --trusted line that is not a key exit 1. The test runs each and expects status 2 with no .sidecar created.
parse now builds a typed command with every argument it takes checked, the numbers parsed and the --trusted lines read as verifiers, so any command line the binary does not take is status 2 before run opens DIR/.sidecar/pack. Everything run can fail on is a store, a file or a proof and is status 1, which replaces telling the two apart by the wording of the message. The binary's doc and the reference page say a rejected command line opens nothing.
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.
A command line the sidecar binary does not take now exits with status 2 and opens nothing, and the docs list
origin=among an entry's lookup keys.runopenedDIR/.sidecar/packand took its lock before it looked at the command. An unknown command or a missing argument left a new sidecar beside the project, and a non-numeric tree SIZE,includewithout--trusted, or a--trustedline that is not a key exited 1.parsenow builds a typed command with every argument checked, so any command line the binary does not take is status 2 beforerunopens the pack. Everythingruncan fail on is status 1. The module doc andsidecar_keysnow listpath=,blob=andorigin=..sidecarcreated. The include test also finds the two logged checkpoints byorigin=.The branch has towncrier fragments.