Skip to content

feat(sccm): establish shared diagnostic contract boundary (#318 Phase A) - #336

Merged
adamgell merged 8 commits into
codex/parser-family-skeletonfrom
codex/sccm-318-spine-role-fix
Jul 30, 2026
Merged

adamgell merged 8 commits into
codex/parser-family-skeletonfrom
codex/sccm-318-spine-role-fix

Conversation

@adamgell

@adamgell adamgell commented Jul 30, 2026 •

Copy link
Copy Markdown
Owner

Scope

Issue-scoped Phase A of #318 from the SCCM diagnostics execution contract:

  • public, versioned SCCM contract boundary in the pure Rust parser crate
  • additive artifact, coverage, rotation, role, family, and source-catalog models
  • tolerant future-value serialization without changing LogEntry or ParserKind
  • canonical rotation grammar with lossless unsupported provenance
  • exact producer-role catalog semantics (distmgr/PkgXferMgr and WCM/wsyncmgr remain site-server producers; DP-local/SUP-local sources stay distinct; Admin Service remains a family on the Provider producer)
  • synthetic SCCM manifest fixture and exhaustive contract tests

No Windows I/O, Tauri, registry, WMI, network, database, live collection, workflow reducer, or cross-side correlation is added.

Dependency state

This is the shared API review point. #319 and #335 production intake remain blocked until this Phase A contract is reviewed. Tasks 4–7 of #318 (logical-record evidence, signals, versioned keys, conservative findings) remain follow-up commits on this issue branch after the interface gate.

Verification

  • cargo test --locked -p cmtraceopen-parser --test sccm_spine_contract — 17 passed
  • cargo test --locked -p cmtraceopen-parser — 588 passed in the owner run
  • cargo clippy --locked -p cmtraceopen-parser --all-targets -- -D warnings — passed
  • cargo check --locked -p cmtraceopen-parser --target wasm32-unknown-unknown — passed
  • npx tsc --noEmit — passed
  • owned SCCM Rust files are rustfmt-clean
  • git diff --check f2caccf..HEAD — passed

Repo-wide cargo fmt --check --all has unrelated pre-existing ESP/Tauri drift identical to the base commit; this PR does not modify those files.

Review gates

  • independent API review closed the wire-format, unknown-rotation, catalog-test, and string-normalization findings
  • producer-role review finding is addressed by commit e42df2b
  • CodeRabbit CLI review requested; currently rate-limited by the organization seat/cooldown, so it is not counted as a pass
  • native Windows acceptance is neither required for this pure contract slice nor claimed

Refs #318
Refs #317

Summary by CodeRabbit

  • New Features
    • Added SCCM diagnostics support with structured artifact models, coverage states, roles, findings, and canonical log-rotation metadata.
    • Added catalog-based classification for known SCCM artifacts and rotated filenames, including deterministic handling for unknown sources.
    • Added support for SCCM artifact manifests with host, version, and collection/provenance details.
    • Improved stable JSON serialization of SCCM diagnostic data.
  • Tests
    • Tightened serialization/deserialization validation for rotation values and expanded the classification test matrix.
    • Added/updated SCCM fixture data and strengthened round-trip and invalid-pattern coverage.

Copy link
Copy Markdown
Owner Author

@coderabbitai review

Please review this draft against the #318 architecture boundary, with particular attention to producer-role provenance, future-value serialization, canonical rotation handling, public LogEntry/ParserKind compatibility, and wasm32 purity. Treat the SCCM plans under docs/superpowers/plans/ as the execution contract. Do not infer native Windows acceptance from this pure parser slice.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1bb9c260-9d13-4e76-851b-37334d33c6cf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a public SCCM diagnostics module with serialized artifact models, canonical rotation handling, deterministic source classification, and contract tests backed by an artifact manifest fixture.

Changes

SCCM diagnostics

Layer / File(s) Summary
SCCM schema and rotation models
crates/cmtraceopen-parser/src/lib.rs, crates/cmtraceopen-parser/src/sccm/mod.rs, crates/cmtraceopen-parser/src/sccm/models.rs, crates/cmtraceopen-parser/src/sccm/rotation.rs
Exposes the SCCM module and defines serialized coverage, role, finding, rotation, and artifact models with canonical rotation validation and SccmArtifact::missing.
Source catalog classification
crates/cmtraceopen-parser/src/sccm/catalog.rs
Maps SCCM basenames and producer roles to artifact families, parses canonical and unknown rotation suffixes, and classifies declared and unknown sources.
Schema and catalog contract validation
crates/cmtraceopen-parser/tests/sccm_spine_contract.rs, crates/cmtraceopen-parser/tests/fixtures/sccm/spine/artifact-manifest.json
Tests serialization stability, rotation validation, manifest preservation, catalog determinism, role enforcement, and rotation grammar behavior.

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

Possibly related issues

  • adamgell/cmtraceopen issue 318 — Covers the SCCM artifact provenance, coverage, rotation, and source-catalog contracts implemented here.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 48.84% 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the SCCM Phase A contract-boundary work and matches the parser/models/catalog changes.
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.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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

@adamgell
adamgell marked this pull request as ready for review July 30, 2026 18:49
Copilot AI review requested due to automatic review settings July 30, 2026 18:49

Copy link
Copy Markdown
Owner Author

@coderabbitai review

The Phase A interface PR is now ready for review. Please run the full review against codex/parser-family-skeleton; no merge is authorized until this review and the independent API gate are clean.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

@adamgell I’ll run a complete review of #336 against codex/parser-family-skeleton, including the Phase A architecture boundary and the specified API, provenance, serialization, rotation, compatibility, and wasm32 constraints.

✅ Action performed

Full review finished.

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

Establishes the initial, public SCCM diagnostics contract boundary within the pure cmtraceopen-parser crate, including versioned schema types and a deterministic source catalog intended to support future SCCM intake/diagnostics phases without changing existing parser primitives.

Changes:

  • Adds public SCCM schema models (coverage, roles, findings, rotations, artifacts) with JSON serialization behavior and schema versioning.
  • Introduces a role-aware SCCM source catalog + filename rotation grammar and exposes classification/catalog APIs.
  • Adds a synthetic SCCM manifest fixture plus contract tests covering serialization and catalog semantics.

Reviewed changes

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

Show a summary per file
File Description
crates/cmtraceopen-parser/tests/sccm_spine_contract.rs New contract tests for SCCM schema/versioning, serde behavior, catalog semantics, and rotation grammar.
crates/cmtraceopen-parser/tests/fixtures/sccm/spine/artifact-manifest.json New fixture manifest used for SCCM artifact/coverage round-trip validation.
crates/cmtraceopen-parser/src/sccm/models.rs New SCCM contract models (schema version, coverage, roles, finding class, rotation, artifact) with custom serde behaviors.
crates/cmtraceopen-parser/src/sccm/mod.rs New SCCM module root exporting catalog + models.
crates/cmtraceopen-parser/src/sccm/catalog.rs New SCCM source catalog table and artifact-name classifier (including canonical rotation suffix parsing).
crates/cmtraceopen-parser/src/lib.rs Exposes the new sccm module publicly from the parser crate.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '== Branches and diff summary =='
git branch --all --no-color | sed -n '1,120p'
git diff --stat codex/parser-family-skeleton...HEAD
git diff --name-status codex/parser-family-skeleton...HEAD

echo '== SCCM plans =='
fd -t f . docs/superpowers/plans 2>/dev/null | sort

echo '== Likely SCCM implementation/test files =='
fd -t f . | rg -i 'sccm|spine|contract|cmtrace' | sort | sed -n '1,240p'

echo '== Public parser API map =='
fd -t f -e rs . | xargs -r rg -n -C2 \
  'pub (struct|enum|trait|mod|use)|\b(LogEntry|ParserKind)\b' \
  | sed -n '1,360p'

Length of output: 1240


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '== PR metadata =='
gh pr view 336 --repo adamgell/cmtraceopen \
  --json number,url,baseRefName,baseRefOid,headRefName,headRefOid,title \
  --jq '{number,url,baseRefName,baseRefOid,headRefName,headRefOid,title}'

base_sha=$(gh pr view 336 --repo adamgell/cmtraceopen --json baseRefOid --jq .baseRefOid)
echo "== Base SHA: ${base_sha} =="

echo '== Changed files =='
git diff --name-status "${base_sha}...HEAD"
echo '== Diff stat =='
git diff --stat "${base_sha}...HEAD"

echo '== SCCM execution plans =='
fd -t f . docs/superpowers/plans 2>/dev/null | sort | while IFS= read -r file; do
  printf '\n--- %s ---\n' "$file"
  rg -n -i -C2 'sccm|phase a|contract|rotation|producer|wasm|LogEntry|ParserKind' "$file" || true
done

echo '== Changed Rust item outlines =='
git diff --name-only "${base_sha}...HEAD" -- '*.rs' | while IFS= read -r file; do
  printf '\n--- %s ---\n' "$file"
  ast-grep outline "$file" --items all --view expanded || true
done

Length of output: 217558


🏁 Script executed:

#!/bin/bash
set -euo pipefail

base_sha='f2caccfb8602638807bff5c19d722c037676ca43'

echo '== Spine plan: public models, catalog, and Phase A boundaries =='
sed -n '1,410p' docs/superpowers/plans/2026-07-30-sccm-diagnostic-spine.md

echo '== Public SCCM models =='
cat -n crates/cmtraceopen-parser/src/sccm/models.rs

echo '== SCCM artifact catalog =='
cat -n crates/cmtraceopen-parser/src/sccm/catalog.rs

echo '== SCCM contract tests (all) =='
cat -n crates/cmtraceopen-parser/tests/sccm_spine_contract.rs

echo '== Synthetic manifest fixture =='
cat -n crates/cmtraceopen-parser/tests/fixtures/sccm/spine/artifact-manifest.json

echo '== Exact PR patch for changed Rust/fixture files =='
git diff --find-renames --find-copies --no-ext-diff \
  "${base_sha}...HEAD" -- \
  crates/cmtraceopen-parser/src/lib.rs \
  crates/cmtraceopen-parser/src/sccm \
  crates/cmtraceopen-parser/tests/sccm_spine_contract.rs \
  crates/cmtraceopen-parser/tests/fixtures/sccm/spine/artifact-manifest.json

Length of output: 137701


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '== Parser crate manifest and declared dependencies =='
parser_manifest=$(fd -t f '^Cargo\.toml$' crates/cmtraceopen-parser | head -n 1)
printf '%s\n' "$parser_manifest"
cat -n "$parser_manifest"

echo '== SCCM module imports and calls with potential I/O/platform coupling =='
ast-grep run --lang rust \
  --pattern 'use $PATH;' \
  crates/cmtraceopen-parser/src/sccm
ast-grep run --lang rust \
  --pattern '$OBJ.$METHOD($$$)' \
  crates/cmtraceopen-parser/src/sccm \
  | rg -n -i -C2 'std::fs|File|Path|read_|write_|Command|process|registry|winapi|windows|tokio|reqwest|http|socket|network|env'

echo '== Broad SCCM source search for platform/I-O APIs =='
rg -n -i -C2 \
  'std::(fs|net|process|path|env)|\b(File|Path|Command|ReadDir|Tcp|Udp|Windows|Win32|Registry|WMI|Tauri|tokio|reqwest|hyper)\b' \
  crates/cmtraceopen-parser/src/sccm || true

echo '== Existing public LogEntry and ParserKind definitions =='
log_entry_file=$(fd -t f '^log_entry\.rs$' | head -n 1)
printf '%s\n' "$log_entry_file"
ast-grep outline "$log_entry_file" --items all --match 'LogEntry|ParserKind' --view expanded
rg -n -C3 'pub (struct LogEntry|enum ParserKind)\b' "$log_entry_file"

echo '== Cross-check new SCCM module references into legacy public models =='
rg -n -C2 '\b(LogEntry|ParserKind)\b' crates/cmtraceopen-parser/src/sccm crates/cmtraceopen-parser/src/lib.rs || true

Length of output: 7554


@adamgell I found one blocking Phase A contract issue.

  • Canonical rotation handling is inconsistent at the public JSON boundary. SccmRotation accepts {"kind":"numbered","value":0} and any string for {"kind":"timestamped","value":"…"} as known rotations in crates/cmtraceopen-parser/src/sccm/models.rs (Lines 179–195). In contrast, the filename grammar in crates/cmtraceopen-parser/src/sccm/catalog.rs (Lines 523–537) correctly accepts only non-zero, non-zero-padded numeric suffixes and exact valid YYYYMMDD-HHMMSS timestamps; invalid suffixes retain filenameSuffix provenance and are unsupported.

    This lets a manifest/API input bypass the canonical grammar and be treated as trusted rotation lineage. Validate known JSON rotation values with the same canonical rules (or reject them), and add regressions for numbered: 0, zero-padded numbers, and malformed/noncanonical timestamp strings.

The remaining requested boundaries look sound from source inspection: the change is additive, does not modify public LogEntry or ParserKind, preserves the producer-role tuples including Site Server provenance for distmgr/PkgXferMgr and WCM/wsyncmgr, and contains no native/I/O/platform APIs in the SCCM module. Static inspection also found only portable chrono/Serde dependencies in this slice; no native Windows acceptance is inferred.

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

Copy link
Copy Markdown
Owner Author

Independent Phase A API re-review is PASS at e42df2b with no Critical/Important/Minor findings. Exact producer-role, wire/rotation, compatibility, native, and wasm32 checks are green. This does not replace the pending CodeRabbit review; merge remains gated on that external result.

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

🧹 Nitpick comments (1)
crates/cmtraceopen-parser/src/sccm/models.rs (1)

19-74: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicated string-backed-enum-with-future-fallback pattern across SccmRole and SccmArtifactFamily. Both types independently hand-roll the same shape: a serialized_name lookup table, a Serialize impl calling serialize_str, and a Deserialize impl chaining string-equality guards ending in an Unknown(String) catch-all. This duplication risks the two impls drifting as more roles/families are added in later phases.

  • crates/cmtraceopen-parser/src/sccm/models.rs#L19-L74: extract the shared pattern (e.g. a declarative macro or a small generic helper keyed on a static &[(&str, Variant)] table) and implement SccmRole in terms of it.
  • crates/cmtraceopen-parser/src/sccm/catalog.rs#L29-L89: implement SccmArtifactFamily using the same shared helper/macro introduced for SccmRole.
♻️ Example macro-based consolidation sketch
macro_rules! string_backed_enum {
    ($name:ident { $($variant:ident => $str:literal),+ $(,)? }) => {
        impl $name {
            fn serialized_name(&self) -> &str {
                match self {
                    $(Self::$variant => $str,)+
                    Self::Unknown(value) => value,
                }
            }
        }
        impl Serialize for $name {
            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
            where S: Serializer {
                serializer.serialize_str(self.serialized_name())
            }
        }
        impl<'de> Deserialize<'de> for $name {
            fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
            where D: Deserializer<'de> {
                Ok(match String::deserialize(deserializer)? {
                    $($str => Self::$variant,)+
                    value => Self::Unknown(value),
                })
            }
        }
    };
}
🤖 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/models.rs` around lines 19 - 74, Extract
the duplicated string-backed enum serialization and deserialization logic into
one shared macro or helper, then use it for SccmRole in
crates/cmtraceopen-parser/src/sccm/models.rs lines 19-74 and SccmArtifactFamily
in crates/cmtraceopen-parser/src/sccm/catalog.rs lines 29-89. Preserve each
type’s existing string mappings and Unknown(String) fallback while removing
their separate serialized_name, Serialize, and Deserialize implementations.
🤖 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.

Nitpick comments:
In `@crates/cmtraceopen-parser/src/sccm/models.rs`:
- Around line 19-74: Extract the duplicated string-backed enum serialization and
deserialization logic into one shared macro or helper, then use it for SccmRole
in crates/cmtraceopen-parser/src/sccm/models.rs lines 19-74 and
SccmArtifactFamily in crates/cmtraceopen-parser/src/sccm/catalog.rs lines 29-89.
Preserve each type’s existing string mappings and Unknown(String) fallback while
removing their separate serialized_name, Serialize, and Deserialize
implementations.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 47032be9-3fab-45e6-89ec-29ecfecec67c

📥 Commits

Reviewing files that changed from the base of the PR and between f2caccf and e42df2b.

📒 Files selected for processing (6)
  • crates/cmtraceopen-parser/src/lib.rs
  • crates/cmtraceopen-parser/src/sccm/catalog.rs
  • crates/cmtraceopen-parser/src/sccm/mod.rs
  • crates/cmtraceopen-parser/src/sccm/models.rs
  • crates/cmtraceopen-parser/tests/fixtures/sccm/spine/artifact-manifest.json
  • crates/cmtraceopen-parser/tests/sccm_spine_contract.rs

@adamgell adamgell self-assigned this Jul 30, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

Commit 463133d addresses the canonical-rotation blocker with shared validation and symmetric serialize/deserialize rejection. Please re-review the new commit and confirm the prior blocking issue is closed. Unknown filename suffixes remain lossless unsupported values; unknown top-level JSON fields remain rejected to avoid silent provenance loss.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

@adamgell I’ll run a full re-review of #336 against codex/parser-family-skeleton, with special focus on whether 463133d closes the canonical-rotation validation gap in both serialization directions, while preserving lossless unsupported filename suffixes and rejecting unknown top-level JSON fields.

✅ Action performed

Full review finished.


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

Copy link
Copy Markdown
Owner Author

Review disposition: CodeRabbit’s enum-macro suggestion is deferred as nonblocking YAGNI. There are only two small wire enums in separate modules; introducing a shared macro in this compatibility boundary would increase indirection without changing safety. Exact mappings and future fallbacks remain exhaustively tested. All three inline Copilot threads have been replied to and resolved; two were fixed in 463133d, and the unknown-extra-field suggestion was declined because ignoring fields would lose provenance.

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

Please perform a substantive full review of exact current head 463133d76e2c9003a6d52369501a77b84128516d now that review capacity is available. Focus on fail-closed canonical numbered/timestamped rotation serialization and deserialization, lossless unsupported filename suffixes, producer/role provenance, public wire compatibility, pure-Rust/wasm32 boundaries, and deterministic behavior. Do not carry the earlier approval on e42df2b forward without checking 463133d.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Your plan includes PR reviews subject to rate limits. Reviews are available now.

Copy link
Copy Markdown
Owner Author

@coderabbitai review

Review exact current head 463133d76e2c9003a6d52369501a77b84128516d; the earlier approval is anchored to e42df2b and is not sufficient for this canonical-rotation fix.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

@adamgell I’ll review the exact current head 463133d76e2c9003a6d52369501a77b84128516d, independently of the earlier e42df2b approval, with focused validation of the canonical-rotation fix and the stated Phase A boundaries.

✅ 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

CodeRabbit exact-head gate — changes required

Local CodeRabbit CLI v0.7.1 completed a committed review of exact head 463133d76e2c9003a6d52369501a77b84128516d against codex/parser-family-skeleton and reported one Major / Functional Correctness finding: standard ConfigMgr rollover names use the .lo_ extension (for example CcmExec.log → CcmExec.lo_), while the current classifier marks CcmExec.lo_ unsupported and only accepts the nonstandard appended CcmExec.log.lo_ form. Microsoft Learn confirms .log is copied to the same basename with the .lo_ extension.

The #318 owner is adding a red regression and correcting canonical-basename/rotation semantics. Reviewer pseudocode will not be applied blindly because simply stripping .lo_ would lose the canonical .log identity. PR remains unmergeable pending focused green proof and exact-head re-review.

Reference: https://learn.microsoft.com/en-us/intune/configmgr/core/plan-design/hierarchy/about-log-files

adamgell commented Jul 30, 2026 •

Copy link
Copy Markdown
Owner Author

.lo_ correctness blocker fixed at exact head 3f7ce001c7d599647d32175d6632eac7bb1daadd.

The focused regression first failed because CcmExec.lo_ was exported as an unsupported unknown filename suffix. The classifier now recognizes standard Configuration Manager rollover names where .lo_ replaces .log, retains the canonical public basename CcmExec.log, emits SccmRotation::LoUnderscore, and marks the source supported only when the basename/producer-role tuple is declared. Unknown sources and wrong roles remain unsupported. Existing plan-compatible appended-rotation parsing remains unchanged in this focused fix.

Verification at committed head:

  • focused catalog_recognizes_standard_lo_rollback_name_by_canonical_log_basename — red before fix, green after
  • cargo test --locked -p cmtraceopen-parser --test sccm_spine_contract catalog_ -- --nocapture — 10 passed
  • cargo test --locked -p cmtraceopen-parser --quiet — 592 passed, 0 failed
  • cargo clippy --locked -p cmtraceopen-parser --all-targets -- -D warnings — pass
  • cargo check --locked -p cmtraceopen-parser --target wasm32-unknown-unknown — pass
  • npx tsc --noEmit — pass
  • both Rust formatters on the two owned files — pass
  • git diff --check HEAD^ HEAD — pass

Repository-wide cargo fmt --all -- --check still reports pre-existing formatting drift in unrelated ESP/Tauri files; this commit does not touch those files, and both owned files pass scoped formatting. Exact-head re-review is requested below; no merge is authorized by this update.

Copy link
Copy Markdown
Owner Author

@coderabbitai review

Please review exact head 3f7ce001c7d599647d32175d6632eac7bb1daadd, specifically the standard ConfigMgr rollover correction: CcmExec.lo_ must retain canonical basename CcmExec.log, rotation loUnderscore, declared producer-role gating, and unsupported handling for undeclared sources. Treat the prior exact-head .lo_ Major finding as unresolved unless this commit substantively addresses it. Do not infer native Windows acceptance.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

head_sha='3f7ce001c7d599647d32175d6632eac7bb1daadd'
parent_sha="${head_sha}^"

echo '== Verify requested commit is available =='
git show -s --format='commit=%H%nparent=%P%nsubject=%s' "$head_sha"

echo '== Exact commit patch =='
git diff --find-renames --find-copies --no-ext-diff "${parent_sha}" "$head_sha" -- \
  crates/cmtraceopen-parser/src/sccm/catalog.rs \
  crates/cmtraceopen-parser/tests/sccm_spine_contract.rs

echo '== Relevant item outline =='
ast-grep outline crates/cmtraceopen-parser/src/sccm/catalog.rs --items all --view expanded
ast-grep outline crates/cmtraceopen-parser/tests/sccm_spine_contract.rs --items all --match 'catalog|rotation|lo' --view expanded || true

echo '== Catalog parser, lookup, and source declarations =='
rg -n -C5 \
  'ParsedArtifactName|from_name|classify_artifact_name|SOURCE_CATALOG|declared_source_catalog|LoUnderscore|lo_' \
  crates/cmtraceopen-parser/src/sccm/catalog.rs

echo '== Focused regression and nearby catalog contract tests =='
rg -n -C8 \
  'catalog_recognizes_standard_lo_rollback_name_by_canonical_log_basename|CcmExec\.lo_|CcmExec\.log\.lo_|wrong.role|undeclared|LoUnderscore' \
  crates/cmtraceopen-parser/tests/sccm_spine_contract.rs

echo '== Precise changed-line context at exact head =='
git diff -U40 "${parent_sha}" "$head_sha" -- \
  crates/cmtraceopen-parser/src/sccm/catalog.rs \
  crates/cmtraceopen-parser/tests/sccm_spine_contract.rs

Length of output: 24574


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '== Catalog declaration(s) for CcmExec and adjacent naming convention =='
rg -n -C4 'basename: "(CcmExec|AppEnforce|PolicyAgent)' \
  crates/cmtraceopen-parser/src/sccm/catalog.rs

echo '== Full classification and parsed-name implementation =='
sed -n '396,530p' crates/cmtraceopen-parser/src/sccm/catalog.rs

echo '== Role, unknown-source, and rotation contract test bodies =='
sed -n '270,455p' crates/cmtraceopen-parser/tests/sccm_spine_contract.rs

echo '== All explicit .lo_ classifier call sites and assertions =='
rg -n -C5 'classify_artifact_name\([^)]*\.lo_|\.lo_.*(Unknown|unsupported|role|SccmRole)' \
  crates/cmtraceopen-parser/tests crates/cmtraceopen-parser/src --glob '*.rs' || true

echo '== SCCM public model fields and their provenance meanings =='
sed -n '85,110p' crates/cmtraceopen-parser/src/sccm/catalog.rs

Length of output: 15002


@adamgell Reviewed exact head 3f7ce001c7d599647d32175d6632eac7bb1daadd. No findings.

The .lo_ correction substantively closes the prior Major issue:

  • CcmExec.lo_ is parsed as SccmRotation::LoUnderscore.
  • Its stem still undergoes exact catalog tuple matching, and the public result reconstructs the canonical basename as CcmExec.log.
  • A matching Client producer yields the declared ccmExec / ClientHealth entry; wrong roles and undeclared stems remain Unknown, with uses_ccm_records and supported_for_diagnosis both false.
  • The appended CcmExec.log.lo_ grammar remains supported, and case-insensitive .lo_ coverage is included.

This was source-and-contract-test inspection only; I did not infer native Windows acceptance.

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

Independent exact-head review found one remaining canonical-grammar blocker. Microsoft documents that Configuration Manager copies AppEnforce.log to the same filename with the extension replaced by .lo_ (AppEnforce.lo_), not an appended AppEnforce.log.lo_: https://learn.microsoft.com/en-us/intune/configmgr/core/plan-design/hierarchy/about-log-files#how-it-works

Head 3f7ce001 correctly adds support for the standard form, but the test named catalog_rotation_grammar_accepts_only_canonical_suffixes still classifies the appended form as canonical/supported. That creates an evidence-first false-positive path for a nonstandard filename. Required before merge: retain AppEnforce.lo_ (case-insensitive) as LoUnderscore; treat AppEnforce.log.lo_ as an explicit unsupported/unknown filename suffix; add focused red/green proof; and obtain a new exact-head CodeRabbit review. No native Windows acceptance is inferred.

Copy link
Copy Markdown
Owner Author

Follow-up canonical-grammar blocker fixed in new commit b143ffcd94c80cf03748ea282afda82971b66d55; prior commit 3f7ce001 was not rewritten.

TDD proof:

  • RED: after moving AppEnforce.log.lo_ and AppEnforce.LOG.LO_ into the rejected matrix, catalog_rotation_grammar_accepts_only_canonical_suffixes failed because production still emitted loUnderscore.
  • GREEN: removed the .log. + lo_ special case. Those nonstandard appended forms now remain explicit unsupported filenameSuffix values (.lo_/.LO_), while standard AppEnforce.lo_ and AppEnforce.LO_ remain canonical LoUnderscore rotations with canonical AppEnforce.log identity.

Verification at exact committed head:

  • focused canonical grammar test — pass
  • catalog suite — 10 passed
  • cargo test --locked -p cmtraceopen-parser --quiet — 592 passed
  • strict Clippy — pass
  • wasm32 check — pass
  • npx tsc --noEmit — pass
  • scoped formatting with Rust 1.88 and current rustfmt — pass
  • git diff --check HEAD^ HEAD — pass

No merge performed. Exact-head review is requested below.

Copy link
Copy Markdown
Owner Author

@coderabbitai review

Review exact head b143ffcd94c80cf03748ea282afda82971b66d55. Confirm that standard replacement-extension forms such as AppEnforce.lo_ remain canonical loUnderscore rotations with AppEnforce.log identity, while nonstandard appended forms such as AppEnforce.log.lo_ are preserved only as explicit unsupported filename suffixes. Do not carry prior review conclusions forward without checking this commit, and do not infer native Windows acceptance.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

head_sha='b143ffcd94c80cf03748ea282afda82971b66d55'
parent_sha="${head_sha}^"

echo '== Requested commit =='
git show -s --format='commit=%H%nparent=%P%nsubject=%s' "$head_sha"

echo '== Exact patch =='
git diff --find-renames --find-copies --no-ext-diff -U45 "$parent_sha" "$head_sha" -- \
  crates/cmtraceopen-parser/src/sccm/catalog.rs \
  crates/cmtraceopen-parser/tests/sccm_spine_contract.rs

echo '== Changed-file outlines =='
for file in $(git diff --name-only "$parent_sha" "$head_sha" -- '*.rs'); do
  printf '\n--- %s ---\n' "$file"
  ast-grep outline "$file" --items all --view expanded
done

echo '== Classification and canonical catalog lookup =='
rg -n -C8 \
  'struct ParsedArtifactName|impl ParsedArtifactName|fn from_name|fn classify_artifact_name|SOURCE_CATALOG|LoUnderscore|unknown_filename_suffix' \
  crates/cmtraceopen-parser/src/sccm/catalog.rs

echo '== Exact .lo_ contract coverage and grammar matrix =='
rg -n -C10 \
  'lo_|LoUnderscore|catalog_rotation_grammar_accepts_only_canonical_suffixes|catalog_recognizes_standard_lo_rollback_name_by_canonical_log_basename|filenameSuffix|AppEnforce' \
  crates/cmtraceopen-parser/tests/sccm_spine_contract.rs

echo '== Changed SCCM source checks for platform/I-O coupling =='
git diff --name-only "$parent_sha" "$head_sha" -- crates/cmtraceopen-parser/src/sccm | while IFS= read -r file; do
  rg -n -i -C2 \
    'std::(fs|net|process|path|env)|\b(File|Path|Command|ReadDir|Tcp|Udp|Windows|Win32|Registry|WMI|Tauri|tokio|reqwest|hyper)\b' \
    "$file" || true
done

Length of output: 24115


@adamgell Reviewed exact head b143ffcd94c80cf03748ea282afda82971b66d55. No findings.

The commit substantively enforces the requested distinction:

  • Standard replacement-extension names—AppEnforce.lo_ and case-insensitive AppEnforce.LO_—continue to parse as SccmRotation::LoUnderscore. Their parsed stem is matched with the producer role against the declared catalog, so a matching entry retains canonical basename AppEnforce.log.
  • Appended forms—AppEnforce.log.lo_ and AppEnforce.LOG.LO_—now follow the unsupported .log. suffix path. They preserve exact suffix provenance as {"kind":"filenameSuffix","value":".lo_"} / ".LO_" and are not supported for diagnosis.
  • Catalog lookup remains exact on canonical stem plus role, so recognized rotations do not bypass producer-role gating; undeclared sources or roles remain unsupported.
  • This incremental change introduces no SCCM platform, native Windows, or I/O coupling.

This conclusion is based on exact-commit source and contract-test inspection only; no native Windows acceptance is inferred.

You are interacting with an AI system.

@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 final review PASS at exact head b143ffcd94c80cf03748ea282afda82971b66d55.

Verified the canonical replacement-extension grammar, explicit unsupported preservation for appended .log.lo_, exact producer-role gating, stable public tags, and parser-only/wasm boundary. Fresh local proof: focused canonical-rotation test passed; full parser suite passed 592/592 (349 unit + 222 ESP integration + 21 SCCM); strict Clippy passed; wasm32 check passed; npx tsc --noEmit passed; owned-file Rust 1.88 formatting passed; git diff --check passed; worktree is clean and synchronized. Repository-wide cargo fmt --check --all still reports only the documented unrelated baseline drift and no owned #318 file.

CodeRabbit separately reviewed this exact SHA with no findings. No native Windows acceptance is claimed. Approved for the #336 shared-spine Phase A merge gate; #342 remains separately blocked on its public-message privacy correction.

@adamgell
adamgell merged commit 262a18d into codex/parser-family-skeleton Jul 30, 2026
1 check passed
adamgell added a commit that referenced this pull request Aug 4, 2026
Implements the reviewed Phase A SCCM spine contracts for issue #318, including pure-Rust artifact/coverage/provenance models, exact role-aware catalog classification, conservative rotation grammar, and canonical ConfigMgr .lo_ handling.

Validation: 592 parser tests, strict Clippy, wasm32, TypeScript, scoped Rust 1.88 formatting, and diff checks. CodeRabbit and independent exact-head review passed. Native Windows acceptance remains pending and is not claimed.

Part of #318.
adamgell added a commit that referenced this pull request Sep 18, 2026
…t-1.6.0 fixes (#633)

* docs(changelog): cite the shipped issue numbers and record main's post-1.6.0 fixes

Three things were wrong with the changelog as it stood after the 1.6.0 cut.

**The 1.6.0 section under-cited its own SCCM work.** A check across every commit
in the tag (`v1.5.2..9bbaf67`) found twelve issue numbers that shipped without
appearing anywhere in the section: #335, #336, #342, #344, #346, #348, #350,
#394, #404, #418, #444, #458. They are the foundation and hardening under the one
SCCM bullet — diagnostic spine, evidence framing, canonical intake and health
contracts, signal tokens, correlation keys, coverage assessment, bounded ids,
overlapping evidence ranges, client discovery, DP-to-intake binding. The bullet
now names them. Two more were folded into bullets that described their work
without citing them: the CodeRabbit retarget and review charter (#537, #538 under
the agent-tooling bullet) and the framework's own extraction (#543, #548 under
Reducer Framework v1).

**Main carries two fixes the 1.6.0 tag does not.** `[Unreleased]` was empty while
`9bbaf67e..main` held the updater-manifest publisher fix and the `rustls` advisory
bump, so both are recorded now.

Verified: a script that walks every `feat`/`fix`/`perf`/`refactor`/`build`/`ci`
commit in the tag, extracts its issue references and checks them against both the
1.6.0 and 1.5.2 sections now reports zero undocumented references. The one that
looked missing before, #521, is documented under 1.5.2 where it shipped.

* docs(changelog): name the redaction boundary decision in the 1.6.0 section

The section cited the work but never named ADR-004 revision 1 or the ruling that
makes it load-bearing. The changelog is the durable record, so the decision now
appears there with the audit finding that motivated it, what changed (projected
form is the only constructible public form, preserving variants are explicitly
named local-only entry points), and a pointer to the document that carries the
eight rulings.

* docs(changelog): say the redaction decision in plain English

Same decision, no jargon: 'covered almost none of the places data actually leaves
the app' rather than 'binds at almost no real export surface', 'the version
holding the real values' rather than 'the preserving variant', and the check
described as following through nested data rather than as structural enforcement
being recursive. The eight rulings and the ADR link are unchanged.
@adamgell
adamgell deleted the codex/sccm-318-spine-role-fix 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants