Skip to content

refactor: validate resolved config with a zod schema - #2850

Closed
Lightning00Blade wants to merge 2 commits into
cd4a-2-late-defaultsfrom
cd4a-3-zod-validation
Closed

Lightning00Blade wants to merge 2 commits into
cd4a-2-late-defaultsfrom
cd4a-3-zod-validation

Conversation

@Lightning00Blade

Copy link
Copy Markdown
Collaborator

Move the mutually exclusive argument check into a zod superRefine so schema
validation is the single final gatekeeper for the resolved configuration.

No behavior change.


Stack created with GitHub Stacks CLI • Give Feedback 💬

@Lightning00Blade
Lightning00Blade added this pull request to stack #2851 September 28, 2026 08:33
@Lightning00Blade
Lightning00Blade force-pushed the cd4a-3-zod-validation branch 2 times, most recently from b60f8d5 to d82340e Compare September 28, 2026 13:09
Parse CLI arguments and the JSON config file without yargs defaults so only
explicit user intent is captured, merge them with CLI taking precedence, then
apply defaults (including the --viaCli ones). Conflict checks now only consider
explicitly provided arguments, so implicit defaults such as channel=stable can
no longer conflict with explicit flags.

Also restores --help/--version exiting via a shared buildCliParser and adds
edge-case tests for config parsing, precedence and conflicts.
Move the mutually exclusive argument check into a zod superRefine so schema
validation is the single final gatekeeper for the resolved configuration.

No behavior change.
@Lightning00Blade

Copy link
Copy Markdown
Collaborator Author

Dropping this PR: the default resolution and validation it added are now covered in #2849, which also splits parsing into separately testable steps.

An error occurred while trying to automatically change base from cd4a-2-late-defaults to main September 29, 2026 13:18
@Lightning00Blade
Lightning00Blade deleted the cd4a-3-zod-validation branch September 29, 2026 23:05
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