Repository navigation
Conversation
|
@coderabbitai full review Please review exact head |
There was a problem hiding this comment.
Pull request overview
This PR aligns the SCCM client health fixture corpus (#320) with documented ConfigMgr contracts by enforcing valid 3-character site codes and canonical log rollover naming, and adds a regression test to prevent future fixture drift.
Changes:
- Replaces invalid
CONTOSOsite codes with a valid three-character syntheticLABacross all nine health manifests and directly-evidenced log facts. - Canonicalizes the rollover fixture naming from
ccmsetup.log.lo_toccmsetup.lo_, updating identity/path/provenance and ensuring the physical fixture exists. - Adds a focused fixture-contract test to validate scenario count, site-code shape, rollover path/basename, fixture presence, and byte-length integrity.
Reviewed changes
Copilot reviewed 11 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| docs/sccm/preparation/issue-320-client-health-corpus.md | Updates documentation to reflect the canonical 3-character site code contract used by fixtures. |
| crates/cmtraceopen-parser/tests/sccm_client_health_fixture_contract.rs | Adds a committed regression test enforcing site-code + rollover + byte-integrity fixture contracts. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/client/health/transport-failure/manifest.json | Updates bundle siteCode to LAB and corrects bytesCopied for LocationServices artifact. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/client/health/transport-failure/evidence/client-location-services-shared/current/LocationServices.log | Replaces directly-evidenced siteCode=CONTOSO with siteCode=LAB. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/client/health/success/manifest.json | Updates bundle siteCode to LAB and corrects bytesCopied for LocationServices artifact. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/client/health/success/evidence/client-location-services-shared/current/LocationServices.log | Replaces directly-evidenced siteCode=CONTOSO with siteCode=LAB. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/client/health/setup-failure/manifest.json | Updates bundle siteCode to LAB. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/client/health/rotation-boundary/manifest.json | Updates bundle siteCode to LAB and canonicalizes rollover artifact basename/path to ccmsetup.lo_. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/client/health/rotation-boundary/evidence/client-ccmsetup/lo/ccmsetup.lo_ | Adds the canonical .lo_ rollover fixture file referenced by the manifest. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/client/health/no-site-or-mp/manifest.json | Updates bundle siteCode to LAB. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/client/health/malformed/manifest.json | Updates bundle siteCode to LAB. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/client/health/incomplete/manifest.json | Updates bundle siteCode to LAB. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/client/health/identity-failure/manifest.json | Updates bundle siteCode to LAB. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/client/health/contradictory/manifest.json | Updates bundle siteCode to LAB. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
✅ 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 3 minutes. |
afb6d28 to
c59ea8f
Compare
|
Rebased cleanly onto byte-stable parser-family base Fresh post-rebase verification: focused client-health 1/1; exact-byte corpus validator PASS; full parser 595/595; strict Clippy; wasm32; All reviews attached to the pre-rebase SHA are stale by design. Fresh independent exact-head review is pending/active. @coderabbitai review Review exact head |
|
✅ Action performedReview finished.
|
c59ea8f to
4326820
Compare
|
Final base refresh: rebased onto current parser-family @coderabbitai review Review exact head |
|
✅ 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 33 minutes. |
adamgell
left a comment
There was a problem hiding this comment.
Exact-head independent review: BLOCKED at 4326820b7e0ce47bf8bcefef6561467e97cd37a7 on base 690cb32240a86001fdc4c3acc58e63638814d20e.
[Major] Make the committed evidence-key test non-vacuous — crates/cmtraceopen-parser/tests/sccm_client_health_fixture_contract.rs:119-139
The loop validates the shape of whatever siteCode= values happen to exist, but it never asserts that the four intended site facts remain present, that they are exactly the corpus key LAB, or that each evidence key matches its scenario manifest. Removing all four facts makes the loop execute zero assertions; changing a manifest to ABC and its evidence to a different valid XYZ also passes. Either mutation breaks the evidence-first site/MP transaction contract this correction is meant to lock. Assert the exact nine manifest LAB values plus the expected four evidence occurrences (success lines 1-2 and transport-failure lines 1-2), and bind each occurrence to that scenario's manifest site code.
Everything else inspected is coherent at this SHA: nine scenarios; current manifest/evidence values are LAB; canonical ccmsetup.lo_ rename/basename/relative path/sanitized provenance/118-byte identity; inherited parser-fixture -text attribute; expected/evidence references; exact-byte corpus integrity; conservative client-only coverage; privacy/synthetic/native boundaries; no #319 README/plan overlap; no PR closing keyword.
Fresh verification passed: focused 1/1; exact-byte validator; full parser 595/595 (349 + 222 + 1 health + 1 client intake + 1 server intake + 21 SCCM); strict Clippy; wasm32; npx tsc --noEmit; owned Rust 1.88 formatting; git diff --check.
CodeRabbit is not an approval at this SHA: commit status description is Review rate limited; the exact local CLI attempt also returned rate_limit (40 minutes). The GitHub incremental response belongs to stale head c59ea8f. A substantive exact-head CodeRabbit review remains required after the test fix.
|
Review correction pushed at exact head TDD red: the new focused test initially failed to compile because the exact site-contract validator did not exist. The correction now fails closed for a valid-but-wrong manifest code, a missing fact, a valid-but-mismatched evidence code, and a fact moved off its contracted line. Pinned contract: all 9 health manifests use Fresh exact-head verification: focused health 2/2; exact-byte validator PASS (9 scenarios, 23 physical artifacts); full parser 596/596; strict Clippy; wasm32; @coderabbitai review Review exact head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
base="690cb32240a86001fdc4c3acc58e63638814d20e"
head_short="12a1d9e"
echo "== HEAD identity =="
git rev-parse HEAD
git show -s --format='%H%n%P%n%s' HEAD
echo "== Base availability and ancestry =="
git cat-file -e "${base}^{commit}"
git merge-base --is-ancestor "$base" HEAD
echo "base_is_ancestor=yes"
echo "== Changed files (base...HEAD) =="
git diff --name-status "$base"...HEAD
echo
echo "== Diff stat =="
git diff --stat "$base"...HEAD
echo
echo "== Candidate test/fixture paths =="
fd . | rg -i 'sccm|health|locationservices|ccmsetup|fixture'Length of output: 58894 🏁 Script executed: #!/bin/bash
set -euo pipefail
test_file="crates/cmtraceopen-parser/tests/sccm_client_health_fixture_contract.rs"
health_root="crates/cmtraceopen-parser/tests/fixtures/sccm/client/health"
base="690cb32240a86001fdc4c3acc58e63638814d20e"
echo "== Test structure =="
ast-grep outline "$test_file" --items all
echo
echo "== New contract test =="
cat -n "$test_file"
echo
echo "== Exact diff for changed manifests and artifacts =="
git diff --find-renames --find-copies --unified=40 "$base"...HEAD -- "$health_root" 'docs/sccm/preparation/issue-320-client-health-corpus.md'
echo
echo "== Independent manifest/filesystem byte validation =="
python3 - <<'PY'
import json
from pathlib import Path
root = Path("crates/cmtraceopen-parser/tests/fixtures/sccm/client/health")
manifests = sorted(root.glob("*/manifest.json"))
print(f"scenario_count={len(manifests)}")
for manifest_path in manifests:
data = json.loads(manifest_path.read_text())
scenario = manifest_path.parent.name
print(f"\n[{scenario}]")
print(f" siteCode={data.get('siteCode')!r}")
artifacts = data.get("artifacts", [])
print(f" artifact_count={len(artifacts)}")
for artifact in artifacts:
rel = artifact.get("relativePath")
declared = artifact.get("byteCount")
if rel is None:
continue
physical = manifest_path.parent / rel
actual = physical.stat().st_size if physical.is_file() else None
status = "OK" if actual == declared else "MISMATCH"
print(f" {status}: {rel} declared={declared} actual={actual} source={artifact.get('sourcePath')!r} provenance={artifact.get('provenance')!r}")
PY
echo
echo "== Site-code evidence occurrences in health artifacts =="
rg -n -i -C1 'siteCode\s*=\s*|site code|LAB|CONTOSO' "$health_root"Length of output: 83424 🏁 Script executed: #!/bin/bash
set -euo pipefail
health_root="crates/cmtraceopen-parser/tests/fixtures/sccm/client/health"
rotation_manifest="$health_root/rotation-boundary/manifest.json"
echo "== Comparable fixture-contract assertions =="
for f in \
crates/cmtraceopen-parser/tests/sccm_client_intake_fixture_contract.rs \
crates/cmtraceopen-parser/tests/sccm_server_intake_fixture_contract.rs \
crates/cmtraceopen-parser/tests/sccm_spine_contract.rs
do
if [ -f "$f" ]; then
echo "-- $f"
rg -n -C2 'relativePath|sanitizedSourcePath|originalBasename|bytesCopied|ends_with|assert_eq!' "$f"
fi
done
echo
echo "== Rotation rollover metadata =="
python3 - "$rotation_manifest" <<'PY'
import json, sys
from pathlib import Path
p = Path(sys.argv[1])
m = json.loads(p.read_text())
r = next(a for a in m["artifacts"] if a["rotation"]["kind"] == "lo")
for key in ("originalBasename", "relativePath", "sanitizedSourcePath", "bytesCopied", "pathFingerprint"):
print(f"{key}={r.get(key)!r}")
fixture = p.parent / r["relativePath"]
print(f"fixture={fixture}")
print(f"is_file={fixture.is_file()}")
print(f"actual_bytes={fixture.stat().st_size if fixture.is_file() else None}")
PY
echo
echo "== Corrected whole-health manifest/filesystem validation =="
python3 - "$health_root" <<'PY'
import json, sys
from pathlib import Path
root = Path(sys.argv[1])
failures = []
total_physical = 0
for p in sorted(root.glob("*/manifest.json")):
m = json.loads(p.read_text())
scenario = p.parent.name
code = m.get("bundle", {}).get("siteCode")
if code != "LAB":
failures.append(f"{scenario}: bundle.siteCode={code!r}")
for a in m["artifacts"]:
rel = a.get("relativePath")
if rel is None:
continue
total_physical += 1
f = p.parent / rel
if not f.is_file():
failures.append(f"{scenario}: missing {rel}")
elif f.stat().st_size != a["bytesCopied"]:
failures.append(f"{scenario}: bytes {rel}: declared={a['bytesCopied']} actual={f.stat().st_size}")
print(f"manifests={len(list(root.glob('*/manifest.json')))}")
print(f"referenced_physical_artifacts={total_physical}")
print("PASS" if not failures else "FAIL\n" + "\n".join(failures))
PY
echo
echo "== Legacy rollover spelling in health/docs paths =="
rg -n -i 'ccmsetup[.]log[.]lo_|CONTOSO' "$health_root" docs/sccm/preparation/issue-320-client-health-corpus.md || trueLength of output: 16788
Finding
The site-evidence validator is otherwise non-vacuous: it pins all nine manifest codes to You are interacting with an AI system. |
|
CodeRabbit finding at comment 5136529483 is fixed in exact head TDD red: The committed contract pins:
Fresh exact-head gates: focused health 3/3; exact-byte validator PASS (9 scenarios, 23 physical artifacts); full parser 597/597; strict Clippy; wasm32; TypeScript; owned rustfmt; diff check — all green. @coderabbitai review Re-review exact head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
base="690cb32240a86001fdc4c3acc58e63638814d20e"
head="23350d7"
echo "== Commit identity and ancestry =="
git rev-parse HEAD
git rev-parse "$head^{commit}"
git show -s --format='%H%n%P%n%s' "$head"
git cat-file -e "${base}^{commit}"
git merge-base --is-ancestor "$base" "$head"
echo "base_is_ancestor=yes"
echo
echo "== Changed files (base...head) =="
git diff --name-status "$base...$head"
echo
git diff --stat "$base...$head"
echo
echo "== Contract test outline =="
test_file="crates/cmtraceopen-parser/tests/sccm_client_health_fixture_contract.rs"
ast-grep outline "$test_file" --items all
echo
echo "== Full-path assertions and adversarial mutations =="
rg -n -C5 \
'client_health_rotation_contract_pins_full_paths|evidence/client-ccmsetup/lo/ccmsetup[.]lo_|SYNTHETIC://root-a/ccmsetup/Logs/ccmsetup[.]lo_|evidence/other/ccmsetup[.]lo_|SYNTHETIC://different-root/ccmsetup/Logs/ccmsetup[.]lo_|sanitizedSourcePath|relativePath' \
"$test_file"
echo
echo "== Diff for contract test and rotation manifest =="
git diff --find-renames --unified=30 "$base...$head" -- \
"$test_file" \
crates/cmtraceopen-parser/tests/fixtures/sccm/client/health/rotation-boundary/manifest.json
echo
echo "== Independently inspect rollover artifact metadata and physical file =="
python3 - <<'PY'
import json
from pathlib import Path
manifest_path = Path("crates/cmtraceopen-parser/tests/fixtures/sccm/client/health/rotation-boundary/manifest.json")
manifest = json.loads(manifest_path.read_text())
matches = [
artifact for artifact in manifest["artifacts"]
if artifact.get("rotation", {}).get("kind") == "lo"
]
assert len(matches) == 1, f"expected one lo artifact, found {len(matches)}"
artifact = matches[0]
for key in ("originalBasename", "relativePath", "sanitizedSourcePath", "bytesCopied"):
print(f"{key}={artifact.get(key)!r}")
physical = manifest_path.parent / artifact["relativePath"]
print(f"physical_path={physical}")
print(f"is_file={physical.is_file()}")
print(f"actual_bytes={physical.stat().st_size if physical.is_file() else None}")
PY
echo
echo "== Detect remaining suffix-only rollover checks in this contract test =="
rg -n -C3 'ends_with\([^)]*ccmsetup[.]lo_|ends_with\([^)]*ccmsetup' "$test_file" || trueLength of output: 30630
Verified in
No further issue found in the requested full-path contract scope. You are interacting with an AI system. |
23350d7 to
e515f44
Compare
|
Base refresh after #342 merged: the same three #320 correction commits were restacked without patch drift onto current parser-family Fresh current-base gates: focused 3/3; exact-byte validator (9 scenarios, 23 physical artifacts); full parser 618/618; strict Clippy; wasm32; TypeScript; owned rustfmt; diff check — all green. @coderabbitai review Review exact head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
base="6ef2482d20e132e9ca7db920a9e1199e2f8bd7ea"
head="e515f44adc0382a41293f9eab8fb928c9f72dc71"
test_file="crates/cmtraceopen-parser/tests/sccm_client_health_fixture_contract.rs"
health_root="crates/cmtraceopen-parser/tests/fixtures/sccm/client/health"
rotation_manifest="$health_root/rotation-boundary/manifest.json"
echo "== Requested commit identity and ancestry =="
printf 'checked_head='; git rev-parse "$head^{commit}"
git show -s --format='parents=%P%nsubject=%s' "$head"
git cat-file -e "${base}^{commit}"
git merge-base --is-ancestor "$base" "$head"
echo "base_is_ancestor=yes"
echo
echo "== Changed paths and diff stat (base...head) =="
git diff --name-status "$base...$head"
git diff --stat "$base...$head"
echo
echo "== Contract test structure =="
ast-grep outline "$test_file" --items all
echo
echo "== Contract test source =="
cat -n "$test_file"
echo
echo "== Complete scoped diff =="
git diff --find-renames --find-copies --unified=60 "$base...$head" -- \
"$test_file" \
"$health_root" \
"docs/sccm/preparation/issue-320-client-health-corpus.md"
echo
echo "== Independent fixture contract validation =="
python3 - "$health_root" "$rotation_manifest" <<'PY'
import json
import re
import sys
from pathlib import Path
root = Path(sys.argv[1])
rotation_manifest = Path(sys.argv[2])
failures = []
manifests = sorted(root.glob("*/manifest.json"))
site_fact_files = {}
physical_count = 0
for manifest_path in manifests:
manifest = json.loads(manifest_path.read_text(encoding="utf-8"))
scenario = manifest_path.parent.name
site = manifest.get("bundle", {}).get("siteCode")
if site != "LAB":
failures.append(f"{scenario}: bundle.siteCode expected LAB, got {site!r}")
for artifact in manifest.get("artifacts", []):
rel = artifact.get("relativePath")
if rel is None:
continue
physical_count += 1
path = manifest_path.parent / rel
if not path.is_file():
failures.append(f"{scenario}: missing physical artifact {rel}")
elif path.stat().st_size != artifact.get("bytesCopied"):
failures.append(
f"{scenario}: bytesCopied for {rel}: declared={artifact.get('bytesCopied')!r}, actual={path.stat().st_size}"
)
if path.is_file():
matches = [
(i + 1, m.group(1))
for i, line in enumerate(path.read_text(encoding="utf-8", errors="replace").splitlines())
for m in [re.search(r"(?i)\bsite\s*code\s*[:=]\s*([A-Za-z0-9]+)", line)]
if m
]
if matches:
site_fact_files[str(path.relative_to(root))] = matches
print(f"manifests={len(manifests)}")
print(f"referenced_physical_artifacts={physical_count}")
print("site_facts=" + repr(site_fact_files))
expected_evidence = {
"success/evidence/client-location-services/LocationServices.log": [(1, "LAB"), (2, "LAB")],
"transport-failure/evidence/client-location-services/LocationServices.log": [(1, "LAB"), (2, "LAB")],
}
if site_fact_files != expected_evidence:
failures.append(
f"site evidence expected {expected_evidence!r}, got {site_fact_files!r}"
)
rotation = json.loads(rotation_manifest.read_text(encoding="utf-8"))
lo = [
a for a in rotation["artifacts"]
if a.get("rotation", {}).get("kind") == "lo"
]
if len(lo) != 1:
failures.append(f"rotation-boundary: expected exactly one lo artifact, got {len(lo)}")
else:
artifact = lo[0]
expected = {
"originalBasename": "ccmsetup.lo_",
"relativePath": "evidence/client-ccmsetup/lo/ccmsetup.lo_",
"sanitizedSourcePath": "SYNTHETIC://root-a/ccmsetup/Logs/ccmsetup.lo_",
}
for key, value in expected.items():
if artifact.get(key) != value:
failures.append(f"rollover {key}: expected {value!r}, got {artifact.get(key)!r}")
physical = rotation_manifest.parent / expected["relativePath"]
if not physical.is_file():
failures.append(f"rollover physical artifact missing: {physical}")
elif physical.stat().st_size != artifact.get("bytesCopied"):
failures.append(
f"rollover byte mismatch: declared={artifact.get('bytesCopied')!r}, actual={physical.stat().st_size}"
)
print("RESULT=PASS" if not failures else "RESULT=FAIL\n" + "\n".join(failures))
PY
echo
echo "== Search for legacy values and suffix-only rollover checks =="
rg -n -i -C2 'CONTOSO|ccmsetup[.]log[.]lo_' "$health_root" \
"docs/sccm/preparation/issue-320-client-health-corpus.md" "$test_file" || true
rg -n -C2 'ends_with\([^)]*(ccmsetup[.]lo_|ccmsetup)' "$test_file" || trueLength of output: 93532
The prior full-path finding remains closed: Finding
You are interacting with an AI system. |
|
CodeRabbit exact-head finding at comment 5136609770 is fixed in TDD red reproduced the gap: duplicating the canonical Fresh gates: focused health 3/3; exact-byte validator (9 scenarios, 23 physical artifacts); full parser 618/618; strict Clippy; wasm32; TypeScript; owned rustfmt; diff check — all green. @coderabbitai review Review exact head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
base="6ef2482d20e132e9ca7db920a9e1199e2f8bd7ea"
head="c8b69439ac3663f712ca8ea712a81d910fc51f61"
test_file="crates/cmtraceopen-parser/tests/sccm_client_health_fixture_contract.rs"
health_root="crates/cmtraceopen-parser/tests/fixtures/sccm/client/health"
rotation_manifest="$health_root/rotation-boundary/manifest.json"
echo "== Commit identity and ancestry =="
printf "checked_head="; git rev-parse "${head}^{commit}"
git show -s --format='parents=%P%nsubject=%s' "$head"
git cat-file -e "${base}^{commit}"
git merge-base --is-ancestor "$base" "$head"
echo "base_is_ancestor=yes"
echo
echo "== Changed paths and stat (base...head) =="
git diff --name-status "$base...$head"
git diff --stat "$base...$head"
echo
echo "== Contract test outline =="
ast-grep outline "$test_file" --items all
echo
echo "== Exact duplicate-rollover contract implementation and test coverage =="
rg -n -C8 \
'rotation.*kind|[.]lo_|exactly one|duplicate|assert.*eq|client_health_rotation' \
"$test_file"
echo
echo "== Scoped base-to-head diff =="
git diff --find-renames --find-copies --unified=50 "$base...$head" -- \
"$test_file" \
"$health_root" \
"docs/sccm/preparation/issue-320-client-health-corpus.md"
echo
echo "== Independent fixture invariant validation =="
python3 - "$health_root" "$rotation_manifest" <<'PY'
import json
import re
import sys
from pathlib import Path
root = Path(sys.argv[1])
rotation_manifest = Path(sys.argv[2])
failures = []
manifests = sorted(root.glob("*/manifest.json"))
physical_count = 0
site_fact_files = {}
for manifest_path in manifests:
manifest = json.loads(manifest_path.read_text(encoding="utf-8"))
scenario = manifest_path.parent.name
if manifest.get("bundle", {}).get("siteCode") != "LAB":
failures.append(f"{scenario}: siteCode is not LAB")
for artifact in manifest.get("artifacts", []):
relative_path = artifact.get("relativePath")
if relative_path is None:
continue
physical_count += 1
physical = manifest_path.parent / relative_path
if not physical.is_file():
failures.append(f"{scenario}: missing {relative_path}")
continue
if physical.stat().st_size != artifact.get("bytesCopied"):
failures.append(f"{scenario}: byte mismatch for {relative_path}")
facts = [
(line_number, match.group(1))
for line_number, line in enumerate(
physical.read_text(encoding="utf-8", errors="replace").splitlines(), 1
)
for match in [re.search(r"(?i)\bsite\s*code\s*[:=]\s*([A-Za-z0-9]+)", line)]
if match
]
if facts:
site_fact_files[str(physical.relative_to(root))] = facts
expected_facts = {
"success/evidence/client-location-services/LocationServices.log": [(1, "LAB"), (2, "LAB")],
"transport-failure/evidence/client-location-services/LocationServices.log": [(1, "LAB"), (2, "LAB")],
}
if site_fact_files != expected_facts:
failures.append(f"site facts mismatch: {site_fact_files!r}")
rotation = json.loads(rotation_manifest.read_text(encoding="utf-8"))
rollovers = [a for a in rotation["artifacts"] if a.get("rotation", {}).get("kind") == "lo"]
if len(rollovers) != 1:
failures.append(f"expected exactly one lo rollover, got {len(rollovers)}")
else:
rollover = rollovers[0]
expected = {
"originalBasename": "ccmsetup.lo_",
"relativePath": "evidence/client-ccmsetup/lo/ccmsetup.lo_",
"sanitizedSourcePath": "SYNTHETIC://root-a/ccmsetup/Logs/ccmsetup.lo_",
}
for key, value in expected.items():
if rollover.get(key) != value:
failures.append(f"{key}: expected {value!r}, got {rollover.get(key)!r}")
physical = rotation_manifest.parent / expected["relativePath"]
if not physical.is_file():
failures.append(f"missing canonical rollover file: {physical}")
elif physical.stat().st_size != rollover.get("bytesCopied"):
failures.append("canonical rollover bytesCopied does not match physical size")
print(f"manifests={len(manifests)}")
print(f"referenced_physical_artifacts={physical_count}")
print(f"lo_rollover_count={len(rollovers)}")
print("RESULT=PASS" if not failures else "RESULT=FAIL\n" + "\n".join(failures))
PY
echo
echo "== Legacy fixture names and suffix-only assertions =="
rg -n -i -C2 'CONTOSO|ccmsetup[.]log[.]lo_' \
"$health_root" "docs/sccm/preparation/issue-320-client-health-corpus.md" "$test_file" || true
rg -n -C2 'ends_with\([^)]*(ccmsetup[.]lo_|ccmsetup)' "$test_file" || trueLength of output: 81547 🏁 Script executed: #!/bin/bash
set -euo pipefail
health_root="crates/cmtraceopen-parser/tests/fixtures/sccm/client/health"
rotation_manifest="$health_root/rotation-boundary/manifest.json"
python3 - "$health_root" "$rotation_manifest" <<'PY'
import json
import re
import sys
from pathlib import Path
root = Path(sys.argv[1])
rotation_manifest = Path(sys.argv[2])
failures = []
site_fact_files = {}
physical_count = 0
manifests = sorted(root.glob("*/manifest.json"))
for manifest_path in manifests:
manifest = json.loads(manifest_path.read_text(encoding="utf-8"))
scenario = manifest_path.parent.name
if manifest.get("bundle", {}).get("siteCode") != "LAB":
failures.append(f"{scenario}: bundle.siteCode must be LAB")
for artifact in manifest.get("artifacts", []):
relative_path = artifact.get("relativePath")
if relative_path is None:
continue
physical_count += 1
physical = manifest_path.parent / relative_path
if not physical.is_file():
failures.append(f"{scenario}: missing artifact {relative_path}")
continue
if physical.stat().st_size != artifact.get("bytesCopied"):
failures.append(f"{scenario}: byte mismatch for {relative_path}")
facts = []
for line_number, line in enumerate(
physical.read_text(encoding="utf-8", errors="replace").splitlines(), 1
):
facts.extend(
(line_number, match.group(1))
for match in re.finditer(r"siteCode=([A-Za-z0-9]+)", line)
)
if facts:
site_fact_files[str(physical.relative_to(root))] = facts
expected_site_facts = {
"success/evidence/client-location-services-shared/current/LocationServices.log": [
(1, "LAB"), (2, "LAB")
],
"transport-failure/evidence/client-location-services-shared/current/LocationServices.log": [
(1, "LAB"), (2, "LAB")
],
}
if site_fact_files != expected_site_facts:
failures.append(f"site facts mismatch: {site_fact_files!r}")
rotation = json.loads(rotation_manifest.read_text(encoding="utf-8"))
rollovers = [
artifact for artifact in rotation["artifacts"]
if artifact.get("rotation", {}).get("kind") == "lo"
]
expected_rollover = {
"originalBasename": "ccmsetup.lo_",
"relativePath": "evidence/client-ccmsetup/lo/ccmsetup.lo_",
"sanitizedSourcePath": "SYNTHETIC://root-a/ccmsetup/Logs/ccmsetup.lo_",
}
if len(rollovers) != 1:
failures.append(f"expected exactly one rollover, got {len(rollovers)}")
else:
rollover = rollovers[0]
for key, expected in expected_rollover.items():
if rollover.get(key) != expected:
failures.append(f"{key}: expected {expected!r}, got {rollover.get(key)!r}")
physical = rotation_manifest.parent / expected_rollover["relativePath"]
if not physical.is_file():
failures.append("canonical rollover physical artifact is absent")
elif physical.stat().st_size != rollover.get("bytesCopied"):
failures.append(
f"rollover bytes: declared={rollover.get('bytesCopied')!r}, "
f"actual={physical.stat().st_size}"
)
print(f"manifests={len(manifests)}")
print(f"referenced_physical_artifacts={physical_count}")
print(f"lo_rollover_count={len(rollovers)}")
print("RESULT=PASS" if not failures else "RESULT=FAIL\n" + "\n".join(failures))
PYLength of output: 3597
Verified in
No further issue found in the requested scope. No native Windows acceptance is inferred. You are interacting with an AI system. |
adamgell
left a comment
There was a problem hiding this comment.
Exact-head independent review: PASS
Reviewed c8b69439ac3663f712ca8ea712a81d910fc51f61 against exact base 6ef2482d20e132e9ca7db920a9e1199e2f8bd7ea. I found no actionable blocker in the #320 correction scope.
Contract verification
- All 9 manifests use exact synthetic site code
LAB. - Site evidence is non-vacuously pinned to exactly four facts: success and transport-failure
LocationServices.log, lines 1–2, both values matching their scenario manifest. - The wrong-valid manifest, missing fact, mismatched valid evidence value, and moved-line mutations all fail closed (4/4 independently reproduced).
- The rollover validator requires exactly one
rotation.kind == "lo"artifact before field validation. The duplicate-.lo_mutation fails with the exact-one contract, closing the prior first-match gap. - The unique rollover is pinned to:
originalBasename = ccmsetup.lo_relativePath = evidence/client-ccmsetup/lo/ccmsetup.lo_sanitizedSourcePath = SYNTHETIC://root-a/ccmsetup/Logs/ccmsetup.lo_
- Both alternate suffix-matching relative/provenance mutations fail closed.
- The physical rollover is present and exactly 118 bytes. The pre-rename and post-rename Git blobs are identical (
f0067020d55609858d56fe9ed909bb31fdbe3936; SHA-2561db27c27ba131e2313e885b1db41f1bb8e24eaf3c223d747d78f586e82d99bd8).
Stack and boundaries
git range-diffmaps all three pre-restack commits identically (=);c8b6943is the sole additional duplicate-rollover correction.- All 14 changed paths are confined to the #320 health fixture corpus, its fixture-contract test, and its preparation document.
- No parser production source, Tauri/native collection, Windows I/O, Cargo dependency, or another issue family's files changed.
- All manifests remain
proposalOnlyandsyntheticFixture; every non-null source path usesSYNTHETIC://, fingerprints are synthetic, and versions are test-only. - No PR/commit closing keyword is present; issue #320 remains open. No native Windows acceptance is inferred.
Fresh verification at this exact SHA
cargo test --locked -p cmtraceopen-parser --test sccm_client_health_fixture_contract --quiet— 3/3 passed- Independent exact contract/byte validator — 9 manifests, 23 referenced physical artifacts, 4/4 site adversarial mutations rejected, 3/3 rollover mutations rejected (relative path, provenance path, duplicate), PASS
cargo test --locked -p cmtraceopen-parser --quiet— 618 passed (351 + 222 + 3 + 1 + 1 + 40)cargo clippy --locked -p cmtraceopen-parser --all-targets --all-features -- -D warnings— passedcargo check --locked -p cmtraceopen-parser --target wasm32-unknown-unknown— passednpx tsc --noEmit— passed- Rust 1.88 and current rustfmt on the owned Rust test — passed
git diff --check, issue-scope/no-overlap, no-native-production, privacy/provenance, secret, and no-closing-keyword checks — passed- Exact-head review worktree remained clean
CodeRabbit
CodeRabbit’s fresh response 5136652227 is substantive and explicitly anchored to this exact base/head. It confirms the exact-one filter, duplicate adversarial mutation, canonical paths/provenance/physical bytes, 9 manifests, 23 artifacts, and closure of the prior finding. This is not a skipped, incremental-only, or rate-limited response.
This PASS supersedes my stale older-SHA blocker review. It is limited to the synthetic preparation/corpus correction and does not close #320 or authorize production/native expansion.
Part of #320. Pin exact LAB site evidence and the canonical unique ccmsetup.lo_ rollover contract with fail-closed adversarial fixture tests. No production reducer or native acceptance.
…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.
Summary
Corrects the already-merged #320 health/location preparation corpus to match documented ConfigMgr contracts:
LABand exactly four manifest-bound LocationServices facts on Lines 1–2ccmsetup.lo_and pins its basename, full relative path, full sanitized provenance, physical file, and bytesMicrosoft references:
TDD and review corrections
Initial red coverage exposed 16 corpus defects. Independent review then drove non-vacuous exact evidence assertions. CodeRabbit exact-head reviews drove full path equality and exact-one rollover cardinality; both findings were reproduced red and closed with adversarial tests.
Verification at
c8b69439ac3663f712ca8ea712a81d910fc51f614823561575— pass5136652227— no further issueIssue #320 remains open for production analyzer implementation and later native validation.
Part of #320.