agent-relay-orchestrator 0.121.5 → 0.122.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 (2) hide show
  1. package/package.json +2 -2
  2. package/src/control.ts +15 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-relay-orchestrator",
3
- "version": "0.121.5",
3
+ "version": "0.122.0",
4
4
  "description": "Agent Relay orchestrator — manages agent lifecycle across hosts",
5
5
  "type": "module",
6
6
  "bin": {
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "agent-relay-providers": "0.104.3",
20
- "agent-relay-sdk": "0.2.113",
20
+ "agent-relay-sdk": "0.2.114",
21
21
  "callmux": "0.23.0"
22
22
  },
23
23
  "devDependencies": {
package/src/control.ts CHANGED
@@ -457,7 +457,21 @@ export function createControlHandler(
457
457
  }
458
458
  // #638 — settle `failed` (carrying the error) for a no-op merge instead of
459
459
  // `succeeded`; see mergeCommandStatus.
460
- await relay.updateCommand(command.id, mergeCommandStatus(result), result as unknown as Record<string, unknown>, result.error);
460
+ // #924 the merge OUTCOME is now definitive: mergeWorkspace settles its own throws
461
+ // into `result` at the catch above, so `result` already reflects success or failure.
462
+ // A transport error while REPORTING it (the SDK http client's 10s abort firing on a
463
+ // slow settle-response — "The operation was aborted.") must NOT cascade into the outer
464
+ // catch's blanket `failed` re-stamp: that stamped a genuinely-successful fast-forward
465
+ // land as failed/aborted WHILE result.merged=true — the self-contradictory record #924.
466
+ // The relay already committed the report in the common (slow-response) case; in the rare
467
+ // lost-write case the command strands non-terminal and the relay watchdog / TTL reconcile
468
+ // (recoverAgedInFlightWorkspaces, the #1025 A7 timed_out→succeeded correction) settles it.
469
+ // Same belt-and-suspenders as the spawn path (#930, markSpawnCommandFailed).
470
+ try {
471
+ await relay.updateCommand(command.id, mergeCommandStatus(result), result as unknown as Record<string, unknown>, result.error);
472
+ } catch (reportError) {
473
+ console.error(`[orchestrator] workspace.merge result report failed for ${command.id} (not re-stamping as failed — relay reconcile owns recovery): ${errMessage(reportError)}`);
474
+ }
461
475
  } else if (command.type === "workspace.pr-arm-auto-merge") {
462
476
  const rawPrNumber = command.params.prNumber;
463
477
  const result = await armWorkspacePrAutoMerge({