♻️ Extract TDD runtime context assembly#266
Merged
Merged
Conversation
Why: reduce constructor complexity in tdd-service by isolating dependency merging and runtime bootstrap logic into a focused module that is easier to test and reason about. What changed: moved grouped dependency composition plus working-directory/path resolution into src/tdd/runtime-context.js and added dedicated unit coverage.
Vizzly - Visual Test Results
|
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.
Why
src/tdd/tdd-service.jsis one of the highest-risk maintenance surfaces in the CLI. Before deeper runtime decomposition, we need a safer constructor shape with explicit seams.This PR extracts constructor runtime/dependency assembly into a dedicated module so we can keep behavior stable while making follow-up splits smaller and safer.
What Changed
src/tdd/runtime-context.js:buildTddDependencyOps(...)resolveTddWorkingDirectory(...)resolveTddPaths(...)src/tdd/tdd-service.jsconstructor to use the extracted runtime-context helpers.tests/tdd/runtime-context.test.js.Verification
npm run lintnode --test tests/tdd/runtime-context.test.js tests/tdd/tdd-service.test.jsNotes
This is intentionally behavior-preserving. It is PR 1 in the new tech-debt train and sets up the next TDD runtime split slices.