Skip to content

fix(sccm): canonicalize server intake fixture contracts - #345

Merged
adamgell merged 2 commits into
codex/parser-family-skeletonfrom
codex/sccm-335-canonical-contract-fix
Jul 30, 2026
Merged

fix(sccm): canonicalize server intake fixture contracts#345
adamgell merged 2 commits into
codex/parser-family-skeletonfrom
codex/sccm-335-canonical-contract-fix

Conversation

@adamgell

Copy link
Copy Markdown
Owner

Summary

Corrects the already-merged #335 preparation corpus to match documented ConfigMgr contracts:

  • replaces impossible six-character CONTOSO site codes with exact synthetic three-character LAB across all 11 server-intake manifests
  • renames the standard rollback fixture from nonstandard MP_GetPolicy.log.lo_ to replacement-extension MP_GetPolicy.lo_, updating manifest identity and physical path
  • adds a committed fixture contract test that enforces the scenario matrix, ^[A-Z0-9]{3}$, canonical .lo_ identity, manifest-to-file path existence, and byte-count integrity
  • updates preparation/privacy documentation without changing shared or native production interfaces

Microsoft references:

TDD proof

After correcting the test’s expected matrix count to the observed 11 planned scenarios, the focused test failed with 13 fixture defects:

  • 11 invalid CONTOSO site codes
  • noncanonical MP_GetPolicy.log.lo_ original basename
  • noncanonical .log.lo_ relative path

It passes after the smallest fixture/document corrections.

Verification

Boundaries

This is an issue-scoped synthetic-corpus correction only. It does not implement native configured-path discovery/capture, workflow reducers, Windows I/O, or live acceptance. Issue #335 remains open for production native implementation and native Windows/lab validation.

Part of #335.

Copilot AI review requested due to automatic review settings July 30, 2026 20:42
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@adamgell, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 10 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 92e5b49d-17d2-47a3-b97a-abdfbd1503b2

📥 Commits

Reviewing files that changed from the base of the PR and between 262a18d and f30e40c.

📒 Files selected for processing (17)
  • .gitattributes
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/README.md
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/absent-dp/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/access-denied-mp/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/capped-sup/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/collision-same-basename-configured-roots/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/complete-multi-role/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/configured-nondefault-path/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/multiline/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/rotations/evidence/sccm/server/management-point/server-mp-policy/lo_/MP_GetPolicy.lo_
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/rotations/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/skipped-iis/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/unsorted-manifest/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/unsupported-db-supplement/manifest.json
  • crates/cmtraceopen-parser/tests/sccm_server_intake_fixture_contract.rs
  • docs/sccm/preparation/issue-335-server-intake.md
  • docs/superpowers/plans/2026-07-30-sccm-server-intake-and-core.md

Comment @coderabbitai help to get the list of available commands.

@adamgell adamgell self-assigned this Jul 30, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

Please review exact head 58fc0908daf529985c434f10a3d8efdd91001672, including the committed 11-scenario site/rotation/path/byte contract test and the issue-scoped no-native-acceptance boundary. A rate-limited response is not approval.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

@adamgell Understood. I’ll perform a full review of PR #345 at commit 58fc0908daf529985c434f10a3d8efdd91001672, including the 11-scenario site/rotation/path/byte contract test and confirmation that the change remains within the stated fixture-only, no-native-acceptance boundary. This is a review request, not an approval.

✅ Action performed

Full review finished.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 13 minutes.

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.

Pull request overview

This PR canonicalizes the synthetic SCCM server-intake fixture corpus for Issue #335 so it matches documented ConfigMgr contracts (3-character site codes and .lo_ rollover naming), and adds an automated contract test to prevent future fixture drift.

Changes:

  • Replaces invalid CONTOSO site codes with a synthetic 3-character LAB across the server-intake manifests.
  • Canonicalizes .lo_ rollover naming (MP_GetPolicy.lo_) and updates the rotations fixture path accordingly.
  • Adds a focused Rust fixture-contract test to enforce scenario-matrix size, site-code format, .lo_ basename/path existence, and byte-count integrity; updates related documentation.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
docs/sccm/preparation/issue-335-server-intake.md Updates documentation to describe canonical .lo_ rollover spelling as replacement-extension.
crates/cmtraceopen-parser/tests/sccm_server_intake_fixture_contract.rs Adds a contract test validating server-intake fixture invariants (site code, .lo_ artifact identity/path, bytes).
crates/cmtraceopen-parser/tests/fixtures/sccm/server/README.md Updates fixture README to reflect the new contract test and canonical site-code expectations.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/unsupported-db-supplement/manifest.json Updates siteCode to canonical 3-character LAB.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/unsorted-manifest/manifest.json Updates siteCode to canonical 3-character LAB.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/skipped-iis/manifest.json Updates siteCode to canonical 3-character LAB.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/rotations/manifest.json Updates siteCode and canonicalizes .lo_ basename/relativePath.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/rotations/evidence/sccm/server/management-point/server-mp-policy/lo_/MP_GetPolicy.lo_ Adds/updates the .lo_ rollover fixture file with canonical basename.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/multiline/manifest.json Updates siteCode to canonical 3-character LAB.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/configured-nondefault-path/manifest.json Updates siteCode to canonical 3-character LAB.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/complete-multi-role/manifest.json Updates siteCode to canonical 3-character LAB.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/collision-same-basename-configured-roots/manifest.json Updates siteCode to canonical 3-character LAB.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/capped-sup/manifest.json Updates siteCode to canonical 3-character LAB.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/access-denied-mp/manifest.json Updates siteCode to canonical 3-character LAB.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/absent-dp/manifest.json Updates siteCode to canonical 3-character LAB.

Comment thread crates/cmtraceopen-parser/tests/fixtures/sccm/server/README.md Outdated
Comment thread crates/cmtraceopen-parser/tests/sccm_server_intake_fixture_contract.rs Outdated

@adamgell adamgell left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Independent exact-head review: BLOCKED at 58fc0908

This review is anchored to 58fc0908daf529985c434f10a3d8efdd91001672 (base 262a18dedff5934868ed2f89d82795c412935733). The PR advanced to a newer head while this review was concluding, so the fixes require a fresh exact-head review.

Blocking findings

  1. The exact-byte test is not cross-platform. .gitattributes protects only src-tauri/tests/fixtures/**; the byte-sensitive crates/cmtraceopen-parser/tests/fixtures/** tree has no attribute. A simulated Git-for-Windows checkout with core.autocrlf=true changed MP_GetPolicy.lo_ from the manifest's 177 bytes to 178 bytes. The new metadata().len() assertion therefore fails because of checkout normalization, not fixture content. Add a byte-preserving attribute such as an appropriately scoped -text rule.

  2. The #335 execution-contract plan remains noncanonical. docs/superpowers/plans/2026-07-30-sccm-server-intake-and-core.md:24 and :103 still prescribe CONTOSO, contradicting the corrected LAB fixtures and the PR statement that no #335-owned documentation residual remains. Because this plan is the execution contract, it can reintroduce the invalid six-character site code.

Verified at the reviewed SHA

The remaining requested scope passed:

  • all 11 scenarios and JSON files are present and internally consistent
  • MP_GetPolicy.lo_ is a physical 100% rename; the old .log.lo_ path is absent; manifest/path/provenance and 177 LF bytes agree on this host
  • role/topology producer and workflow-subject facts remain distinct
  • configured non-default provenance is retained and default-path absence does not infer a missing role
  • absent/access-denied/capped/skipped/unsupported states remain coverage-only with conservative expected results
  • all manifest/expected/evidence paths, IDs, limits, SHA-256, and byte relationships pass the exact-byte and independent consistency audits
  • fixtures are synthetic/privacy-safe and make no native Windows/live acceptance claim
  • focused contract: 1 passed; full parser: 594 passed; strict Clippy, wasm32, npx tsc --noEmit, Rust 1.88 formatting, JSON parse, and git diff --check: PASS

Copilot's EOL-normalization comment is confirmed blocking. CodeRabbit's response remains rate-limited and is not approval.

Copy link
Copy Markdown
Owner Author

Review corrections are pushed at exact head f30e40cd12407243fb4f75c272a9acc4dde3e2fc.

  • preserved the entire parser fixture tree byte-for-byte with .gitattributes
  • reproduced the Windows-style red case (177 LF bytes became 178 CRLF bytes) and green case (177 remains 177)
  • corrected residual invalid CONTOSO plan examples to the three-character synthetic site code LAB
  • separated topology host labels from site-code documentation
  • made manifest test failures scenario-specific

Focused test, exact-byte validator, full parser, strict Clippy, wasm32, TypeScript, owned rustfmt, and diff check are green. Fresh independent exact-head review and substantive CodeRabbit review remain required.

@coderabbitai review

Please review exact head f30e40cd12407243fb4f75c272a9acc4dde3e2fc; skipped/rate-limited output is not approval.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

@adamgell Understood. I’m initiating a fresh full review of PR #345 at exact head f30e40cd12407243fb4f75c272a9acc4dde3e2fc, including the fixture byte-integrity protections, 11-scenario contract coverage, canonical site-code/documentation corrections, and the stated fixture-only boundary. This is a review request, not approval.


✏️ Learnings added
Learnt from: adamgell
URL: https://github.com/adamgell/cmtraceopen/pull/345

Timestamp: 2026-07-30T21:04:14.724Z
Learning: For the SCCM server-intake synthetic fixture corpus in pull request `#345`, the parser fixture tree must remain byte-for-byte stable across checkouts; `.gitattributes` is used to prevent line-ending conversion from changing manifest-validated byte counts.

Learnt from: adamgell
URL: https://github.com/adamgell/cmtraceopen/pull/345

Timestamp: 2026-07-30T21:04:14.724Z
Learning: In SCCM server-intake fixture contracts, synthetic ConfigMgr site codes must be exactly three uppercase alphanumeric characters (for example, `LAB`); topology host labels are distinct from site-code values.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

✅ Action performed

Full review finished.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 10 minutes.

@adamgell adamgell left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Independent exact-head re-review: PASS

No actionable findings at f30e40cd12407243fb4f75c272a9acc4dde3e2fc against base 262a18dedff5934868ed2f89d82795c412935733.

The blockers from the superseded 58fc0908 review are resolved:

  • .gitattributes now marks crates/cmtraceopen-parser/tests/fixtures/** -text; git check-attr reports text: unset.
  • A controlled core.autocrlf=true checkout now preserves MP_GetPolicy.lo_ byte-for-byte at 177 bytes (177 == 177 and cmp succeeds), fixing the Windows checkout failure.
  • the #335 execution plan, preparation docs, intake corpus, README, and focused test contain no residual CONTOSO or .log.lo_
  • topology host labels and the LAB site code are documented separately
  • manifest read/parse failures now include scenario names and underlying errors

Fresh exact-head verification:

  • focused server-intake contract: 1 passed
  • exact-byte corpus validator: PASS across all 11 scenarios
  • JSON parse and independent manifest↔expected↔evidence audit: PASS
  • role/topology/configured-path provenance, collision identities, rotation lineage, cap SHA/bytes, and conservative absent/access/skipped/unsupported semantics: PASS
  • full parser: 594 passed (349 unit + 222 ESP + 1 client-intake + 1 server-intake + 21 SCCM)
  • strict parser Clippy: PASS
  • wasm32 parser check: PASS
  • npx tsc --noEmit: PASS
  • Rust 1.88 formatting and git diff --check: PASS
  • synthetic/privacy-only and no-native/live-acceptance boundaries remain explicit

CodeRabbit is visibly in the exact-head loop and GitHub records an APPROVED review at this SHA. Its accompanying command response also reports the fair-usage limit, so under the program's stricter rule that a rate-limited response is not substantive approval, the coordinator should keep that separate gate pending unless it accepts the actual review object as sufficient.

Copy link
Copy Markdown
Owner Author

Substantive CodeRabbit gate is now satisfied at exact head f30e40cd12407243fb4f75c272a9acc4dde3e2fc.

Local CodeRabbit CLI 0.7.1 exact committed-range review:

  • base: codex/parser-family-skeleton
  • head: f30e40cd12407243fb4f75c272a9acc4dde3e2fc
  • result: review_completed
  • findings: 0
  • reviewed files: all 17 changed files, including .gitattributes, server intake manifests, canonical .lo_ fixture, focused Rust contract test, preparation document, and execution plan

This is the substantive review result; the earlier GitHub fair-usage response was not counted as approval. Independent exact-head review 4823226673 also passes, all threads are resolved, and all verification gates are green.

@adamgell
adamgell merged commit 99554f4 into codex/parser-family-skeleton Jul 30, 2026
1 check passed
adamgell added a commit that referenced this pull request Aug 4, 2026
Canonicalize the synthetic server-intake site and rollover contract, preserve parser fixture bytes across Windows-style checkouts, and add the focused cross-platform corpus guard.

Refs #335.
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