sequant 1.20.2 → 1.20.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sequant",
3
3
  "description": "Structured workflow system for Claude Code - GitHub issue resolution with spec, exec, test, and QA phases",
4
- "version": "1.20.2",
4
+ "version": "1.20.3",
5
5
  "author": {
6
6
  "name": "sequant-io",
7
7
  "email": "hello@sequant.io"
@@ -23,14 +23,15 @@ const PHASE_PROMPTS = {
23
23
  };
24
24
  /**
25
25
  * Phases that require worktree isolation.
26
- * Spec runs in main repo since it's planning-only.
27
- * security-review and loop must be isolated because they need to read/modify
28
- * worktree code, and running them in main directory with a session created
29
- * in the worktree causes the SDK to crash (cwd mismatch on session resume).
26
+ * Only `spec` runs in the main repo (planning-only, no file changes).
27
+ * All other phases must run in the worktree because:
28
+ * 1. They need to read/modify the worktree code
29
+ * 2. Resuming a session created in a different cwd crashes the SDK
30
30
  */
31
31
  const ISOLATED_PHASES = [
32
32
  "exec",
33
33
  "security-review",
34
+ "testgen",
34
35
  "test",
35
36
  "qa",
36
37
  "loop",
@@ -152,8 +153,12 @@ async function executePhase(issueNumber, phase, config, sessionId, worktreePath,
152
153
  env.SEQUANT_ORCHESTRATOR = "sequant-run";
153
154
  env.SEQUANT_PHASE = phase;
154
155
  // Execute using Claude Agent SDK
155
- // Note: Don't resume sessions when switching to worktree (different cwd breaks resume)
156
- const canResume = sessionId && !shouldUseWorktree;
156
+ // Safety: never resume a session when worktree isolation is active.
157
+ // Even if THIS phase doesn't use the worktree, a previous phase may have
158
+ // created the session there. Resuming from a different cwd crashes the SDK
159
+ // (exit code 1). ISOLATED_PHASES prevents this by design, but this guard
160
+ // catches edge cases (e.g. a new phase added without updating ISOLATED_PHASES).
161
+ const canResume = sessionId && !worktreePath;
157
162
  // Get MCP servers config if enabled
158
163
  // Reads from Claude Desktop config and passes to SDK for headless MCP support
159
164
  const mcpServers = config.mcp ? getMcpServersConfig() : undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sequant",
3
- "version": "1.20.2",
3
+ "version": "1.20.3",
4
4
  "description": "Quantize your development workflow - Sequential AI phases with quality gates",
5
5
  "type": "module",
6
6
  "bin": {