Skip to content

fix: reject recipes without named dimensions - #423

Merged
StepenkoAnatoli merged 1 commit into
mainfrom
fix/issue-356-recipe-validation
Oct 16, 2026
Merged

StepenkoAnatoli merged 1 commit into
mainfrom
fix/issue-356-recipe-validation

Conversation

@StepenkoAnatoli

@StepenkoAnatoli StepenkoAnatoli commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Fixes #356.

What changed

Recipe files now refuse missing dimensions and blank dimension labels. Errors name the source file and, for blank labels, the physical line. The CLI exits with usage status 2 before writing a map.

Why

An existing text file without usable recipe dimensions was accepted and produced universal rows, making a malformed recipe appear successful. The default when no recipe is requested and valid recipes retain their existing behavior.

What it touched

Recipe parsing and CLI error handling, two regression tests, architecture documentation, the changelog, and the registered test count.

What you verified

  • Verified: before/after probes reproduced the acceptance and confirmed refusal.
  • Verified: 39 focused tests passed with zero failures.
  • Verified: the normal full commit gate passed; corpus handoff and preflight checks passed.
  • Verified: all seven GitHub Actions jobs passed on commit a31112c, including Windows, both Ubuntu platforms, Node 24/26, archive tree, and the aggregate suite. Node 24: 1847 passed, 0 failed in 203.6s (watchdog 60000ms/test).
  • Untested: live collection, which this change does not require.

What you got wrong and fixed

Nothing to report.

what changed
Recipe parsing refuses a blank dimension label with its physical line number. Loading a requested recipe refuses content that provides no dimensions and names the file. Decompose handles INVALID_RECIPE as usage failure (exit 2), before it writes the map.

why
Fixes #356. Existing files were treated as usable recipes even when they contributed no domain checklist, and an empty label became a nameless subtopic. This restores the documented recipe contract with one direct validation remedy; no flag, format, provider or new gate check is introduced.

what it touched
research-kit/lib/decompose.mjs; research-kit/bin/decompose.mjs; two regressions in decompose.test.mjs; the decompose architecture row; CHANGELOG.md; the registered offline test count in research-kit/README.md (1847). Valid shipped recipes and the universal dimensions keep their existing behavior.

what you verified
verified: direct unchanged-code probe accepted a plain document, empty dimensions and a blank label; the CLI returned 0 and wrote a nine-row map for the plain document.
verified: after the fix, all three inputs return INVALID_RECIPE with the file, the blank label names its physical line, and the same CLI probe returns 2 without a stack.
verified: node research-kit/bin/selftest.mjs decompose passed all 39 tests, 0 failed, in 4.6s, including usage exit 2, file/line errors, map/ledger preservation and shipped recipes.
verified: handoff OK (33 entries, 27 evidence rows), preflight PASS (28 passing, 1 existing unstamped-brief warning), and git diff --check. Cwd: C:\Users\PC\Desktop\gittoken\Research-Kit-issue-356.
verified: doctor today from the issue-296 checkout reports READY on the shared machine, collector role, firecrawl-cli fetch/search.
expected: the normal pre-commit gate will run the full staged-tree suite and validate architecture/README before this commit is recorded; exact-head CI will accompany the PR.
untested: no live collection or vendor egress; CLI probes use dry-run and explicit http-keyless transports.

what you got wrong and fixed
nothing to report
@StepenkoAnatoli
StepenkoAnatoli merged commit a332996 into main Oct 16, 2026
7 checks passed
@StepenkoAnatoli
StepenkoAnatoli deleted the fix/issue-356-recipe-validation 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

1 participant