Skip to content

Keep extracted CLI seams single-sourced#303

Merged
NagyVikt merged 1 commit intomainfrom
agent/codex/split-cli-main-args-dispatch-2026-04-22-13-48
Apr 22, 2026
Merged

Keep extracted CLI seams single-sourced#303
NagyVikt merged 1 commit intomainfrom
agent/codex/split-cli-main-args-dispatch-2026-04-22-13-48

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Automated by gx branch finish (PR flow).

The seam extraction had landed partially, but src/cli/main.js still imported helper modules while keeping local parser and dispatch copies. That left the runtime brittle and previously caused src/cli/main.js to fail syntax loading once the imported names overlapped with local declarations.

This commit makes main.js rely on src/cli/args.js, src/cli/dispatch.js, and src/git/index.js as the authoritative seams, and it folds the setup --current alias into the shared repo-traversal parser so setup and doctor stay aligned on the same single-repo behavior.

Constraint: Preserve the existing gx command surface and nested-repo traversal semantics
Rejected: Split setup --current into a separate branch | the parser extraction already owned the same seam and proof surface
Confidence: high
Scope-risk: moderate
Reversibility: clean
Directive: Keep src/cli/main.js as a dispatcher and integration point; do not reintroduce local parser or dispatch helper copies without moving ownership back deliberately
Tested: node --check src/cli/main.js
Tested: node --check src/cli/args.js
Tested: node --check src/cli/dispatch.js
Tested: node --check src/git/index.js
Tested: node --test test/cli-args-dispatch.test.js
Tested: node --test test/metadata.test.js
Tested: node --test test/setup.test.js
Tested: node --test test/doctor.test.js
Tested: npm test
Tested: openspec validate agent-codex-split-cli-main-args-dispatch-2026-04-22-13-48 --type change --strict
Tested: openspec validate setup-current-single-repo-alias --type change --strict
Tested: openspec validate --specs (no items found)
Not-tested: branch finish/PR merge/cleanup flow
@NagyVikt NagyVikt merged commit 4f047b9 into main Apr 22, 2026
@NagyVikt NagyVikt deleted the agent/codex/split-cli-main-args-dispatch-2026-04-22-13-48 branch April 22, 2026 12:21
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