3.5 KiB
Tasks: MIDI Service Crash Warning
Tasks by their numbers in the project-wide sequence, which continues across every spec. Each was built and checked in one piece, so they are not broken into phases.
-
T236 Warn that the MIDI service stopped and was restarted after the daemon replaces one that lost it, without naming applications, since other applications using MIDI may have lost their connection with the service and only a relaunch mends them (R-101, owner decision 2026-09-27), per FR-032, FR-044 — done: a
midi_server_replacedevent replaces thedaemon_startedwarning, andStatusSummary.midi_server_replaced_at(6) carries the time for as long as that process runs;statuswarns above its table and--jsoncarries the time; the window shows a banner until dismissed, remembered in the window only; the replacement posts one desktop notification throughosascript, none from the sandboxed helper. Protocol 1.2. A CLI test over the binary checksstatus,status --jsonandevents --jsonfor a replaced daemon and a plain one. -
T237 Report when each endpoint last received and last sent a message, and a network port's automatic port's traffic, over the contract, in
status, the endpoint panel and the diagnostic report, per FR-044, FR-045, FR-048 — done:TrafficCounters.last_received(10) andlast_sent(11), stored besidelast_activitywith one more relaxed store each on the data path;NetworkSessionDetail.automatic_port_counters(11);statusgains LAST IN and LAST OUT and a row under each network port for its automatic port. A contract test sends a note into an automatic port over loopback and checks the times each way; swapping the two stores fails it. -
T238 Log each endpoint's traffic when it moves, so the log says whether a message arrived at a given minute after the history is gone, per FR-048, Constitution Principle III — done: a task reads the counters every 10 s and writes a
trafficline at info with the totals and last times, at the first look after a quiet one and then at most once a minute while traffic keeps moving; the data path is unchanged. Not unit tested: the rule restates this code. -
T242 Date the MIDI service warning when the daemon found the service gone rather than when its replacement started, which can be up to 30 s later while the service comes back, per FR-M04 — done: the daemon records when its watcher saw the loss, and the process replacing it receives the time in
MIDI_HARBOR_MIDI_SERVER_LOST_AT, an RFC 3339 time, besideMIDI_HARBOR_REPLACED_BECAUSE; the warning and themidi_server_replacedevent carry it, and a replacement not told falls back to its own start. The server-loss test checks the daemon records the time; checked live by starting a replacement with the variable set, andstatusand the window gave that time. -
T243 Let dismissing the warning tell the daemon, so a warning seen in one window no longer shows in another or in
status(owner request 2026-09-27), per FR-M04 — done: aDismissMidiServerWarningRPC (protocol 1.2) clears it and says whether there was one; the window's Dismiss calls it and hides the banner at once, replacing the window-only dismissal;midi-harbor dismiss-warning, whichstatusnow names in its warning. The CLI test checks the time handed over, the dismissal, a second dismissal finding nothing, andstatus --jsonafter; making the daemon ignore the handed-over time, or not clear the warning, fails it. Checked live both ways: Dismiss in the window clearedstatus, anddismiss-warningcleared an open window's banner at its next refresh.