The Lease That Outlives the Leader: A Fleet Config Bug That Passes Every Review

Two AGVs can end up in the same intersection after a coordinator failover even when neither the fleet manager nor the vehicle firmware has a bug. The fault is a relationship between two numbers kept in two repositories, owned by two teams and approved by two reviewers who each saw only half of it. Each value looks sensible in its own diff, so the inequality between them never gets reviewed, and the incident keeps coming back under a new ticket number.

Where the authority actually lives

In an agentic swarm the coordinator does not drive vehicles. It hands out time-bounded leases on traffic zones, and each vehicle agent moves only while it holds a valid lease for the zone ahead. Fleet safety depends on one property: a vehicle must stop moving before the coordinator is allowed to believe that vehicle's lease has expired. The fleet manager keeps that belief in its zone table as a lease TTL, say 3000 ms. The vehicle keeps its side as a comm-loss timeout plus a braking profile, both in the firmware or vehicle agent config, which usually lives in a different repository and ships on a different release train. When a coordinator replica dies and a standby takes over, the standby rebuilds the zone table from replicated state, waits out the TTL on anything it cannot confirm, and then re-grants. If the vehicle is still rolling on its old authorization at that moment, you get two holders for one zone, and both are behaving exactly as configured.

Why review never catches it

Nobody commits a wrong value on its own. An integrator raises the vehicle comm-loss timeout because a Wi-Fi roaming dead spot near the dock was causing nuisance stops, and the change is correct for that problem. Months later someone on the platform team shortens the lease TTL to speed up recovery after failover, and that change is correct for their problem too. Each diff passes review because a reviewer can only check what is in the diff, and the constraint that matters spans both files. Functional safety standards for driverless industrial trucks, ISO 3691-4 being the usual reference, require you to analyse loss of communication, but the hazard analysis is often written against the values from commissioning and is never re-run when one side drifts. In my estimate, most sites that have had a double occupancy event at an intersection could find this drift in their config history if they looked.

A check you can run before the next deploy

Pull the lease TTL from the fleet manager config, pull the comm-loss timeout and the worst-case stop time at maximum zone speed from each vehicle profile, and assert that the comm-loss timeout plus the stop time plus your measured clock skew budget is strictly less than the lease TTL. With yq this is a few lines: read.zones.lease_ttl_ms from the fleet file, loop over the vehicle profiles reading.safety.comm_loss_ms and.safety.stop_time_ms, and exit nonzero on any profile that breaks the inequality. Wire it into CI for both repositories, because a check that only runs in one of them leaves the other side free to drift. Then confirm it at runtime: in your coordinator logs, find every lease re-grant issued during a failover window and match it against the previous holder's last reported velocity, since a nonzero velocity after the old lease expired means the margin is already gone in production, whatever the YAML says. Treat the clock skew term as measured, not assumed, and take it from your time sync monitoring rather than from the NTP config.

The decision rule is to make the vehicle give up its authority before the coordinator can give it away, and to fail the build whenever any profile in the fleet stops guaranteeing that, so the remaining trade-off is honest: every millisecond you take off failover recovery has to come out of the vehicles' tolerance for roaming gaps, and someone now has to own that budget across both teams.

Can fencing tokens on the coordinator replace this check?

Fencing tokens stop a deposed coordinator from issuing commands, but they do nothing about a vehicle that keeps moving on an authorization it received legitimately. Use both: fencing protects the control plane, and the timing inequality protects the physical floor.

Back to AVGAgentic · Domains

← Back to AVGAgentic
Engineering & Architecture Brief

The Lease That Outlives the Leader: A Fleet Config Bug That Passes Every Review

Two AGVs can end up in the same intersection after a coordinator failover even when neither the fleet manager nor the vehicle firmware has a bug. The fault is a relationship between two numbers kept in two repositories, owned by two teams and approved by two reviewers who each saw only half of it. Each value looks sensible in its own diff, so the inequality between them never gets reviewed, and the incident keeps coming back under a new ticket number.

Where the authority actually lives

In an agentic swarm the coordinator does not drive vehicles. It hands out time-bounded leases on traffic zones, and each vehicle agent moves only while it holds a valid lease for the zone ahead. Fleet safety depends on one property: a vehicle must stop moving before the coordinator is allowed to believe that vehicle's lease has expired. The fleet manager keeps that belief in its zone table as a lease TTL, say 3000 ms. The vehicle keeps its side as a comm-loss timeout plus a braking profile, both in the firmware or vehicle agent config, which usually lives in a different repository and ships on a different release train. When a coordinator replica dies and a standby takes over, the standby rebuilds the zone table from replicated state, waits out the TTL on anything it cannot confirm, and then re-grants. If the vehicle is still rolling on its old authorization at that moment, you get two holders for one zone, and both are behaving exactly as configured.

Why review never catches it

Nobody commits a wrong value on its own. An integrator raises the vehicle comm-loss timeout because a Wi-Fi roaming dead spot near the dock was causing nuisance stops, and the change is correct for that problem. Months later someone on the platform team shortens the lease TTL to speed up recovery after failover, and that change is correct for their problem too. Each diff passes review because a reviewer can only check what is in the diff, and the constraint that matters spans both files. Functional safety standards for driverless industrial trucks, ISO 3691-4 being the usual reference, require you to analyse loss of communication, but the hazard analysis is often written against the values from commissioning and is never re-run when one side drifts. In my estimate, most sites that have had a double occupancy event at an intersection could find this drift in their config history if they looked.

A check you can run before the next deploy

Pull the lease TTL from the fleet manager config, pull the comm-loss timeout and the worst-case stop time at maximum zone speed from each vehicle profile, and assert that the comm-loss timeout plus the stop time plus your measured clock skew budget is strictly less than the lease TTL. With yq this is a few lines: read.zones.lease_ttl_ms from the fleet file, loop over the vehicle profiles reading.safety.comm_loss_ms and.safety.stop_time_ms, and exit nonzero on any profile that breaks the inequality. Wire it into CI for both repositories, because a check that only runs in one of them leaves the other side free to drift. Then confirm it at runtime: in your coordinator logs, find every lease re-grant issued during a failover window and match it against the previous holder's last reported velocity, since a nonzero velocity after the old lease expired means the margin is already gone in production, whatever the YAML says. Treat the clock skew term as measured, not assumed, and take it from your time sync monitoring rather than from the NTP config.

The decision rule is to make the vehicle give up its authority before the coordinator can give it away, and to fail the build whenever any profile in the fleet stops guaranteeing that, so the remaining trade-off is honest: every millisecond you take off failover recovery has to come out of the vehicles' tolerance for roaming gaps, and someone now has to own that budget across both teams.

Technical FAQ: Can fencing tokens on the coordinator replace this check?

Fencing tokens stop a deposed coordinator from issuing commands, but they do nothing about a vehicle that keeps moving on an authorization it received legitimately. Use both: fencing protects the control plane, and the timing inequality protects the physical floor.

Related Architecture Specifications (AGENTIC): agentichypervisor.com · maintenanceagentic.com · surveillanceagentic.com

More Technical Articles on avgagentic.com

Docking Precision Benchmarks of Heavy-Duty AVGs under High-Speed Payload Transfers →Energy-Optimal Route Selection for Battery-Constrained Industrial Vehicle Fleets →The Lease That Outlives Its Leader: Catching Double Zone Grants in AGV Swarms Before Failover Does →The Lease That Expires Before the Vehicle Stops →