Skip to content

Close UTC-Time P0 display precision gaps - #56

Closed
masarray wants to merge 5 commits into
mainfrom
agent/utc-time-p0-display-consistency
Closed

Close UTC-Time P0 display precision gaps#56
masarray wants to merge 5 commits into
mainfrom
agent/utc-time-p0-display-consistency

Conversation

@masarray

Copy link
Copy Markdown
Owner

What changed

  • add a single Iec61850UtcTimeFormatter policy for IEC 61850 UTC-Time display;
  • keep full engine evidence at seven fractional digits (fffffff);
  • expose a five-digit engineering UTC/local timestamp view (fffff) for event/dispute analysis without changing the decoded timestamp;
  • route both MmsDataCodec and the shared MmsDataValueRenderer through the full-precision formatter;
  • close the structured-value and report TimeOfEntry path that could still fall back to .fff after PR Preserve IEC 61850 UTC-Time sub-millisecond precision #55;
  • add deterministic regression coverage for the customer 0x335A86 / 31.2006000 case, structured values, report header TimeOfEntry, and the five-digit engineering view;
  • update the changelog.

Root cause

PR #55 fixed the wire decode and primary timestamp binding path, but MmsDataValueRenderer.FormatScalar still formatted UTC-Time with yyyy-MM-dd HH:mm:ss.fff. Structured MMS values and report TimeOfEntry use that renderer, so sub-millisecond evidence could still be truncated to milliseconds even though the underlying decoded timestamp was preserved.

Engineering impact

A source timestamp such as ...36.2006000 remains available at full engine precision and can also be presented as ...36.20060 in an engineering view. This makes the difference between truncation (36.200) and millisecond rounding (36.201) visible during FAT, SOE/event analysis, and vendor disputes.

Validation

Deterministic tests added for:

  • 24-bit fraction -> .NET tick preservation;
  • primary timestamp decoder full precision;
  • report value projection full precision;
  • scalar MMS display full precision;
  • structured MMS renderer full precision;
  • report header TimeOfEntry full precision;
  • five-digit engineering display without mutation of the underlying ticks.

Local CLI validation could not be run in this ChatGPT environment because outbound GitHub access and gh are unavailable; GitHub Actions CI is the validation gate for this draft PR.

Remaining scope

This P0 intentionally does not add raw 8-byte UTC-Time provenance to MmsDataValue; preserving wire bytes is the separate forensic P1 follow-up.

masarray added a commit that referenced this pull request Aug 14, 2026
Consolidate UTC-Time display precision and forensic provenance from stale drafts #56/#57 onto the current engine baseline after full CI validation.

Copy link
Copy Markdown
Owner Author

Superseded by the current-main consolidation PR #73, merged as d04fe94877679d66330c5e5bd1a83c245aa9ccb2. The useful P0 display-consistency work was selectively ported onto current main rather than merging this diverged draft. PR #73 exact-head CI #317 passed and post-merge main CI #318 passed. Closing this historical draft; branch/commits remain preserved.

@masarray masarray closed this Aug 14, 2026
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