Accept reverted/failed device status reports #26
Reference in New Issue
Block a user
Delete Branch "benvin/status-reverted"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Agent mode will auto-revert a generation that cuts a device off from the API, but the status endpoint only accepts an applied generation, so reverts and failures are invisible.
{"generation":N,"status":"applied|reverted|failed","error":"..."}; generation-only payloads stayappliedreported_generationonly onappliedagent_statusonGET /devices/{name}Refs unkin/tomswall#11
appliedreport with an OLDER generation movesreported_generationbackwards (unconditional= $3), and any older report overwritesstatus/status_generationof a newer one (late retry, replayed report) → useGREATEST(reported_generation, $3)for applied and guard the status columns withWHERE ... AND $3 >= status_generation(or equivalent); add a test posting applied N then applied N-1.No findings.