Skip to content

Keep helper behavior single-sourced before duplicate parsers drift again#344

Merged
NagyVikt merged 1 commit intomainfrom
agent/codex/replace-custom-semver-jsonc-stdin-helper-2026-04-22-18-06
Apr 22, 2026
Merged

Keep helper behavior single-sourced before duplicate parsers drift again#344
NagyVikt merged 1 commit intomainfrom
agent/codex/replace-custom-semver-jsonc-stdin-helper-2026-04-22-18-06

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Automated by gx branch finish (PR flow).

The CLI still carried duplicate custom semver, stdin, and JSONC helpers in multiple modules, which kept correctness fixes from landing once and sticking everywhere. This extracts shared core helpers, routes the toolchain and CLI through them, replaces scaffold JSONC parsing with jsonc-parser, and updates the stale agents-args expectation that was already failing on main so the full suite can go green again.

Constraint: Preserve existing CLI names, prompts, and output wording while changing only helper internals

Rejected: Leave the duplicate helpers in place and patch each bug locally | keeps version/stdin/jsonc behavior drifting across modules

Confidence: high

Scope-risk: moderate

Reversibility: clean

Directive: Keep semver comparison, interactive stdin reads, and JSONC parsing in shared helpers instead of reintroducing local copies in command modules

Tested: node --check src/core/versions.js src/core/stdin.js src/toolchain/index.js src/scaffold/index.js src/cli/main.js; node --test test/status.test.js test/release.test.js test/setup.test.js test/core-version.test.js test/core-stdin.test.js test/scaffold-jsonc.test.js; node --test test/cli-args-dispatch.test.js; npm test; openspec validate agent-codex-replace-custom-semver-jsonc-stdin-helper-2026-04-22-18-06 --type change --strict; openspec validate --specs

Not-tested: Root cause of the lingering full-suite node test runner process after the green npm test body printed
@NagyVikt NagyVikt merged commit 3e5e48c into main Apr 22, 2026
@NagyVikt NagyVikt deleted the agent/codex/replace-custom-semver-jsonc-stdin-helper-2026-04-22-18-06 branch April 22, 2026 19:49
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