Repository navigation
refactor: arrange the command by subject under internal (chunkdb/chunkdb#151) - #63
Merged
Merged
Conversation
Keep the executable entry point in cmd/chunk-cli and group the command implementation under internal by subject. Keep unit and wire tests with their subjects and run server-backed tests from one integration package with a shared fixture. Document the layout rule and update statement coverage links to the moved implementation. Have integration servers bind port zero and report their bound port through the readiness log. Synchronize capture of startup diagnostics and report an early child exit. Verify the global input file flag by checking the parameter header and binary payload sent to the server.
Use the local reply field when serving the tagged BEGIN and SET BLOCK frames so the statement tests compile. Read the exported Reply field from the shared status fixture in the promotion test and retain the valid and malformed epoch cases.
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.
Part of chunkdb/chunkdb#151 (CLI layout).
Move command implementation into subject packages under internal. The executable calls the same flag parser and dispatcher used by the CLI tests. Keep the protocol client, URI parser, and CI result checker in their existing packages.
Users keep the same install path, commands, flags, text and JSON output, exit codes, and wire behavior.
Preserve the unit and fake-server assertions in their subject packages and collect the real-server tests in one integration package. The fixture passes port zero to the server, waits for the child's readiness log, and synchronizes startup diagnostics. Tests cover split readiness lines, concurrent diagnostic capture, and the exact binary parameter sent for the global input file flag.
The existing CI workflow covers the build, vet, race tests, checked documentation, and CLI examples. Formatting and source references were checked locally. Build and test results are pending CI. A separate CLI file-publication change can address backup directory syncing and atomic export replacement.