sillyspec 3.22.7 → 3.22.8
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.
- package/package.json +1 -1
- package/src/run.js +19 -0
package/package.json
CHANGED
package/src/run.js
CHANGED
|
@@ -1571,6 +1571,25 @@ export async function runCommand(args, cwd, specDir = null) {
|
|
|
1571
1571
|
}
|
|
1572
1572
|
}
|
|
1573
1573
|
|
|
1574
|
+
// quick 启动(非 --done):reset steps + 生成 quickRunId,避免多会话共享 progress.default.quick
|
|
1575
|
+
// 继承并行会话的 step1(会话 B 复用会话 A 的 ql,本会话改动无 ql 记录)。C-实用方案:
|
|
1576
|
+
// 每次 quick 启动 reset steps(逻辑隔离,本会话从 step1 重跑建独立 ql)+ 写 current-quick-run-id。
|
|
1577
|
+
if (stageName === 'quick' && !isDone && !isStatus && !isSkip && !isReset && !isReopen) {
|
|
1578
|
+
const qStage = progress.stages?.quick
|
|
1579
|
+
if (qStage?.steps?.length) {
|
|
1580
|
+
qStage.steps = qStage.steps.map(s => ({ ...s, status: 'pending', completedAt: null }))
|
|
1581
|
+
qStage.status = 'in-progress'
|
|
1582
|
+
}
|
|
1583
|
+
try {
|
|
1584
|
+
const now = new Date()
|
|
1585
|
+
const pad = (n) => String(n).padStart(2, '0')
|
|
1586
|
+
const quickRunId = `quick-${now.getFullYear()}-${pad(now.getMonth()+1)}-${pad(now.getDate())}-${pad(now.getHours())}${pad(now.getMinutes())}${pad(now.getSeconds())}`
|
|
1587
|
+
const runtimeRoot = platformOpts.runtimeRoot || join(specRoot, '.runtime')
|
|
1588
|
+
mkdirSync(runtimeRoot, { recursive: true })
|
|
1589
|
+
writeFileSync(join(runtimeRoot, 'current-quick-run-id'), quickRunId)
|
|
1590
|
+
} catch {}
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1574
1593
|
// 确保步骤已初始化
|
|
1575
1594
|
const changed = await ensureStageSteps(progress, stageName, cwd, specRoot)
|
|
1576
1595
|
if (changed && effectiveChange) {
|