cassette_configs never reconciles bay removals, and Publish can overwrite a newer ATM report #43
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Two halves of the same problem, found alongside aiolabs/bitspire#94.
apply_bootstrap_state upserts the positions in the payload but never deletes positions that are absent. If a machine's bay count shrinks, the stale row stays, the dashboard shows a mix of old and new, and publish_cassettes rejects every payload with a position mismatch. The error text tells the operator to fix it with atm-tui, but atm-tui changes don't propagate (see the bitspire issue), so the advice is a dead end. There is no delete endpoint; the only way out today is DELETE FROM cassette_configs by hand.
The cassettes form is a load-once snapshot and Publish sends it as-is. Nothing checks whether the machine has reported a newer state since the form was loaded, so a stale Publish gets a fresh created_at and the ATM applies it over its own fresh report. The state_* columns already hold the reported values and event id but the UI doesn't render them.
Proposed: