Skip to content

refactor(ts): TS-6 — unified CLI architecture under src/cli/ - #69

Merged
gocanto merged 2 commits into
refactor/ts5-drizzle-splitfrom
refactor/ts6-cli-unification
Jul 24, 2026
Merged

refactor(ts): TS-6 — unified CLI architecture under src/cli/#69
gocanto merged 2 commits into
refactor/ts5-drizzle-splitfrom
refactor/ts6-cli-unification

Conversation

@gocanto

@gocanto gocanto commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

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.

@gocanto
gocanto force-pushed the refactor/ts5-drizzle-split branch from f3d2825 to ad9bb9c Compare July 24, 2026 03:06
@gocanto
gocanto force-pushed the refactor/ts6-cli-unification branch 3 times, most recently from 689cb5a to f426a87 Compare July 24, 2026 03:19
@gocanto
gocanto force-pushed the refactor/ts5-drizzle-split branch from 2aa3779 to a45206a Compare July 24, 2026 03:19
gocanto added 2 commits July 24, 2026 11:20
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
gocanto force-pushed the refactor/ts6-cli-unification branch from f426a87 to 357392c Compare July 24, 2026 03:20
@gocanto
gocanto force-pushed the refactor/ts5-drizzle-split branch from a45206a to 11fa186 Compare July 24, 2026 03:20
@gocanto
gocanto merged commit 15e0bb7 into refactor/ts5-drizzle-split Jul 24, 2026
@gocanto
gocanto deleted the refactor/ts6-cli-unification branch July 24, 2026 03:21
@gocanto
gocanto restored the refactor/ts6-cli-unification branch July 24, 2026 03:25
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