Skip to content

P0-H: fail-closed canonical Report alias collisions and sibling-phase fallback - #645

Draft
masarray wants to merge 4 commits into
fix/p0-f-browser-catalog-authority-20261020from
fix/p0-h-report-reference-ambiguity-20261020
Draft

masarray wants to merge 4 commits into
fix/p0-f-browser-catalog-authority-20261020from
fix/p0-h-report-reference-ambiguity-20261020

Conversation

@masarray

@masarray masarray commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Baseline (immutable stack)

Stacks on #644 at 80e4836affce0b1f5f142c2966199a2ef5af41b3 (itself stacked on combined #642). Engine remains ARIEC61850 #183 c85d4e20db722bd0c2729f2533b323b13d3ef735. No engine repin or main integration.

Root cause / reproduction

IndexPointReference previously used TryAdd for both normalized and canonical aliases. Two different selected points could share a canonical alias; whichever was registered first silently won. The rare Report fallback used Points.Values.FirstOrDefault for ancestor/descendant prefixes, permitting MMXU1.A to route as whichever phsA/phsB child happened to be enumerated first. It then overwrote the alias cache, making the misroute persistent.

Change

  • Retain one existing session-scoped ReportReferenceIndex; record its ambiguous keys in a bounded same-session set. Collision removes the alias, forbids future re-insertion until reset.
  • Replace first-match prefix selection by exact canonical leaf equality only; sibling phases and even a single selected child of a three-phase parent fail closed. Typed engine schema projection must emit the exact leaf to authorize routing.
  • Never overwrite a pre-existing alias during fallback, and clear ambiguity quarantine with the session association.
  • Preserve exact point routing, read-only report ingestion, and all existing RCB/command/data ledger authority. No MMS reads or writes, no polling, no global scans on successful indexed hot path.

Regression

Five positive/negative cases: parent/child ambiguity independent of ordering, single selected child rejected for parent aggregate, exact FC-encoded aliases accepted, segment-boundary prefix safety, canonical collision quarantine, and stable same-point cache.

Gate

New code/test committed; exact-head Windows CI and physical report member/FC/schema FAT still required. This prevents a known class of wrong point routing, but does not claim analogue Unknown is solved or that schema-proven per-member projection is complete. No release or merge without matched on-wire and UI evidence.

Copy link
Copy Markdown
Owner Author

2026-10-20 exact-SHA Windows qualification checkpoint (code-only)

This branch has not been deployed

No deployments
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