Commit Graph

2 Commits

Author SHA1 Message Date
Tom Boucher
990c3e648d fix(tests): update 5 source-text tests to read config-schema.cjs (#2480)
VALID_CONFIG_KEYS moved from config.cjs to config-schema.cjs in the
drift-prevention companion PR. Tests that read config.cjs source text
and checked for key literal includes() now point to the correct file.

Closes #2480

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 09:54:35 -04:00
Tibsfox
e5cc0bb48b fix(workflow): correct grep anchor and add threshold=0 guard (#1979)
Two correctness bugs from @trek-e review:

1. Grep pattern `^<task` only matched unindented task tags, missing
   indented tasks in PLAN.md templates that use indentation. Fixed to
   `^\s*<task[[:space:]>]` which matches at any indentation level and
   avoids false positives on <tasks> or </task>.

2. Threshold=0 was documented to disable inline routing but the
   condition `TASK_COUNT <= INLINE_THRESHOLD` evaluated 0<=0 as true,
   routing empty plans inline even when the feature was disabled.
   Fixed by guarding with `INLINE_THRESHOLD > 0`.

Added tests/inline-plan-threshold.test.cjs (8 tests) covering:
- config-set accepts the key and threshold=0
- VALID_CONFIG_KEYS and planning-config.md contain the entry
- Routing pattern matches indented tasks and rejects <tasks>/</task>
- Inline routing is guarded by INLINE_THRESHOLD > 0

Review feedback on #2061 from @trek-e.
2026-04-11 03:33:29 -07:00