Skip to content

refactor: arrange the command by subject under internal (chunkdb/chunkdb#151) - #63

Merged
eventvoid merged 2 commits into
mainfrom
refactor/command-layout
Dec 1, 2026
Merged

eventvoid merged 2 commits into
mainfrom
refactor/command-layout

Conversation

@eventvoid

Copy link
Copy Markdown
Member

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.

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.
@eventvoid
eventvoid merged commit 5475b6f into main Dec 1, 2026
5 checks passed
@eventvoid
eventvoid deleted the refactor/command-layout branch December 1, 2026 22:13
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