Skip to content

fix: validate parent quantity before execution replay - #19

Merged
dev-belly merged 2 commits into
mainfrom
codex/quantity-validation-20261022
Oct 22, 2026
Merged

dev-belly merged 2 commits into
mainfrom
codex/quantity-validation-20261022

Conversation

@dev-belly

Copy link
Copy Markdown
Owner

run --quantity 0 --json previously exited successfully and simulated the configured default of 20,000 base units. The harness used a truthiness fallback, so an explicit zero was treated as an omitted override.

Use the configured quantity only when the override is None, and reject effective parent quantities that are not positive integers before replay. The CLI also validates --quantity as at least one. Omitted overrides and positive quantities keep their existing behavior; configuration errors use the existing error path.

Validation: all 43 focused checks in test_guards.py and test_resources.py pass, including an independent rerun. Of the 22 added cases, 12 fail against the previous implementation; the other 10 preserve already-supported behavior. Coverage includes Python overrides, configured quantities, CLI failures without a traceback or result report, and preservation of defaults and positive overrides.

@dev-belly
dev-belly merged commit 9f25302 into main Oct 22, 2026
8 checks passed
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