ruvnet/ruflo · error · Error

Rollout not found

Error message

Rollout ${rolloutId} not found

What it means

FirmwareOrchestrationService keeps rollouts in an in-memory map; getExistingRollout() throws for any follow-up operation whose rolloutId is not in that map. The ID must have been created by this same service instance within its lifetime.

Solutions

  1. Use the rollout ID returned by the same service instance that created it, within that instance's lifetime
  2. Re-create the rollout after a restart instead of reusing the old ID
  3. Persist rollout IDs externally if follow-up operations must survive restarts

Example fix

// before
await fwService.advanceRollout(rolloutIdFromLastDeploy); // map empty after restart -> throws

// after
const { rolloutId } = await fwService.createRollout(spec); // fresh, same instance
await fwService.advanceRollout(rolloutId);
Defensive patterns

Strategy: validation

Validate before calling

const active = new Set<string>(); // rolloutIds created by THIS service instance
const { rolloutId } = await fwService.createRollout(spec);
active.add(rolloutId);
if (!active.has(rolloutId)) throw new Error('rollout not created here; refusing follow-up');
await fwService.advanceRollout(rolloutId);

Try / catch

try {
  await fwService.advanceRollout(rolloutId);
} catch (e) {
  if (e instanceof Error && e.message.endsWith('not found')) {
    // rollout map lost (restart or other instance): re-create the rollout from spec
  } else throw e;
}

Prevention

When it happens

Trigger: Referencing a rollout ID created before a service restart, by another process or replica, or a mistyped ID; or the createRollout call failed so no entry exists under that ID.

Common situations: Long-running fleet campaigns that span deploys (the restart loses the map); horizontally scaled coordinators where the rollout lives on a different instance; rollout IDs copied between environments.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/c4cb974eca6259ac. Report an issue: GitHub.

Appendix: source

Thrown at v3/@claude-flow/plugin-iot-cognitum/src/domain/services/firmware-orchestration-service.ts:217

  private async deployToDevices(
    rollout: FirmwareRollout,
    deviceIds: string[],
    version: string,
  ): Promise<void> {
    for (const deviceId of deviceIds) {
      const result = await this.deps.deployFirmware(deviceId, version);
      if (result.success) {
        rollout.completedDeviceIds.push(deviceId);
      } else {
        rollout.failedDeviceIds.push(deviceId);
      }
    }
  }

  private getExistingRollout(rolloutId: string): FirmwareRollout {
    const rollout = this.rollouts.get(rolloutId);
    if (!rollout) {
      throw new Error(`Rollout ${rolloutId} not found`);
    }
    return rollout;
  }
}

View on GitHub (pinned to fa13ee4ad6)