Commit Graph

2 Commits

Author SHA1 Message Date
Tom Boucher
2703422be8 refactor(tests): standardize to node:assert/strict and t.after() per CONTRIBUTING.md (#1675)
* 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>
2026-04-04 14:29:03 -04:00
Tibsfox
2aca125308 feat(autonomous): add --interactive flag for lean context with user input
The autonomous workflow previously had two extremes: full auto-answer
mode (--auto discuss, lean context but no user input) or manager mode
(interactive but bloated context from accumulating everything inline).

The --interactive flag bridges this gap:
- Discuss runs inline via gsd:discuss-phase (asks questions, waits for
  user answers — preserving all design decisions)
- Plan and execute dispatch as background agents (fresh context per
  phase — no accumulation in the main session)
- Pipeline parallelism: discuss Phase N+1 while Phase N builds in the
  background

This keeps the main context lean (only discuss conversations accumulate)
while preserving user input on all decisions. Particularly helpful for
users hitting context limits with /gsd:manager on multi-phase milestones.

Usage:
  /gsd:autonomous --interactive
  /gsd:autonomous --interactive --from 3
  /gsd:autonomous --interactive --only 5

Also adds --only N flag parsing to the upstream workflow (previously only
in PR #1444's branch).

Closes #1413

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 14:58:52 -07:00