Skip to content

feat(data): raise the archive state from the catalogue - #142

Merged
mrcsin merged 1 commit into
masterfrom
archive-state-from-catalogue
Oct 20, 2026
Merged

mrcsin merged 1 commit into
masterfrom
archive-state-from-catalogue

Conversation

@mrcsin

@mrcsin mrcsin commented Oct 20, 2026

Copy link
Copy Markdown
Member

Problem

The status bar's archive indicator and its ConnectionLost entry came from the live-edge poll, which a
later slice of the OPC UA live edge (#116) replaces. The poll turned any failure, a missing trends table
included, into ConnectionLost. One outage also made two panel entries: the read loop's third-failure
report and the status bar's fault report. The catalogue read inherited the 300 s connection backstop, so
a stalled server would have taken about 15 minutes to raise a fault through it.

What changed

  • PenCatalogueSync publishes ArchiveConnectionState through a sink of ArchiveReadLoop; MarkerSync
    passes none. ConnectionLost after three connection-class failures in a row, Connected on the first
    success and on the first success after a fault. One outage makes one entry from the loops and the bar.
  • Connection class is ArchiveFault.Unreachable. ArchiveExceptionMapper widens it to SQLSTATE class
    08, 57P01-57P03 and 53300; 57014 stays QueryTimedOut. The Unreachable texts in both resx
    files widen to match.
  • The catalogue command has its own 5 s CommandTimeout. The window reads the catalogue at open.
  • IDataProvider.ConnectionFaults, TrendCoordinator.ConnectionFaults and the poll's state machine are
    deleted. The poll keeps its statements, samples, 10 s tick bound and failure warning.
  • Docs: data-integration.md (section renamed to "The connection state the catalogue read reports",
    residual cases under "No failure stops at the log"), overview.md, charting.md,
    trend-interaction.md, testing-strategy.md, AGENTS.md.

Known residual until the poll is deleted in a later slice of this roadmap: a non-connection poll failure
reaches the panel only through the minimap's band reads or the next history read. The list is in
data-integration.md#no-failure-stops-at-the-log.

How it was verified

  • dotnet build SemiPlot.slnx: 0 errors.
  • dotnet format SemiPlot.slnx --verify-no-changes: exit 0; dotnet terse over the 40 touched .cs files:
    exit 0.
  • SemiPlot.Tests.Unit: 2297/2297. SemiPlot.Tests.Integration: 196/196.
  • TrendWindowTests.ThreeUnreachableCatalogueReads_TurnTheBarToFault_WithOneConnectionLostEntry and
    TheWindowReadsTheCatalogueAtOnce were red before the wiring change.
  • Not run: the manual outage check on the demo stand (stop, start and pause the bench container). The
    automated suites stand in for it in this unattended roadmap run.
  • PenEditorViewTests.ANameTypedWhileARefreshRuns_ReachesNoFieldAndWritesNothing failed once and then
    passed 5/5; it is outside this change.
Per-task commits before collapse
fb89170 docs(plans): correct the verify list
dee54aa docs(plans): record the exec run and checks
83301f5 fix(comments): address audit findings
913c178 fix(tests): address review findings
84aafa5 fix(bridge): address review findings
0fca00d docs(architecture): describe the catalogue state
93656a2 docs(plans): record the acceptance checks
1de694f refactor(data): delete the poll's connection state
ea5a25c feat(ui): feed the status bar from the catalogue
338820a test(data): arm the realtime tests on poll log lines
82f0cb7 feat(data): bound the catalogue read, widen Unreachable
2053abf feat(bridge): raise the archive state from the catalogue

The status bar's archive indicator and its ConnectionLost entry came
from the live-edge poll, which a later slice replaces with OPC UA. The
poll also turned any failure, a missing trends table included, into
ConnectionLost, and the status bar and the read loop each wrote their own
entry for one outage.

PenCatalogueSync now publishes ArchiveConnectionState through a sink of
ArchiveReadLoop; MarkerSync passes none. The loop raises ConnectionLost
after three connection-class failures in a row and Connected on the
first success and the first success after a fault. Connection class is
ArchiveFault.Unreachable, widened to SQLSTATE class 08, 57P01-57P03 and
53300 so a restart's recovery is not ReadFailed. Other kinds keep their
own entries; one outage makes one entry from the loops and the bar.

The catalogue command gets a 5 s bound instead of the 300 s backstop,
and the window reads the catalogue at open, so the first Connected and
the failure run start at window open. IDataProvider.ConnectionFaults,
its republish in TrendCoordinator and the poll's state machine are
deleted; the poll keeps its statements and samples.
@mrcsin
mrcsin marked this pull request as ready for review October 20, 2026 08:59
@mrcsin
mrcsin merged commit 54f455e into master Oct 20, 2026
2 checks passed
@mrcsin
mrcsin deleted the archive-state-from-catalogue branch October 20, 2026 09:04
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