feat(ops): device-audit script + canonical devices.yaml registry — closes recurrence vector of #5 #15
Labels
No labels
agent:felinus
agent:human
agent:maximus
priority:p0
priority:p1
priority:p2
priority:p3
status:blocked
status:needs-review
status:wip
type:chore
type:docs
type:feat
type:fix
type:perf
type:refactor
type:test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jmz/matrix-bridge#15
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?
Background
Closing #5 (the specific
mba-726dadit"ghost device" report) tonight surfaced a recurrence vector: tonight's investigation only confirmed the device was legitimate after cryptographic comparison of the curve25519 in the local store. If that key hadn't been available, the only evidence would have been "the device looks idle but might be live or might not" — exactly the same place #5's filer was in May.Host-prefixed device ids (
mba-…,nas-…,rpi5-…) — landed in the rotation runbook after #5 was filed — help, but only when an operator is looking. We have no automated detection of:The same diagnostic dance from #5 will recur every time a Mac is unused for >2 days, every time a rotation is half-completed, every time a test bridge instance is forgotten. We should make the data legible without manual sleuthing.
Proposed shape
1. Canonical device registry
A small
devices.yaml(in this repo) listing the expected fleet:Lives in the repo so the device list is git-tracked. Rotation procedure (in
docs/bridge-client-setup.md) gains a final step: "updatedevices.yamlwith the new id".2.
scripts/audit-devices.py(or sh)Diff the registry against live Synapse:
Exits non-zero when ACTION REQUIRED so it can drive a cron alert.
3. Scheduling
Run weekly via a
.forgejo/workflows/audit-devices.ymlcron, posting results to the bridge matrix room when ACTION REQUIRED. Or trivially via crontab on rpi5 / nas withcurl matrix-room-webhookon failure.Acceptance criteria
devices.yamlcommitted with current fleet (~3 Maximus + Felinus/jmz/kitty devices)scripts/audit-devices.py(or equivalent) implements the diff + exits non-zero on mismatchdocs/bridge-client-setup.mdrotation procedure gains a "update devices.yaml" stepOut of scope (defer to follow-up tickets)