Commit graph

3535 commits

Author SHA1 Message Date
Tibsfox
8dd8744b91 test: add regression test for pre-execution backtick strip and inputs-only check
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:26:53 -07:00
Tibsfox
fe84893351 test: add regression test for importing done milestones as complete
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:26:51 -07:00
Tibsfox
ef68e37e79 test: add regression test for skipped validation completion
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:26:33 -07:00
Tibsfox
b8536a896d test: add regression test for worktree expected-condition warning suppression
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:26:28 -07:00
Tibsfox
fceb983beb test: add regression test for slice sequence on insert
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:26:19 -07:00
Tibsfox
08ebf3387d test: add regression test for projection plan overwrite prevention
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:26:06 -07:00
Tibsfox
474c3c287d test: add regression test for prompt step ordering and runtime fixes
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:26:04 -07:00
Tibsfox
808a0e56bd test: add regression test for error-success mask detection
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:26:03 -07:00
Tibsfox
5a0c127543 test: add regression test for isolation:none stale branch guard
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:25:57 -07:00
Tibsfox
9ea3beab22 test: add regression test for phantom milestone default queued status
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:25:44 -07:00
Tibsfox
fc210a4edf test: add regression test for .bg-shell/ in gitignore BASELINE_PATTERNS
Structural verification that .bg-shell/ is included in the
BASELINE_PATTERNS array in gitignore.ts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:25:38 -07:00
Tibsfox
5222801ebd test: add regression test for frontmatter parse noise suppression
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:25:32 -07:00
Tibsfox
faf8c95c8a test: add regression test for provider manager Enter key handler
Structural verification that selectConfirm handler and onSetupAuth
callback exist in provider-manager.ts (#3579).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:25:26 -07:00
Tibsfox
b461cf75ed test: add regression test for run-uat replay cap
Structural verification that MAX_UAT_ATTEMPTS constant exists and
incrementUatCount is called before dispatch (#3624).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:25:12 -07:00
Tibsfox
1d428c5ffd test: add regression test for complete-task normalizeListParam
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:25:10 -07:00
Tibsfox
9475757d9a test: add regression test for dispatcher stuck-planning reconciliation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:25:10 -07:00
Tibsfox
26d1222096 test: add regression test for MCP createRequire subpath resolution
Structural verification that createRequire import and _require.resolve
usage exist in mcp-server.ts (#3603).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:24:58 -07:00
Tibsfox
7372948585 test: add regression test for status DB open in cold sessions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:24:55 -07:00
Tibsfox
ad21e0de76 test: add regression test for note captures execution in triage resolution
Structural verification that classification === "note" filter and
markCaptureExecuted call exist in executeTriageResolutions (#3578).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:24:43 -07:00
Tibsfox
383fbfdd16 test: add regression test for isClosedStatus dispatch guard
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:24:40 -07:00
Tibsfox
554c7a5ff3 test: add regression test for project-root cwd crash and main_branch validation
Structural verification that process.cwd() is wrapped in try/catch (#3598)
and nativeBranchExists validates prefs.main_branch (#3589).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:24:26 -07:00
Tibsfox
c9a4d117b0 test: add regression test for auto-remediate stale slice status
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:24:18 -07:00
Tibsfox
a7af280c81 test: add regression test for query-tools ensureDbOpen usage
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:23:54 -07:00
Tibsfox
ce6beb3000 test: add regression test for phantom milestone ghost detection
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:23:28 -07:00
Tibsfox
64d5232cc0 test: add regression test for needs-remediation revalidation guard
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:23:05 -07:00
Tibsfox
83822c51b3 test: add regression test for findMissingSummaries closed-status exclusion
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:21:33 -07:00
Tibsfox
ba8f6a0be2 test: add regression test for findMissingSummaries closed-status exclusion
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:19:52 -07:00
github-actions[bot]
a1fb64a6ba release: v2.65.0 2026-04-07 04:25:48 +00:00
Jeremy McSpadden
97bd6bf0ee Merge pull request #3700 from jeremymcs/fix/notification-overlay-backdrop
fix(gsd): wrap notification messages and fit overlay to content
2026-04-06 23:05:27 -05:00
Jeremy
5b959648f9 test(gsd): add wrapText tests for notification overlay wrapping
Tests cover: short text, long wrapping, single-word truncation,
empty string, exact-fit, and word preservation across lines.
2026-04-06 22:52:46 -05:00
Jeremy
073a6dc546 fix(gsd): wrap long notification messages and fit overlay to content
Long messages now word-wrap onto continuation lines aligned with the
message start instead of being truncated with ellipsis. Overlay box
sizes to content height instead of padding to fill the viewport.
2026-04-06 22:49:14 -05:00
Tibsfox
f65f92cf76 fix(gsd): import all-done milestones as complete during DB migration
migrateHierarchyToDb imported milestones with all-done roadmap slices
as "active" when SUMMARY.md was missing. This let plan-milestone
overwrite already-completed work.

Now checks parsed roadmap slices — if all are done, imports as
"complete" even without SUMMARY.md.

Closes #3390
Closes #3379

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 20:07:42 -07:00
Tibsfox
5affaaf734 fix(gsd): allow milestone completion when validation skipped by preference
The completing-milestone dispatch guard blocked completion when
operational verification was planned but the validation was
intentionally skipped by a budget profile preference. The guard
now detects skip-by-preference markers in the validation content
and allows completion to proceed.

Closes #3399
Closes #3344

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:52:55 -07:00
Tibsfox
2d3723691a fix(gsd): set slice sequence at all three insertion sites
All slices got sequence=0 because the three code paths that insert
slices never set the sequence column. This made positional ordering
degenerate to alphabetical-by-ID, causing deadlocks when dependency-
free slices were ordered after blocked ones.

Now passes sequence at:
- plan-milestone: array index from agent-ordered params.slices
- reassess-roadmap: existingCount + index for newly added slices
- md-importer: parse order from roadmap content

Closes #3356

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:51:16 -07:00
Tibsfox
994fc15c9d fix(gsd): four prompt/runtime fixes for completion and session stability
1. complete-milestone: move gsd_requirement_update before
   gsd_complete_milestone so agents don't exit before updating
   requirement status (#3155)
2. complete-slice: use gsd_requirement_update instead of
   gsd_save_decision for requirement status transitions (#3154)
3. uncaughtException handler: log instead of re-throwing to prevent
   fatal double-fault that kills the session (#3163)
4. session_before_compact: only cancel during active auto-mode, not
   when paused — allows compaction during interactive work (#3165)

Closes #3155
Closes #3154
Closes #3163
Closes #3165

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:47:38 -07:00
Tibsfox
947ff2ba0a fix(gsd): default insertMilestone status to queued instead of active
Hallucinated tool calls could auto-create phantom milestones as
"active", hijacking the state machine. Observed: complete-slice issued
a stray gsd_task_complete for M000, which was auto-created as active
and promoted over the real M028.

Changing the default from "active" to "queued" means phantom milestones
from stray tool calls won't be promoted as active. Combined with the
ghost detection fix (#3645), they'll be cleaned up automatically.

Legitimate callers (plan-milestone, state reconciliation, md-importer)
already pass status explicitly.

Closes #3380

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:36:01 -07:00
Tibsfox
db19c2e67a fix(gsd): suppress repeated frontmatter YAML parse warnings
logWarning fired on every preferences load when YAML was malformed,
flooding the TUI. Now warns at most once per session with a suppression
notice.

Closes #3376

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:33:55 -07:00
Tibsfox
09acec6dce fix(gsd): normalize list inputs in complete-task + fix roadmap dep parsing
Two fixes:
1. gsd_complete_task now normalizes keyFiles/keyDecisions from strings
   (newline-delimited bullet lists) into arrays at the tool boundary,
   preventing type mismatch rejections on first call (#3361)
2. Legacy roadmap table parser now detects the dependency column from
   the header and only parses deps from that column or cells with
   explicit depends/deps keywords — prevents false deps from slice
   titles that mention other S-IDs (#3383, #3336)

Closes #3361
Closes #3383
Closes #3336

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:32:17 -07:00
Tibsfox
05130b41ad fix(gsd): open DB before status derivation + respect isolation:none in quick
Two fixes:
1. handleStatus now calls ensureDbOpen() before deriveState so cold
   sessions use DB-backed state instead of filesystem fallback (#3385)
2. /gsd quick now checks getIsolationMode() and skips branch creation
   when isolation is "none", consistent with milestone behavior (#3337)

Closes #3385
Closes #3337

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:30:05 -07:00
Tibsfox
34049b4a7e fix(gsd): add .bg-shell/ to baseline gitignore patterns
The bg-shell process manifest directory is ephemeral runtime state that
should never be committed, but ensureGitignore() was not including it.

Closes #3389
Closes #3388

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:27:06 -07:00
Tibsfox
771a729eb7 fix(tui): prevent Enter key infinite loop in interview notes mode
When "None of the above" was selected and the notes field was already
visible but empty, pressing Enter re-opened the notes field endlessly
because the guard only checked !notes (empty string is falsy).

Add !notesVisible guard so auto-open only triggers on the initial
selection, not when the user is confirming from an already-open notes
field.

Closes #3450
Closes #3449

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:25:52 -07:00
Tibsfox
f121d6f170 fix(provider): handle Enter key to initiate auth setup in provider manager
The provider manager let users navigate with arrow keys but pressing
Enter did nothing. Users had no way to set up authentication from within
the /provider command.

Adds selectConfirm (Enter) handler that routes to showLoginDialog for
the selected provider, with a hint in the status bar.

Closes #3579
Closes #3567

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:23:14 -07:00
Tibsfox
03328e04e8 fix(gsd): cap run-uat dispatch attempts to prevent infinite replay loop
When verification commands fail before writing an ASSESSMENT verdict,
checkNeedsRunUat keeps returning the same slice, causing infinite
re-dispatch until the provider throttles the session.

Adds a per-slice disk-persisted counter (survives crash/restart) that
caps run-uat at 3 attempts. After the cap, stops auto-mode with an
actionable message instead of looping.

Closes #3624

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:19:20 -07:00
Tibsfox
8fbb0cd1eb fix(mcp): use createRequire to resolve SDK wildcard subpath imports
Node ESM can't resolve wildcard export patterns without .js extension.
The MCP SDK's server/stdio and types subpaths use wildcard exports that
fail at runtime with ERR_MODULE_NOT_FOUND.

Use createRequire (CJS resolver) to resolve physical file paths before
passing to dynamic import(), since CJS auto-appends .js.

Closes #3603

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:17:26 -07:00
Tibsfox
a3d0b66836 fix(gsd): mark note captures as executed in executeTriageResolutions
Note captures (informational-only, no action needed) were never marked
as Executed because loadActionableCaptures excluded them and there was
no dedicated handler. They stayed in "resolved but not executed" limbo.

Now marks note captures as executed immediately since the triage
classification is their complete lifecycle.

Closes #3578

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:14:18 -07:00
Tibsfox
902e3be6d8 fix(gsd): validate main_branch preference exists before using in merge
mergeMilestoneToMain used prefs.main_branch without checking if the
branch exists in the repo. A stale preference (e.g. "master" when repo
uses "main") caused merge failure.

Now validates with nativeBranchExists before using the preference,
falling through to nativeDetectMainBranch if invalid.

Closes #3589

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:12:54 -07:00
Tibsfox
5cc2e24800 fix(gsd): handle deleted cwd in projectRoot to prevent ENOENT crash
process.cwd() throws ENOENT when the worktree directory was deleted
during a failed merge. Every /gsd command calls projectRoot(), causing
the entire extension to crash.

Now catches the ENOENT and falls back to HOME directory.

Closes #3598

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:12:48 -07:00
Tibsfox
16b61a7789 fix(gsd): skip current milestone in syncWorktreeStateBack to prevent merge conflicts
syncWorktreeStateBack copied all milestone directories including the one
being merged. This caused dirty-tree conflicts when mergeMilestoneToMain
ran because the files already existed from the copy-back.

Now skips the current milestoneId in the sync loop since its files are
already in the milestone branch being merged.

Closes #3641

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:11:14 -07:00
Tibsfox
dd527ce08e fix(gsd): add structuredQuestionsAvailable conditional to slice discuss
The slice discuss template hardcoded ask_user_questions references with
no fallback for providers that don't have the tool. The milestone
discuss template was already fixed with a conditional.

Now buildDiscussSlicePrompt accepts and passes structuredQuestionsAvailable,
and the prompt template uses the same conditional pattern as the milestone
discuss template.

Closes #3604

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:09:41 -07:00
Tibsfox
69eb369675 fix(gsd): restore full tool set after discuss flow scoping
dispatchWorkflow scoped tools down for discuss-* flows but never
restored them. The narrowed set persisted into subsequent dispatches,
making GSD execution tools permanently unavailable for the session.

Now saves the full tool list before scoping and restores it immediately
after sendMessage queues the turn. The LLM turn has already captured
the scoped set so it's unaffected.

Closes #3628

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:06:59 -07:00