Skip to content

Extract shared state-aware normalization - #1091

Open
Gudge (MGudgin) wants to merge 1 commit into
user/gudge/version_specific_config_parsers_phase7afrom
user/gudge/version_specific_config_parsers_phase7b
Open

Extract shared state-aware normalization#1091
Gudge (MGudgin) wants to merge 1 commit into
user/gudge/version_specific_config_parsers_phase7afrom
user/gudge/version_specific_config_parsers_phase7b

Conversation

@MGudgin

@MGudgin Gudge (MGudgin) commented Sep 3, 2026

Copy link
Copy Markdown
Member

This PR changes state-aware parsing to produce one neutral wire input and run rolling and future exact-contract requests through the same normalization seam.

Details

  • Separate rolling source recovery from phase, policy, and telemetry normalization while preserving existing behavior and diagnostics.
  • Canonicalize state-aware adapter inputs around the raw experimental payload and compare them with the real rolling pre-normalization representation.
  • Retain tested typed experimental mappings as staging for the Phase 9.5 typed backend-payload migration, with provision-config parity coverage.

Tests

  • cargo fmt --all -- --check
  • cargo check --workspace --all-targets
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
Microsoft Reviewers: Open in CodeFlow

@MGudgin
Gudge (MGudgin) requested a review from a team as a code owner September 3, 2026 02:04
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Gudge (MGudgin) pushed a commit that referenced this pull request Sep 3, 2026
This PR updates the parser roadmap for the squashed Phase 7.2 implementation
and its stacked pull request.

Details

* Record Phase 7.2 on the phase7b branch at 401ba0c.
* Link PR #1091 and its Phase 7a base PR #969 in the status and delivery table.

Tests

* git diff --check

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 651084c2-3d1e-4824-917a-6994d62feba0
This PR changes state-aware parsing to produce one neutral wire input and
run rolling and exact-contract requests through the same normalization seam.

Details

* Separates rolling source recovery from phase, policy, and telemetry
  normalization while preserving existing behavior and diagnostics.
* Canonicalizes state-aware adapter inputs around the raw experimental payload
  and compares them with the real rolling pre-normalization representation.
* Retains tested typed experimental mappings alongside raw payload transport,
  with provision-config parity coverage.

Tests

* `cargo fmt --all -- --check`
* `cargo check --workspace --all-targets`
* `cargo clippy --workspace --all-targets -- -D warnings`
* `cargo test --workspace`

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 651084c2-3d1e-4824-917a-6994d62feba0
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/version_specific_config_parsers_phase7b branch from 401ba0c to 840f8c0 Compare September 3, 2026 16:46
@MGudgin
Gudge (MGudgin) requested review from a team and a balanced review from Copilot September 3, 2026 16:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The architecture documentation incorrectly describes the current rolling and exact-contract normalization wiring.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 2 Low severity

New issues introduced by this change (2)
Severity Finding
Low severity docs/​state-aware-lifecycle/​mxc-state-aware-sandbox-api.mdconvert_wire_state_aware is not only the source adapter: it calls…
Low severity docs/​state-aware-lifecycle/​mxc-state-aware-sandbox-api.md — The exact development adapter does not currently enter normalize_state_aware: it only returns…
What changed in this PR

Extracts a neutral state-aware wire representation to prepare rolling and exact-contract parsers for shared normalization.

Changes:

  • Separates rolling source recovery from state-aware normalization.
  • Canonicalizes exact-contract adapter output and adds parity coverage.
  • Updates lifecycle architecture documentation.
File Description
config_parser.rs Extracts and tests shared normalization.
dev/​state_aware.rs Canonicalizes adapter output.
state_aware_tests/​common.rs Adds shared parity assertions.
state_aware_tests/​provision.rs Adds provision payload parity tests.
state_aware_tests/​start.rs Updates start parity tests.
state_aware_tests/​exec.rs Updates exec parity tests.
state_aware_tests/​stop.rs Updates stop parity tests.
state_aware_tests/​deprovision.rs Updates deprovision parity tests.
dev/​mod.rs Verifies experimental data canonicalization.
mxc-state-aware-sandbox-api.md Documents the normalization architecture.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +1135 to +1137
`convert_wire_state_aware` is now only the rolling source adapter. It extracts
and validates the raw experimental block, masks that block for base wire
deserialization, and produces:
Comment on lines +1149 to +1151
presence handling, and typed telemetry population. The exact development
adapter produces the same neutral representation and enters this seam without
duplicating rolling normalization.
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.

2 participants