Skip to content

G2.6 P1.5: legacy InformationReportProven compatibility adapter - #101

Merged
masarray merged 2 commits into
mainfrom
g2.6-p1.5-legacy-compatibility
Aug 28, 2026
Merged

G2.6 P1.5: legacy InformationReportProven compatibility adapter#101
masarray merged 2 commits into
mainfrom
g2.6-p1.5-legacy-compatibility

Conversation

@masarray

Copy link
Copy Markdown
Owner

Goal

Close the P1.5 compatibility gap without weakening the existing guarded runtime planner or ProductionEligible boundary.

Some field-qualified profiles were persisted as InformationReportProven from the earlier G2.4 GI proof, while a later G2.5/A3 physical run independently proved a real NO-GI spontaneous data-change InformationReport on the same exact identity / RCB / ordered member envelope. The old profile was intentionally read-only, so the stored InformationReportProof.Kind remained GeneralInterrogation.

Change

Adds a separate MmsGuardedDynamicReportLegacyCompatibilityPolicy and typed MmsDynamicReportLegacyDataChangeCompatibilityEvidence.

The adapter is fail-closed. It accepts a legacy profile only when:

  • profile schema and current identity remain compatible;
  • profile is InformationReportProven or stronger;
  • stored activation + InformationReport proofs are successful;
  • stored activation/report RCB, DataSet and ordered member sequence agree;
  • stored report members remain inside the accepted exact envelope;
  • application-supplied compatibility evidence is complete;
  • compatibility stable identity, model fingerprint and profile revision exactly match the current IED;
  • compatibility RCB and ordered member sequence exactly match the persisted proven chain;
  • the later physical evidence explicitly says actual InformationReport received, data-change reason verified, GI disabled, exact member mapping verified, association healthy, and cleanup succeeded.

If accepted, ARIEC builds an in-memory compatibility view only whose report kind is DataChange, then the existing guarded planner still performs its normal fresh capability / availability / exact-envelope / at-most-one-dynamic-group checks. The original persisted profile object is not mutated or saved.

Safety boundary

  • No MarkProductionEligible.
  • No profile persistence.
  • No arbitrary free-RCB substitution.
  • No member broadening.
  • Stored DataChange profiles continue unchanged without requiring compatibility evidence.
  • Missing/mismatched/incomplete legacy evidence remains quarantined to static/polling behavior.

Tests

Adds dedicated P1.5 regression coverage for exact legacy acceptance plus missing evidence, fingerprint mismatch, member-order mismatch, incomplete cleanup, and the native stored-DataChange path.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 66ab426b0a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +16 to +18
public string StableIdentityKey { get; init; } = string.Empty;
public string ModelFingerprint { get; init; } = string.Empty;
public string ProfileRevision { get; init; } = string.Empty;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Bind compatibility evidence to the firmware revision

When archived compatibility evidence comes from firmware A but the persisted GI profile and current device are on firmware B, this adapter still accepts it as long as the stable key, model fingerprint, and profile revision stayed unchanged. The existing identity policy explicitly treats firmware changes as requiring requalification, but this evidence contract has no firmware field to compare, so a stale physical proof can unlock dynamic RCB/DataSet writes on an untested firmware version. Add the firmware revision to the evidence identity and require an exact match before adapting the profile.

AGENTS.md reference: AGENTS.md:L88-L90

Useful? React with 👍 / 👎.

!string.IsNullOrWhiteSpace(StableIdentityKey) &&
!string.IsNullOrWhiteSpace(ModelFingerprint) &&
!string.IsNullOrWhiteSpace(RcbReference) &&
MemberReferences.Count > 0 &&

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject null member lists instead of throwing

When application-supplied evidence is deserialized with "memberReferences": null, the non-nullable initializer does not prevent the property from becoming null, and evaluating evidence.IsSuccess throws here instead of returning false. This defeats the stated fail-closed behavior for incomplete evidence and can abort monitoring-plan construction rather than leaving the legacy profile quarantined; test for null before accessing Count and report the evidence as incomplete.

AGENTS.md reference: AGENTS.md:L90-L94

Useful? React with 👍 / 👎.

@masarray
masarray merged commit e7cf12e into main Aug 28, 2026
1 check passed
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