Skip to content

G2.6: consume ProductionEligible profile for automatic dynamic reporting - #97

Merged
masarray merged 5 commits into
mainfrom
g2.6-production-dynamic-consumer
Aug 24, 2026
Merged

G2.6: consume ProductionEligible profile for automatic dynamic reporting#97
masarray merged 5 commits into
mainfrom
g2.6-production-dynamic-consumer

Conversation

@masarray

Copy link
Copy Markdown
Owner

Goal

Close the P6.2-B production-consumer gap without weakening the existing dynamic-report quarantine.

Behavior

  • existing callers without a production context remain static -> polling
  • automatic dynamic planning requires CanUseForProductionPlanning(...) to accept an identity-compatible ProductionEligible profile
  • production dynamic planning is restricted to the exact RCB that produced the proven InformationReport
  • only exact InformationReport-proven member references are exposed to the production dynamic planner
  • first production consumer is limited to one dynamic group and no more than the proven report member count
  • static report coverage still wins first
  • unproven members remain on bounded MMS polling
  • persisted profile evidence is treated as untrusted input and cross-checked again for RCB/DataSet/member consistency
  • post-plan invariant validation fails closed to the frozen static -> polling behavior

Compatibility

The existing MmsCapabilityAwareHybridReportAcquisitionPlanner.Build(...) signature remains source-compatible; the production context is an optional final argument.

Tests

Adds G2.6 regressions for:

  • InformationReportProven still quarantined
  • ProductionEligible exact RCB/member dynamic authorization
  • unproven member remains polling
  • identity mismatch fails closed
  • another free RCB cannot substitute for the proven RCB
  • tampered persisted production evidence is rejected

No live field claim is made by this PR. Next step after CI is wiring this typed context into ARSAS and then running the deterministic A3/shadow field qualification.

@masarray
masarray marked this pull request as ready for review August 24, 2026 05:45

@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: a2b2265af5

ℹ️ 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 +187 to +190
if (!capability.MayAttemptDynamicReports)
{
return ProductionDynamicAuthorization.Denied(
"The current MMS association does not satisfy the dynamic-report capability gate.");

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 Check capability on the proven RCB

When another free RCB makes capability.MayAttemptDynamicReports true but the profile-proven RCB itself lacks required current evidence such as TrgOps, this association-wide check authorizes production planning anyway. The restricted generic planner then accepts the proven RCB because IsDynamicUsable does not enforce the per-RCB capability evaluator's field checks, so it can emit an active write plan for an RCB whose current capability classification rejected dynamic mutation. Require capability.FindReportControl(report.RcbReference)?.IsDynamicWriteAttemptCandidate == true before authorizing it.

AGENTS.md reference: AGENTS.md:L153-L155

Useful? React with 👍 / 👎.

Comment on lines +110 to 117
var automaticOptions = AutomaticMonitoringOptions(options, production);
var plan = MmsHybridReportAcquisitionPlanner.Build(
catalog,
requestedSignals,
restrictedInventory,
restrictedAvailability,
liveDirectory,
planningDirectory,
automaticOptions);

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 Reuse the qualified DataSet identity

For every authorized dynamic segment, this delegates to BuildFreshDynamicPlan, which unconditionally creates AR_HYB_01 rather than using the DataSet reference stored in the activation and InformationReport proofs. Consequently a profile proving LD0/LLN0.AR_G2Q authorizes creation and binding of a different named-variable list, with a different encoded request size and identity that the qualification evidence never exercised; the post-plan invariant checks only RCB and members and therefore does not catch this. Pass the proven DataSet identity into planning or reject any emitted segment whose DataSet reference differs.

AGENTS.md reference: AGENTS.md:L156-L156

Useful? React with 👍 / 👎.

Comment on lines 111 to 117
var plan = MmsHybridReportAcquisitionPlanner.Build(
catalog,
requestedSignals,
restrictedInventory,
restrictedAvailability,
liveDirectory,
planningDirectory,
automaticOptions);

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 Preserve the proven member order during planning

A valid profile may record members in any DataSet order, but the generic planner invoked here sorts resolved signals by domain and SignalKey before constructing DynamicPoints. If the proven report order is non-lexical—for example [Ind2, Ind1]—requesting both produces [Ind1, Ind2]; the new ordered-subset invariant then rejects the otherwise qualified plan and rebuilds it as polling-only. Construct the dynamic points in production.MemberReferences order rather than relying on the generic planner's ordering.

AGENTS.md reference: AGENTS.md:L144-L144

Useful? React with 👍 / 👎.

@masarray
masarray merged commit aa2ddfb into main Aug 24, 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