Skip to content

feat(engine): stations, tracks and the packet list come back after a restart - #459

Merged
gx1400 merged 1 commit into
mainfrom
feat/history-restore
Oct 28, 2026
Merged

gx1400 merged 1 commit into
mainfrom
feat/history-restore

Conversation

@gx1400

@gx1400 gx1400 commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Second part of #314 (F1.41 behavior 7). Stacked on #458.

  • When: Engine.RunAsync restores first, before any source connects.
  • What it reads: the packets kept from the last RemoveAfter (2 h by default; at most 24 h, which also applies when stations are never removed), in order and with their original times.
  • What it rebuilds:
    • The station store and tracks, through StationStore.Apply. Same-source duplicates are listed but not applied, as when they arrived.
    • The packet list: the last RecentPacketCapacity packets, with own packets marked Sent.
    • A sweep then marks stations stale or removes them as they'd be had the engine kept running.
  • What it doesn't touch: messaging, acks, alerts, digipeating, IGating, transmitting, the dashboard's counts and PacketsReceived. Nothing is written to the history again.
  • Spec change: the restart reports itself in the log ("Restored N packets from the last M minutes") instead of a status line. It finishes before anything connects, so a status would never be seen.

Tests: HistoryRestoreTests checks three things:

  • stations, tracks and the packet list come back, and a station older than the window doesn't;
  • nothing is counted or kept again;
  • with history off, nothing is restored.

Release build, all tests and csharpier pass locally.

@gx1400
gx1400 force-pushed the feat/history-restore branch from 4f3b0b8 to 0119ea0 Compare October 28, 2026 04:34
Base automatically changed from feat/history-store to main October 28, 2026 12:28
@gx1400
gx1400 added this pull request to stack #470 October 28, 2026 12:54
…restart

Before the sources connect, the engine applies again the packets the
history kept from the last RemoveAfter (at most 24 hours), in order and
with their times (F1.41 behavior 7). Stations, tracks and the packet list
are as they were; nothing is sent, acked, alerted, counted or kept again.

Refs #314
@gx1400
gx1400 force-pushed the feat/history-restore branch from 0119ea0 to 5b4ef5a Compare October 28, 2026 12:57
@gx1400
gx1400 merged commit 4b1d2bf into main Oct 28, 2026
11 checks passed
@gx1400
gx1400 deleted the feat/history-restore branch October 28, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant