Skip to content

fix(sccm): remove fixture identity allowlists from intake - #508

Merged
adamgell merged 4 commits into
mainfrom
codex/issue-409-intake-identity-grammar
Aug 5, 2026
Merged

fix(sccm): remove fixture identity allowlists from intake#508
adamgell merged 4 commits into
mainfrom
codex/issue-409-intake-identity-grammar

Conversation

@adamgell

@adamgell adamgell commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace server-intake synthetic fixture identity lists with bounded field grammars
  • make the server source catalog the sole owner of declared source IDs
  • preserve opaque production handles and fail-closed malformed/identity-bearing rejection

Verification

  • cargo test -p cmtraceopen-parser --test sccm_server_intake
  • CARGO_INCREMENTAL=0 cargo test -p cmtraceopen-parser
  • CARGO_INCREMENTAL=0 cargo clippy -p cmtraceopen-parser --all-targets -- -D warnings
  • scoped rustfmt --check and git diff --check origin/main

Closes #409

Summary by CodeRabbit

  • Bug Fixes

    • Improved SCCM server-intake validation for conforming synthetic artifact, host, subject, site-code, path, and lineage identities.
    • Preserved validation of production source IDs, topology relationships, source versions, and rotation limits.
    • Improved rejection of malformed, unsafe, and inconsistent identity formats.
    • Synthetic WSUS artifacts are accepted when structurally valid, while catalog-bound fields remain protected.
    • Standardized content-addressed identity handling across server roles and workflows.
  • Documentation

    • Added guidance for server-intake identity validation updates.

@github-actions github-actions Bot added bug Something isn't working enhancement New feature or request parser Log parser related sccm SCCM/ConfigMgr related labels Aug 5, 2026
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c30ec691-d5d7-4001-8a04-76d1a4de9ba4

📥 Commits

Reviewing files that changed from the base of the PR and between 2af3c9a and f40f552.

📒 Files selected for processing (1)
  • library.md

📝 Walkthrough

Walkthrough

Server intake now accepts structured synthetic identities instead of fixture-specific allowlists. Declared source IDs come from the catalog. Hierarchy profile admission uses approved payload digests. Tests and fixtures use deterministic synthetic identifiers.

Changes

SCCM server intake validation

Layer / File(s) Summary
Catalog source membership and identity grammar
crates/cmtraceopen-parser/src/sccm/server/windows/catalog.rs, crates/cmtraceopen-parser/src/sccm/server/windows/intake.rs, crates/cmtraceopen-parser/src/sccm/server/windows/management_point.rs, crates/cmtraceopen-parser/src/sccm/server/windows/site_core.rs, crates/cmtraceopen-parser/src/sccm/server/windows/distribution_point.rs
Catalog-backed source checks and structured validation now cover artifacts, hosts, subjects, paths, lineage IDs, site codes, topology links, and WSUS provenance.
Content-bound hierarchy admission
crates/cmtraceopen-parser/src/sccm/server/windows/hierarchy.rs
Synthetic profile provenance is admitted by approved payload digest instead of artifact-ID association.
Regression coverage and fixture migration
crates/cmtraceopen-parser/tests/*, crates/cmtraceopen-parser/tests/fixtures/sccm/server/*
Tests cover malformed and conforming identities. Manifests and expected outputs use deterministic synthetic identifiers.
Implementation record
docs/superpowers/plans/2026-08-05-sccm-409-server-intake-identity-grammar.md, library.md
The plan records the grammar, acceptance criteria, verification commands, and implementation reference.

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

Sequence Diagram(s)

sequenceDiagram
  participant ServerIntake
  participant IdentityValidators
  participant Catalog
  participant HierarchyProfile
  participant ServerManifest
  ServerIntake->>IdentityValidators: Validate synthetic identity formats
  IdentityValidators-->>ServerIntake: Return validation results
  ServerIntake->>Catalog: Check declared source ID
  Catalog-->>ServerIntake: Return catalog membership
  ServerIntake->>HierarchyProfile: Check approved payload digest
  HierarchyProfile-->>ServerIntake: Return digest admission
  ServerIntake->>ServerManifest: Accept or reject manifest
Loading

Possibly related PRs

Suggested labels: test

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title follows Conventional Commits and accurately describes removal of SCCM intake fixture identity allowlists.
Linked Issues check ✅ Passed The changes replace fixture allowlists with bounded validators, centralize source IDs in the catalog, preserve opaque handles, and retain fail-closed validation for issue #409.
Out of Scope Changes check ✅ Passed The implementation, tests, fixtures, and related plan documentation all support the SCCM intake identity grammar objectives.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/issue-409-intake-identity-grammar

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

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

🤖 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 `@crates/cmtraceopen-parser/src/sccm/server/windows/intake.rs`:
- Around line 3035-3039: Restrict safe_manifest_artifact_id and the related
synthetic identity validation at
crates/cmtraceopen-parser/src/sccm/server/windows/intake.rs:3035-3039 and
3066-3077 to fixed semantic segments containing only numeric or otherwise
nonsemantic tokens, rejecting identity-bearing values such as jane-doe and
synthetic:host:jane-doe-01; update the associated intake handling at
crates/cmtraceopen-parser/src/sccm/server/windows/intake.rs:3192-3250
accordingly. Add rejection coverage in
crates/cmtraceopen-parser/tests/sccm_server_intake.rs:918-940. Revise the
privacy claim and supporting plan text in
docs/superpowers/plans/2026-08-05-sccm-409-server-intake-identity-grammar.md:5-8
and 89-129 to describe the narrowed guarantee.

In `@crates/cmtraceopen-parser/tests/sccm_server_intake.rs`:
- Around line 918-940: Add a companion rejection test near
server_intake_accepts_new_conforming_synthetic_identities that mutates the
relevant synthetic identity field to a hyphenated personal-name-shaped token
such as jane-doe, then assert assess_server_intake returns an error. Keep the
existing structurally synthetic acceptance case unchanged and target the
identity field validated by synthetic_slug.

In
`@docs/superpowers/plans/2026-08-05-sccm-409-server-intake-identity-grammar.md`:
- Around line 5-8: Update the plan’s grammar definition and privacy-safety claim
to require non-user semantic token segments, rather than permitting arbitrary
lowercase slugs such as jane-doe. Apply this requirement consistently throughout
the affected sections, including the design details covered by the referenced
range, and preserve rejection of identity-bearing strings before public
projection.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d4e7ad43-cbea-4201-908b-a79607e35f19

📥 Commits

Reviewing files that changed from the base of the PR and between 281861c and 9a30a9d.

📒 Files selected for processing (5)
  • crates/cmtraceopen-parser/src/sccm/server/windows/catalog.rs
  • crates/cmtraceopen-parser/src/sccm/server/windows/intake.rs
  • crates/cmtraceopen-parser/tests/sccm_server_intake.rs
  • docs/superpowers/plans/2026-08-05-sccm-409-server-intake-identity-grammar.md
  • library.md

Comment thread crates/cmtraceopen-parser/src/sccm/server/windows/intake.rs
Comment thread crates/cmtraceopen-parser/tests/sccm_server_intake.rs
@adamgell
adamgell force-pushed the codex/issue-409-intake-identity-grammar branch from 9a30a9d to 2af3c9a Compare August 5, 2026 10:02
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@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

🤖 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 `@crates/cmtraceopen-parser/src/sccm/server/windows/intake.rs`:
- Around line 1034-1045: Use the same site representation for the synthetic
topology handle and hierarchy-link endpoint comparisons in the intake flow
around synthetic topology admission and hierarchy direction validation.
Normalize both values consistently, or compare against the raw synthetic site
code, so matching origin or target links produce a populated
hierarchy_admission.direction instead of None. Add a regression test covering a
synthetic hierarchy artifact with a matching origin or target link.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f46d598e-b340-4ffc-bc10-1ff566ef245d

📥 Commits

Reviewing files that changed from the base of the PR and between 162f1c2 and 2af3c9a.

📒 Files selected for processing (90)
  • crates/cmtraceopen-parser/src/sccm/server/windows/catalog.rs
  • crates/cmtraceopen-parser/src/sccm/server/windows/distribution_point.rs
  • crates/cmtraceopen-parser/src/sccm/server/windows/hierarchy.rs
  • crates/cmtraceopen-parser/src/sccm/server/windows/intake.rs
  • crates/cmtraceopen-parser/src/sccm/server/windows/management_point.rs
  • crates/cmtraceopen-parser/src/sccm/server/windows/management_point_tests.rs
  • crates/cmtraceopen-parser/src/sccm/server/windows/site_core.rs
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/absent-dp/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/backlog-blocked/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/content-version-mismatch/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/contradiction-recovery/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/distribution-failure/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/healthy-package/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/incomplete/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/malformed-current/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/rotation-boundary/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/serve-observed/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/transfer-deferred/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/transfer-failure/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/transfer-retry/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/distribution_point/validation-failure/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/absent-remote-source/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/backlog-retry/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/clock-offset-unknown/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/generic-site-token/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/healthy-link/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/incomplete/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/receiver-processing-failure/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/recovery/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/rotation-boundary/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/sender-failure/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/topology-mismatch/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/absent-dp/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/access-denied-mp/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/capped-sup/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/capped-sup/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/collision-same-basename-configured-roots/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/collision-same-basename-configured-roots/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/complete-multi-role/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/complete-multi-role/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/configured-nondefault-path/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/configured-nondefault-path/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/multiline/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/multiline/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/rotations/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/rotations/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/skipped-iis/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/supplemental-wsus-skipped/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/unsorted-manifest/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/intake/unsorted-manifest/manifest.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/management-point/canonical-intake-policy-scope/manifest.json
  • 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-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-skipped/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/blocked-deferred/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/iis-supplemental/expected.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/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-capped/expected.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-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/fixtures/sccm/server/site_core/component-failure/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/site_core/contradictory/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/site_core/healthy/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/site_core/inbox-backlog/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/site_core/incomplete/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/site_core/malformed/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/site_core/recovery/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/site_core/rotation-boundary/expected.json
  • crates/cmtraceopen-parser/tests/fixtures/sccm/server/site_core/status-processing-failure/expected.json
  • crates/cmtraceopen-parser/tests/sccm_hierarchy_reducer.rs
  • crates/cmtraceopen-parser/tests/sccm_server_distribution_point.rs
  • crates/cmtraceopen-parser/tests/sccm_server_hierarchy_and_replication_fixture_contract.rs
  • crates/cmtraceopen-parser/tests/sccm_server_intake.rs
  • crates/cmtraceopen-parser/tests/sccm_server_management_point.rs
  • crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service.rs
  • crates/cmtraceopen-parser/tests/sccm_server_site_core.rs
  • crates/cmtraceopen-parser/tests/sccm_server_software_update_point.rs
  • docs/superpowers/plans/2026-08-05-sccm-409-server-intake-identity-grammar.md
  • library.md

Comment on lines +1034 to +1045
if !synthetic_site_code(&manifest.topology.site_code)
|| !synthetic_capture_host(
&manifest.topology.capture_host,
&manifest.topology.site_code,
)
{
return Err(SccmServerIntakeError::InvalidTopology);
}
"synthetic:site:lab".to_owned()
format!(
"synthetic:site:{}",
manifest.topology.site_code.to_ascii_lowercase()
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win

Use one site representation for topology links and topology admission.

Lines 1042-1045 store site_handle as synthetic:site:lab. Lines 1114-1115 retain hierarchy-link endpoints as LAB. The later direction check compares these values directly, so every valid synthetic hierarchy link fails direction validation.

Normalize both values before comparison, or compare links with the raw synthetic site code. Otherwise hierarchy_admission.direction remains None, and the hierarchy reducer can panic when it requires a sealed artifact direction. Add a regression test with a synthetic hierarchy artifact and a matching origin or target link.

Also applies to: 1112-1117

🤖 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/server/windows/intake.rs` around lines
1034 - 1045, Use the same site representation for the synthetic topology handle
and hierarchy-link endpoint comparisons in the intake flow around synthetic
topology admission and hierarchy direction validation. Normalize both values
consistently, or compare against the raw synthetic site code, so matching origin
or target links produce a populated hierarchy_admission.direction instead of
None. Add a regression test covering a synthetic hierarchy artifact with a
matching origin or target link.

@adamgell

adamgell commented Aug 5, 2026

Copy link
Copy Markdown
Owner Author

Final independent integration verdict: ACCEPT at exact SHA f40f552c7dde5c697497cc5140a122e866003d05. Parents are accepted #409 2af3c9a plus current main/#506 162f1c2; reconstructed integration tree matches exactly, with no manual product delta. SCCM intake 66/66 and Device Inventory 24/24 pass; both library routes occur exactly once and resolve; changed Rust formatting and diff checks pass. Exact-head merge is authorized after hosted CI and all package jobs are green.

@adamgell
adamgell merged commit e59aed3 into main Aug 5, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request parser Log parser related sccm SCCM/ConfigMgr related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

intake.rs hardcodes test-fixture string literals in production source

1 participant