refactor(ts): TS-7 — final sweep: cycle-free proof, static audit, cleanups - #70
Closed
gocanto wants to merge 5 commits into
Closed
refactor(ts): TS-7 — final sweep: cycle-free proof, static audit, cleanups#70gocanto wants to merge 5 commits into
gocanto wants to merge 5 commits into
Conversation
gocanto
force-pushed
the
refactor/ts6-cli-unification
branch
from
July 24, 2026 03:06
68c5443 to
605c1ba
Compare
gocanto
force-pushed
the
refactor/ts7-sweep
branch
from
July 24, 2026 03:06
dbf908e to
e6fecb3
Compare
gocanto
force-pushed
the
refactor/ts6-cli-unification
branch
from
July 24, 2026 03:13
605c1ba to
689cb5a
Compare
gocanto
force-pushed
the
refactor/ts7-sweep
branch
from
July 24, 2026 03:13
e6fecb3 to
9685bfc
Compare
gocanto
force-pushed
the
refactor/ts6-cli-unification
branch
from
July 24, 2026 03:19
689cb5a to
f426a87
Compare
gocanto
force-pushed
the
refactor/ts7-sweep
branch
from
July 24, 2026 03:19
9685bfc to
29170fe
Compare
Extract FormatAllCommand into cli/format-all-command.ts (importing only its direct deps), matching format-pass-command.ts/validate-syntax-command.ts. cli/format-all.ts is now a pure entry (main + run-as-main guard importing only CompositionRoot); composition-root.ts imports the command module. sidecar.ts still imports #sidecar/cli/format-all.
…d instances Removes the last static-namespace classes in the sidecar. VueScript and MarkdownFences become instances injected into EmbeddedBlockSplitter. The static FileTargets class (and its module-private EmbeddedBlockSplitter singleton, the TS-3 compromise) becomes FileTargetPolicy, an instance holding its splitter, constructed once in PipelineFactory and injected into the declaration-aware passes (ExpandedCallPass, DrizzleQueryPass) and the CLI commands. PassCliDto.parse now takes the policy as an explicit argument.
Widen the failure branch of ParsedSourceDto.from to carry an unparameterised z.ZodError. The schema output omits the DTO's own methods, so the previous `parsed.error as unknown as z.ZodError<ParsedSourceDto>` bridged the phantom generic; since the only caller (SourceParser.parse) discards the typed payload and raises a fresh SourceUnparsable, the unparameterised error is exact and the double cast is gone.
Reword two test comments that named the pre-refactor BlankLines.insert and FluentChains.format classes to describe the current BlankLinePass reference behaviour and the fluent pipeline order. Make EmbeddedBlockSplitter's scanner imports type-only now that they are used solely as constructor parameter types.
Runs `make format-all` (the repo's own pipeline) over the stage's edits: the new FileTargetPolicy parameter pushes several constructor signatures past the width threshold, so the formatter expands their inline dependency-object types to one member per line and splits the delegated extractBlocks chains. Pure whitespace normalisation, no behaviour change.
gocanto
force-pushed
the
refactor/ts6-cli-unification
branch
from
July 24, 2026 03:20
f426a87 to
357392c
Compare
gocanto
force-pushed
the
refactor/ts7-sweep
branch
from
July 24, 2026 03:20
29170fe to
88b9db4
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 8/8 (stacks on TS-6). FormatAllCommand extracted to its own module (dissolves the TS-6 deferred import cycle; Tarjan SCC proof over all 50 modules: zero cycles). Static-namespace audit: VueScript, MarkdownFences, FileTargets converted to injected instances (FileTargetPolicy; PassCliDto.parse takes it explicitly); every remaining static surface is a sanctioned value-type factory or documented exception. The TS-2 double-cast eliminated via a properly-typed failure union. Stale JSDoc and transitional comments swept. 187 tests, 98.34% lines, ts-infra 18/18, smoke + self-format clean.