refactor(ts): TS-6 — unified CLI architecture under src/cli/ - #69
Merged
gocanto merged 2 commits intoJul 24, 2026
Merged
Conversation
gocanto
force-pushed
the
refactor/ts5-drizzle-split
branch
from
July 24, 2026 03:06
f3d2825 to
ad9bb9c
Compare
gocanto
force-pushed
the
refactor/ts6-cli-unification
branch
3 times, most recently
from
July 24, 2026 03:19
689cb5a to
f426a87
Compare
gocanto
force-pushed
the
refactor/ts5-drizzle-split
branch
from
July 24, 2026 03:19
2aa3779 to
a45206a
Compare
The Files directory-scan utility had no production consumers; only its own test imported it. Remove both.
Introduce a single CLI architecture under packages/ts/sidecar/src/cli/: - CliCommand interface: run(argv) returns an exit code, never process.exit. - CompositionRoot: the single production wiring point, composing PipelineFactory's pass graph with the Node IO adapters, FormatPipeline, reporters, and command classes (formatAllCommand, segmentPassCommand, fluentPassCommand, validateSyntaxCommand). - One PassReporter and one SyntaxReporter, replacing FormatAllReporter, SyntaxErrorReporter, and the ad-hoc reporting loops in the blank-lines and fluent-chains entrypoints. Console output bytes are unchanged. - FormatAllCommand owns the segment -> oxfmt -> fluent -> segment -> validate schedule; FormatPassCommand backs both standalone format passes; ValidateSyntaxCommand backs standalone validation. - DTOs moved to cli/: PassCliDto, CliOptionsDto (cli/format-all-cli-dto), SyntaxCliDto. Flag grammar unchanged. - Entry files (blank-lines, fluent-chains, validate-syntax) hold only main() plus the run-as-main guard. Update sidecar.ts pipeline dispatch, the validate-syntax package script, and the moved CLI tests to the new paths. Naming inversion is resolved: reporters are named for what they report, not their former host module.
gocanto
force-pushed
the
refactor/ts6-cli-unification
branch
from
July 24, 2026 03:20
f426a87 to
357392c
Compare
gocanto
force-pushed
the
refactor/ts5-drizzle-split
branch
from
July 24, 2026 03:20
a45206a to
11fa186
Compare
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.
Stage 7/8 (stacks on TS-5). One CliCommand contract, CompositionRoot as the single production wiring point, one PassReporter + one SyntaxReporter replacing four ad-hoc reporting loops, DTOs relocated to cli/, entry files reduced to sanctioned main() shims, blank-lines naming inversion fixed. io/files.ts deleted (test-only). Acceptance: base-vs-branch staged binaries byte-diffed on a fixture set with tsruntime's exact invocation — files, stderr, exit codes identical; every wire label the Go orchestrator scrapes unchanged. 187 tests, 98.22% lines, smoke + self-format clean.