Skip to content

fix(selftest): refuse every unmatched test group - #395

Merged
StepenkoAnatoli merged 2 commits into
mainfrom
fix/issue-332-selftest-groups
Oct 14, 2026
Merged

StepenkoAnatoli merged 2 commits into
mainfrom
fix/issue-332-selftest-groups

Conversation

@StepenkoAnatoli

Copy link
Copy Markdown
Owner

A misspelled selftest group was silently ignored when another requested group matched, allowing an incomplete run to print all tests passed. Every requested group now must match a test filename before any tests begin; otherwise the CLI names it and exits 2.

Fixes #332

what changed: Added per-group validation and CLI regressions for a missing group alone, both mixed orders, and two valid groups.

why: Restore the existing no-match refusal for every requested group. No alternative design was set aside.

what it touched: selftest CLI, new CLI tests, architecture description, changelog and research-kit README inventory. No new flag or format.

what you verified: verified - red-first one pass and one expected failure; then three passing CLI tests, including parent-report isolation. Handoff OK and preflight PASS in this checkout. The required full-suite commit gate must accept the commit before publication.

what you got wrong and fixed: mistake - CLI regression children initially inherited RESEARCH_KIT_RESULT_FILE from the parent suite. where - selftest-cli.test.mjs runGroups. impact - a child wrote a partial group report to the full-suite report path; the observer captured that partial sample. The initial commit remained unpublished, and no delivered PR was affected. cause - copied the parent environment without excluding its output artifact path. fix - remove that variable from child environments and add a parent-report preservation regression; amend the unpublished commit through the full gate. verified - the new regression first failed with the parent file overwritten, then all three CLI tests passed in 13.3 seconds with the parent report unchanged.

Full offline gate on Windows / Node 24.20.0: 1780 passed, 0 failures, 12 unsupported capabilities waived by the gate's documented local policy; 1314.0 seconds. No hook override or fail-open acceptance.

what changed: Validate every requested group against available test filenames before importing any test. An unmatched group is named and refused with exit 2, including beside a valid group. Added CLI regressions for both orders and for valid multi-group runs.

why: The union of group matches silently dropped misspelled groups while printing all tests passed. Apply the existing no-match refusal to each requested group. No alternative design was set aside.

what it touched: selftest CLI, new selftest-cli tests, architecture description, changelog and research-kit README inventory. No new flag or result format.

what you verified: verified - red-first one pass and one expected refusal failure; then three CLI regressions passed with zero failures, including parent-report isolation. Handoff OK and preflight PASS in this checkout. The required full offline suite runs in the commit gate before acceptance.

what you got wrong and fixed: mistake - CLI regression children initially inherited RESEARCH_KIT_RESULT_FILE from the parent suite. where - selftest-cli.test.mjs runGroups. impact - a child wrote a partial group report to the full-suite report path; the observer captured that partial sample. The initial commit remained unpublished, and no delivered PR was affected. cause - copied the parent environment without excluding its output artifact path. fix - remove that variable from child environments and add a parent-report preservation regression; amend the unpublished commit through the full gate. verified - the new regression first failed with the parent file overwritten, then all three CLI tests passed in 13.3 seconds with the parent report unchanged.
what changed: Bring the merged README preview and contributor guide into the selftest fix branch; preserve both changelog entries.
why: Main advanced through PR407 after the fix's CI run. Strict branch protection requires the current base and its combined checks before merging PR395.
what it touched: Root README, CONTRIBUTING.md, docs/assets/research-overview.svg and CHANGELOG.md only. The selftest implementation, tests, architecture map and inventory remain exactly those of the accepted fix commit.
what you verified: verified - original fix fe7f338 passed its full local commit gate and all seven CI jobs. Main's presentation input passed all seven CI jobs. The only merge conflict was additive changelog prose and both entries are retained. The normal docs commit gate and combined-head GitHub CI follow this resolution; those outcomes are not yet observed in this report.
what you got wrong and fixed: nothing to report.
@StepenkoAnatoli
StepenkoAnatoli merged commit 0dc3ff0 into main Oct 14, 2026
7 checks passed
@StepenkoAnatoli
StepenkoAnatoli deleted the fix/issue-332-selftest-groups branch October 14, 2026 18:56
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.

selftest.mjs ignores a group name that matches no file when another group matches, and prints 'all tests passed'

1 participant