Skip to content

test(sccm): prepare Provider and Admin Service corpus - #380

Merged
adamgell merged 15 commits into
codex/parser-family-skeletonfrom
codex/sccm-332-provider-admin-service-corpus
Jul 31, 2026
Merged

adamgell merged 15 commits into
codex/parser-family-skeletonfrom
codex/sccm-332-provider-admin-service-corpus

Conversation

@adamgell

@adamgell adamgell commented Jul 31, 2026 •

Copy link
Copy Markdown
Owner

Tracks #332

Scope

Preparation-only Provider/Admin Service source, privacy, request-key, topology, coverage, and reducer-test corpus. This PR adds no production reducer, Windows collector, network/database/WMI/Tauri code, or live SCCM acceptance. Production implementation remains blocked on reviewed/stable #318 and #335 interfaces.

Fixture matrix

  • Provider success, explicit authorization denial, query/operation failure, and incomplete timeout with invalid offset
  • Admin Service success, authentication failure, backend failure, and incomplete request
  • optional scoped IIS evidence that remains supplemental and cannot create/complete an Admin Service transaction
  • privacy fixture with raw synthetic sensitive shapes omitted from public output
  • split rotation plus unknown version that cannot emit an exact key

The corpus contains 11 scenarios, 14 bounded physical artifacts, and 22 manifest/expected JSON files. Smsprov.log and AdminService.log continue to use raw CCM transport; no ParserKind::Sccm is introduced. Producer role stays separate from Provider/Admin Service workflow layer.

TDD evidence

  • First focused test failed because the exact fixture root did not exist.
  • Privacy citation test then failed because the shared redactor correctly replaced the sensitive tail; the fixture reader was narrowed to recognize only the versioned redaction marker.
  • A mutation pass reproduced seven fail-open cases (control-bearing version, blank rewritten artifact ID, arbitrary transaction/source-local IDs, high confidence over incomplete fragment, arbitrary outcome, and omitted bounded request); all now fail closed.

Verification at exact head 0144448492e3526e989eea12fdfd30b8014aa4b7

  • cargo test --locked -p cmtraceopen-parser --test sccm_server_provider_and_admin_service_fixture_contract — 7/7
  • cargo test --locked -p cmtraceopen-parser --test sccm_server_intake_fixture_contract — 1/1
  • cargo test --locked -p cmtraceopen-parser --test sccm_spine_contract — 61/61
  • cargo test --locked -p cmtraceopen-parser — 661 tests listed, green
  • cargo clippy --locked -p cmtraceopen-parser --all-targets -- -D warnings — green
  • cargo check --locked -p cmtraceopen-parser --target wasm32-unknown-unknown — green
  • npm exec -- tsc --noEmit — green
  • Rust 1.88 scoped rustfmt, JSON parse, and git diff --check — green

Review state

Draft pending exact-head CodeRabbit and an independent adversarial review. Issue stays open; compile success alone is not closure.

Summary by CodeRabbit

  • Documentation

    • Added guidance for preparing and interpreting Provider and Admin Service diagnostic data.
    • Documented evidence, privacy, provenance, completeness, coverage states, retry handling, and supported IIS boundaries.
  • Privacy

    • Improved redaction of authorization values, caller and query handles, and other sensitive diagnostic content while preserving safe status details.
  • Tests

    • Added comprehensive coverage for successful, failed, incomplete, timed-out, retried, contradictory, redacted, and rotation-boundary scenarios.
    • Added validation for artifact handling, transaction outcomes, evidence ordering, supplemental IIS data, and fail-closed behavior.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This change adds a synthetic SCCM Provider and Admin Service preparation corpus. It includes manifests, expected normalized outputs, rotation evidence, privacy redaction, preparation documentation, and extensive fixture-contract tests.

Changes

Provider and Admin Service corpus

Layer / File(s) Summary
Corpus contract and manifest topology
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/README.md, docs/sccm/preparation/..., crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/*/manifest.json
Defines source boundaries, privacy rules, evidence requirements, coverage states, and synthetic artifact manifests.
Scenario expectations and evidence
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/*/expected.json, crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/rotation-boundary/evidence/.../Smsprov.lo_
Adds expected normalized results for success, failure, incomplete, retry, contradiction, privacy, supplemental IIS, timeout, absent-source, unsupported-source, and rotation-boundary scenarios.
Provider-private evidence redaction
crates/cmtraceopen-parser/src/sccm/evidence.rs, crates/cmtraceopen-parser/tests/sccm_spine_contract.rs
Redacts authorization values, caller handles, query handles, and related sensitive fields while preserving approved diagnostic status fields.
Fixture contract and fail-closed validation
crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs
Validates schemas, topology, provenance, identity, evidence citations, privacy, rotation, retry recovery, mutation rejection, and fail-closed behavior.

Estimated code review effort: 4 (Complex) | ~60 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.77% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the preparation of the SCCM Provider and Admin Service test corpus.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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

@adamgell

Copy link
Copy Markdown
Owner Author

@coderabbitai review\n\nPlease review exact head 0144448492e3526e989eea12fdfd30b8014aa4b7. Treat skipped, rate-limited, status-only, or stale-head output as no approval.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026 •

Copy link
Copy Markdown

@adamgell I requested a review for exact head 0144448492e3526e989eea12fdfd30b8014aa4b7.

I will not treat skipped, rate-limited, status-only, or stale-head output as approval.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs (1)

428-1139: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider splitting schema_failures into per-section validators.

schema_failures validates manifest identity, topology, artifacts, profiles, coverage, transactions, source-local observations, and artifact requests in one function. Each section already appends to the same failures vector, so extraction is mechanical and behavior-preserving. Smaller functions such as manifest_failures, artifact_failures, transaction_failures, and request_failures make each gate easier to locate when a mutation case fails.

This is optional for this preparation-only PR.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs`
around lines 428 - 1139, Optionally split the monolithic schema_failures
validator into focused per-section helpers such as manifest/topology, artifact,
profile/coverage, transaction, source-local observation, and request validators.
Preserve the shared failures accumulation, validation order, and all existing
behavior while having schema_failures orchestrate the extracted functions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/sccm/preparation/issue-332-provider-admin-service-corpus.md`:
- Line 18: Update the issue-number sentence beginning “#332 keeps producer
role...” by prefixing it with “Issue,” producing “Issue `#332` keeps producer
role...”. Keep the issue number inline and do not add a space after “#”.

---

Nitpick comments:
In
`@crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs`:
- Around line 428-1139: Optionally split the monolithic schema_failures
validator into focused per-section helpers such as manifest/topology, artifact,
profile/coverage, transaction, source-local observation, and request validators.
Preserve the shared failures accumulation, validation order, and all existing
behavior while having schema_failures orchestrate the extracted functions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 27796d52-61e4-4f7c-b744-15d5a4137228

📥 Commits

Reviewing files that changed from the base of the PR and between 25b3733 and 0144448.

⛔ Files ignored due to path filters (13)
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-auth-failure/evidence/server-admin-service/admin-service-lab/current/AdminService.log is excluded by !**/*.log
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-backend-failure/evidence/server-admin-service/admin-service-lab/current/AdminService.log is excluded by !**/*.log
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-success/evidence/server-admin-service/admin-service-lab/current/AdminService.log is excluded by !**/*.log
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/evidence/server-admin-service-iis/admin-service-lab/current/u_ex_synthetic.log is excluded by !**/*.log
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/evidence/server-admin-service/admin-service-lab/current/AdminService.log is excluded by !**/*.log
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/incomplete/evidence/server-admin-service/admin-service-lab/current/AdminService.log is excluded by !**/*.log
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/evidence/server-admin-service/admin-service-lab/current/AdminService.log is excluded by !**/*.log
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/evidence/server-provider/provider-local/current/Smsprov.log is excluded by !**/*.log
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-authz-denied/evidence/server-provider/provider-local/current/Smsprov.log is excluded by !**/*.log
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-query-failure/evidence/server-provider/provider-local/current/Smsprov.log is excluded by !**/*.log
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-success/evidence/server-provider/provider-local/current/Smsprov.log is excluded by !**/*.log
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-timeout/evidence/server-provider/provider-local/current/Smsprov.log is excluded by !**/*.log
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/rotation-boundary/evidence/server-provider/provider-local/current/Smsprov.log is excluded by !**/*.log
📒 Files selected for processing (26)
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/README.md
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-auth-failure/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-auth-failure/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-backend-failure/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-backend-failure/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-success/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-success/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/incomplete/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/incomplete/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-authz-denied/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-authz-denied/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-query-failure/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-query-failure/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-success/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-success/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-timeout/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-timeout/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/rotation-boundary/evidence/server-provider/provider-local/lo_/Smsprov.lo_
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/rotation-boundary/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/rotation-boundary/manifest.json
  • crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs
  • docs/sccm/preparation/issue-332-provider-admin-service-corpus.md

@adamgell adamgell added test Testing related sccm SCCM/ConfigMgr related parser Log parser related enhancement New feature or request labels Jul 31, 2026
@adamgell

Copy link
Copy Markdown
Owner Author

@coderabbitai review

Please re-review exact head 0e9feef428d84074d432d86edf963335c0a677ca. The sole actionable MD018 finding from the prior exact-head review is fixed; the optional monolithic-test-validator refactor was intentionally not taken because it is a behavior-preserving low-value refactor outside this preparation slice. Focused corpus remains 7/7 green and the branch is otherwise unchanged.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026 •

Copy link
Copy Markdown

@adamgell I will re-review pull request #380 at exact head 0e9feef428d84074d432d86edf963335c0a677ca.

I will assess the MD018 fix and the changed corpus. I will not require the intentionally deferred behavior-preserving refactor for this preparation slice.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@adamgell adamgell added this to the SCCM End-to-End Diagnostics milestone Jul 31, 2026

@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.

BLOCK at exact head 0e9feef. The shipped 7 focused tests pass, but an uncommitted independent mutation probe demonstrated eight fail-open cases across version admission, topology/provenance, citation integrity, privacy, and exact topology cardinality. The exact-head CodeRabbit approval does not close these adversarial gaps; its second pass was incremental and log fixtures were excluded. Keep this preparation PR draft/open until permanent RED-to-GREEN regressions, aggregate gates, a fresh substantive CodeRabbit pass, and a different exact-head reviewer all clear.

@adamgell

Copy link
Copy Markdown
Owner Author

Claiming the exact-head #332 correction from 0e9feef428d84074d432d86edf963335c0a677ca in isolated worktree .worktrees/sccm-332-review-fix-0e9f, branch codex/sccm-332-review-fix-0e9f. Ownership is limited to sccm_server_provider_and_admin_service_fixture_contract.rs and any directly required #332 fixture/docs adjustments. I will preserve the independent review worktree, reproduce every accepted mutation permanently RED, implement the smallest contract fix, run the plan gates, verify the remote head before a non-force push to the PR branch, request fresh exact-head CodeRabbit, and leave the PR draft/open for a different reviewer.

@adamgell

Copy link
Copy Markdown
Owner Author

#332 review correction is pushed at exact head 8a07abf86864788595a54608e01f407da0e99c63 from isolated worktree .worktrees/sccm-332-review-fix-0e9f.

RED-to-GREEN matrix:

  • 13 permanent accepted mutations were reproduced RED: short and overlong synthetic versions; producer/endpoint host divergence; identity-bearing host, sanitized source path, and fingerprint; basename mismatch; duplicate sanitized physical identity; out-of-range and reversed source-local citations; private source-local and artifact-request reasons; and an unobserved exact endpoint.
  • The same 13 now fail closed. Focused Provider/Admin Service corpus is 8/8 green.

Minimal contract changes:

  • exact four-digit synthetic profile versions;
  • opaque bounded host/fingerprint handles;
  • exact source/rotation sanitized paths plus independent case-normalized physical-source uniqueness;
  • artifact host equals endpoint host and every exact endpoint is artifact-observed;
  • source-local line citations are physically bounded and ordered;
  • one recursive public-projection privacy gate covers every exported string.

Verification:

  • cargo test --locked -p cmtraceopen-parser --test sccm_server_provider_and_admin_service_fixture_contract — 8/8
  • server intake — 1/1
  • spine — 61/61
  • full parser — 662/662
  • default strict parser Clippy — green
  • Rust 1.88 wasm32 check — green
  • TypeScript, 22 fixture JSON documents, scoped Rust 1.88 rustfmt, and git diff --check — green
  • Rust 1.88 strict Clippy still reports the exact inherited 59 uninlined_format_args baseline outside changed files; workspace fmt still reports the inherited 17-file baseline. No changed-file lint/format debt.

All six handled independent-review threads were replied to and resolved; unresolved count will be audited after CodeRabbit. PR remains draft/open. No production reducer/native collector/live Windows acceptance claim. Fresh substantive exact-head CodeRabbit plus a different independent exact-head PASS are required before readiness.

@adamgell

Copy link
Copy Markdown
Owner Author

@coderabbitai review

Please perform a fresh substantive review of exact head 8a07abf86864788595a54608e01f407da0e99c63, including the full Provider/Admin Service contract rather than only the latest commit. Recheck version-profile admission, endpoint/producer-host binding, redacted provenance and physical-source collision identity, source-local physical line citations, privacy across every public string, exact topology cardinality, coverage/conservative confidence, determinism, and parser purity. The PR stays draft until this exact head and a different independent reviewer both clear.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026 •

Copy link
Copy Markdown

@adamgell I will perform a fresh substantive review of pull request #380 at exact head 8a07abf86864788595a54608e01f407da0e99c63.

I will review the full Provider/Admin Service contract. I will recheck version-profile admission, endpoint and producer-host binding, redacted provenance, physical-source collision identity, source-local line citations, public-string privacy, topology cardinality, coverage and confidence controls, determinism, and parser purity. I will not treat skipped, rate-limited, status-only, or stale-head output as approval.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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.

BLOCK at exact head 8a07abf86864788595a54608e01f407da0e99c63.

The shipped target is green, but disposable adversarial probes reproduced five contract failures, including persisted fixture edits that left all 8 focused tests green: u64 evidence lines wrap to a different u32 logical record; manifest/public privacy leaks survive; split rotations accept divergent lineage; invalid-offset incomplete work accepts a high confidence ceiling; and a generic unbounded request reason is accepted.

Fresh verification on the clean detached exact-head worktree:

  • focused #332: 8/8
  • server intake: 1/1
  • spine: 61/61
  • full parser: 662/662
  • default strict parser Clippy: pass
  • Rust 1.88 wasm32 check: pass
  • TypeScript, 22 JSON documents, scoped Rust 1.88 rustfmt, and diff checks: pass
  • workspace Rust 1.88 fmt remains the inherited 17-file / 24-hunk baseline; Rust 1.88 strict Clippy remains the inherited 59 uninlined_format_args diagnostics, with no changed-file overlap.

CodeRabbit is not yet an exact-head approval: the hosted bot has only acknowledged the 8a07abf8 request, the prior approval is stale at 0e9feef4, and the exact-head CLI review was rate-limited for 16 minutes. Keep this PR draft/open until these findings are fixed, a different reviewer re-runs persisted adversarial probes, and a substantive formal CodeRabbit review is anchored to the new exact head.

@adamgell

Copy link
Copy Markdown
Owner Author

Correction-round ownership claim (independent review 4826128919)

  • Issue/PR: SCCM Server: diagnose SMS Provider and Admin Service workflows #332 / test(sccm): prepare Provider and Admin Service corpus #380 only
  • Worktree: /Users/Adam.Gell/repo/cmtraceopen/.worktrees/sccm-332-fix-8a07-round2
  • Local branch: codex/sccm-332-fix-8a07-round2
  • Exact base/head verified: 8a07abf
  • Remote PR state verified before edits: OPEN, draft, base codex/parser-family-skeleton, head codex/sccm-332-provider-admin-service-corpus
  • Owned file: crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs
  • Owned fixtures if a contract correction requires them: crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/{provider-success,provider-timeout,rotation-boundary}/manifest.json and expected.json
  • Scope: permanent adversarial mutations and the smallest fail-closed contract fixes for u64-to-u32 citation overflow, whole-manifest/public privacy, divergent split-rotation lineage, incomplete/invalid-offset confidence ceilings, and exact bounded artifact requests.

I will demonstrate focused RED before implementation, run the full prescribed gate matrix, verify the remote head is unchanged, then push non-force to the existing PR branch. I will not merge or expand shared #318 contracts.

@adamgell

Copy link
Copy Markdown
Owner Author

#332 second independent-review correction is pushed at exact head 8c4e0ceba2355a41bfd6a329e4a110aee4fb3de8 from isolated worktree /Users/Adam.Gell/repo/cmtraceopen/.worktrees/sccm-332-fix-8a07-round2.

RED-to-green matrix:

  • overflowing_transaction_citation_lines_fail_closed: accepted u64::from(u32::MAX) + 2 at 8a07abf8; now checked before physical and exact logical-record lookup.
  • exported_manifest_and_expected_strings_fail_closed_on_private_shapes: accepted email-bearing lineage and a domain identity + DELETE query + token-shaped public summary; now manifest and expected use one recursive privacy gate, closed lineage tokens, and exact narrative allowlists.
  • split_rotation_members_with_divergent_lineage_fail_closed: accepted different lineage IDs; now the cited current/lo_ pair must share source, endpoint, producer host, and lineage.
  • incomplete_invalid_offset_transaction_cannot_claim_high_ceiling: accepted high; now the ceiling is derived from timestamp usability, terminal evidence, coverage gaps, and completeness, and pinned in the exact outcome matrix.
  • generic_artifact_request_reason_fails_closed: accepted Collect logs.; now each request is an exact logical-source + unresolved-basis pair.

Focused RED was 8 passed / 5 failed. Focused GREEN is 13/13.

Fresh verification at 8c4e0ceb:

  • cargo +1.88.0 test --locked -p cmtraceopen-parser --test sccm_server_provider_and_admin_service_fixture_contract — 13/13
  • cargo +1.88.0 test --locked -p cmtraceopen-parser --test sccm_server_intake_fixture_contract — 1/1
  • cargo +1.88.0 test --locked -p cmtraceopen-parser --test sccm_spine_contract — 61/61
  • cargo +1.88.0 test --locked -p cmtraceopen-parser — 667/667
  • cargo clippy --locked -p cmtraceopen-parser --all-targets -- -D warnings — green
  • cargo +1.88.0 check --locked -p cmtraceopen-parser --target wasm32-unknown-unknown — green
  • npm exec tsc -- --noEmit — green
  • all 22 SCCM Server: diagnose SMS Provider and Admin Service workflows #332 JSON documents via jq empty — green
  • scoped Rust 1.88 rustfmt and git diff --check — green

Inherited baselines remain outside the owned file: Rust 1.88 workspace fmt reports 24 hunks across 17 unrelated files; Rust 1.88 strict Clippy reports 59 unrelated uninlined_format_args diagnostics. All five handled independent-review threads were replied to and resolved; unresolved count is 0.

CodeRabbit CLI 0.7.1 was invoked on the one-file uncommitted diff and returned a 15-minute rate limit, which is not approval. A fresh hosted full-range exact-head review is being requested separately. PR remains draft/open. No production reducer, native collector, or live Windows acceptance claim.

@adamgell

Copy link
Copy Markdown
Owner Author

@coderabbitai review

Please perform a fresh substantive full-range review of exact head 8c4e0ceba2355a41bfd6a329e4a110aee4fb3de8 against base codex/parser-family-skeleton, not only the newest commit. Re-run adversarial analysis for checked citation widths and exact physical/logical evidence binding; privacy on every manifest and expected string; current/lo_ source/endpoint/host/lineage compatibility; evidence-derived confidence ceilings for invalid-offset/incomplete states; and exact bounded artifact-request basis. Also recheck versioned profiles, topology, coverage semantics, determinism, parser purity, and wasm compatibility.

The PR remains draft/open. An acknowledgment, skipped review, rate limit, status-only response, incremental stale-head review, or prior approval is not exact-head approval.

@adamgell

Copy link
Copy Markdown
Owner Author

Independent exact-head review claim (agent review_332_8c4e_exact)

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Your plan includes PR reviews subject to rate limits. More reviews will be available in 36 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.

BLOCK — independent exact-head review at 8c4e0ce. GitHub rejected the attempted REQUEST_CHANGES event because this authenticated identity owns the PR; this formal COMMENT review records the same blocking disposition. Six disposable, on-disk adversarial mutations beyond the 13 shipped regressions each left the full focused corpus 13/13 green; the inline findings identify the fail-open contracts. The issue acceptance also still asks for a retry fixture, and the program workflow gate requires contradictory evidence; neither has an explicit scenario. Clean-head gates are otherwise green: #332 13/13, server intake 1/1, spine 61/61, full parser 667/667, default strict Clippy, Rust 1.88 wasm32, TypeScript, 22 JSON files, scoped rustfmt, and feature diff-check. Rust 1.88 Clippy and workspace fmt reproduce only the inherited 59 uninlined-format-args and 17-file format baselines outside this PR. Hosted CodeRabbit was requested for this exact head but returned a 36-minute fair-use rate limit (not substantive approval); CLI 0.7.1 separately returned a one-minute rate limit. PR must remain draft/open.

@adamgell

Copy link
Copy Markdown
Owner Author

RED frozen in issue-scoped commit 24ab957e43463b6fb20dd18a5f34a324a1ad1efa (not yet pushed to the PR branch).

Evidence:

  • cargo test --locked -p cmtraceopen-parser --test sccm_spine_contract evidence_public_message_projection_redacts_provider_handles_in_all_positions -- --exact => 0/1; independently reproduced QueryHandle=SELECT 1; DROP TABLE private_object; status=80 tail leakage, then AuthorizationHeader=Custom private-credential-value; status=81 leakage.
  • cargo test --locked -p cmtraceopen-parser --test sccm_server_provider_and_admin_service_fixture_contract => 25 passed / 4 intentionally failed: required-phase omission accepted for both Provider/Admin Service, unrecovered receive-phase retry accepted, stale dependency lifecycle across 20 scenarios, and rejected-segment diagnostic leaked raw value.
  • Seven synthetic coverage scenarios were added for absent/accessDenied/capped/skipped/unsupported/parseFailed plus blocked/deferred; their non-outcome assertions pass.

No implementation behavior changed in the RED commit.

@adamgell

Copy link
Copy Markdown
Owner Author

🟢 #332 review-blocker remediation — exact head d27b8f2

Pushed two issue-scoped commits without force:

  • RED: 24ab957e43463b6fb20dd18a5f34a324a1ad1efa
  • GREEN: d27b8f26cc14662b685d003cccaa71deb489a2de

Six formal review findings closed in this slice

  1. Provider/Admin authorization header and query-tail privacy now stays redacted, including multi-statement SQL and adjacent sensitive labels, while existing safe path preservation remains intact.
  2. Successful Provider/Admin transactions now require and cite the complete ordered layer sequence.
  3. Retryable failures require later recovery in the same phase; the retry corpus has an exact recovery sequence.
  4. The fixture matrix now explicitly covers absent, access-denied, capped, skipped, unsupported, malformed/parse-failed, and blocked/deferred coverage without treating non-capture as proof.
  5. All 20 scenarios use the reviewed dependency lifecycle preparationOnlyReviewedDependenciesAvailable.
  6. Rejected-segment diagnostics identify only the segment index and never echo raw private content.

RED → GREEN evidence

Before production changes, the focused provider target had 25 pass / 4 intentional fail:

  • missing complete phase sequences for Provider/Admin success;
  • wrong-phase recovery accepted;
  • stale lifecycle across the scenario corpus;
  • rejected diagnostic leaked raw content.

The SCCM spine privacy test independently failed for both:

  • QueryHandle=SELECT 1; DROP TABLE private_object; status=80
  • AuthorizationHeader=Custom private-credential-value; status=81

After the minimal implementation:

  • cargo test --locked -p cmtraceopen-parser --test sccm_server_provider_and_admin_service_fixture_contract — 29/29 pass
  • cargo test --locked -p cmtraceopen-parser --test sccm_spine_contract — 137/137 pass
  • cargo test --locked -p cmtraceopen-parser --test sccm_server_intake_fixture_contract — 1/1 pass (the plan name sccm_server_intake is not an existing test target)
  • cargo test --locked -p cmtraceopen-parser — pass
  • cargo clippy --locked -p cmtraceopen-parser --all-targets -- -D warnings — pass
  • cargo +1.88.0 check --locked -p cmtraceopen-parser --target wasm32-unknown-unknown — pass
  • npm run frontend:build — pass (existing Vite dynamic-import warning only)
  • scoped rustfmt +1.88.0 --edition 2021 --check on changed Rust files — pass
  • all 40 JSON fixture files via jq empty — pass
  • git diff --check 91e4c07b..d27b8f26 and worktree git diff --check — pass

Repository-wide cargo fmt --check --all remains RED on the same inherited 17 unrelated files / 24 hunks, with zero overlap with this #332 slice. No unrelated formatting was committed.

Fixture/dependency state

PR remains draft and unmerged.

@adamgell

Copy link
Copy Markdown
Owner Author

@coderabbitai review

Please review exact head d27b8f26cc14662b685d003cccaa71deb489a2de. The six prior-head review threads were fixed with RED → GREEN evidence, replied to individually, and resolved. Treat the earlier approval on 91e4c07b as stale; this exact head requires a fresh review before merge.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='91e4c07bef53ea4e7a5b44cadddb17a02231a25d'
head='d27b8f26cc14662b685d003cccaa71deb489a2de'
contract='crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs'
spine='crates/cmtraceopen-parser/tests/sccm_spine_contract.rs'
evidence='crates/cmtraceopen-parser/src/sccm/evidence.rs'
fixtures='crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service'

echo '== Exact head and ancestry =='
printf 'checked_out='; git rev-parse HEAD
git show -s --format='head=%H%nparents=%P%nsubject=%s' "$head"
git merge-base --is-ancestor "$base" "$head"
echo 'base_is_ancestor=true'

echo '== Correction-range commits and changed paths =='
git log --format='%H %s' "${base}..${head}"
git diff --name-status "${base}..${head}"
git diff --check "${base}..${head}"
echo 'diff_check=clean'

echo '== Changed-source outlines =='
for file in "$evidence" "$contract" "$spine"; do
  if git diff --quiet "${base}..${head}" -- "$file"; then
    continue
  fi
  echo "--- $file ---"
  ast-grep outline "$file" --items all --type function --view expanded
done

echo '== Privacy projection and rejected-diagnostic changes =='
git diff --unified=40 "${base}..${head}" -- "$evidence" "$spine"

echo '== Fixture contract changes =='
git diff --unified=30 "${base}..${head}" -- "$contract"

echo '== Contract-invariant locations =='
rg -n -C3 --glob 'sccm_server_provider_and_admin_service_fixture_contract.rs' \
  'required.*phase|phase.*required|retryableFailure|recovery|coverage|accessDenied|parseFailed|blocked|deferred|preparationOnlyReviewedDependenciesAvailable|rejected.*segment|diagnostic|disposition|confidence|terminal' \
  crates/cmtraceopen-parser/tests

echo '== Fixture corpus inventory and JSON syntax =='
fd -e json -t f . "$fixtures" | sort
fd -e json -t f . "$fixtures" -x jq empty '{}'
echo 'json_syntax=valid'

echo '== Production source scope =='
git diff --name-only "${base}..${head}" | awk '
  /^crates\/cmtraceopen-parser\/src\// { print "production_source_change=" $0 }
'

echo '== Network/database/process indicators added in production and tests =='
git diff --unified=0 "${base}..${head}" -- \
  crates/cmtraceopen-parser/src crates/cmtraceopen-parser/tests |
  rg -n '^\+.*\b(TcpStream|UdpSocket|reqwest|hyper|sqlx|rusqlite|diesel|Command|Child|std::process|tokio::net)\b' \
  && exit 1 || true
echo 'impurity_indicators=none'

Length of output: 194173


🏁 Script executed:

#!/bin/bash
set -euo pipefail

root='crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service'
evidence='crates/cmtraceopen-parser/src/sccm/evidence.rs'
contract='crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs'

echo '== Redaction implementation context =='
sed -n '90,225p' "$evidence"

echo '== Exact contract validation context =='
sed -n '723,1020p;1120,1540p;1815,2060p' "$contract"

echo '== Independent corpus consistency checks =='
python3 - <<'PY'
from __future__ import annotations
import json
import re
from collections import Counter
from pathlib import Path

root = Path("crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service")
required_state = "preparationOnlyReviewedDependenciesAvailable"
states = {"captured", "absent", "accessDenied", "capped", "skipped", "unsupported", "parseFailed"}
private = re.compile(
    r"(@|\\\\|https?://|\b(?:select|insert|update|delete|drop|bearer|token|password|secret)\b|"
    r"ghp_|github_pat_|eyj)",
    re.IGNORECASE,
)
log_re = re.compile(r"<!\[LOG\[(.*?)\]LOG\]!>")
prefix = "SYNTHETIC FIXTURE; "
errors = []
counts = Counter()

def strings(value):
    if isinstance(value, str):
        yield value
    elif isinstance(value, list):
        for item in value:
            yield from strings(item)
    elif isinstance(value, dict):
        for item in value.values():
            yield from strings(item)

for directory in sorted(path for path in root.iterdir() if path.is_dir()):
    scenario = directory.name
    manifest_path, expected_path = directory / "manifest.json", directory / "expected.json"
    if not manifest_path.is_file() or not expected_path.is_file():
        errors.append(f"{scenario}: missing contract document")
        continue
    counts["scenarios"] += 1
    counts["documents"] += 2
    manifest = json.loads(manifest_path.read_text())
    expected = json.loads(expected_path.read_text())
    if expected.get("contractState") != required_state:
        errors.append(f"{scenario}: stale contract state")
    artifacts = manifest.get("artifacts")
    coverage = expected.get("coverage")
    if not isinstance(artifacts, list) or not isinstance(coverage, list):
        errors.append(f"{scenario}: artifacts or coverage is not an array")
        continue
    counts["artifacts"] += len(artifacts)
    artifact_by_id = {a.get("artifactId"): a for a in artifacts}
    if len(artifact_by_id) != len(artifacts):
        errors.append(f"{scenario}: duplicate artifact identifier")
    if [row.get("artifactId") for row in coverage] != [a.get("artifactId") for a in artifacts]:
        errors.append(f"{scenario}: coverage is not the ordered artifact projection")
    records = {}
    for artifact in artifacts:
        aid, state = artifact.get("artifactId"), artifact.get("captureState")
        if state not in states:
            errors.append(f"{scenario}/{aid}: unsupported coverage state {state!r}")
        relative = artifact.get("relativePath")
        if state in {"absent", "accessDenied", "skipped", "unsupported"}:
            if relative is not None:
                errors.append(f"{scenario}/{aid}: nonphysical state has evidence path")
            continue
        if not isinstance(relative, str):
            errors.append(f"{scenario}/{aid}: physical state lacks evidence path")
            continue
        path = directory / relative
        if not path.is_file():
            errors.append(f"{scenario}/{aid}: missing evidence file")
            continue
        raw = path.read_bytes()
        if artifact.get("bytesCopied") != len(raw):
            errors.append(f"{scenario}/{aid}: byte count mismatch")
        for line_no, line in enumerate(path.read_text().splitlines(), 1):
            m = log_re.search(line)
            if not m or not m.group(1).startswith(prefix):
                continue
            fields = {}
            for part in m.group(1)[len(prefix):].split("; "):
                if "=" not in part:
                    continue
                key, value = part.split("=", 1)
                fields[key] = value
            records[(aid, line_no)] = fields
    for document_name, document in (("manifest", manifest), ("expected", expected)):
        for text in strings(document):
            if private.search(text):
                errors.append(f"{scenario}/{document_name}: private exported shape {text!r}")
    for transaction in expected.get("transactions", []):
        key = transaction.get("key", {})
        cited = set()
        for observation in transaction.get("observations", []):
            for ref in observation.get("evidence", []):
                aid, start, end = ref.get("artifactId"), ref.get("startLine"), ref.get("endLine")
                if not isinstance(start, int) or not isinstance(end, int) or start < 1 or end < start:
                    errors.append(f"{scenario}: invalid citation range")
                    continue
                for line in range(start, end + 1):
                    cited.add((aid, line))
                    fields = records.get((aid, line))
                    if fields is None:
                        errors.append(f"{scenario}: cited record absent {aid}:{line}")
                        continue
                    for name, value in {
                        "RequestId": key.get("requestId"),
                        "OperationHandle": key.get("operationHandle"),
                        "EndpointId": key.get("endpointId"),
                        "Layer": transaction.get("layer"),
                        "ProfileId": key.get("extractionProfileId"),
                        "Phase": observation.get("phase"),
                        "Disposition": observation.get("disposition"),
                        "Terminal": str(observation.get("terminal")).lower(),
                    }.items():
                        if fields.get(name) != value:
                            errors.append(f"{scenario}: evidence field mismatch {aid}:{line}:{name}")
        for (aid, line), fields in records.items():
            exact = all((
                fields.get("RequestId") == key.get("requestId"),
                fields.get("OperationHandle") == key.get("operationHandle"),
                fields.get("EndpointId") == key.get("endpointId"),
                fields.get("Layer") == transaction.get("layer"),
                fields.get("ProfileId") == key.get("extractionProfileId"),
            ))
            if exact and (aid, line) not in cited:
                errors.append(f"{scenario}: uncited exact-key record {aid}:{line}")
    if any(a.get("captureState") in states - {"captured", "capped"} for a in artifacts):
        if expected.get("transactions") and scenario != "blocked-deferred":
            errors.append(f"{scenario}: noncaptured coverage produced a transaction")

print(f"scenarios={counts['scenarios']}")
print(f"artifacts={counts['artifacts']}")
print(f"json_documents={counts['documents']}")
if errors:
    print("\n".join(errors))
    raise SystemExit(1)
print("contract_state=valid")
print("coverage_projections=valid")
print("evidence_binding=valid")
print("public_string_privacy_static_scan=valid")
PY

echo '== Changed production source does not add parsing, IO, or network APIs =='
git diff --unified=0 91e4c07bef53ea4e7a5b44cadddb17a02231a25d..d27b8f26cc14662b685d003cccaa71deb489a2de \
  -- "$evidence" |
  rg -n '^\+.*\b(fs::|File|read_to|write|Tcp|Udp|http|reqwest|sql|Command|process)\b' \
  && exit 1 || true
echo 'projection_scope=local_string_transformation_only'

Length of output: 55204


🏁 Script executed:

#!/bin/bash
set -euo pipefail

root='crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service'

echo '== New coverage contracts =='
for scenario in \
  admin-service-access-denied \
  admin-service-parse-failed \
  admin-service-skipped \
  blocked-deferred \
  provider-source-absent \
  provider-source-capped \
  provider-source-unsupported
do
  echo "--- ${scenario}/manifest.json ---"
  jq -S . "$root/$scenario/manifest.json"
  echo "--- ${scenario}/expected.json ---"
  jq -S . "$root/$scenario/expected.json"
done

echo '== Corrected independent corpus validation =='
python3 - <<'PY'
from __future__ import annotations
import json
import re
from collections import Counter
from pathlib import Path

root = Path("crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service")
private = re.compile(
    r"(@|\\\\|https?://|ghp_|github_pat_|eyj|"
    r"(?<![a-z-])(?:select|insert|update|delete|drop)(?![a-z-]))",
    re.IGNORECASE,
)
states = {"captured", "absent", "accessDenied", "capped", "skipped", "unsupported", "parseFailed"}
errors: list[str] = []
counts: Counter[str] = Counter()

def strings(value):
    if isinstance(value, str):
        yield value
    elif isinstance(value, list):
        for item in value:
            yield from strings(item)
    elif isinstance(value, dict):
        for item in value.values():
            yield from strings(item)

for directory in sorted(path for path in root.iterdir() if path.is_dir()):
    scenario = directory.name
    manifest = json.loads((directory / "manifest.json").read_text())
    expected = json.loads((directory / "expected.json").read_text())
    counts["scenarios"] += 1
    counts["documents"] += 2
    artifacts = manifest["artifacts"]
    counts["artifacts"] += len(artifacts)

    if expected.get("contractState") != "preparationOnlyReviewedDependenciesAvailable":
        errors.append(f"{scenario}: stale dependency lifecycle")
    if [row.get("artifactId") for row in expected.get("coverage", [])] != [
        item.get("artifactId") for item in artifacts
    ]:
        errors.append(f"{scenario}: coverage projection mismatch")

    noncaptured = False
    for artifact in artifacts:
        state = artifact.get("captureState")
        if state not in states:
            errors.append(f"{scenario}: unsupported capture state {state!r}")
        noncaptured |= state in states - {"captured", "capped"}
        relative = artifact.get("relativePath")
        if state in {"absent", "accessDenied", "skipped", "unsupported"}:
            if relative is not None:
                errors.append(f"{scenario}: nonphysical state has a relativePath")
        elif not isinstance(relative, str) or not (directory / relative).is_file():
            errors.append(f"{scenario}: physical state has no evidence file")
    if noncaptured and expected.get("transactions") and scenario != "blocked-deferred":
        errors.append(f"{scenario}: noncaptured coverage has transactions")

    for document_name, document in (("manifest", manifest), ("expected", expected)):
        for value in strings(document):
            if private.search(value):
                errors.append(f"{scenario}/{document_name}: unsafe public value {value!r}")

if errors:
    print("\n".join(errors))
    raise SystemExit(1)
print(f"scenarios={counts['scenarios']}")
print(f"artifacts={counts['artifacts']}")
print(f"json_documents={counts['documents']}")
print("dependency_lifecycle=valid")
print("coverage_and_nonoutcome_semantics=valid")
print("public_string_privacy_static_scan=valid")
PY

echo '== Sensitive-marker test cases in the correction range =='
sed -n '4565,4875p' crates/cmtraceopen-parser/tests/sccm_spine_contract.rs

Length of output: 33611


@adamgell I reviewed exact head d27b8f26cc14662b685d003cccaa71deb489a2de.

I found no actionable defect in the reviewed range from 91e4c07bef53ea4e7a5b44cadddb17a02231a25d.

The correction range includes the six stated controls:

  • The public projection redacts AuthorizationHeader values and multi-statement QueryHandle values. It preserves only allowlisted safe tail fields.
  • Successful Provider and Admin Service transactions require the complete ordered phase sequence.
  • A retryableFailure requires a later successful observation in the same phase. The Provider retry scenario requires the exact recovery sequence.
  • The corpus covers absent, accessDenied, capped, skipped, unsupported, parseFailed, and blocked/deferred states without converting non-capture into an outcome.
  • All 20 expected documents use preparationOnlyReviewedDependenciesAvailable.
  • Rejected fixture-segment diagnostics report the segment index and do not echo the raw segment value.

Independent static checks confirmed:

  • 20 scenarios, 23 artifacts, and 40 JSON documents.
  • Valid JSON and clean diff whitespace.
  • Exact coverage projections and non-outcome coverage behavior.
  • Valid transaction-to-evidence binding and no uncited exact-key evidence record.
  • No private shapes in manifest or expected JSON strings.
  • No added network, database, process-launch, or IO behavior in the changed code.

This environment cannot independently run Rust tests, Clippy, TypeScript, or WebAssembly checks. I did not verify those execution results.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/cmtraceopen-parser/src/sccm/evidence.rs (1)

236-274: 🔒 Security & Privacy | 🔴 Critical | ⚡ Quick win

Overlapping identity matches leak usernames when a longer redaction range extends beyond an earlier match.

The redact_windows_identities function merges ranges from windows_identity_re() and windows_user_path_identity_re(), then processes them with a loop that skips ranges where start < copied_through without extending copied_through to that range's end. When a shorter match is processed first and a longer overlapping match is skipped, the unredacted tail of the longer match is copied into the output.

Example: input "users\ADMIN\secret"

  • windows_identity_re() matches (0, 11): "users\ADMIN". This range is kept.
  • windows_user_path_identity_re() identity captures (6, 18): "ADMIN\secret". This range overlaps.
  • After sorting: [(0, 11), (6, 18)]
  • The loop redacts (0, 11) and sets copied_through = 11. The range (6, 18) is skipped because 6 < 11. The final output includes "\secret" unredacted.

This affects message, component, and ccm_source_file fields (all routed through project_public_text_v1 → redact_windows_identities). The fix merges overlapping ranges instead of skipping them:

Proposed fix
     identity_ranges.sort_unstable();
     identity_ranges.dedup();
 
-    for (start, end) in identity_ranges {
-        if start < copied_through {
-            continue;
-        }
-
+    let mut merged_ranges: Vec<(usize, usize)> = Vec::with_capacity(identity_ranges.len());
+    for (start, end) in identity_ranges {
+        match merged_ranges.last_mut() {
+            Some(last) if start <= last.1 => last.1 = last.1.max(end),
+            _ => merged_ranges.push((start, end)),
+        }
+    }
+
+    for (start, end) in merged_ranges {
         projected.push_str(&value[copied_through..start]);
         projected.push_str(PUBLIC_MESSAGE_REDACTION);
         copied_through = end;
     }

Add a regression test exercising the overlapping case:

#[test]
fn export_redacts_username_in_multi_segment_windows_profile_path() {
    let raw_message = r"Policy stored at C:\Users\CONTOSO\jdoe\AppData\Local\ccmcache";
    // ... build artifact/record as in `export_redaction_does_not_mutate_raw_snapshot`
    // assert exported message/component/ccm_source_file do not contain "jdoe"
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/cmtraceopen-parser/src/sccm/evidence.rs` around lines 236 - 274,
Update redact_windows_identities to merge overlapping or adjacent
identity_ranges before redaction, extending the existing range’s end rather than
skipping a later range that starts before copied_through. Add a regression test
for a multi-segment Windows profile path such as the provided jdoe example,
verifying exported message, component, and ccm_source_file values contain no
username while preserving the raw snapshot.
♻️ Duplicate comments (1)
crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs (1)

274-285: 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Report the segment index instead of the parsed field name.

Line 278 interpolates name. split_once('=') splits on the first =, so a rejected segment can place private text in name. For the segment Bearer private-token=x, the diagnostic contains Bearer private-token. The no-= path at line 276 already avoids this by reporting the index only. Apply the same rule to the unsupported-field path.

🔒️ Proposed fix
         if !allowed.contains(&name) || value.is_empty() {
-            return Err(format!("unsupported or empty fixture field {name}"));
+            return Err(format!(
+                "unsupported or empty fixture field at segment {segment_index}"
+            ));
         }

Extend rejected_fixture_segment_diagnostic_omits_raw_value with a segment such as Bearer private-credential-value=1 to keep this closed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs`
around lines 274 - 285, Update the unsupported or empty fixture-field error in
the segment-validation logic to report segment_index instead of the parsed name,
preventing private text before the first '=' from entering diagnostics. Preserve
the existing validation behavior and extend
rejected_fixture_segment_diagnostic_omits_raw_value with a sensitive segment
such as Bearer private-credential-value=1.
🧹 Nitpick comments (1)
crates/cmtraceopen-parser/tests/sccm_spine_contract.rs (1)

4603-4686: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add coverage for the AuthorizationToken variant alongside AuthorizationHeader.

The regex in evidence.rs recognizes both authorization header and authorization token variants, but this test suite only exercises AuthorizationHeader (case 10, Lines 4650-4654). The past review explicitly asked for "permanent variants" for authorization header/token. Add a case for AuthorizationToken=... to confirm the token variant redacts correctly and preserves the safe tail, closing the validation gap for this security-sensitive fix.

✅ Suggested additional case
         (
             "AuthorizationHeader=Custom private-credential-value; status=81",
             "private-credential-value",
             Some("status=81"),
         ),
+        (
+            "AuthorizationToken=private-auth-token-value; status=82",
+            "private-auth-token-value",
+            Some("status=82"),
+        ),
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/cmtraceopen-parser/tests/sccm_spine_contract.rs` around lines 4603 -
4686, Extend the cases in
evidence_public_message_projection_redacts_provider_handles_in_all_positions
with an AuthorizationToken=... entry alongside the existing AuthorizationHeader
case, using a sensitive token value and a status field as the safe tail. Ensure
the test verifies the token value is redacted while the status tail remains in
the projected message.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@crates/cmtraceopen-parser/src/sccm/evidence.rs`:
- Around line 236-274: Update redact_windows_identities to merge overlapping or
adjacent identity_ranges before redaction, extending the existing range’s end
rather than skipping a later range that starts before copied_through. Add a
regression test for a multi-segment Windows profile path such as the provided
jdoe example, verifying exported message, component, and ccm_source_file values
contain no username while preserving the raw snapshot.

---

Duplicate comments:
In
`@crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs`:
- Around line 274-285: Update the unsupported or empty fixture-field error in
the segment-validation logic to report segment_index instead of the parsed name,
preventing private text before the first '=' from entering diagnostics. Preserve
the existing validation behavior and extend
rejected_fixture_segment_diagnostic_omits_raw_value with a sensitive segment
such as Bearer private-credential-value=1.

---

Nitpick comments:
In `@crates/cmtraceopen-parser/tests/sccm_spine_contract.rs`:
- Around line 4603-4686: Extend the cases in
evidence_public_message_projection_redacts_provider_handles_in_all_positions
with an AuthorizationToken=... entry alongside the existing AuthorizationHeader
case, using a sensitive token value and a status field as the safe tail. Ensure
the test verifies the token value is redacted while the status tail remains in
the projected message.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8b4261c7-d52e-416f-b95c-7d5cc6b41f88

📥 Commits

Reviewing files that changed from the base of the PR and between 3d7e31d and d27b8f2.

⛔ Files ignored due to path filters (6)
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-parse-failed/evidence/server-admin-service/admin-service-lab/current/AdminService.log is excluded by !**/*.log
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/blocked-deferred/evidence/server-admin-service/admin-service-lab/current/AdminService.log is excluded by !**/*.log
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/evidence/server-admin-service/admin-service-lab/current/AdminService.log is excluded by !**/*.log
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/evidence/server-admin-service/admin-service-lab/current/AdminService.log is excluded by !**/*.log
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/evidence/server-provider/provider-local/current/Smsprov.log is excluded by !**/*.log
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-capped/evidence/server-provider/provider-local/current/Smsprov.log is excluded by !**/*.log
📒 Files selected for processing (34)
  • crates/cmtraceopen-parser/src/sccm/evidence.rs
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/README.md
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-access-denied/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-access-denied/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-auth-failure/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-backend-failure/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-parse-failed/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-parse-failed/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-skipped/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-skipped/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-success/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/blocked-deferred/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/blocked-deferred/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/contradictory-evidence/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/incomplete/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-authz-denied/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-query-failure/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-retry/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-absent/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-absent/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-capped/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-capped/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-unsupported/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-unsupported/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-success/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-timeout/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/rotation-boundary/expected.json
  • crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs
  • crates/cmtraceopen-parser/tests/sccm_spine_contract.rs
  • docs/sccm/preparation/issue-332-provider-admin-service-corpus.md
🚧 Files skipped from review as they are similar to previous changes (15)
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/incomplete/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-backend-failure/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-authz-denied/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-auth-failure/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-retry/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/rotation-boundary/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-timeout/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-success/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-success/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-query-failure/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/contradictory-evidence/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/expected.json

@adamgell

Copy link
Copy Markdown
Owner Author

Critical exact-head CodeRabbit finding is accepted and assigned to fresh root-owned worktree .worktrees/sccm-332-d27b-privacy-fix at exact base d27b8f26cc14662b685d003cccaa71deb489a2de.

Review: #380 (review)

The overlapping Windows-identity ranges can expose the tail of the longer match across public message/component/ccmSourceFile projections. I am freezing this as a focused RED regression before the minimal range-merge implementation, plus the requested AuthorizationToken permanent case. PR remains draft/unmerged and the current CodeRabbit result is a blocker, not approval.

@adamgell

Copy link
Copy Markdown
Owner Author

Critical CodeRabbit privacy correction — exact head 59af7b5

Pushed non-force after guarding remote d27b8f2:

  • RED 814f784: public export leaked secret from overlapping users\\ADMIN\\secret ranges; fixture rejection echoed private-credential-value; AuthorizationToken permanent case added and already green.
  • GREEN 59af7b5: overlapping/adjacent ranges are unioned before public redaction, and rejected fixture fields report only segment index.

The permanent unit regression proves message, component, and ccmSourceFile public projections omit both private identity segments while the crate-private raw snapshot remains unchanged. The provider-handle matrix now covers AuthorizationToken alongside AuthorizationHeader.

Exact-head verification:

  • focused overlap, diagnostic, AuthorizationToken: 3/3
  • provider/Admin contract: 29/29
  • SCCM spine: 137/137
  • full parser suite: pass (352 unit tests plus all integration targets)
  • strict Clippy: pass
  • Rust 1.88 wasm32: pass
  • frontend build: pass
  • 40 JSON contracts: pass
  • scoped Rust 1.88 rustfmt, diff check, clean status: pass
  • global fmt: same inherited 17 non-SCCM Server: diagnose SMS Provider and Admin Service workflows #332 paths only

CodeRabbit review #4828660001 is addressed. This PR remains draft/unmerged pending a fresh substantive exact-head CodeRabbit result and a different independent exact-head review. No live Windows/SCCM Server acceptance is claimed.

@adamgell

Copy link
Copy Markdown
Owner Author

@coderabbitai review

Please perform a fresh substantive review of exact head 59af7b5f. Verify the overlapping-range union across public message/component/ccmSourceFile, raw-snapshot non-mutation, index-only rejected diagnostics, and AuthorizationToken coverage. Review all new commits since d27b8f26; a skipped or rate-limited result is not approval.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='d27b8f26cc14662b685d003cccaa71deb489a2de'
head='59af7b5f'
evidence='crates/cmtraceopen-parser/src/sccm/evidence.rs'
spine='crates/cmtraceopen-parser/tests/sccm_spine_contract.rs'
contract='crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs'
fixtures='crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service'

echo '== Exact head and ancestry =='
printf 'checked_out='
git rev-parse HEAD
git rev-parse "${head}^{commit}"
git show -s --format='head=%H%nparents=%P%nsubject=%s' "$head"
git merge-base --is-ancestor "$base" "$head"
echo 'base_is_ancestor=true'

echo '== Reviewed commits and changed paths =='
git log --format='%H %s' "${base}..${head}"
git diff --name-status "${base}..${head}"
git diff --check "${base}..${head}"
echo 'diff_check=clean'

echo '== Changed source outline =='
for file in "$evidence" "$spine" "$contract"; do
  if ! git diff --quiet "${base}..${head}" -- "$file"; then
    echo "--- ${file} ---"
    ast-grep outline "$file" --items all --type function --view expanded
  fi
done

echo '== Exact implementation and test diff =='
git diff --unified=60 "${base}..${head}" -- "$evidence" "$spine" "$contract"

echo '== Redaction and diagnostic implementation context =='
rg -n -C5 \
  'redact|range|overlap|adjacent|AuthorizationToken|AuthorizationHeader|QueryHandle|CallerHandle|rejected.*segment|segment.*index|ccmSourceFile|raw' \
  "$evidence" "$spine" "$contract"

echo '== Focused static source assertions =='
python3 - <<'PY'
from pathlib import Path
import re

evidence = Path("crates/cmtraceopen-parser/src/sccm/evidence.rs").read_text()
spine = Path("crates/cmtraceopen-parser/tests/sccm_spine_contract.rs").read_text()
contract = Path("crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs").read_text()

checks = {
    "range_merge_or_union_logic": r"(?:merge|union).{0,160}(?:range|span)|(?:range|span).{0,160}(?:merge|union)",
    "authorization_token_supported": r"AuthorizationToken",
    "public_projection_tested": r"ccmSourceFile",
    "raw_snapshot_tested": r"(?:raw snapshot|raw_snapshot|raw.*unchanged|unchanged.*raw)",
    "index_only_diagnostic_tested": r"(?:segment index|segment_index|rejected.*index|index.*rejected)",
}
for name, pattern in checks.items():
    corpus = evidence + "\n" + spine + "\n" + contract
    if not re.search(pattern, corpus, re.IGNORECASE | re.DOTALL):
        raise SystemExit(f"missing_static_indicator={name}")
    print(f"{name}=present")
PY

echo '== JSON syntax =='
fd -e json -t f . "$fixtures" -x jq empty '{}'
echo 'json_syntax=valid'

echo '== Newly added impurity indicators =='
git diff --unified=0 "${base}..${head}" -- crates/cmtraceopen-parser/src crates/cmtraceopen-parser/tests |
  rg -n '^\+.*\b(TcpStream|UdpSocket|reqwest|hyper|sqlx|rusqlite|diesel|Command|Child|std::process|tokio::net|File|fs::)\b' \
  && exit 1 || true
echo 'added_network_database_process_file_indicators=none'

Length of output: 193632


🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='d27b8f26cc14662b685d003cccaa71deb489a2de'
head='59af7b5f3315698f9d6fb8da0b2ac756799ec9d4'
evidence='crates/cmtraceopen-parser/src/sccm/evidence.rs'
spine='crates/cmtraceopen-parser/tests/sccm_spine_contract.rs'
contract='crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs'
fixtures='crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service'

echo '== Sensitive labels and public export =='
sed -n '1,180p;300,350p' "$evidence"

echo '== Exact overlap regression body =='
sed -n '420,480p' "$evidence"

echo '== AuthorizationToken regression body =='
sed -n '4600,4692p' "$spine"

echo '== Index-only diagnostic regression body =='
sed -n '240,292p;2936,2962p' "$contract"

echo '== Static implementation assertions =='
python3 - <<'PY'
from pathlib import Path
import re

evidence = Path("crates/cmtraceopen-parser/src/sccm/evidence.rs").read_text()
spine = Path("crates/cmtraceopen-parser/tests/sccm_spine_contract.rs").read_text()
contract = Path("crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs").read_text()

required = {
    "authorization_token_sensitive_label": r"authorizationtoken",
    "adjacent_or_overlapping_ranges_are_merged": r"if start <= \*merged_end",
    "message_component_and_source_file_use_public_projection": (
        r"message:\s*project_public_message_v1\(&self\.message\).*?"
        r"component:\s*self\.component\.as_deref\(\)\.map\(project_public_text_v1\).*?"
        r"ccm_source_file:\s*self\.ccm_source_file\.as_deref\(\)\.map\(project_public_text_v1\)"
    ),
    "overlap_test_checks_all_public_surfaces": (
        r"export_merges_overlapping_identity_ranges_without_mutating_raw_snapshot.*?"
        r"snapshot\.message.*?snapshot\.component.*?snapshot\.ccm_source_file.*?"
        r"exported\.message.*?exported\.component.*?exported\.ccm_source_file"
    ),
    "authorization_token_test": r"AuthorizationToken=private-auth-token-value",
    "index_only_diagnostic": r"unsupported or empty fixture field at segment \{segment_index\}",
}
corpus = evidence + "\n" + spine + "\n" + contract
for name, pattern in required.items():
    if not re.search(pattern, corpus, re.IGNORECASE | re.DOTALL):
        raise SystemExit(f"missing_required_control={name}")
    print(f"{name}=present")
PY

echo '== JSON syntax =='
fd -e json -t f . "$fixtures" -x jq empty '{}'
echo 'json_syntax=valid'

echo '== Added impurity indicators =='
if git diff --unified=0 "${base}..${head}" -- crates/cmtraceopen-parser/src crates/cmtraceopen-parser/tests |
  rg -n '^\+.*\b(TcpStream|UdpSocket|reqwest|hyper|sqlx|rusqlite|diesel|Command|Child|std::process|tokio::net)\b'
then
  exit 1
fi
echo 'added_network_database_process_indicators=none'

echo '== Changed production scope =='
git diff --name-only "${base}..${head}" | awk '
  /^crates\/cmtraceopen-parser\/src\// { print }
'

Length of output: 19615


@adamgell I reviewed exact head 59af7b5f3315698f9d6fb8da0b2ac756799ec9d4 against d27b8f26cc14662b685d003cccaa71deb489a2de.

I found no actionable defect in the reviewed range.

The range contains the two requested commits. Diff whitespace is clean.

The redaction change sorts identity ranges and merges ranges when they overlap or are adjacent. The public export applies the projection to message, component, and ccm_source_file.

The new regression verifies that users\ADMIN\secret does not leak from any public surface. It also verifies that export does not mutate the crate-private raw snapshot.

The sensitive-label grammar covers AuthorizationToken. The spine contract includes an AuthorizationToken=private-auth-token-value case. The test requires redaction and preserves the independent status=82 tail.

parse_fixture_fields() now reports malformed fixture fields by segment index. The diagnostic regression verifies that rejected diagnostics omit the raw private value.

I did not independently execute Rust tests, Clippy, TypeScript, or WebAssembly checks in this environment.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@adamgell

Copy link
Copy Markdown
Owner Author

🟢 Independent exact-head reviewer active in fresh detached worktree .worktrees/review-332-59af-independent at 59af7b5f3315698f9d6fb8da0b2ac756799ec9d4. Review range is a8a367c661cd17bd1e73b87724c143ec8565ffc7..59af7b5f; scope is adversarial privacy/redaction, exact profile grammar, coverage non-outcome semantics, determinism, parser purity/wasm, and synthetic-only corpus. This reviewer will not edit or push and will post a formal COMMENTED exact-head PASS or BLOCK with reproducible evidence.

@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: BLOCK at 59af7b5f3315698f9d6fb8da0b2ac756799ec9d4

Reviewed the full a8a367c661cd17bd1e73b87724c143ec8565ffc7..59af7b5f3315698f9d6fb8da0b2ac756799ec9d4 range in a fresh detached, clean worktree (64 files, +4,846/-4). No review edits or pushes.

[P1] Phase-specific failure claims are not actually bound to the named failed phase. The validator derives failed state from the terminal recordOutcome=failed, but its exact phase-sequence check runs only for succeeded transactions. In a disposable external mutation harness, I changed both the normalized source record and expected transaction so that the claimed failed phase disappeared while the generic terminal failure remained:

  • Provider authorization: authenticateOrAuthorize/failed → receive/succeeded
  • Admin Service authentication: authenticateOrAuthorize/failed → receive/succeeded
  • Provider query: executeProviderOperation/failed → authenticateOrAuthorize/succeeded
  • Admin Service backend: executeBackendOperation/failed → route/succeeded

All four mutations were accepted with their unchanged phase-specific public summaries. The probe failed as intended with: phase-specific failure summaries survived without their named failed phase: [Provider authorization, Admin Service authentication, Provider operation, Admin Service backend operation]. A generic terminal failure proves only that the transaction failed; it does not prove which layer phase failed. This violates the evidence-first, exact phase/disposition, and conservative-claim contract.

Required correction: add permanent RED regressions for all four failure families; bind each phase-specific outcome/public summary to the exact profile-owned failed phase plus the cited terminal recordOutcome; and keep any terminal-only failure generic/conservative when that phase fact is absent. Then run the full gates, request fresh substantive CodeRabbit, and obtain a different exact-head independent review.

Green evidence at this exact head:

  • Provider/Admin corpus 29/29; server intake 1/1; spine 137/137
  • Full parser 760/760; strict all-target parser Clippy green
  • wasm32 green on Rust 1.88 and current Rust 1.92
  • Overlapping Windows identity redaction/raw-snapshot immutability regression green
  • 40/40 JSON documents parse; scoped rustfmt for all three changed Rust files green; git diff --check and status clean
  • Public redaction covers message/component/ccmSourceFile; raw evidence remains crate-private and unchanged; coverage-state non-outcome tests remain green

Repo-wide cargo fmt --check --all still reports the known inherited formatting delta outside the exact #332 Rust files; this range adds no scoped formatting debt.

CodeRabbit is in the loop, but both hosted exact-head and local CLI review attempts are currently rate-limited. Its generated walkthrough/status is not approval. This review therefore remains BLOCKED pending the semantic correction and fresh review. PR stays draft/open; no production reducer, native collection, or live Windows acceptance is claimed.

@adamgell

Copy link
Copy Markdown
Owner Author

Claiming the independent-review P1 correction at exact base 59af7b5f3315698f9d6fb8da0b2ac756799ec9d4 in fresh isolated worktree /Users/Adam.Gell/repo/cmtraceopen/.worktrees/sccm-332-fix-59af-phase, local branch codex/sccm-332-fix-59af-phase.

Ownership is limited to crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs and directly required #332 fixture/docs changes. TDD order: preserve all four accepted phase-removal mutations as a test-only RED commit; implement the smallest exact failed-phase + terminal binding; run every prescribed gate; verify remote head remains 59af7b5f; push non-force to the existing PR branch; reply/resolve the P1; and request fresh substantive CodeRabbit. PR remains draft/open. No shared #318 API, native collector, merge/close, or live Windows acceptance claim.

@adamgell

Copy link
Copy Markdown
Owner Author

#332 phase-specific failure correction is pushed at exact head ea0546355efac441763fa21405472f36b28dfe86 from isolated worktree .worktrees/sccm-332-fix-59af-phase.

RED → GREEN:

  • Test-only RED f12840f7: Provider/Admin target 29 passed / 1 failed. The permanent test listed eight accepted mutations—missing named failed phase and named phase marked succeeded for each of Provider authorization, Admin Service authentication, Provider operation, and Admin Service backend operation—while paired normalized facts matched and terminal recordOutcome=failed remained.
  • GREEN ea054635: each phase-specific failed scenario now requires its exact ordered phase/disposition sequence plus failed terminal record. Generic terminal-only evidence is rejected and cannot retain a phase-specific classification or summary.

Verification at exact head:

  • Provider/Admin 30/30
  • server intake 1/1
  • spine 137/137
  • full parser 761/761
  • strict all-target parser Clippy green
  • Rust 1.88 wasm32 green
  • TypeScript green
  • 40/40 JSON documents parse
  • scoped rustfmt, git diff --check, one-file scope, and clean status green
  • repo-wide fmt reports the known inherited 17 files, all outside the SCCM Server: diagnose SMS Provider and Admin Service workflows #332 correction range

Local CodeRabbit first found a valid missing same-phase/successful-disposition regression; that case was added for all four families and folded into RED. Its final review of the exact two-commit range reports zero findings. The independent P1 thread is replied to and resolved.

PR remains draft/open. Fresh hosted exact-head CodeRabbit and a different independent exact-head review are still required; no production reducer, native collection, or live Windows acceptance is claimed.

@adamgell

Copy link
Copy Markdown
Owner Author

@coderabbitai review

Please perform a fresh substantive review of exact head ea0546355efac441763fa21405472f36b28dfe86, including the full Provider/Admin Service contract rather than only the latest commit. Recheck all four phase-specific failed scenarios, exact phase/disposition order, paired record-backed facts, terminal recordOutcome, conservative handling of terminal-only failure, exact public summaries/classifications, privacy, coverage non-outcome semantics, determinism, and parser/wasm purity. Local CodeRabbit is zero-findings at this head, but hosted exact-head review remains an independent gate. Treat skipped, rate-limited, status-only, or stale-head output as no approval.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026 •

Copy link
Copy Markdown

@adamgell I will perform a fresh substantive review of exact head ea0546355efac441763fa21405472f36b28dfe86.

I will review the full Provider/Admin Service contract. I will recheck all requested phase, evidence, terminality, privacy, coverage, determinism, purity, and WebAssembly conditions. I will not treat a skipped, rate-limited, status-only, incremental-only, or stale-head result as approval.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@adamgell

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@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 adversarial re-review of PR #380 at exact head ea05463.

Verdict: PASS at exact head ea05463.

Descent: merge-base with a8a367c is a8a367c (clean restack on the reviewed spine).

Battery: focused Provider/Admin Service contract test 30 passed, 0 failed; sccm_spine_contract 137 passed, 0 failed; full parser suite 761 passed, 0 failed; cargo clippy --all-targets -D warnings clean; wasm32-unknown-unknown check clean.

P1 verification (phase binding): the prior blocker was that phase-specific failure claims were not bound to a named failed phase. Head ea05463 pins an exact per-failure-scenario phase/disposition sequence and pins summaries and observation identities per scenario. Three adversarial paired-mutation probes (expected output and paired records mutated together) were all rejected specifically by the new phase-binding gate: a failure claim with no named failed phase; a claim whose named phase succeeds with only a terminal recordOutcome failure; and failure evidence relocated to a different phase than the claimed one. A byte-length-preserving mutation of the physical fixture log was independently rejected by the evidence-semantics binding, confirming the gate does not depend on byte accounting.

Prior Critical class (overlapping identity ranges in evidence.rs): confirmed still fixed. Overlapping windows-identity and user-path matches are merged before projection; probes walking decoded JSON strings (not serialized bytes) across message, component, and source-file fields found no leak of the overlap class. The committed regression test remains present at head.

Privacy sweep: all 60 fixture files are synthetic (example.invalid, SYNTHETIC markers only); no real domains, UNC paths, drive paths, or emails. The diff contains only synthetic adversarial strings inside fail-closed mutation tests.

Non-blocking observations for follow-up outside this PR: two identity-recognizer gaps (space-preceded slash-separated home paths; path segments below an already-redacted identity head) exist unchanged at the foundation SHA and are spine-lane scope, not introduced here; one mutation test uses the maintainer's real name as an adversarial identity-bearing path input where a synthetic name would be cleaner; unbounded private query values conservatively swallow trailing diagnostic codes, which is the safe direction.

This verdict applies to exact head ea05463.

@adamgell
adamgell marked this pull request as ready for review July 31, 2026 20:47
Copilot AI review requested due to automatic review settings July 31, 2026 20:47
@adamgell
adamgell merged commit 7655826 into codex/parser-family-skeleton Jul 31, 2026
1 check passed

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

Prepares the SCCM Server Provider/Admin Service “preparation-only” corpus for issue #332 by adding a bounded synthetic fixture set, a strict contract test to validate manifests/expected outputs, and tightening public evidence redaction behavior for Provider/Admin Service–style sensitive fields.

Changes:

  • Added a 20-scenario Provider/Admin Service server fixture corpus (manifests, expected projections, and bounded synthetic evidence artifacts) plus a corpus README describing the contract.
  • Added a dedicated fixture-contract test that validates topology/provenance/coverage/transaction shape, citation rules, privacy constraints, and fail-closed mutation behavior.
  • Expanded SCCM public message redaction to cover AuthorizationHeader/AuthorizationToken, CallerHandle, and QueryHandle patterns, and fixed identity-range merging during Windows identity redaction.

Reviewed changes

Copilot reviewed 45 out of 64 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
docs/sccm/preparation/issue-332-provider-admin-service-corpus.md Documents the preparation-only scope, key/privacy/state/coverage contracts, and test-first history for #332.
crates/cmtraceopen-parser/src/sccm/evidence.rs Tightens SCCM public evidence redaction (Provider/Admin Service sensitive handles) and merges overlapping identity ranges safely.
crates/cmtraceopen-parser/tests/sccm_spine_contract.rs Adds a regression test asserting Provider-handle redaction in multiple syntactic positions while preserving safe tails.
crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs Introduces a comprehensive contract test that enforces the corpus schema, privacy, citation, and fail-closed guarantees across scenarios.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/README.md Corpus-level documentation: scenario matrix, boundaries, and contract invariants.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-access-denied/manifest.json Scenario manifest: Admin Service access-denied coverage-only case.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-access-denied/expected.json Expected projection for Admin Service access-denied coverage-only case.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-auth-failure/manifest.json Scenario manifest: Admin Service authentication failure.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-auth-failure/expected.json Expected projection for Admin Service authentication failure.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-auth-failure/evidence/server-admin-service/admin-service-lab/current/AdminService.log Synthetic CCM evidence for Admin Service authentication failure scenario.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-backend-failure/manifest.json Scenario manifest: Admin Service backend operation failure.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-backend-failure/expected.json Expected projection for Admin Service backend operation failure.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-backend-failure/evidence/server-admin-service/admin-service-lab/current/AdminService.log Synthetic CCM evidence for Admin Service backend failure scenario.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-parse-failed/manifest.json Scenario manifest: Admin Service parse-failed coverage case.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-parse-failed/expected.json Expected projection for Admin Service parse-failed coverage case.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-parse-failed/evidence/server-admin-service/admin-service-lab/current/AdminService.log Malformed synthetic evidence used to enforce parse-failed coverage behavior.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-skipped/manifest.json Scenario manifest: Admin Service skipped coverage case.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-skipped/expected.json Expected projection for Admin Service skipped coverage case.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-success/manifest.json Scenario manifest: Admin Service terminal success.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-success/expected.json Expected projection for Admin Service terminal success.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-success/evidence/server-admin-service/admin-service-lab/current/AdminService.log Synthetic CCM evidence for Admin Service success scenario.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/blocked-deferred/manifest.json Scenario manifest: blocked/deferred incomplete Admin Service request.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/blocked-deferred/expected.json Expected projection for blocked/deferred incomplete Admin Service request.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/blocked-deferred/evidence/server-admin-service/admin-service-lab/current/AdminService.log Synthetic CCM evidence for blocked/deferred incomplete scenario.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/contradictory-evidence/manifest.json Scenario manifest: Provider contradictory terminal outcomes on same exact key.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/contradictory-evidence/expected.json Expected projection enforcing incomplete/low-confidence outcome for contradictory terminals.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/contradictory-evidence/evidence/server-provider/provider-local/current/Smsprov.log Synthetic CCM evidence containing contradictory recordOutcome terminals.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/manifest.json Scenario manifest: Admin Service success plus supplemental IIS evidence.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/expected.json Expected projection ensuring IIS remains source-local and non-promotable.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/evidence/server-admin-service/admin-service-lab/current/AdminService.log Synthetic CCM evidence for Admin Service success in IIS-supplemental scenario.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/evidence/server-admin-service-iis/admin-service-lab/current/u_ex_synthetic.log Synthetic W3C IIS evidence used as supplemental-only context.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/incomplete/manifest.json Scenario manifest: incomplete Admin Service request (no terminal outcome).
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/incomplete/expected.json Expected projection for incomplete Admin Service request.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/incomplete/evidence/server-admin-service/admin-service-lab/current/AdminService.log Synthetic CCM evidence for incomplete Admin Service scenario.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/manifest.json Scenario manifest: privacy-redaction case with sensitive-shaped raw values.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/expected.json Expected projection verifying sensitive shapes are absent from public output while keys remain stable.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/evidence/server-admin-service/admin-service-lab/current/AdminService.log Synthetic CCM evidence containing sensitive-shaped Admin Service fields to validate redaction.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/evidence/server-provider/provider-local/current/Smsprov.log Synthetic CCM evidence containing sensitive-shaped Provider fields to validate redaction.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-authz-denied/manifest.json Scenario manifest: Provider authorization denial (explicit failed authz).
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-authz-denied/expected.json Expected projection for Provider authorization denial scenario.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-authz-denied/evidence/server-provider/provider-local/current/Smsprov.log Synthetic CCM evidence for Provider authz denial scenario.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-query-failure/manifest.json Scenario manifest: Provider operation/query failure (explicit terminal failure).
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-query-failure/expected.json Expected projection for Provider query/operation failure scenario.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-query-failure/evidence/server-provider/provider-local/current/Smsprov.log Synthetic CCM evidence for Provider query/operation failure.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-retry/manifest.json Scenario manifest: Provider retry then recovery (same-key retry contract).
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-retry/expected.json Expected projection enforcing explicit retryableFailure then same-phase success recovery.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-retry/evidence/server-provider/provider-local/current/Smsprov.log Synthetic CCM evidence for Provider retry/recovery scenario.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-absent/manifest.json Scenario manifest: Provider source absent coverage-only case.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-absent/expected.json Expected projection for Provider absent coverage-only case.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-capped/manifest.json Scenario manifest: Provider capped collection coverage-only case.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-capped/expected.json Expected projection for Provider capped coverage-only case.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-capped/evidence/server-provider/provider-local/current/Smsprov.log Synthetic truncated evidence artifact for capped-coverage contract checks.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-unsupported/manifest.json Scenario manifest: Provider unsupported source/profile coverage-only case.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-unsupported/expected.json Expected projection for Provider unsupported coverage-only case.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-success/manifest.json Scenario manifest: Provider terminal success.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-success/expected.json Expected projection for Provider terminal success.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-success/evidence/server-provider/provider-local/current/Smsprov.log Synthetic CCM evidence for Provider success scenario.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-timeout/manifest.json Scenario manifest: Provider incomplete/timeout case with invalid offset.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-timeout/expected.json Expected projection enforcing incomplete/low-confidence for invalid-offset timeout.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-timeout/evidence/server-provider/provider-local/current/Smsprov.log Synthetic CCM evidence for Provider timeout/invalid-offset scenario.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/rotation-boundary/manifest.json Scenario manifest: split-rotation boundary fragments with unknown version.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/rotation-boundary/expected.json Expected projection enforcing source-local rotationFragment and no transaction key formation.
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/rotation-boundary/evidence/server-provider/provider-local/current/Smsprov.log Synthetic partial-rotation fragment evidence (current).
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/rotation-boundary/evidence/server-provider/provider-local/lo_/Smsprov.lo_ Synthetic partial-rotation fragment evidence (lo_).

Comment on lines +93 to +97
A later mutation pass reproduced seven fail-open cases before correction:
control-bearing versions, blank rewritten artifact identity, arbitrary
transaction/source-local observation IDs, high confidence over an incomplete
fragment, arbitrary outcomes, and omitted required bounded requests. The
closed contract now rejects all seven.
Comment on lines +107 to +112
The current twenty-scenario matrix additionally separates absent,
access-denied, capped, skipped, unsupported, parse-failed/malformed, and
blocked/deferred coverage. None of those states is promoted into success or
failure. Every high-success transaction now cites the complete layer-specific
phase sequence, and every retryable failure requires a later success at the
same phase.
@adamgell
adamgell deleted the codex/sccm-332-provider-admin-service-corpus branch September 25, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request parser Log parser related sccm SCCM/ConfigMgr related test Testing related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants