Skip to content

fix: enforce the positive decompose search limit - #419

Merged
StepenkoAnatoli merged 1 commit into
mainfrom
fix/issue-320-limit-floor
Oct 16, 2026
Merged

StepenkoAnatoli merged 1 commit into
mainfrom
fix/issue-320-limit-floor

Conversation

@StepenkoAnatoli

@StepenkoAnatoli StepenkoAnatoli commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

decompose --limit now consistently requires a whole number of at least 1. Zero, negative and nonnumeric limits are refused at the CLI boundary with the same real minimum; --max-scrapes 0 remains supported.

Fixes #320.

what changed

Aligned decompose's CLI --limit floor with the library's positive whole-number requirement. Regression coverage refuses zero, negative and nonnumeric limits and accepts limit one with max-scrapes zero. Updated the architecture map, changelog and test inventory.

why

Fixes #320. The CLI claimed a minimum of zero while the library refused zero. The existing library guard remains; max-scrapes still permits zero.

what it touched

research-kit/bin/decompose.mjs, research-kit/test/cli.test.mjs, docs/ARCHITECTURE.md, CHANGELOG.md and research-kit/README.md. No new options or collection behavior.

what you verified

verified: before-fix probes showed the contradictory --limit abc and --limit 0 diagnostics. verified: the normal git commit gate ran the full staged offline suite, including CLI and decompose coverage, and allowed commit 3b21051. The local gate permits unavailable capabilities under ADR-0108 and deletes their detailed totals. verified: all seven required CI jobs passed for head 3b2105123daf9a97ea735931c236ababb13e8975 in offline-suite run #778. The completed Node 24 log reports 1,846 passed, 0 failed in 202.2s.

what you got wrong and fixed

mistake: the initial test insertion split an existing comment. where: cli.test.mjs before the new-project regression. impact: comment placement only, no delivered behavior affected. cause: insertion matched one comment line. fix: moved the new test before the intact comment. verified: final placement reviewed and git diff --check passed.

what changed
Aligned decompose's CLI --limit floor with the library's positive whole-number requirement. Regression coverage refuses zero, negative and nonnumeric limits and accepts limit one with max-scrapes zero. Updated the architecture map, changelog and test inventory.

why
Fixes #320. The CLI claimed a minimum of zero while the library refused zero. The existing library guard remains; max-scrapes still permits zero.

what it touched
research-kit/bin/decompose.mjs, research-kit/test/cli.test.mjs, docs/ARCHITECTURE.md, CHANGELOG.md and research-kit/README.md. No new options or collection behavior.

what you verified
verified: before-fix probes showed the contradictory --limit abc and --limit 0 diagnostics. expected: the ordinary commit gate runs the full offline suite, including CLI and decompose coverage, and verifies the staged map and inventory. Final observed results accompany the PR.

what you got wrong and fixed
mistake: the first test insertion split an existing explanatory comment.
where: research-kit/test/cli.test.mjs, before the new-project regression.
impact: the comment was detached from its original test; no behavior or delivered change was affected.
cause: the patch insertion matched only the first line of the comment.
fix: moved the new limit-boundary test before the complete original comment.
verified: reviewed the final placement and git diff --check passed; the normal gate covers the final test file.
@StepenkoAnatoli
StepenkoAnatoli merged commit a332996 into main Oct 16, 2026
7 checks passed
@StepenkoAnatoli
StepenkoAnatoli deleted the fix/issue-320-limit-floor branch October 17, 2026 06:34
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.

decompose --limit: the CLI says "at least 0" and the library refuses 0 as "must be positive" - two floors, two sentences for one flag

1 participant