Repository navigation
fix: reject recipes without named dimensions - #423
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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).What you got wrong and fixed
Nothing to report.