@deksden-com/dd-flow-cli 0.9.0-beta.41 → 0.9.0-beta.42
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @deksden-com/dd-flow-cli
|
|
2
2
|
|
|
3
|
+
## 0.9.0-beta.42
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3e1f87f: Reuse an already accepted RUN pause or stop when draining its EVAL scope, preserving the exact control identity and options without weakening stop or replaying work.
|
|
8
|
+
|
|
3
9
|
## 0.9.0-beta.41
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/build-info.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"cli_package": "@deksden-com/dd-flow-cli",
|
|
3
|
-
"cli_version": "0.9.0-beta.
|
|
4
|
-
"cli_commit": "
|
|
5
|
-
"built_at": "2026-09-
|
|
3
|
+
"cli_version": "0.9.0-beta.42",
|
|
4
|
+
"cli_commit": "fb9736bf2af837404a43027631113232f0134b58",
|
|
5
|
+
"built_at": "2026-09-09T19:11:00.722Z",
|
|
6
6
|
"built_with_canon": {
|
|
7
7
|
"version": "4.1.0",
|
|
8
8
|
"commit": "ef349bf47cba1c987468e51d73a0dbadbd48dc1f",
|
|
@@ -316,7 +316,7 @@ export async function controlRuntimeScopeRuns(context, scopeId, requestId, mode)
|
|
|
316
316
|
if (!owner || owner.process_id !== record.id || owner.process_lease_token !== record.lease_token || manifest?.resource_home !== resourceHome(context) || manifest.budget?.scope_id !== scopeId || !project?.root)
|
|
317
317
|
throw new AppError("runtime_scope_owner_unknown", "Scope RUN registration does not match the retained controller", 1);
|
|
318
318
|
const runRequestId = `scope:${crypto.createHash("sha256").update(JSON.stringify([scopeId, control.generation, key])).digest("hex")}`;
|
|
319
|
-
|
|
319
|
+
let input = { projectRoot: project.root, runId: record.run_id, requestId: runRequestId, action: mode };
|
|
320
320
|
// Lock order is resource registry then RUN database. No provider or await
|
|
321
321
|
// occurs here; a newer scope request cannot interleave RUN intent creation.
|
|
322
322
|
registry.exec("BEGIN IMMEDIATE");
|
|
@@ -326,6 +326,13 @@ export async function controlRuntimeScopeRuns(context, scopeId, requestId, mode)
|
|
|
326
326
|
throw new AppError("runtime_scope_control_superseded", "Scope request no longer owns admission", 1);
|
|
327
327
|
if (!registry.get("SELECT 1 FROM managed_processes WHERE id = ? AND lease_token = ? AND owner_id = ? AND project_id = ? AND run_id = ? AND metadata_json = ?", [record.id, record.lease_token, record.owner_id, record.project_id, record.run_id, record.metadata_json]))
|
|
328
328
|
throw new AppError("runtime_scope_owner_changed", "RUN owner changed before scope intent dispatch", 1);
|
|
329
|
+
// A narrower caller may already have fenced this RUN. Reuse its exact
|
|
330
|
+
// intent; a scope stop still escalates a pause through the RUN arbiter.
|
|
331
|
+
const active = runControlStatus(target, input).control;
|
|
332
|
+
if (active?.current && ["requested", "settled"].includes(active.status) && (active.requested_mode === mode || active.requested_mode === "stop")) {
|
|
333
|
+
input = { ...input, requestId: active.request_id, action: active.requested_mode,
|
|
334
|
+
...(active.requested_mode === "stop" ? { force: active.request.force ?? false } : { graceMs: active.request.grace_ms ?? 30_000, ...(active.request.escalate ? { escalate: active.request.escalate } : {}) }) };
|
|
335
|
+
}
|
|
329
336
|
recordRunControlIntent(target, input);
|
|
330
337
|
registry.exec("COMMIT");
|
|
331
338
|
}
|
|
@@ -335,7 +342,7 @@ export async function controlRuntimeScopeRuns(context, scopeId, requestId, mode)
|
|
|
335
342
|
}
|
|
336
343
|
seen.add(key);
|
|
337
344
|
const receipt = await requestRunControl(target, { ...input, waitMs: 0 });
|
|
338
|
-
runs.push({ runtime_home: metadata.dd_flow_home, project_id: record.project_id, run_id: record.run_id, request_id:
|
|
345
|
+
runs.push({ runtime_home: metadata.dd_flow_home, project_id: record.project_id, run_id: record.run_id, request_id: input.requestId, receipt });
|
|
339
346
|
}
|
|
340
347
|
catch (error) {
|
|
341
348
|
runs.push({ process_id: record.id, run_id: record.run_id, pending: true, reason: error instanceof AppError ? error.code : "runtime_scope_control_failed", message: String(error) });
|