Skip to content

Emit goodbye POST when diagnostics push toggled off#87

Merged
d4rken merged 2 commits into
devfrom
feat/dev-386-diagnostics-goodbye
May 17, 2026
Merged

Emit goodbye POST when diagnostics push toggled off#87
d4rken merged 2 commits into
devfrom
feat/dev-386-diagnostics-goodbye

Conversation

@d4rken

@d4rken d4rken commented May 17, 2026

Copy link
Copy Markdown
Member

When a feeder owner disables diagnostics push, the website previously had no way to distinguish that from a broken feeder. The collector now owns an intent-ack file that records the last state the server has been told and emits a one-shot minimal payload on every REPORT_STATUS transition, retrying on the natural ~10 min timer cadence until the server acks. Full diagnostics payloads always carry the new diagnostics_enabled flag so the website's view of the state stays authoritative.

The server-side handling (skip Redis write, drop the snapshot, classify the feeder as "muted") lands separately in airplanes-live/website.

Addresses DEV-386 (feeder diagnostics push parent epic).
Addresses DEV-390 (webconfig REPORT_STATUS toggle).

airplanes-diagnostics.sh now owns an intent-ack file recording the last diagnostics_enabled state the server has been told. On a REPORT_STATUS transition the next tick sends a goodbye or full payload until the server acks. Full payloads carry diagnostics_enabled=true.
@d4rken d4rken added the enhancement New feature or request label May 17, 2026
…ewer

The intent-ack file becomes stale if a successful full POST is followed by a failed ack-true write. In that case the file still claims the server is muted while the server saw a fresh full payload. The next disable would skip-as-already-acked and the goodbye would never go out. The disabled+acked-false branch now compares LAST_SUCCESS_FILE mtime against INTENT_ACK_FILE mtime; if the success is newer, the ack is treated as stale and the goodbye is sent on this tick. Also clarifies the operator-facing message on apl-feed diagnostics disable to mention the one-shot signal.
@d4rken d4rken merged commit 72cf1b7 into dev May 17, 2026
12 checks passed
@d4rken d4rken deleted the feat/dev-386-diagnostics-goodbye branch May 17, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant