@opengsd/gsd-core 1.20.0 → 1.21.0

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.
Files changed (154) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.opencode/plugins/gsd-core.js +33 -2
  4. package/agents/gsd-executor.md +1 -1
  5. package/agents/gsd-plan-checker.md +1 -1
  6. package/agents/gsd-planner.md +3 -3
  7. package/agents/gsd-verifier.md +2 -2
  8. package/bin/install.js +265 -161
  9. package/commands/gsd/autonomous.md +1 -1
  10. package/commands/gsd/new-milestone.md +2 -2
  11. package/commands/gsd/new-project.md +2 -2
  12. package/gsd-core/bin/gsd-tools.cjs +554 -823
  13. package/gsd-core/bin/lib/capability-activation.cjs +8 -2
  14. package/gsd-core/bin/lib/capability-command-router.cjs +6 -2
  15. package/gsd-core/bin/lib/capability-ledger.cjs +1 -1
  16. package/gsd-core/bin/lib/capability-lock.cjs +19 -27
  17. package/gsd-core/bin/lib/capability-registry.cjs +74 -71
  18. package/gsd-core/bin/lib/capability-validator.cjs +1 -0
  19. package/gsd-core/bin/lib/capability-writer.cjs +7 -4
  20. package/gsd-core/bin/lib/claude-orchestration-command-router.cjs +142 -62
  21. package/gsd-core/bin/lib/claude-orchestration.cjs +214 -122
  22. package/gsd-core/bin/lib/cli-surface.cjs +545 -0
  23. package/gsd-core/bin/lib/command-arg-projection.cjs +356 -103
  24. package/gsd-core/bin/lib/commands.cjs +99 -2
  25. package/gsd-core/bin/lib/config-file-read.cjs +85 -0
  26. package/gsd-core/bin/lib/config-loader.cjs +23 -15
  27. package/gsd-core/bin/lib/config.cjs +139 -101
  28. package/gsd-core/bin/lib/configuration.cjs +41 -2
  29. package/gsd-core/bin/lib/criterion-baseline.cjs +346 -0
  30. package/gsd-core/bin/lib/criterion-replay.cjs +380 -0
  31. package/gsd-core/bin/lib/estimate-cli.cjs +5 -1
  32. package/gsd-core/bin/lib/gap-checker.cjs +12 -1
  33. package/gsd-core/bin/lib/gate-evaluation-scope.cjs +593 -27
  34. package/gsd-core/bin/lib/gate-phase-context.cjs +16 -4
  35. package/gsd-core/bin/lib/graphify.cjs +19 -2
  36. package/gsd-core/bin/lib/gsd-tool-dir.cjs +134 -0
  37. package/gsd-core/bin/lib/health-diagnostic.cjs +5 -1
  38. package/gsd-core/bin/lib/init.cjs +20 -18
  39. package/gsd-core/bin/lib/install-effort-resolver.cjs +24 -4
  40. package/gsd-core/bin/lib/install-engine.cjs +20 -28
  41. package/gsd-core/bin/lib/install-fs-adapter.cjs +5 -1
  42. package/gsd-core/bin/lib/install-manifest-record.cjs +86 -0
  43. package/gsd-core/bin/lib/install-model-override-resolver.cjs +33 -3
  44. package/gsd-core/bin/lib/install-profiles.cjs +4 -2
  45. package/gsd-core/bin/lib/io.cjs +6 -0
  46. package/gsd-core/bin/lib/markdown-sectionizer.cjs +62 -31
  47. package/gsd-core/bin/lib/markdown-table.cjs +39 -1
  48. package/gsd-core/bin/lib/milestone.cjs +8 -6
  49. package/gsd-core/bin/lib/model-resolver.cjs +8 -4
  50. package/gsd-core/bin/lib/phase-entry-grammar.cjs +14 -0
  51. package/gsd-core/bin/lib/phase-id.cjs +26 -9
  52. package/gsd-core/bin/lib/phase-locator.cjs +8 -3
  53. package/gsd-core/bin/lib/phase.cjs +170 -45
  54. package/gsd-core/bin/lib/plan-dependency-graph.cjs +46 -23
  55. package/gsd-core/bin/lib/planning-snapshot.cjs +10 -6
  56. package/gsd-core/bin/lib/planning-workspace.cjs +20 -10
  57. package/gsd-core/bin/lib/profile-output.cjs +9 -6
  58. package/gsd-core/bin/lib/project-context.cjs +439 -0
  59. package/gsd-core/bin/lib/project-root.cjs +9 -230
  60. package/gsd-core/bin/lib/quick-batch-dispatch.cjs +1 -1
  61. package/gsd-core/bin/lib/report-parser.cjs +16 -0
  62. package/gsd-core/bin/lib/roadmap-parser.cjs +357 -50
  63. package/gsd-core/bin/lib/roadmap-upgrade.cjs +24 -5
  64. package/gsd-core/bin/lib/roadmap.cjs +2 -2
  65. package/gsd-core/bin/lib/runtime-artifact-conversion.cjs +317 -134
  66. package/gsd-core/bin/lib/runtime-artifact-install-plan.cjs +81 -3
  67. package/gsd-core/bin/lib/runtime-artifact-layout.cjs +6 -0
  68. package/gsd-core/bin/lib/runtime-hooks-surface.cjs +279 -8
  69. package/gsd-core/bin/lib/runtime-slash.cjs +7 -2
  70. package/gsd-core/bin/lib/shell-command-projection.cjs +1010 -10
  71. package/gsd-core/bin/lib/stale-bake-guard.cjs +4 -1
  72. package/gsd-core/bin/lib/state-transition.cjs +103 -46
  73. package/gsd-core/bin/lib/state.cjs +448 -63
  74. package/gsd-core/bin/lib/surface.cjs +4 -7
  75. package/gsd-core/bin/lib/tdd-red-evidence.cjs +10 -3
  76. package/gsd-core/bin/lib/verify-command-router.cjs +6 -1
  77. package/gsd-core/bin/lib/verify.cjs +49 -6
  78. package/gsd-core/bin/lib/workstream-inventory.cjs +4 -4
  79. package/gsd-core/bin/lib/worktree-base-ref.cjs +32 -2
  80. package/gsd-core/bin/lib/worktree-safety.cjs +8 -111
  81. package/gsd-core/bin/shared/config-schema.manifest.json +1 -0
  82. package/gsd-core/references/autonomous-smart-discuss.md +99 -18
  83. package/gsd-core/references/checkpoints.md +1 -1
  84. package/gsd-core/references/planner-guidance.md +11 -0
  85. package/gsd-core/references/planner-human-verify-mode.md +1 -1
  86. package/gsd-core/references/planner-reversibility.md +2 -0
  87. package/gsd-core/references/planner-verify-command-grounding.md +22 -6
  88. package/gsd-core/workflows/autonomous.md +4 -4
  89. package/gsd-core/workflows/code-review-fix.md +5 -7
  90. package/gsd-core/workflows/execute-phase.md +21 -7
  91. package/gsd-core/workflows/plan-phase/steps/plan-pre-dispatch.md +101 -0
  92. package/gsd-core/workflows/plan-phase.md +18 -19
  93. package/hooks/dist/gsd-agent-isolation-guard.js +4 -3
  94. package/hooks/dist/gsd-config-reload.js +2 -2
  95. package/hooks/dist/gsd-context-monitor.js +2 -1
  96. package/hooks/dist/gsd-cursor-subagent-start.js +9 -6
  97. package/hooks/dist/gsd-read-injection-scanner.js +2 -2
  98. package/hooks/dist/gsd-secret-read-guard.js +141 -6
  99. package/hooks/dist/gsd-statusline.js +3 -2
  100. package/hooks/dist/gsd-workflow-guard.js +2 -1
  101. package/hooks/dist/lib/config-read.js +49 -0
  102. package/hooks/dist/lib/git-cmd.js +3 -1
  103. package/hooks/dist/lib/git-head-tree.js +474 -0
  104. package/hooks/dist/lib/isolation-sentinel.js +168 -13
  105. package/hooks/dist/lib/secret-read-exemptions.js +161 -0
  106. package/hooks/gsd-agent-isolation-guard.js +4 -3
  107. package/hooks/gsd-config-reload.js +2 -2
  108. package/hooks/gsd-context-monitor.js +2 -1
  109. package/hooks/gsd-cursor-subagent-start.js +9 -6
  110. package/hooks/gsd-read-injection-scanner.js +2 -2
  111. package/hooks/gsd-secret-read-guard.js +141 -6
  112. package/hooks/gsd-statusline.js +3 -2
  113. package/hooks/gsd-workflow-guard.js +2 -1
  114. package/hooks/lib/config-read.js +49 -0
  115. package/hooks/lib/git-cmd.js +3 -1
  116. package/hooks/lib/git-head-tree.js +474 -0
  117. package/hooks/lib/isolation-sentinel.js +168 -13
  118. package/hooks/lib/secret-read-exemptions.js +161 -0
  119. package/package.json +7 -2
  120. package/pi/package-agents/gsd-executor.md +1 -1
  121. package/pi/package-agents/gsd-plan-checker.md +1 -1
  122. package/pi/package-agents/gsd-planner.md +3 -3
  123. package/pi/package-agents/gsd-verifier.md +2 -2
  124. package/pi/package-agents/manifest.json +4 -4
  125. package/pi/package-skills/gsd-autonomous/SKILL.md +1 -1
  126. package/pi/package-skills/gsd-new-milestone/SKILL.md +1 -1
  127. package/pi/package-skills/gsd-new-project/SKILL.md +1 -1
  128. package/scripts/changeset/cli.cjs +2 -2
  129. package/scripts/changeset/lint.cjs +28 -3
  130. package/scripts/changeset/serialize.cjs +12 -2
  131. package/scripts/ci-compact-v8-coverage.cjs +204 -0
  132. package/scripts/ci-fix-next-rerun.cjs +149 -0
  133. package/scripts/ci-next-health.cjs +52 -9
  134. package/scripts/ci-test-scope.cjs +77 -71
  135. package/scripts/command-contract-helpers.cjs +56 -7
  136. package/scripts/docs-guard-registry.cjs +3 -0
  137. package/scripts/gen-cli-surface-manifest.cjs +287 -0
  138. package/scripts/gen-platform-conformance-tier.cjs +258 -19
  139. package/scripts/lib/macos-conformance-tier.generated.cjs +59 -47
  140. package/scripts/lib/platform-conformance-tier.generated.cjs +23 -64
  141. package/scripts/lib/shellcheck-fetch.cjs +71 -4
  142. package/scripts/lint-removed-but-needed.cjs +562 -50
  143. package/scripts/merge-commit-pr.cjs +186 -0
  144. package/scripts/release-ancestry.cjs +86 -0
  145. package/scripts/release-notes/changelog-release-notes.cjs +345 -0
  146. package/scripts/release-notes/discord-release-summary.cjs +82 -1
  147. package/scripts/release-pipeline-pr.cjs +92 -0
  148. package/scripts/require-issue-link-policy.cjs +18 -9
  149. package/scripts/sync-next-version.cjs +11 -2
  150. package/scripts/timeout-evidence-from-ci.cjs +964 -0
  151. package/skills/gsd-autonomous/SKILL.md +1 -1
  152. package/skills/gsd-new-milestone/SKILL.md +1 -1
  153. package/skills/gsd-new-project/SKILL.md +1 -1
  154. package/vscode/package.json +1 -1
@@ -8,17 +8,11 @@ module.exports = {
8
8
  "tests/adr-612-bracket-phase-remove.test.cjs",
9
9
  "tests/adr-612-bracket-write-path.test.cjs",
10
10
  "tests/adr-index-gate.test.cjs",
11
- "tests/adr857-core-without-capabilities.test.cjs",
12
11
  "tests/agent-install-check.test.cjs",
13
12
  "tests/agent-install-validation.test.cjs",
14
13
  "tests/agent-skills.test.cjs",
15
14
  "tests/antigravity-upgrades.test.cjs",
16
- "tests/api-coverage-gate-e2e.test.cjs",
17
- "tests/api-coverage.test.cjs",
18
15
  "tests/args-terminator-nonce.test.cjs",
19
- "tests/assumption-delta-checkpoint-e2e.test.cjs",
20
- "tests/assumption-delta.test.cjs",
21
- "tests/audit-command-cutover.test.cjs",
22
16
  "tests/audit-workstream-layouts.test.cjs",
23
17
  "tests/augment-upgrades.test.cjs",
24
18
  "tests/blocking-guard-budget-parity.test.cjs",
@@ -30,29 +24,25 @@ module.exports = {
30
24
  "tests/capability-lifecycle.test.cjs",
31
25
  "tests/capability-loader.test.cjs",
32
26
  "tests/capability-lock-lazy-self-probe-5327.test.cjs",
33
- "tests/capability-lock-mkdir-failure-3987.test.cjs",
34
27
  "tests/capability-probe-fallback.test.cjs",
35
28
  "tests/capability-source.test.cjs",
36
29
  "tests/capability-state.test.cjs",
37
30
  "tests/changeset-new.test.cjs",
38
31
  "tests/check-contract-drift.test.cjs",
39
32
  "tests/check-env.test.cjs",
40
- "tests/check-gap-analysis-plan-post-e2e.test.cjs",
41
33
  "tests/check-glossary-refs.test.cjs",
42
34
  "tests/check-predicate.test.cjs",
43
- "tests/check-router-cutover-equivalence.test.cjs",
44
35
  "tests/check-router-gate-boundaries.test.cjs",
45
- "tests/check-tdd-review-checkpoint-e2e.test.cjs",
46
36
  "tests/check-ui-safety-gate.test.cjs",
47
37
  "tests/check-update-config-dir.test.cjs",
48
38
  "tests/check-update-fail-open.test.cjs",
49
39
  "tests/chunked-planning-parallel.test.cjs",
50
40
  "tests/ci-conformance-pr-gating.test.cjs",
51
- "tests/ci-docs-guard-registry.test.cjs",
52
41
  "tests/ci-rebase-check.test.cjs",
53
42
  "tests/ci-test-scope.test.cjs",
54
- "tests/cjs-command-router-adapter.test.cjs",
55
43
  "tests/claude-md.test.cjs",
44
+ "tests/claude-orchestration-4747.test.cjs",
45
+ "tests/cli-surface-host-router-locks.test.cjs",
56
46
  "tests/cline-install.test.cjs",
57
47
  "tests/close-phase-todos-padded-resolves.test.cjs",
58
48
  "tests/code-review-cicd.test.cjs",
@@ -76,9 +66,8 @@ module.exports = {
76
66
  "tests/commonjs-marker.test.cjs",
77
67
  "tests/compact-content-4139.test.cjs",
78
68
  "tests/complete-milestone-release-map-routing.test.cjs",
79
- "tests/completion-ratio-scope-withholding.test.cjs",
80
69
  "tests/config-defaults-runtime-exclusion.test.cjs",
81
- "tests/config-get-default.test.cjs",
70
+ "tests/config-loader-bounded-read.platform.test.cjs",
82
71
  "tests/config-loader.test.cjs",
83
72
  "tests/config-schema.property.test.cjs",
84
73
  "tests/config.platform.test.cjs",
@@ -88,58 +77,44 @@ module.exports = {
88
77
  "tests/copilot-install.test.cjs",
89
78
  "tests/copilot-upgrades.test.cjs",
90
79
  "tests/core-utils.test.cjs",
91
- "tests/cursor-hook-workspace-roots.test.cjs",
80
+ "tests/criterion-replay.test.cjs",
92
81
  "tests/cursor-hooks.test.cjs",
93
82
  "tests/cursor-subagent-isolation.test.cjs",
94
83
  "tests/custom-phase-readers.test.cjs",
95
84
  "tests/debug-session-management.test.cjs",
96
85
  "tests/defaults-json-fallback.test.cjs",
97
86
  "tests/diagnose-windows-spawn-watcher.test.cjs",
98
- "tests/dispatch-identity.test.cjs",
99
- "tests/dispatcher.test.cjs",
100
87
  "tests/drift-detection.test.cjs",
101
88
  "tests/drift-whole-change-set.test.cjs",
102
89
  "tests/effort-local-install.test.cjs",
103
90
  "tests/effort-surface-axis.test.cjs",
104
91
  "tests/effort-sync-installed-runtime.test.cjs",
105
- "tests/emitted-ack-trailer.test.cjs",
92
+ "tests/effort-sync-manifest.test.cjs",
106
93
  "tests/emitted-attribution.test.cjs",
107
- "tests/emitted-provenance.test.cjs",
108
- "tests/ensure-runtime-build.test.cjs",
109
94
  "tests/eslint-rules.test.cjs",
110
95
  "tests/execute-phase-cross-block-state.test.cjs",
111
96
  "tests/execute-phase-decimal-arithmetic.test.cjs",
112
97
  "tests/execute-phase-worktree-guard.test.cjs",
113
98
  "tests/execute-plan-update-codebase-map-diff-base.test.cjs",
114
- "tests/execute-wave-post-gate-pipeline-e2e.test.cjs",
115
99
  "tests/executed-plan.test.cjs",
116
100
  "tests/executor-mvp-tdd-section.test.cjs",
117
101
  "tests/executor-sequential-linked-worktree.test.cjs",
118
102
  "tests/external-descriptor-confinement.test.cjs",
119
- "tests/failing-direction.test.cjs",
120
103
  "tests/fallow-runner.test.cjs",
121
104
  "tests/faulty-deps.test.cjs",
122
105
  "tests/feat-2483-review-claude-mds-guard.test.cjs",
123
106
  "tests/features-index-gate.test.cjs",
124
- "tests/frontmatter.test.cjs",
125
- "tests/gap-checker.property.test.cjs",
126
- "tests/gate-api-coverage-verify-pre-escape.test.cjs",
127
- "tests/gate-consumer-exit-awareness.test.cjs",
107
+ "tests/gate-contained-path-symlinked-planning.test.cjs",
128
108
  "tests/gate-decision-coverage-verify-stderr.test.cjs",
129
- "tests/gate-exit.test.cjs",
130
109
  "tests/gate-predicate.unit.test.cjs",
131
110
  "tests/gate-tdd-red-evidence-containment.test.cjs",
132
111
  "tests/gate-tdd-review-checkpoint-hardening.test.cjs",
133
112
  "tests/gate-tdd-review-checkpoint.unit.test.cjs",
134
113
  "tests/gate-tdd-review-order-5275.test.cjs",
135
- "tests/gate-ui-plan.unit.test.cjs",
136
114
  "tests/gate-ui-safety.unit.test.cjs",
137
- "tests/gate-verify-command-paths.unit.test.cjs",
138
115
  "tests/gemini-runtime-removed.test.cjs",
139
- "tests/gen-context-index.test.cjs",
140
- "tests/gen-health-docs.test.cjs",
141
- "tests/gen-section-manifest.test.cjs",
142
116
  "tests/git-base-branch.test.cjs",
117
+ "tests/git-head-tree.test.cjs",
143
118
  "tests/git-location-env-scrub.test.cjs",
144
119
  "tests/git-optional-locks-parity.test.cjs",
145
120
  "tests/golden-install-tree.test.cjs",
@@ -147,23 +122,20 @@ module.exports = {
147
122
  "tests/graphify-visualization.test.cjs",
148
123
  "tests/graphify.test.cjs",
149
124
  "tests/gsd-agent-isolation-guard.test.cjs",
150
- "tests/gsd-check-update-worker-atomic-cache.test.cjs",
151
125
  "tests/gsd-check-update-worker-platform-gate.test.cjs",
152
- "tests/gsd-mcp-server-bin.test.cjs",
153
126
  "tests/gsd-mcp-server.test.cjs",
154
127
  "tests/gsd-path-export-hook.test.cjs",
155
128
  "tests/gsd-statusline.test.cjs",
129
+ "tests/gsd-tool-dir.platform.test.cjs",
156
130
  "tests/gsd-validate-commit-crash-policy.test.cjs",
157
131
  "tests/gsd-validate-commit-sigpipe.test.cjs",
158
132
  "tests/gsd-write-guard.test.cjs",
159
133
  "tests/health-diagnostic-rules/config-validation.test.cjs",
160
134
  "tests/health-diagnostic-rules/worktree-health.test.cjs",
161
- "tests/health-diagnostic.test.cjs",
162
135
  "tests/helpers-cleanup.test.cjs",
163
136
  "tests/helpers-process-isolation.test.cjs",
164
137
  "tests/hermes-skills-migration.test.cjs",
165
138
  "tests/hook-activation-probe.test.cjs",
166
- "tests/hooks-commonjs-marker.test.cjs",
167
139
  "tests/hooks-crash-policy.test.cjs",
168
140
  "tests/hooks-opt-in.test.cjs",
169
141
  "tests/host-integration.test.cjs",
@@ -184,10 +156,10 @@ module.exports = {
184
156
  "tests/installer-migration-prune-stale-pristine.test.cjs",
185
157
  "tests/installer-migration-rename-gsd-core.test.cjs",
186
158
  "tests/installer-migrations.test.cjs",
187
- "tests/intel.test.cjs",
188
159
  "tests/inventory-nested-families.test.cjs",
189
- "tests/io.test.cjs",
160
+ "tests/isolated-env.test.cjs",
190
161
  "tests/isolation-aged-none-sentinel.test.cjs",
162
+ "tests/isolation-sentinel-read.platform.test.cjs",
191
163
  "tests/isolation-sentinel.test.cjs",
192
164
  "tests/kilo-upgrades.test.cjs",
193
165
  "tests/kimi-agent-converter.test.cjs",
@@ -196,13 +168,8 @@ module.exports = {
196
168
  "tests/launcher-homes-derivation.test.cjs",
197
169
  "tests/lint-phase-arg-assignment.test.cjs",
198
170
  "tests/lint-workflow-shellcheck-fetch.test.cjs",
199
- "tests/live-config-guard.test.cjs",
200
171
  "tests/lockfile-cve-audit.test.cjs",
201
172
  "tests/locking-bugs-1909-1916-1925-1927.test.cjs",
202
- "tests/loop-hooks-empty-points-e2e.test.cjs",
203
- "tests/loop-hooks-ship-pre-e2e.test.cjs",
204
- "tests/loop-hooks-verify-post-e2e.test.cjs",
205
- "tests/mcp-catalog.property.test.cjs",
206
173
  "tests/mcp-catalog.test.cjs",
207
174
  "tests/milestone-archive.test.cjs",
208
175
  "tests/milestone-lock.test.cjs",
@@ -216,11 +183,9 @@ module.exports = {
216
183
  "tests/no-bare-npm-exec.rule.test.cjs",
217
184
  "tests/no-exact-case-env-access.rule.test.cjs",
218
185
  "tests/no-path-literal-in-assert.rule.test.cjs",
219
- "tests/no-pending-3212-markers.test.cjs",
220
186
  "tests/no-phantom-issue-refs.test.cjs",
221
187
  "tests/no-posix-mode-bit-assert.rule.test.cjs",
222
188
  "tests/no-private-binary-resolution.rule.test.cjs",
223
- "tests/no-unbounded-dirname-walk.rule.test.cjs",
224
189
  "tests/no-unbounded-spawn.test.cjs",
225
190
  "tests/no-unguarded-nonportable-exec.rule.test.cjs",
226
191
  "tests/node-compile-cache.test.cjs",
@@ -228,7 +193,6 @@ module.exports = {
228
193
  "tests/npm-audit-baseline.test.cjs",
229
194
  "tests/npm-integrity-gate.test.cjs",
230
195
  "tests/nsegment-phase-grammar.test.cjs",
231
- "tests/onboard-command.test.cjs",
232
196
  "tests/opencode-advisory-stderr.test.cjs",
233
197
  "tests/opencode-command-dir-plural.test.cjs",
234
198
  "tests/opencode-config-jsonc.test.cjs",
@@ -244,9 +208,6 @@ module.exports = {
244
208
  "tests/pause-work-context-detection.test.cjs",
245
209
  "tests/pause-work-improvements.test.cjs",
246
210
  "tests/perf-317-context-monitor-fs.test.cjs",
247
- "tests/phase-completion-single-owner.test.cjs",
248
- "tests/phase-estimation.test.cjs",
249
- "tests/phase-locator.test.cjs",
250
211
  "tests/phase.platform.test.cjs",
251
212
  "tests/phase6-capstone-conformance.test.cjs",
252
213
  "tests/pi-config-dir-env-override.test.cjs",
@@ -258,37 +219,35 @@ module.exports = {
258
219
  "tests/plan-phase-stall-detection.test.cjs",
259
220
  "tests/plan-pre-hook-e2e.test.cjs",
260
221
  "tests/plan-review-convergence.test.cjs",
222
+ "tests/planner-memory-recall-5960.test.cjs",
261
223
  "tests/planning-inspect.test.cjs",
262
224
  "tests/planning-inspect.unit.test.cjs",
263
- "tests/planning-lock-mkdir-failure-1884.test.cjs",
264
- "tests/planning-prompt-drift.test.cjs",
265
225
  "tests/planning-snapshot.test.cjs",
266
- "tests/planning-workspace.test.cjs",
267
226
  "tests/platform-conformance-tier.test.cjs",
268
227
  "tests/platform-guard.unit.test.cjs",
269
228
  "tests/plugin-manifest.test.cjs",
270
229
  "tests/policy-160-route0-resume.test.cjs",
271
230
  "tests/policy-shell-pinning.test.cjs",
272
- "tests/portability-rule-disable-ban.test.cjs",
273
231
  "tests/pr-branch-planning-filter.test.cjs",
274
232
  "tests/precommit-alias-drift-hook.test.cjs",
275
233
  "tests/prepush-enterprise-email-hook.test.cjs",
276
234
  "tests/process-seam.test.cjs",
277
235
  "tests/profile-output.test.cjs",
278
- "tests/profile-pipeline.test.cjs",
279
- "tests/progress-drift-guard.test.cjs",
280
236
  "tests/prohibition-enforcement.test.cjs",
237
+ "tests/project-context-cli.test.cjs",
238
+ "tests/project-context.test.cjs",
281
239
  "tests/project-root.test.cjs",
282
240
  "tests/quick-batch-command-router.stdin.test.cjs",
283
241
  "tests/quick-batch.test.cjs",
284
242
  "tests/quick-branching.test.cjs",
285
243
  "tests/quick-commit-boundary.test.cjs",
286
- "tests/quick-research.test.cjs",
287
244
  "tests/quick-review-scope-tip-bound.test.cjs",
288
245
  "tests/read-guard.test.cjs",
289
246
  "tests/reapply-verify-hunks.test.cjs",
247
+ "tests/release-ancestry.test.cjs",
248
+ "tests/release-backmerge-invariants.test.cjs",
249
+ "tests/release-notes-real-os-5922.test.cjs",
290
250
  "tests/repo-layout.test.cjs",
291
- "tests/representative-corpus.test.cjs",
292
251
  "tests/require-fs-op-fallback.rule.test.cjs",
293
252
  "tests/require-full-tmpdir-triad.rule.test.cjs",
294
253
  "tests/require-userprofile-with-home.rule.test.cjs",
@@ -300,15 +259,12 @@ module.exports = {
300
259
  "tests/review-lane-invocation.test.cjs",
301
260
  "tests/review-lane-no-redirect-5433.test.cjs",
302
261
  "tests/review-lane-prompt-cap.test.cjs",
303
- "tests/review-lane-runner.test.cjs",
304
262
  "tests/review-lane-windows-spawn-resolution.test.cjs",
305
263
  "tests/review-model-config.test.cjs",
306
264
  "tests/review-parallel-lanes.test.cjs",
307
265
  "tests/review-plan-coverage-manifest.test.cjs",
308
- "tests/reviewer-manifest-body.test.cjs",
309
266
  "tests/reviewer-step-dispatch.test.cjs",
310
267
  "tests/revision-remediation-binding.test.cjs",
311
- "tests/roadmap-parser.test.cjs",
312
268
  "tests/roadmap-upgrade-bracket.test.cjs",
313
269
  "tests/roadmap-upgrade.test.cjs",
314
270
  "tests/roadmap.test.cjs",
@@ -320,10 +276,11 @@ module.exports = {
320
276
  "tests/runtime-artifact-layout.test.cjs",
321
277
  "tests/runtime-converters.test.cjs",
322
278
  "tests/runtime-descriptor-owner.test.cjs",
279
+ "tests/runtime-home-hermeticity.test.cjs",
323
280
  "tests/runtime-homes-descriptor-drive.test.cjs",
324
281
  "tests/runtime-identity.test.cjs",
325
282
  "tests/runtime-launcher-parity.test.cjs",
326
- "tests/schema-drift.test.cjs",
283
+ "tests/secret-read-exemptions.test.cjs",
327
284
  "tests/section-manifest-init-facts.test.cjs",
328
285
  "tests/security.test.cjs",
329
286
  "tests/self-test-report-policy.test.cjs",
@@ -332,7 +289,6 @@ module.exports = {
332
289
  "tests/shared-hooks-dir-resolution.test.cjs",
333
290
  "tests/shell-command-projection-dispatch.test.cjs",
334
291
  "tests/shell-command-projection-md-normalize.test.cjs",
335
- "tests/shell-command-projection-path-sep.test.cjs",
336
292
  "tests/ship-notes-wedged-pr.test.cjs",
337
293
  "tests/shipped-reference-cites.test.cjs",
338
294
  "tests/skill-manifest.test.cjs",
@@ -340,11 +296,14 @@ module.exports = {
340
296
  "tests/smart-entry.unit.test.cjs",
341
297
  "tests/state-todos-render.test.cjs",
342
298
  "tests/state.platform.test.cjs",
299
+ "tests/sub-repos-evaluation-scope-5867.test.cjs",
343
300
  "tests/subject-first-line.platform.test.cjs",
344
301
  "tests/tdd-mode.platform.test.cjs",
345
302
  "tests/tdd-review-checkpoint-cross-plan.test.cjs",
346
303
  "tests/teams-status.test.cjs",
347
304
  "tests/test-gate-watch-mode.test.cjs",
305
+ "tests/timeout-evidence-from-ci.test.cjs",
306
+ "tests/timeout-evidence.test.cjs",
348
307
  "tests/todos-workstream-scope.test.cjs",
349
308
  "tests/uat-complete-session.test.cjs",
350
309
  "tests/ui-auditor-screenshot-block.test.cjs",
@@ -353,17 +312,17 @@ module.exports = {
353
312
  "tests/undo-commit-selection.test.cjs",
354
313
  "tests/unreachable-guard-drift.test.cjs",
355
314
  "tests/unreachable-shell-guard.test.cjs",
356
- "tests/unusable-input.test.cjs",
357
315
  "tests/update-custom-backup.test.cjs",
358
316
  "tests/user-artifact-staging.test.cjs",
359
317
  "tests/user-home-isolation-5594.test.cjs",
360
318
  "tests/verification-append-audit.test.cjs",
361
319
  "tests/verification-status.test.cjs",
362
- "tests/verify-archive-dirs-live-path.test.cjs",
363
320
  "tests/verify-command-grounding.test.cjs",
364
321
  "tests/verify-lifecycle-writes-e2e.test.cjs",
365
322
  "tests/verify-work-auto-transition.test.cjs",
366
323
  "tests/verify.test.cjs",
324
+ "tests/vscode-browser-no-node-api.test.cjs",
325
+ "tests/windows-powershell-hook-runner.test.cjs",
367
326
  "tests/windsurf-hooks-bridge.test.cjs",
368
327
  "tests/workflow-guard.test.cjs",
369
328
  "tests/workflow-shell-pinning.test.cjs",
@@ -15,6 +15,14 @@
15
15
  * reader (no third-party archive library), and caches the extracted binary
16
16
  * for reuse across runs.
17
17
  *
18
+ * The download retries a transient failure (HTTP 408/429/5xx, network error,
19
+ * request timeout) up to DOWNLOAD_ATTEMPTS times, sleeping DOWNLOAD_BACKOFF_MS
20
+ * between attempts (#6095). The attempt count and the DOWNLOAD_BACKOFF_MS
21
+ * sleeps are bounded; total wall time is not bounded by this module, because
22
+ * DOWNLOAD_TIMEOUT_MS is a per-hop socket idle timeout (a body that keeps
23
+ * trickling bytes never trips it). The CI job's timeout-minutes is the outer
24
+ * bound. A non-transient failure (404, too many redirects) fails at once.
25
+ *
18
26
  * Zip-slip defense: unlike `decompress`, which wrote extracted files using
19
27
  * PATHS TAKEN FROM THE ARCHIVE (the exact defect class in GHSA-mp2f-45pm-
20
28
  * 3cg9 — a malicious archive entry named e.g. `../../etc/passwd` gets
@@ -62,9 +70,18 @@ const MAX_REDIRECTS = 5;
62
70
  // SHELLCHECK_TIMEOUT_MS bound on the ShellCheck subprocess. A bare `timeout`
63
71
  // option on the request does NOT abort it by itself — Node only emits a
64
72
  // 'timeout' event, which must be handled by destroying the request (see the
65
- // `req.on('timeout', ...)` below).
73
+ // `req.on('timeout', ...)` below). This is a per-hop IDLE timeout (socket
74
+ // inactivity): a stalled hop fails after it, but a body that keeps trickling
75
+ // bytes never trips it. downloadWithRetry bounds the attempt count and the
76
+ // DOWNLOAD_BACKOFF_MS sleeps; total wall time is not bounded by this module
77
+ // (the CI job's timeout-minutes is the outer bound).
66
78
  const DOWNLOAD_TIMEOUT_MS = 30_000;
67
79
 
80
+ // Total download attempts and the sleeps (ms) between them: a sleep of
81
+ // DOWNLOAD_BACKOFF_MS[i] follows failed attempt i + 1 (#6095).
82
+ const DOWNLOAD_ATTEMPTS = 3;
83
+ const DOWNLOAD_BACKOFF_MS = [2000, 5000];
84
+
68
85
  /**
69
86
  * Issue one real HTTPS request. Exists as its own function purely so tests
70
87
  * can inject a fake in its place (see `httpsGetFollowingRedirects`'s
@@ -95,7 +112,9 @@ function httpsGetFollowingRedirects(url, redirectsLeft = MAX_REDIRECTS, requestF
95
112
  if (status >= 300 && status < 400 && res.headers.location) {
96
113
  res.resume(); // drain so the socket can be reused/closed
97
114
  if (redirectsLeft <= 0) {
98
- reject(new Error(`too many redirects fetching ${url}`));
115
+ const err = new Error(`too many redirects fetching ${url}`);
116
+ err.code = 'TOO_MANY_REDIRECTS';
117
+ reject(err);
99
118
  return;
100
119
  }
101
120
  const next = new URL(res.headers.location, url).toString();
@@ -104,7 +123,9 @@ function httpsGetFollowingRedirects(url, redirectsLeft = MAX_REDIRECTS, requestF
104
123
  }
105
124
  if (status !== 200) {
106
125
  res.resume();
107
- reject(new Error(`unexpected HTTP ${status} fetching ${url}`));
126
+ const err = new Error(`unexpected HTTP ${status} fetching ${url}`);
127
+ err.status = status;
128
+ reject(err);
108
129
  return;
109
130
  }
110
131
  const chunks = [];
@@ -124,6 +145,48 @@ function httpsGetFollowingRedirects(url, redirectsLeft = MAX_REDIRECTS, requestF
124
145
  });
125
146
  }
126
147
 
148
+ /**
149
+ * True when a download failure is worth retrying: HTTP 408, 429 or 5xx, or an
150
+ * error with no HTTP status (network error, request timeout, socket reset).
151
+ * False for any other status (e.g. 404, a wrong pinned asset) and for
152
+ * `too many redirects`, which is deterministic.
153
+ */
154
+ function isTransientDownloadError(err) {
155
+ const status = err && err.status;
156
+ if (typeof status === 'number') {
157
+ return status === 408 || status === 429 || (status >= 500 && status <= 599);
158
+ }
159
+ return !(err && err.code === 'TOO_MANY_REDIRECTS');
160
+ }
161
+
162
+ /**
163
+ * GET `url` via `getFn`, retrying a transient failure up to `attempts` times
164
+ * with `backoffMs[i]` sleeps between attempts. A non-transient error rejects
165
+ * at once; exhausting the attempts rejects with one Error listing every
166
+ * attempt. `sleep` and `getFn` are injectable so tests never wait.
167
+ */
168
+ async function downloadWithRetry(
169
+ url,
170
+ {
171
+ attempts = DOWNLOAD_ATTEMPTS,
172
+ backoffMs = DOWNLOAD_BACKOFF_MS,
173
+ sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)),
174
+ getFn = httpsGetFollowingRedirects,
175
+ } = {},
176
+ ) {
177
+ const failures = [];
178
+ for (let attempt = 1; attempt <= attempts; attempt++) {
179
+ try {
180
+ return await getFn(url);
181
+ } catch (e) {
182
+ if (!isTransientDownloadError(e)) throw e;
183
+ failures.push(`attempt ${attempt}: ${e.message}`);
184
+ if (attempt < attempts) await sleep(backoffMs[Math.min(attempt - 1, backoffMs.length - 1)]);
185
+ }
186
+ }
187
+ throw new Error(failures.join('; '));
188
+ }
189
+
127
190
  /**
128
191
  * Find the entry named (or path-ending-in) `targetName` inside a raw
129
192
  * (already gunzipped) POSIX tar byte stream and return its content as a
@@ -204,7 +267,7 @@ async function resolveShellcheckBin() {
204
267
 
205
268
  let gz;
206
269
  try {
207
- gz = await httpsGetFollowingRedirects(url);
270
+ gz = await downloadWithRetry(url);
208
271
  } catch (e) {
209
272
  throw new ExitError(1, `lint-workflow-shellcheck: failed to download ShellCheck (${url}): ${e.message}`);
210
273
  }
@@ -241,7 +304,11 @@ module.exports = {
241
304
  CACHED_BIN_PATH,
242
305
  MAX_REDIRECTS,
243
306
  DOWNLOAD_TIMEOUT_MS,
307
+ DOWNLOAD_ATTEMPTS,
308
+ DOWNLOAD_BACKOFF_MS,
244
309
  extractFileFromTar,
245
310
  httpsGetFollowingRedirects,
311
+ isTransientDownloadError,
312
+ downloadWithRetry,
246
313
  resolveShellcheckBin,
247
314
  };