test(sccm): prepare hierarchy and replication corpus - #379
Conversation
📝 WalkthroughWalkthroughAdded a synthetic SCCM hierarchy-and-replication corpus, preparation rules, physical evidence, expected results, and comprehensive contract tests for valid scenarios and adversarial mutations. ChangesSCCM hierarchy and replication corpus
Estimated code review effort: 4 (Complex) | ~60 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Comment |
|
@coderabbitai review\n\nPlease review exact head |
|
✅ Action performedReview finished.
|
|
@coderabbitai review\n\nRetry the substantive review at exact head |
|
✅ Action performedReview finished.
|
adamgell
left a comment
There was a problem hiding this comment.
Independent exact-head review — BLOCKED
Reviewed exact 25b37333affde22b4ef8a19f4a5f3d89c082b599..e1c65146a9f3d479278d50386e7335a17bbb9d7b. Keep PR #379 draft/open.
Four reproduced contract blockers are attached inline:
- Physical evidence host handles are only prefix-checked and are not bound to origin or target topology, so incompatible-host evidence can retain exact topology and High confidence.
- Coverage-gap IDs need not resolve to a declared non-captured manifest artifact; fabricated IDs pass the current
assert_necheck. - The reorder test compares two
BTreeSetvalues built from the same elements, so it cannot prove byte-identical candidate output. - The required negative for a generic CCM message containing a site-code-looking string is absent.
Verification at the exact head: focused #331 7/7, full parser suite, server intake, and spine pass; default strict Clippy passes; Rust 1.88 wasm32, TypeScript, owned rustfmt, and diff checks pass. Rust 1.88 strict Clippy reports the same 59 unrelated base findings and full-workspace formatting reports the documented unrelated baseline; neither touches owned files.
CodeRabbit has not supplied a substantive review: its responses are rate-limited or status-only and therefore are not approval. Require permanent adversarial regressions, corrected exact-head gates, fresh substantive CodeRabbit, and a different independent PASS before readiness or merge.
Exact-head #331 review-fix evidencePushed Scope and dependency state
RED → GREEN
Fixture matrixEleven synthetic/sanitized scenarios: healthy, sender failure, receiver failure, backlog/retry, recovery, absent remote source, invalid offset, topology mismatch, rotation split, capped/incomplete, and generic site-code token. Origin/primary/additional-target host direction, exact coverage closure, provenance collision, and no-time-only/cross-side cause boundaries are pinned. Verification
|
|
@coderabbitai review Please perform a fresh substantive review of exact head |
|
I will review the specified host/topology binding, coverage-gap closure, canonical collision preservation, generic CCM site-token negative case, and target-side fixture assets. This request is not an approval. ✅ Action performedReview finished.
|
adamgell
left a comment
There was a problem hiding this comment.
Independent exact-head review — BLOCKED
Reviewed exact 25b37333affde22b4ef8a19f4a5f3d89c082b599..bc457feff93ab384b5f77815510855fab1b4a61d. Keep PR #379 draft/open.
The four prior P1s are closed at this SHA: physical producer hosts are bound to origin/target topology including the additional-target site/host mapping; gap IDs close against one exact typed non-captured manifest/coverage row; candidate facts are canonically serialized byte-for-byte across reordered inputs while distinct rotation provenance survives; and the generic CCM site-token fixture normalizes as evidence but creates no hierarchy candidate. The six formerly ignored target-side .log assets are tracked, synthetic/sanitized, normalized, and cited by exact evidence references.
A new executable P1 blocks readiness: the invalidOffset artifact-request arm is not bound to the request source, direction, basename, or declared target topology. Rewriting the clock-offset request to server-hierarchy-control / both / XYZ / replmgr.log left the focused request test and the entire 9-test disposable probe run green. Inline reproduction: #379 (comment). The exact source/role/direction/site/basename request must be derived from the invalid-offset artifacts, and both must mean the bounded union of origin and target.
Two secondary exactness items are attached: the README omits tracked sender.lo_, and documentation assertions embed LF-only line breaks. The authenticated CodeRabbit CLI review found both plus the request-binding issue. I independently reproduced the hard blocker. Hosted CodeRabbit review 4825780195 is a real formal APPROVED review object on exact bc457fe and is not stale, but its no-finding result is superseded by the executable mutation.
Fresh clean-head verification: #331 8/8, server intake 1/1, spine 61/61, full parser 662/662, active Rust strict Clippy, Rust 1.88 wasm32, TypeScript, 22 JSON files, owned rustfmt, and range diff checks pass. Rust 1.88 strict Clippy has the exact base 59-finding baseline and full workspace formatting has the exact base 17-file/24-hunk baseline; neither includes #331 files.
Require a separate fix owner, permanent RED-to-GREEN request-provenance tests, fresh substantive CodeRabbit readback, and a different independent exact-head review. Do not merge, mark ready, close #331, claim production reducers, or claim live Windows acceptance.
|
🟢 Correction ownership claimed for the current #331 review round. I am working only in |
|
🟢 #331 round-2 correction claimed in a fresh isolated worktree from exact head |
#331 round-2 correction pushedExact head: Commits:
Verification at this head:
Global The PR stays draft/open. Fresh substantive exact-head CodeRabbit and a different independent exact-head re-review remain required. No native collection, production reducer expansion, merge/readiness, or live-Windows claim is made. |
|
@coderabbitai full review Please perform a fresh substantive review of exact head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
head='142ff8d3aea0121b1ca080c70dc1448e13552161'
base='edd6461c6635a461a6b87884c44bae937e0531fa'
contract='crates/cmtraceopen-parser/tests/sccm_server_hierarchy_and_replication_fixture_contract.rs'
document='docs/sccm/preparation/issue-331-hierarchy-replication-corpus.md'
printf '%s\n' '== exact commit verification =='
printf 'checked-out HEAD: '; git rev-parse HEAD
printf 'requested head: '; git rev-parse "$head"
printf 'requested base: '; git rev-parse "$base"
printf 'merge base: '; git merge-base "$base" "$head"
printf 'base ancestor of head: '; git merge-base --is-ancestor "$base" "$head" && echo yes
printf '%s\n' '== changed files =='
git diff --name-status "$base..$head"
printf '%s\n' '== range summary =='
git diff --stat "$base..$head"
printf '%s\n' '== contract function map =='
ast-grep outline "$contract" --items all --type function --view signatures
printf '%s\n' '== changed validation, grammar, and regression references =='
git diff --no-ext-diff --unified=18 "$base..$head" -- "$contract" "$document" \
| rg -n -C 10 -i \
'safe_server_handle|relative_path|path.*segment|candidate|provenance|normalize_key|profile|message|link|site|disposition|terminal|confidence|mutation|correlation|`#331`|`#333`'
printf '%s\n' '== current relevant symbols =='
rg -n -C 7 -i \
'fn (safe_server_handle|safe_relative_path|artifact_has_exact_public_provenance|artifact_is_exact_candidate|validate.*candidate|normalize.*key|validate.*profile|validate.*disposition|validate.*terminal)|MAX_.*(HANDLE|PATH|SEGMENT)|EXACT_SOURCE_VERSION|disposition|terminal|cross.side|correlation|`#333`' \
"$contract" "$document"
printf '%s\n' '== range whitespace =='
git diff --check "$base..$head"Length of output: 141060 🏁 Script executed: #!/bin/bash
set -euo pipefail
contract='crates/cmtraceopen-parser/tests/sccm_server_hierarchy_and_replication_fixture_contract.rs'
printf '%s\n' '== provenance and candidate admission helpers =='
sed -n '72,360p' "$contract"
printf '%s\n' '== candidate construction and serialization =='
sed -n '420,610p' "$contract"
printf '%s\n' '== new permanent regressions =='
sed -n '3560,3790p' "$contract"
printf '%s\n' '== shared key-normalization declarations and implementation =='
rg -n -C 10 --type rust \
'pub (fn )?normalize_key\b|fn normalize_key\b|enum SccmCorrelationKeyKind|enum SccmKeyConfidence' \
crates
printf '%s\n' '== every HierarchyCandidateFact field assignment =='
rg -n -C 5 \
'HierarchyCandidateFact \{|artifact_id:|producer_host_handle:|relative_path:|path_fingerprint:|rotation_kind:|rotation_value:|rotation_lineage_id:' \
"$contract"
printf '%s\n' '== candidate provenance field validation references =='
rg -n -C 4 \
'producerHostHandle|relativePath|sanitizedSourcePath|pathFingerprint|lineageId|rotation.*value|rotationValue|safe_(opaque|segmented|server)' \
"$contract"Length of output: 67790 🏁 Script executed: #!/bin/bash
set -euo pipefail
base='edd6461c6635a461a6b87884c44bae937e0531fa'
head='142ff8d3aea0121b1ca080c70dc1448e13552161'
contract='crates/cmtraceopen-parser/tests/sccm_server_hierarchy_and_replication_fixture_contract.rs'
keys='crates/cmtraceopen-parser/src/sccm/keys.rs'
printf '%s\n' '== shared SCCM key normalization rules =='
ast-grep outline "$keys" --items all --type function --view signatures
sed -n '1,155p' "$keys"
printf '%s\n' '== topology and artifact-schema provenance validation =='
sed -n '1129,1395p' "$contract"
printf '%s\n' '== complete exact diff =='
git diff --no-ext-diff --unified=8 "$base..$head" -- "$contract"
printf '%s\n' '== exact `#331` and `#333` boundary assertions =='
sed -n '1430,1490p;2048,2065p' "$contract"
rg -n -C 3 -i '`#331`|`#333`|cross-side|correlation|time alone|native collection|production' \
docs/sccm/preparation/issue-331-hierarchy-replication-corpus.md "$contract"
printf '%s\n' '== repository status =='
git status --shortLength of output: 58133 🏁 Script executed: #!/bin/bash
set -euo pipefail
sed -n '319,415p' crates/cmtraceopen-parser/src/sccm/keys.rsLength of output: 3826
I found no blocking issue in the reviewed range. The correction closes the requested controls:
The This result applies only to exact head You are interacting with an AI system. |
|
Independent exact-head review claimed at I will not edit or push. Review scope is the corrected host/path bounds, shared key grammar, exact profile/phase/disposition/terminal admission, coverage/rotation/topology provenance, deterministic output, source-card-only boundary, and no #333 causal/correlation claim. Prior stale approvals and status-only CodeRabbit output are not clearance. PR remains draft/open. |
adamgell
left a comment
There was a problem hiding this comment.
Independent exact-head review — BLOCKED
Reviewed exact a8a367c661cd17bd1e73b87724c143ec8565ffc7...142ff8d3aea0121b1ca080c70dc1448e13552161 in a fresh detached worktree. Keep PR #379 draft/open.
Three P1 contract roots are attached inline:
- Candidate serialization drops the shared usable timestamp provenance after filtering for normalized UTC, so a future consumer cannot independently validate cross-host ordering.
- Lexically safe producer handles and path fingerprints can still carry identity-bearing payloads and are serialized verbatim.
- Equal UTC instants across different host artifacts pass as usable ordered evidence and preserve the High ceiling; only strictly reversed UTC is rejected.
Disposable evidence was test-first and then removed. Two narrow candidate probes ran 2 passed / 2 failed: healthy candidate facts had no timestampOrdering/utcMillis, and safe:server:RealUser plus synthetic:RealUser reached output. A direct target despool mutation made receive equal in UTC to the origin sender; the plan-critical transaction validator still passed 1/1 as usable. The review worktree is restored clean at the exact SHA.
Committed-head gates are otherwise green: #331 focused 25/25; server intake 1/1; spine 136/136; full parser 754/754; strict all-target Clippy; Rust 1.88 wasm32; TypeScript no-emit; frontend 40/524; 22/22 JSON files; owned-file Rust 1.88 rustfmt; diff/cleanliness. Workspace rustfmt still reports the inherited 17-file non-#331 baseline.
Require permanent RED-to-GREEN regressions for all three roots, a fresh substantive CodeRabbit review at the resulting exact SHA, and a different independent exact-head PASS. This remains preparation-only: no production reducer/native collector and no live Windows acceptance claim.
|
@coderabbitai review Please run a fresh substantive hosted review of exact head |
|
The review will include the candidate timestamp-provenance handoff, public provenance de-identification, and equal-UTC cross-host chronology gates from independent review A skipped, incremental, status-only, rate-limited, or stale-head result is not approval. ✅ Action performedFull 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 14 minutes. |
|
🟢 #331 correction round claimed from exact Owner/worktree: Prep-only owned scope: the #331 hierarchy/replication contract test, synthetic fixture metadata/evidence only if a focused regression requires it, and the #331 preparation documentation. No production reducer, shared SCCM model, native capture, correlation code, or live Windows claim. TDD starts with permanent RED regressions for all three exact-head P1 roots: preserve shared timestamp provenance in candidate facts; reject identity-bearing safe-looking host/fingerprint payloads through explicit versioned/domain-separated construction; and treat equal UTC as ordered only within one artifact with strictly forward physical lines. No push occurs until focused and aggregate gates pass; the PR remains draft/open. |
|
🟢 #331 correction pushed at exact head RED
GREEN
Verification:
Fresh exact-head hosted CodeRabbit and independent review are required before clearance. |
|
@coderabbitai review Please run a fresh substantive hosted full review of exact head |
|
The review will verify the three RED-to-GREEN corrections and the preparation-only boundaries. A skipped, incremental, status-only, rate-limited, or stale-head result will not count as approval. ✅ Action performedFull review finished. |
|
Independent exact-head review started in a fresh detached, read-only worktree at |
There was a problem hiding this comment.
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/tests/fixtures/sccm/server/hierarchy_and_replication/healthy-link/manifest.json`:
- Line 10: The healthy-02-sender manifest entry must match the supplied physical
artifact. Update its relativePath from the current sender.log location to the
evidence path containing origin/lo_/sender.lo_, and change the rotation metadata
from current to the corresponding lo_ rotation while preserving the artifact’s
identity and other fields.
🪄 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: 4e4abcf8-874c-475c-8307-3c3bc59b77b4
⛔ Files ignored due to path filters (21)
Cargo.lockis excluded by!**/*.lockcrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/absent-remote-source/evidence/server-hierarchy-transfer/origin/current/sender.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/backlog-retry/evidence/server-hierarchy-control/origin/current/replmgr.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/clock-offset-unknown/evidence/server-hierarchy-transfer/origin/current/sender.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/clock-offset-unknown/evidence/server-hierarchy-transfer/target/current/despool.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/generic-site-token/evidence/server-hierarchy-transfer/origin/current/sender.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/healthy-link/evidence/server-hierarchy-control/origin/current/replmgr.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/healthy-link/evidence/server-hierarchy-control/origin/equal-instant/replmgr.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/healthy-link/evidence/server-hierarchy-control/target/current/rcmctrl.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/healthy-link/evidence/server-hierarchy-transfer/origin/current/sender.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/healthy-link/evidence/server-hierarchy-transfer/target/current/despool.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/healthy-link/evidence/server-hierarchy-transfer/target/equal-instant/despool.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/incomplete/evidence/server-hierarchy-control/origin/current/replmgr.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/receiver-processing-failure/evidence/server-hierarchy-transfer/origin/current/sender.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/receiver-processing-failure/evidence/server-hierarchy-transfer/target/current/despool.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/recovery/evidence/server-hierarchy-transfer/origin/current/sender.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/recovery/evidence/server-hierarchy-transfer/target/current/despool.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/rotation-boundary/evidence/server-hierarchy-transfer/origin/current/sender.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/sender-failure/evidence/server-hierarchy-transfer/origin/current/sender.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/topology-mismatch/evidence/server-hierarchy-transfer/origin/current/sender.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/topology-mismatch/evidence/server-hierarchy-transfer/target/current/despool.logis excluded by!**/*.log
📒 Files selected for processing (28)
crates/cmtraceopen-parser/Cargo.tomlcrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/README.mdcrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/absent-remote-source/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/absent-remote-source/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/backlog-retry/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/backlog-retry/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/clock-offset-unknown/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/clock-offset-unknown/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/generic-site-token/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/generic-site-token/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/healthy-link/evidence/server-hierarchy-transfer/origin/lo_/sender.lo_crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/healthy-link/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/healthy-link/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/incomplete/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/incomplete/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/receiver-processing-failure/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/receiver-processing-failure/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/recovery/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/recovery/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/rotation-boundary/evidence/server-hierarchy-transfer/origin/lo_/sender.lo_crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/rotation-boundary/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/rotation-boundary/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/sender-failure/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/sender-failure/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/topology-mismatch/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/topology-mismatch/manifest.jsoncrates/cmtraceopen-parser/tests/sccm_server_hierarchy_and_replication_fixture_contract.rsdocs/sccm/preparation/issue-331-hierarchy-replication-corpus.md
adamgell
left a comment
There was a problem hiding this comment.
INDEPENDENT EXACT-HEAD REVIEW: PASS
Reviewed fresh detached head da2b4ca2436bb70c2bb03f09c31f69f493f91930 against base a8a367c661cd17bd1e73b87724c143ec8565ffc7. I did not author #331, made no edits or pushes, and immediately before this verdict confirmed detached local HEAD, fetched origin/codex/sccm-331-hierarchy-replication-corpus, and PR head all match the exact SHA.
Findings: none actionable.
The three prior P1 roots and positive guards are closed:
- candidate facts serialize the exact shared timestamp object (
originalDisplay,offsetMinutes,utcMillis,orderingState), retaining provenance needed by later consumers; - safe-looking identity inputs are never serialized raw: producer-host and path-fingerprint inputs use fixed
sccm-provenance:v1domain-separated SHA-256 tokens, with distinct domains producing distinct fixed-width lowercase digests; - equal UTC across distinct artifacts fails the usable ordering gate, while equal UTC on one artifact remains usable only with a strictly forward physical line range.
Reproduced verification: focused hierarchy contract 28/28; full parser 757/757; strict all-target parser Clippy; Rust 1.88 wasm32; TypeScript; 22/22 JSON; 22 synthetic evidence files; scoped Rust 1.88 rustfmt; range git diff --check; sanitized fixture/document privacy scan; clean detached worktree. Workspace-wide fmt remains red only on the inherited 17 non-#331 files.
CodeRabbit exact-head disposition: its review was substantive but the sole manifest mismatch finding is not valid. origin/current/sender.log exists at 323 bytes and exactly matches the healthy manifest. The additional byte-identical origin/lo_/sender.lo_ is intentionally mutation-only evidence for the complete rotated-sender positive and mismatch negatives added in bda57d83. Evidence and withdrawal request: #379 (comment) . No fixture change is appropriate; the separate hosted-review thread can be resolved after that disposition is acknowledged.
Scope remains preparation/source-contract only. No production reducer, native collection, client/server correlation, cross-side causal claim, or live Windows acceptance is implemented or claimed. Keep the PR draft/open until owner dependency, hosted-review disposition, native validation, and downstream #333 gates are handled.
There was a problem hiding this comment.
Pull request overview
Prepares a synthetic, publication-safe SCCM server hierarchy/replication corpus for Issue #331 by adding a strict fixture contract (manifests + expected outputs + bounded evidence files) plus a comprehensive test that enforces deterministic, fail-closed behavior while production reducers/intake remain dependency-blocked (#318/#335).
Changes:
- Added a preparation document defining the evidence boundary, topology/time constraints, coverage semantics, and scenario matrix for the hierarchy/replication workflow.
- Added a large fixture-contract test that validates schema/identity strictness, deterministic projection, bounded follow-up requests, and “no time-only / no causal claims” guarantees.
- Added synthetic fixture corpus (scenario directories with
manifest.json,expected.json, and minimal evidence files) and a dev-only hash dependency used by tests.
Reviewed changes
Copilot reviewed 27 out of 49 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| docs/sccm/preparation/issue-331-hierarchy-replication-corpus.md | Defines the #331 preparation-only contract boundary, topology/time rules, coverage semantics, and scenario matrix. |
| crates/cmtraceopen-parser/tests/sccm_server_hierarchy_and_replication_fixture_contract.rs | Enforces the corpus contract via deterministic, fail-closed schema/identity/provenance/time/coverage assertions and scenario matrices. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/README.md | Documents fixture intent, evidence boundaries, and safety/determinism constraints. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/topology-mismatch/manifest.json | Adds topology-mismatch scenario manifest (multi-target topology + mismatched keys). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/topology-mismatch/expected.json | Expected output for topology-mismatch (no transactions; source-local mismatch observations). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/topology-mismatch/evidence/server-hierarchy-transfer/origin/current/sender.log | Synthetic sender evidence for topology-mismatch scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/topology-mismatch/evidence/server-hierarchy-transfer/target/current/despool.log | Synthetic despool evidence for topology-mismatch scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/sender-failure/manifest.json | Adds sender-failure scenario manifest. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/sender-failure/expected.json | Expected output for sender-failure (two distinct terminal transactions for CHD/SEC). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/sender-failure/evidence/server-hierarchy-transfer/origin/current/sender.log | Synthetic sender evidence for sender-failure scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/rotation-boundary/manifest.json | Adds rotation-boundary scenario manifest (split fragments across current/lo_). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/rotation-boundary/expected.json | Expected output for rotation-boundary (no transactions; bounded rotation-split request). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/rotation-boundary/evidence/server-hierarchy-transfer/origin/current/sender.log | Truncated synthetic current sender fragment for rotation-boundary scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/rotation-boundary/evidence/server-hierarchy-transfer/origin/lo_/sender.lo_ | Truncated synthetic lo_ sender fragment for rotation-boundary scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/recovery/manifest.json | Adds recovery scenario manifest. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/recovery/expected.json | Expected output for recovery (retry then success => recovered). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/recovery/evidence/server-hierarchy-transfer/origin/current/sender.log | Synthetic sender evidence for recovery scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/recovery/evidence/server-hierarchy-transfer/target/current/despool.log | Synthetic despool evidence for recovery scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/receiver-processing-failure/manifest.json | Adds receiver-processing-failure scenario manifest. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/receiver-processing-failure/expected.json | Expected output for receiver-processing-failure (terminal failure at target processing). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/receiver-processing-failure/evidence/server-hierarchy-transfer/origin/current/sender.log | Synthetic sender evidence for receiver-processing-failure scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/receiver-processing-failure/evidence/server-hierarchy-transfer/target/current/despool.log | Synthetic despool evidence for receiver-processing-failure scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/incomplete/manifest.json | Adds incomplete/capped scenario manifest. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/incomplete/expected.json | Expected output for incomplete/capped scenario (coverage-only + bounded capped request). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/incomplete/evidence/server-hierarchy-control/origin/current/replmgr.log | Truncated synthetic replmgr evidence for incomplete/capped scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/healthy-link/manifest.json | Adds healthy-link scenario manifest. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/healthy-link/expected.json | Expected output for healthy-link (full high-confidence terminal success). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/healthy-link/evidence/server-hierarchy-control/origin/current/replmgr.log | Synthetic replmgr evidence for healthy-link scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/healthy-link/evidence/server-hierarchy-control/origin/equal-instant/replmgr.log | Equal-UTC replmgr evidence variant for ordering constraints. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/healthy-link/evidence/server-hierarchy-transfer/origin/current/sender.log | Synthetic sender evidence for healthy-link scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/healthy-link/evidence/server-hierarchy-transfer/origin/lo_/sender.lo_ | Synthetic rotated lo_ sender evidence for healthy-link scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/healthy-link/evidence/server-hierarchy-transfer/target/current/despool.log | Synthetic despool evidence for healthy-link scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/healthy-link/evidence/server-hierarchy-transfer/target/equal-instant/despool.log | Equal-UTC despool evidence variant for ordering constraints. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/healthy-link/evidence/server-hierarchy-control/target/current/rcmctrl.log | Synthetic rcmctrl evidence for healthy-link scenario (ack + terminal). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/generic-site-token/manifest.json | Adds generic-site-token negative scenario manifest. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/generic-site-token/expected.json | Expected output for generic-site-token (no candidates/transactions). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/generic-site-token/evidence/server-hierarchy-transfer/origin/current/sender.log | Generic CCM message containing a site-like token but not the exact hierarchy grammar. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/clock-offset-unknown/manifest.json | Adds clock-offset-unknown scenario manifest (invalid offsets). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/clock-offset-unknown/expected.json | Expected output for clock-offset-unknown (unusable ordering + bounded invalidOffset request). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/clock-offset-unknown/evidence/server-hierarchy-transfer/origin/current/sender.log | Synthetic sender evidence with invalid offset. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/clock-offset-unknown/evidence/server-hierarchy-transfer/target/current/despool.log | Synthetic despool evidence with invalid offset. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/backlog-retry/manifest.json | Adds backlog-retry scenario manifest. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/backlog-retry/expected.json | Expected output for backlog-retry (medium-confidence deferred/backlog). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/backlog-retry/evidence/server-hierarchy-control/origin/current/replmgr.log | Synthetic replmgr evidence for backlog-retry scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/absent-remote-source/manifest.json | Adds absent-remote-source scenario manifest (explicit absent target artifact). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/absent-remote-source/expected.json | Expected output for absent-remote-source (coverage gap + bounded coverageAbsent request). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/hierarchy_and_replication/absent-remote-source/evidence/server-hierarchy-transfer/origin/current/sender.log | Synthetic sender evidence for absent-remote-source scenario. |
| crates/cmtraceopen-parser/Cargo.toml | Adds sha2 as a dev-dependency for the new tests. |
| Cargo.lock | Locks the newly added sha2 dev-dependency. |
Tracks #331
Scope
Preparation-only hierarchy/replication contract corpus. This does not add a production reducer or native collection path. It keeps role-local evidence independent and hands any later cross-side work to #333.
Fixture matrix
All fixtures are synthetic/sanitized. The manifest proposal preserves origin/target role and host provenance, explicit coverage states, rotation lineage, versioned profiles, cited line ranges, bounded follow-up requests, and deterministic ordering. Multi-target scenarios now bind each transaction target to an explicitly declared topology target.
TDD evidence
MULTItarget.Verification
cargo test --locked -p cmtraceopen-parser --test sccm_server_hierarchy_and_replication_fixture_contract— 7 passedcargo test --locked -p cmtraceopen-parser --test sccm_server_intake_fixture_contract— 1 passedcargo test --locked -p cmtraceopen-parser --test sccm_spine_contract— 61 passedcargo test --locked -p cmtraceopen-parser— 661 tests listed, greencargo clippy --locked -p cmtraceopen-parser --all-targets -- -D warnings— greencargo check --locked -p cmtraceopen-parser --target wasm32-unknown-unknown— greennpm exec -- tsc --noEmit— greenrustfmt --check,jq empty, andgit diff --check— greenDependencies and limits
Built from merged
codex/parser-family-skeletonhead25b37333affde22b4ef8a19f4a5f3d89c082b599. Production implementation remains blocked on stable #318/#335 interfaces and review. No live Windows/SCCM acceptance is claimed. Issue remains open after this preparation slice.Review state
Draft pending exact-head CodeRabbit and independent review. Do not merge on compilation alone.
Summary by CodeRabbit
Tests
Documentation