Skip to content

Add rolling-versus-exact parser equivalence tests - #1097

Open
Gudge (MGudgin) wants to merge 1 commit into
user/gudge/version_specific_config_parsers_phase7cfrom
user/gudge/version_specific_config_parsers_phase7d
Open

Add rolling-versus-exact parser equivalence tests#1097
Gudge (MGudgin) wants to merge 1 commit into
user/gudge/version_specific_config_parsers_phase7cfrom
user/gudge/version_specific_config_parsers_phase7d

Conversation

@MGudgin

@MGudgin Gudge (MGudgin) commented Sep 3, 2026

Copy link
Copy Markdown
Member

📖 Description

This PR adds a private differential harness that classifies
rolling-versus-exact parser behavior while rolling parsing remains
authoritative in production.

Details

  • Compares complete one-shot and state-aware runtime models, diagnostics,
    loader modes, command splicing, every lifecycle phase, and every registered
    contract version.
  • Explicitly inventories 125 exact-stricter corpus files across configs,
    examples, and policy fixtures; new or changed divergences require deliberate
    classification.
  • Fails on every exact-looser acceptance or accepted-model mismatch.

Tests

  • cargo fmt --all -- --check
  • cargo check --workspace --all-targets
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
  • macOS aarch64-apple-darwin cross-target check for wxc_common
Microsoft Reviewers: Open in CodeFlow

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

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

Copilot AI balanced review requested due to automatic review settings September 3, 2026 17:42
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/version_specific_config_parsers_phase7d branch from 01f3c01 to 16b8ec3 Compare September 3, 2026 17:42
@MGudgin
Gudge (MGudgin) requested a review from a team September 3, 2026 17:42

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

Rejection pairs bypass diagnostic comparison, allowing unclassified diagnostic drift.

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

Review tier: Balanced
Findings: 1 Medium severity

New issues introduced by this change (1)
Severity Finding
Medium severity src/​core/​wxc_common/​src/​config_parser.rs — This branch treats any rolling/exact rejection pair as equivalent without comparing…
What changed in this PR

Adds a private differential harness comparing rolling and exact configuration parsers.

Changes:

  • Compares runtime models across versions and lifecycle phases.
  • Exercises loader modes, command splicing, and diagnostics.
  • Inventories 125 expected corpus divergences.
File Description
src/​core/​wxc_common/​src/​config_parser.rs Adds differential parser snapshots, matrices, and corpus validation.

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

));
}
}
(ParserSnapshot::Rejected(_), ParserSnapshot::Rejected(_)) => {
This PR adds a private differential harness that classifies
rolling-versus-exact parser behavior while rolling parsing remains
authoritative in production.

Details

* Compares complete one-shot and state-aware runtime models, diagnostics,
  loader modes, command splicing, every lifecycle phase, and every registered
  contract version.
* Explicitly inventories 125 exact-stricter corpus files across configs,
  examples, and policy fixtures; new or changed divergences require deliberate
  classification.
* Fails on every exact-looser acceptance or accepted-model mismatch.

Tests

* `cargo fmt --all -- --check`
* `cargo check --workspace --all-targets`
* `cargo clippy --workspace --all-targets -- -D warnings`
* `cargo test --workspace`
* macOS `aarch64-apple-darwin` cross-target check for `wxc_common`

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 651084c2-3d1e-4824-917a-6994d62feba0
Copilot AI review requested due to automatic review settings September 3, 2026 18:27
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/version_specific_config_parsers_phase7d branch from 225977f to 2d4b094 Compare September 3, 2026 18:27

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

🔵 Needs a closer look

Corpus cases rejected by both parsers currently bypass diagnostic-equivalence validation.

Review tier: Balanced
Findings: 1 Medium severity

Pre-existing issues (1)
Severity Finding
Medium severity src/​core/​wxc_common/​src/​config_parser.rs — This branch treats any rolling/exact rejection pair as equivalent without comparing… View comment
Suppressed comments (1)

src/core/wxc_common/src/config_parser.rs:3432

  • When both parsers reject a corpus file, this branch accepts any mismatch in route, category, path, source location, or message. A diagnostic regression—or the exact parser beginning to reject for a different reason—will therefore pass without deliberate classification. Compare the two rejection snapshots here and require any intentional mismatch to be listed in an explicit diagnostic-divergence inventory.
                (ParserSnapshot::Rejected(_), ParserSnapshot::Rejected(_)) => {

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