* test(2130): add failing tests for frontmatter body --- sequence mis-parse
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(2130): anchor extractFrontmatter regex to file start, preventing body --- mis-parse
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Fixes#1694
The inline array parser used .split(',') which ignored quote boundaries,
splitting "a, b" into two items. Replaced with a quote-aware splitter
that tracks single/double quote state.
Updated REG-04 test to assert correct behavior and added coverage for
single-quoted and mixed-quote inline arrays.
* refactor(tests): standardize to node:assert/strict and t.after() per CONTRIBUTING.md
- Replace require('node:assert') with require('node:assert/strict') across
all 73 test files to enforce strict equality (no type coercion)
- Replace try/finally cleanup blocks with t.after() hooks in core.test.cjs
and hooks-opt-in.test.cjs per the test lifecycle standards
- Utility functions in codex-config and security-scan retain try/finally
as that is appropriate for per-function resource guards, not lifecycle hooks
Closes#1674
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* perf(tests): add --test-concurrency=4 to test runner for parallel file execution
Node.js --test-concurrency controls how many test files run as parallel child
processes. Set to 4 by default, configurable via TEST_CONCURRENCY env var.
Fixes tests at a known level rather than inheriting os.availableParallelism()
which varies across CI environments.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(security): allowlist verify.test.cjs in prompt-injection scanner
tests/verify.test.cjs uses <human>...</human> as GSD phase task-type
XML (meaning "a human should verify this step"), which matches the
scanner's fake-message-boundary pattern for LLM APIs. This is a
false positive — add it to the allowlist alongside the other test files
that legitimately contain injection-adjacent patterns.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
The parser hardcoded 4/6/8/10-space indent levels for must_haves
sub-blocks, but standard YAML uses 2-space indentation. This caused
"No must_haves.key_links found in frontmatter" for valid plan files.
The fix dynamically detects the actual indent of must_haves: and its
sub-blocks instead of assuming fixed column positions.
Fixes#1356
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- spliceFrontmatter: replace existing, add to plain content, exact body preservation
- parseMustHavesBlock: truths as strings, artifacts as objects with min_lines,
key_links with from/to/via/pattern, nested arrays, missing block, no frontmatter
- FRONTMATTER_SCHEMAS: plan/summary/verification required fields, all schema names