ruvnet/ruflo · error · Error
Fleet ${fleetId} not found
Error message
Fleet ${fleetId} not found What it means
The central fleet lookup: getFleet throws when repo.findById returns null, and most fleet operations (updateFirmwarePolicy, getFleetDeviceCount, ...) delegate to it, so essentially any reference to an unknown fleetId surfaces here.
Source
Thrown at v3/@claude-flow/plugin-iot-cognitum/src/domain/services/fleet-topology-service.ts:81
name: options.name,
description: options.description ?? '',
zoneId: options.zoneId,
deviceIds: [],
topology: options.topology ?? 'star',
firmwarePolicy: { ...DEFAULT_FIRMWARE_POLICY, ...options.firmwarePolicy },
telemetryPolicy: { ...DEFAULT_TELEMETRY_POLICY, ...options.telemetryPolicy },
healthThresholds: { ...DEFAULT_HEALTH_THRESHOLDS, ...options.healthThresholds },
createdAt: new Date(),
updatedAt: new Date(),
};
await this.repo.save(fleet);
return fleet;
}
async getFleet(fleetId: string): Promise<DeviceFleet> {
const fleet = await this.repo.findById(fleetId);
if (!fleet) throw new Error(`Fleet ${fleetId} not found`);
return fleet;
}
async listFleets(): Promise<FleetSummary[]> {
const fleets = await this.repo.findAll();
return fleets.map((f) => ({
fleetId: f.fleetId,
name: f.name,
zoneId: f.zoneId,
deviceCount: f.deviceIds.length,
topology: f.topology,
createdAt: f.createdAt,
}));
}
async addDeviceToFleet(fleetId: string, deviceId: string): Promise<DeviceFleet> {
const fleet = await this.getFleet(fleetId);
if (fleet.deviceIds.includes(deviceId)) {View on GitHub (pinned to fa13ee4ad6)
Solutions
- Confirm the ID via listFleets and use the exact fleetId returned
- Create the fleet first if it should exist
- Check for concurrent deletion or a repo-backend mismatch (in-memory vs persisted) between processes
Example fix
// before
await fleetService.updateFirmwarePolicy('flt-99', { channel: 'stable' }); // unknown ID
// after
const fleets = await fleetService.listFleets();
const fleet = fleets.find((f) => f.name === 'Factory Floor');
if (!fleet) throw new Error('fleet missing; create it first');
await fleetService.updateFirmwarePolicy(fleet.fleetId, { channel: 'stable' }); Defensive patterns
Strategy: validation
Validate before calling
const ids = new Set((await fleetService.listFleets()).map((f) => f.fleetId));
if (!ids.has(fleetId)) {
throw new Error(`unknown fleet ${fleetId}; known: ${[...ids].join(', ')}`);
}
await fleetService.updateFirmwarePolicy(fleetId, policy); Try / catch
try {
await fleetService.updateFirmwarePolicy(fleetId, policy);
} catch (e) {
if (e instanceof Error && e.message === `Fleet ${fleetId} not found`) {
// re-list fleets; create the fleet or prompt for the correct ID
} else throw e;
} Prevention
- Pass fleet IDs obtained from listFleets or createFleet, never hand-typed
- Persist fleet IDs in the config that consumes them
- Use one repository backend consistently across all processes
When it happens
Trigger: Calling getFleet, updateFirmwarePolicy, or getFleetDeviceCount with a fleetId that was never created, was deleted, or lives in a different repository or persistence scope.
Common situations: Stale fleet IDs after an environment reset or store wipe; hand-typed IDs with typos; fleets created in an in-memory repo during tests while the caller reads a persisted repo.
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
- Rollout ${rolloutId} not found
- Fleet ${options.fleetId} already exists
- Amendment not found: ${amendmentId}
- Cannot supersede: anchor "${oldId}" not found
- Daemon '${name}' not found
AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18).
Data as JSON: /api/errors/3aa7af0603c3727f.
Report an issue: GitHub.