Commit graph

2965 commits

Author SHA1 Message Date
Jeremy McSpadden
355cb7ba7d Merge pull request #3845 from jeremymcs/fix/auto-loop-test-timeouts
fix(test): align auto-loop test timers with 120s session timeout
2026-04-09 00:51:47 -05:00
Jeremy
b02b1b1a81 fix(test): align auto-loop test timers with updated session timeout
NEW_SESSION_TIMEOUT_MS was increased from 30s to 120s in #3819, but the
session-switch guard test still ticked only 30s. The test hung, leaked
mock.timers state, and caused 7 downstream tests to hang — timing out
the entire CI build job.
2026-04-09 00:28:45 -05:00
Jeremy McSpadden
d8574e5669 Merge pull request #3737 from mastertyko/fix/3736-safety-expected-output-paths
fix(gsd): normalize described expected output paths
2026-04-08 22:18:56 -05:00
Jeremy McSpadden
535d3a29da Merge pull request #3775 from mastertyko/fix/3770-claude-code-windows-lookup
fix(claude-code): use native Windows claude lookup
2026-04-08 21:53:42 -05:00
Jeremy McSpadden
af15d62c28 Merge pull request #3795 from mastertyko/fix/3751-repair-tool-json-nested-xml
fix(pi-ai): recover XML parameters trapped in valid JSON strings
2026-04-08 21:40:47 -05:00
Jeremy McSpadden
04d4ea1774 Merge pull request #3799 from mastertyko/fix/3778-parseplan-filename-task-ids
fix(gsd): ignore filename headings in parsePlan
2026-04-08 21:13:22 -05:00
Jeremy McSpadden
3e32c02851 Merge pull request #3819 from jeremymcs/fix/auto-session-timeout-3767
fix(auto): increase session timeout to 120s and treat timeout as recoverable pause
2026-04-08 20:50:40 -05:00
Jeremy McSpadden
25dadc2026 Merge pull request #3832 from jeremymcs/fix/orchestration-safety-hardening
fix: harden auto merge recovery and session safety
2026-04-08 20:50:01 -05:00
Jeremy
93fc6fac8a test(gsd): align complete-state milestone assertion 2026-04-08 20:38:15 -05:00
Jeremy McSpadden
2bfd6b5cc6 Merge pull request #3834 from jeremymcs/fix/overlay-widget-surface-fixes
fix: repair overlay, shortcut, and widget surfaces
2026-04-08 20:38:02 -05:00
Jeremy McSpadden
94cb295604 Merge pull request #3833 from jeremymcs/fix/pi-tui-input-hardening
fix: harden pi-tui input parsing and editor focus behavior
2026-04-08 20:37:35 -05:00
Jeremy McSpadden
1a6b655228 Merge pull request #3837 from jeremymcs/fix/prompt-contract-validation-flow
fix: align prompt contracts and validation flow
2026-04-08 20:36:34 -05:00
Jeremy McSpadden
5c31b5f6d7 Merge pull request #3835 from jeremymcs/fix/gate-enforcement-hardening
fix: fail closed for discussion gate enforcement
2026-04-08 20:36:00 -05:00
Jeremy McSpadden
468d8995ae Merge pull request #3836 from jeremymcs/fix/workflow-custom-engine-safety
fix: prevent stale workflow reconcile state writes
2026-04-08 20:35:45 -05:00
Jeremy
b4d06255dd fix(gsd): repair CI after branch split 2026-04-08 20:23:16 -05:00
Jeremy
1d774ca6d8 fix(gsd): repair CI after branch split 2026-04-08 20:22:34 -05:00
Jeremy
eddbfd6a1b fix(gsd): repair CI after branch split 2026-04-08 20:22:33 -05:00
Jeremy
56fbd4d87d fix(gsd): fail closed for discussion gate enforcement 2026-04-08 20:15:21 -05:00
Jeremy
e8c6b5019b fix(gsd): harden auto merge recovery and session safety 2026-04-08 20:15:20 -05:00
Jeremy
ec1bc349aa fix(gsd): repair overlay, shortcut, and widget surfaces 2026-04-08 20:15:20 -05:00
Jeremy
bb4d708b80 fix(gsd): prevent stale workflow reconcile state writes 2026-04-08 20:13:36 -05:00
Jeremy
722dfc96cb fix(gsd): align prompt contracts and validation flow 2026-04-08 20:13:35 -05:00
Jeremy
dac96709d7 fix(pi-tui): harden input parsing and editor focus behavior 2026-04-08 20:13:34 -05:00
Jeremy
74fb4913b1 fix(remote-questions): cancel local TUI when remote answer wins the race
showInterviewRound now accepts an AbortSignal via opts.signal. When the
remote channel wins the race, controller.abort() closes the local TUI
modal instead of leaving an orphaned interactive prompt capturing input.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 19:08:33 -05:00
Jeremy
b619373f0d fix(auto): increase session timeout to 120s and treat timeout as recoverable pause (#3767)
NEW_SESSION_TIMEOUT_MS was 30s which fired before agent_end on slow-starting
tasks, causing spurious stopAuto hard stops. Increased to 120s and added a
dedicated timeout branch in runUnitPhase that calls pauseAuto (recoverable)
instead of stopAuto (destructive teardown).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 18:17:26 -05:00
Jeremy McSpadden
477bf3c3fd Merge pull request #3815 from jeremymcs/fix/anthropic-api-display-remaining
fix(ui): apply anthropic-api display name to all remaining UI surfaces
2026-04-08 18:16:15 -05:00
Jeremy
c8246201b3 test(ui): expand provider display name test coverage 2026-04-08 17:53:49 -05:00
Jeremy
a835b33839 fix(ui): apply anthropic-api display name to all model/provider UI surfaces
Updates scoped model selector, footer bar, provider manager, and /model
autocomplete to use providerDisplayName() consistently.
2026-04-08 17:36:33 -05:00
Jeremy
55cde8549a fix(ui): display 'anthropic-api' in GSD preferences wizard provider list
Applies the same provider display name mapping to the /gsd prefs model
picker so both /model and /gsd prefs show 'anthropic-api' consistently.
2026-04-08 17:36:33 -05:00
Jeremy McSpadden
75a3795e9a Merge pull request #3811 from jeremymcs/worktree-fix+race-remote-local-questions
fix(remote-questions): race local TUI against remote channel
2026-04-08 16:46:22 -05:00
Jeremy
c1a68a48a9 test(remote-questions): add regression tests for race model (#3810)
Validates the race routing logic: raceRemoteAndLocal helper exists,
routing checks both hasRemote and ctx.hasUI, remote timeouts are
treated as non-wins, AbortController cancels the loser, and
isRemoteConfigured is exported from manager.ts.
2026-04-08 16:20:13 -05:00
Jeremy
dadb0b136e fix(remote-questions): race local TUI against remote channel instead of remote-only routing
When a remote channel (Discord/Slack/Telegram) is configured, ask_user_questions
now races the local TUI against the remote dispatch. The first response wins and
the loser is cancelled. Previously, remote completely preempted the local TUI,
meaning terminal users never saw the question prompt when remote was configured.

Closes #3801
2026-04-08 15:58:06 -05:00
Jeremy McSpadden
ed303f3fed Merge pull request #3807 from jeremymcs/fix/anthropic-api-display-name
fix(ui): display 'anthropic-api' in model selector to distinguish from claude-code
2026-04-08 14:27:44 -05:00
Jeremy McSpadden
ecfd4fbc90 Merge pull request #3802 from jeremymcs/fix/harden-prompt-gates
fix(prompts): harden non-bypassable gates and exclude dot-folders from scanning
2026-04-08 14:19:07 -05:00
Jeremy
ce28d00c50 test(ui): add provider display name tests to satisfy CI requirement 2026-04-08 14:15:34 -05:00
Jeremy
61e33519c4 fix(ui): display 'anthropic-api' in model selector to distinguish from claude-code
Helps users understand that 'anthropic-api' makes direct API calls (requires
API key / extra usage) while 'claude-code' routes through the local CLI
(uses subscription).
2026-04-08 14:09:35 -05:00
Jeremy
d84778336c fix(gates): add mechanical enforcement for discussion question gates
When ask_user_questions fails, errors, or is cancelled during a
discussion flow, the model is now mechanically blocked from all
non-read-only tool calls until it re-asks and gets a valid response.

Previously, gate enforcement was prompt-only — the model could
rationalize past failed ask_user_questions calls ("auth issue, I'll
continue") and generate an entire plan without any user interaction.

The pending gate mechanism:
- tool_call hook: any ask_user_questions during discussion sets pending
- tool_result hook: valid user response clears pending; failure keeps it
- tool_call hook: blocks write/edit/gsd/mutating-bash while pending
- read-only tools and ask_user_questions itself always allowed
2026-04-08 14:00:16 -05:00
Jeremy
2c1e4b695e test(scanning): add regression tests for dot-folder exclusions
- codebase-generator: verify .claude/, .plans/, .cursor/, .vscode/ excluded
- detection: verify scanProjectFiles skips .claude, .gsd, .planning, .plans, .cursor, .vscode
2026-04-08 13:08:12 -05:00
Jeremy McSpadden
e3982c9fe5 Merge pull request #3798 from jeremymcs/test/tui-slash-command-regression
test(pi-tui): add regression tests for slash command TUI interactions
2026-04-08 13:01:32 -05:00
Jeremy
757ce56594 fix(prompts): harden non-bypassable gates and exclude dot-folders from scanning
Regression: discuss-prepared.md was created without the non-bypassable gate
language from discuss.md, allowing the LLM to fabricate excuses ("auth issues")
and bypass user approval gates. Also, codebase scanning included .claude/ and
other tool directories, tainting project analysis with LLM metadata.

Gate hardening (9 prompts):
- discuss-prepared.md: all 4 layer gates + requirements/roadmap preview
- discuss.md: requirements, roadmap preview, Phase 3 multi-milestone gate
- guided-discuss-slice.md: added missing write-gate before CONTEXT.md write
- guided-discuss-milestone.md: plain-text fallback path now matches structured
- worktree-merge.md: merge confirmation gate
- system.md: outward-facing actions gate
- rethink.md: skip-slice gate added, discard confirmation hardened
- complete-milestone.md: tool-failure handling for verification gate
- triage-captures.md: quick-task/inject/replan confirmation gate

Dot-folder exclusions (2 files):
- codebase-generator.ts: added .claude/, .plans/, .cursor/, .vscode/
- detection.ts: added .gsd, .planning, .plans, .claude, .cursor, .vscode
2026-04-08 12:58:13 -05:00
mastertyko
afa0f9e463 fix(gsd): ignore filename headings in parsePlan 2026-04-08 19:19:32 +02:00
Jeremy
d98456cad7 test(pi-tui): add regression tests for slash command TUI interactions
Add 3 new tests covering editor↔selector/input component swaps that
happen during /gsd prefs, /gsd migrate, and /gsd setup:

- editor-to-selector swap: verifies cursor tracking when editor with
  CURSOR_MARKER is replaced by a selector without one
- selector-to-editor swap: verifies cursor restores to CURSOR_MARKER
  position when editor returns after selector dismissal
- input component swap: verifies typing in prefs wizard text input
  produces correct cursor movement without jumps

All tests confirm hardwareCursorRow baseline computes correct movement
deltas for these interactive component transitions.
2026-04-08 12:09:21 -05:00
Jeremy McSpadden
d29d086f6a Merge pull request #3794 from jeremymcs/fix/claude-code-routing-bugs
fix(providers): match subscription block errors and respect claude-code routing
2026-04-08 11:15:26 -05:00
Jeremy
c07ecc1028 fix(providers): match 'out of extra usage' error and respect claude-code provider in model resolution (#3772)
Two bugs prevented subscription users from routing through Claude Code CLI:
1. Retry handler regex only matched "third-party" errors but actual error is
   "You're out of extra usage" — fallback never triggered
2. auto-model-selection actively rerouted bare model IDs back to anthropic
   even after startup migration set claude-code as the session provider
2026-04-08 10:47:35 -05:00
mastertyko
304b1bf329 fix(pi-ai): recover XML parameters trapped in JSON strings 2026-04-08 17:43:28 +02:00
Jeremy McSpadden
e3d69ed01a Merge pull request #3766 from OfficialDelta/feat/tiered-context-injection
feat(gsd): tiered context injection with scoped decisions, knowledge, and roadmap excerpts
2026-04-08 08:09:29 -05:00
Jeremy McSpadden
695cab8b63 Merge pull request #3774 from mastertyko/fix/3759-preferences-section-warn-once
fix(gsd): suppress repeated preferences section warnings
2026-04-08 08:07:41 -05:00
Jeremy McSpadden
7d9e9a5585 Merge pull request #3784 from jeremymcs/fix/claude-code-default-provider
fix(providers): route Anthropic subscription users through Claude Code CLI
2026-04-08 08:07:09 -05:00
Jeremy
cf6ea332b7 test(retry): add tests for third-party block provider guard (#3772)
Verify claude-code fallback only fires for anthropic provider and
does not reroute non-anthropic providers on similar error text.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 07:52:58 -05:00
Jeremy
3ea46099d0 fix(retry): guard claude-code fallback to anthropic provider only
Prevent _tryClaudeCodeFallback from firing for non-Anthropic providers
that may produce similar error text, avoiding unintended provider drift.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 07:31:32 -05:00