test(sccm): prepare SUP and WSUS diagnostic corpus - #377
Conversation
|
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:
📝 WalkthroughWalkthroughAdds ten synthetic SCCM Software Update Point scenarios, preparation documentation, and a contract test suite. The tests validate manifests, expected outputs, evidence, coverage, transaction derivation, chronology, provenance, identity isolation, and fail-closed mutations. ChangesSCCM Software Update Point 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 Please review exact head |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== checked-out commit =='
git rev-parse HEAD
printf '%s\n' '== requested commit present =='
git cat-file -t 2fcaa9ca9a13a12234c8e484dcaffd44f471a63b
printf '%s\n' '== branch/status =='
git status --short
git branch --show-current
printf '%s\n' '== pull request metadata =='
gh pr view 377 --repo adamgell/cmtraceopen --json baseRefName,headRefName,commits --jq '{baseRefName, headRefName, commits: [.commits[] | {oid, messageHeadline}]}'
printf '%s\n' '== changed files against PR base =='
base="$(gh pr view 377 --repo adamgell/cmtraceopen --json baseRefOid --jq .baseRefOid)"
git diff --name-status "$base"...2fcaa9ca9a13a12234c8e484dcaffd44f471a63b
printf '%s\n' '== diff summary =='
git diff --stat "$base"...2fcaa9ca9a13a12234c8e484dcaffd44f471a63b
printf '%s\n' '== candidate file map =='
fd -t f . | rg 'sccm|software_update|fixture|SUP|WSUS|330|318|335|333' || trueLength of output: 52433 🏁 Script executed: #!/bin/bash
set -euo pipefail
test_file="crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs"
fixture_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point"
doc_file="docs/sccm/preparation/issue-330-software-update-point-corpus.md"
printf '%s\n' '== contract test outline =='
ast-grep outline "$test_file" --items all --view expanded
printf '%s\n' '== contract test assertion and mutation map =='
rg -n -C 2 \
'fn |assert!|assert_eq!|assert_ne!|panic!|unwrap_err|manifest|expected|citation|terminal|rotation|confidence|producer|subject|physical|coverage|client|synthetic|request|determin' \
"$test_file"
printf '%s\n' '== fixture manifests and expected data =='
while IFS= read -r file; do
printf '\n--- %s ---\n' "$file"
jq -S . "$file"
done < <(fd -t f -e json . "$fixture_root" | sort)
printf '%s\n' '== fixture README =='
cat -n "$fixture_root/README.md"
printf '%s\n' '== preparation boundary document =='
cat -n "$doc_file"
printf '%s\n' '== adjacent server fixture contract outline =='
ast-grep outline crates/cmtraceopen-parser/tests/sccm_server_intake_fixture_contract.rs --items all --view expandedLength of output: 55437 🏁 Script executed: #!/bin/bash
set -euo pipefail
test_file="crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs"
fixture_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point"
doc_file="docs/sccm/preparation/issue-330-software-update-point-corpus.md"
printf '%s\n' '== validate_manifest implementation =='
sed -n '250,708p' "$test_file"
printf '%s\n' '== validate_expected implementation =='
sed -n '770,1521p' "$test_file"
printf '%s\n' '== normalized fixture JSON =='
fd -t f -e json . "$fixture_root" -x sh -c '
for file; do
printf "\n--- %s ---\n" "$file"
jq -S . "$file"
done
' sh {} \;
printf '%s\n' '== physical fixture evidence with line numbers =='
fd -t f -e log . "$fixture_root" -x sh -c '
for file; do
printf "\n--- %s ---\n" "$file"
cat -n "$file"
done
' sh {} \;
printf '%s\n' '== fixture README =='
cat -n "$fixture_root/README.md"
printf '%s\n' '== preparation boundary document =='
cat -n "$doc_file"
printf '%s\n' '== relevant adjacent intake contract ranges =='
rg -n -C 2 'fn validate_|syntheticFixture|proposalOnly|production|dependency|artifactRequests|coverage|rotation|clientCausalClaims' \
crates/cmtraceopen-parser/tests/sccm_server_intake_fixture_contract.rsLength of output: 138640 🏁 Script executed: #!/bin/bash
set -euo pipefail
test_file="crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs"
fixture_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point"
base="$(gh pr view 377 --repo adamgell/cmtraceopen --json baseRefOid --jq .baseRefOid)"
head="2fcaa9ca9a13a12234c8e484dcaffd44f471a63b"
printf '%s\n' '== remaining helper implementations =='
sed -n '159,249p' "$test_file"
sed -n '709,769p' "$test_file"
printf '%s\n' '== complete corpus static audit =='
python3 - <<'PY'
from pathlib import Path
import json
import re
import sys
root = Path("crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point")
errors = []
for manifest_path in sorted(root.glob("*/manifest.json")):
scenario = manifest_path.parent.name
expected_path = manifest_path.with_name("expected.json")
manifest = json.loads(manifest_path.read_text())
expected = json.loads(expected_path.read_text())
artifacts = manifest.get("artifacts", [])
actual_ids = [a.get("artifactId") for a in artifacts]
coverage = expected.get("coverage", [])
coverage_ids = [row.get("artifactId") for row in coverage]
if actual_ids != sorted(actual_ids):
errors.append(f"{scenario}: artifact IDs are not sorted")
if coverage_ids != sorted(coverage_ids):
errors.append(f"{scenario}: coverage IDs are not sorted")
if set(actual_ids) != set(coverage_ids):
errors.append(f"{scenario}: coverage IDs differ from artifact IDs")
states = {}
physical = 0
for artifact in artifacts:
aid = artifact.get("artifactId", "<missing>")
state = artifact.get("captureState")
states[aid] = state
is_physical = state in {"captured", "capped", "parseFailed"}
path = artifact.get("relativePath")
physical_fields = {"relativePath", "bytesCopied", "encoding", "collectionLimit"}
present = physical_fields & artifact.keys()
if is_physical:
physical += 1
if not path:
errors.append(f"{scenario}/{aid}: physical artifact lacks relativePath")
continue
fixture = manifest_path.parent / path
if not fixture.is_file():
errors.append(f"{scenario}/{aid}: missing evidence file {path}")
continue
raw = fixture.read_bytes()
if artifact.get("bytesCopied") != len(raw):
errors.append(f"{scenario}/{aid}: bytesCopied differs from file length")
if b"SYNTHETIC FIXTURE" not in raw:
errors.append(f"{scenario}/{aid}: missing synthetic marker")
elif present:
errors.append(f"{scenario}/{aid}: nonphysical artifact has physical fields {sorted(present)}")
transaction_count = len(expected.get("transactions", []))
print(f"{scenario}: artifacts={len(artifacts)}, physical={physical}, "
f"states={','.join(sorted(set(states.values())))}, transactions={transaction_count}, "
f"requests={len(expected.get('artifactRequests', []))}")
if errors:
print("\nERRORS:")
print("\n".join(errors))
sys.exit(1)
print("audit: all manifest/expected projections and physical file facts are consistent")
PY
printf '%s\n' '== changed production source files, if any =='
git diff --name-only "$base...$head" -- crates/cmtraceopen-parser/src src src-tauri | sed -n '1,120p'
printf '%s\n' '== whitespace check =='
git diff --check "$base...$head"
printf '%s\n' '== suspicious sensitive or live-environment tokens in added corpus =='
git diff --unified=0 "$base...$head" -- "$fixture_root" \
| rg -n -i '^\+.*(password|secret|token|credential|[a-z]:\\\\|/users/|/home/|\\\\users\\\\|microsoft\.com|http://|https://)' \
|| true
printf '%s\n' '== production/dependency references in the changed diff =='
git diff --unified=1 "$base...$head" -- \
crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs \
docs/sccm/preparation/issue-330-software-update-point-corpus.md \
| rg -n -C 1 'production|collector|ParserKind|`#318`|`#335`|`#333`|cross-side|client-impact|proposalOnly|synthetic' \
|| trueLength of output: 14167
I verified the fixture-contract coverage for fail-closed semantics, exact producer/subject/key binding, physical and nonphysical provenance, coverage states, citations, terminality, rotation boundaries, optional WSUS confidence limits, client-key isolation, deterministic ordering, synthetic-only markers, and the production/dependency boundary. The corpus audit passed for all 10 scenarios. It confirmed manifest-to-coverage projection, evidence-path resolution, copied-byte counts, synthetic markers, and omission of physical facts from nonphysical artifacts. No production source files changed. I could not run Rust or TypeScript verification in this sandbox. The review result is based on static inspection only. ✅ Action performedReview finished.
|
|
Local CodeRabbit exact-range disposition for prior head
The post-fix local rerun was rate-limited for 22 minutes and is not counted as approval. @coderabbitai review Please perform a fresh substantive review of exact head |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs (2)
1593-1597: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winPositional indices make the mutation tests fragile.
Line 1594 mutates
observations[5]and assumes index 5 is the terminal observation. The same pattern appears at lines 1624, 1629, 1710, 1786, 1792, 1797, and 1805, which all address artifacts by numeric index.If a fixture gains, removes, or reorders an entry, the mutation lands on a different element. The test can then pass because an unrelated rule rejected the mutation, not the rule named in the pushed message. The failure mode is a silent loss of mutation coverage, not a visible break.
Consider resolving the target by identifier before mutating.
♻️ Example: resolve the terminal observation by identifier
fn observation_index(expected: &Value, observation_id: &str) -> usize { expected["transactions"][0]["observations"] .as_array() .expect("observations are an array") .iter() .position(|observation| observation["observationId"] == observation_id) .unwrap_or_else(|| panic!("{observation_id} is present")) }let mut terminal_removed = expected.clone(); -terminal_removed["transactions"][0]["observations"][5]["terminal"] = json!(false); +let terminal_index = observation_index(&expected, "sync-01-06-terminal"); +terminal_removed["transactions"][0]["observations"][terminal_index]["terminal"] = json!(false);Apply the same approach to the artifact mutations, keyed on
artifactId.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs` around lines 1593 - 1597, Replace positional observation and artifact mutations in the mutation tests with identifier-based lookup helpers. Add an observation resolver keyed by observationId and an artifact resolver keyed by artifactId, then use their returned indices at the mutation sites currently targeting numeric positions, including the terminal observation cases. Preserve each existing mutation and acceptance message while ensuring fixture reordering cannot redirect a mutation to another element.
1181-1212: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winConstrain failed confidence when coverage gaps exist
The failure arm accepts
highconfidence with valid non-empty gaps, includingaccessDeniedartifacts. Requiregap_ids.is_empty()forhighconfidence, and add amediumarm foroptional_only_gap.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs` around lines 1181 - 1212, The state/classification validation match must constrain failure confidence when coverage gaps exist. In the ("failed", "confirmedFailure") arm, require gap_ids.is_empty() alongside the existing high-confidence conditions, and add a medium-confidence arm for optional_only_gap while preserving the existing terminal-failure requirements.
🤖 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/tests/sccm_server_software_update_point_fixture_contract.rs`:
- Around line 1593-1597: Replace positional observation and artifact mutations
in the mutation tests with identifier-based lookup helpers. Add an observation
resolver keyed by observationId and an artifact resolver keyed by artifactId,
then use their returned indices at the mutation sites currently targeting
numeric positions, including the terminal observation cases. Preserve each
existing mutation and acceptance message while ensuring fixture reordering
cannot redirect a mutation to another element.
- Around line 1181-1212: The state/classification validation match must
constrain failure confidence when coverage gaps exist. In the ("failed",
"confirmedFailure") arm, require gap_ids.is_empty() alongside the existing
high-confidence conditions, and add a medium-confidence arm for
optional_only_gap while preserving the existing terminal-failure requirements.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 0bacfdff-6fbe-494c-a37b-19704a4bd835
⛔ Files ignored due to path filters (23)
crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/incomplete/evidence/server-sup-sync/site/current/WCM.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/metadata-failure/evidence/server-sup-sync/site/current/WCM.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/metadata-failure/evidence/server-sup-sync/site/current/wsyncmgr.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/rotation-boundary/evidence/server-sup-sync/site/current/wsyncmgr.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/rotation-boundary/evidence/server-sup-sync/site/lo_/wsyncmgr.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/rotation-boundary/evidence/server-sup-sync/sup/current/WSUSCtrl.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sup-setup-failure/evidence/server-sup-sync/sup/current/SUPSetup.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/supplemental-wsus-skipped/evidence/server-sup-sync/site/current/WCM.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/supplemental-wsus-skipped/evidence/server-sup-sync/site/current/wsyncmgr.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/supplemental-wsus-skipped/evidence/server-sup-sync/sup/current/WSUSCtrl.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sync-retry/evidence/server-sup-sync/site/current/WCM.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sync-retry/evidence/server-sup-sync/site/current/wsyncmgr.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sync-success/evidence/server-sup-sync/site/current/WCM.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sync-success/evidence/server-sup-sync/site/current/wsyncmgr.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sync-success/evidence/server-sup-sync/sup/current/WSUSCtrl.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/unrelated-update-key/evidence/client-updates-control/current/WUAHandler.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/unrelated-update-key/evidence/server-sup-sync/site/current/WCM.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/unrelated-update-key/evidence/server-sup-sync/site/current/wsyncmgr.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/unrelated-update-key/evidence/server-sup-sync/sup/current/WSUSCtrl.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/wcm-configuration-failure/evidence/server-sup-sync/site/current/WCM.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/wsus-health-failure/evidence/server-sup-sync/site/current/WCM.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/wsus-health-failure/evidence/server-sup-sync/site/current/wsyncmgr.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/wsus-health-failure/evidence/server-sup-sync/sup/current/WSUSCtrl.logis excluded by!**/*.log
📒 Files selected for processing (23)
crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/README.mdcrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/incomplete/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/incomplete/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/metadata-failure/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/metadata-failure/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/rotation-boundary/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/rotation-boundary/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sup-setup-failure/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sup-setup-failure/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/supplemental-wsus-skipped/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/supplemental-wsus-skipped/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sync-retry/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sync-retry/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sync-success/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sync-success/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/unrelated-update-key/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/unrelated-update-key/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/wcm-configuration-failure/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/wcm-configuration-failure/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/wsus-health-failure/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/wsus-health-failure/manifest.jsoncrates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rsdocs/sccm/preparation/issue-330-software-update-point-corpus.md
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
head="ac3bbf341c95ac7b86fab1e9752d31d401a4ba2c"
prior="2fcaa9ca9a13a12234c8e484dcaffd44f471a63b"
printf '%s\n' '== checkout and target commit =='
git rev-parse HEAD
git cat-file -t "$head"
git show -s --format='commit=%H%nparents=%P%nsubject=%s' "$head"
git merge-base --is-ancestor "$prior" "$head"
printf '%s\n' 'prior head is an ancestor of requested head'
printf '%s\n' '== pull request metadata =='
gh pr view 377 --repo adamgell/cmtraceopen \
--json baseRefOid,headRefOid,headRefName \
--jq '{baseRefOid,headRefOid,headRefName}'
printf '%s\n' '== requested-head delta from prior head =='
git diff --check "$prior" "$head"
git diff --stat "$prior" "$head"
git diff --name-status "$prior" "$head"
git diff --unified=80 "$prior" "$head"
printf '%s\n' '== complete PR file list to requested head =='
base="$(gh pr view 377 --repo adamgell/cmtraceopen --json baseRefOid --jq .baseRefOid)"
git diff --name-status "$base...$head"
printf '%s\n' '== relevant contract and preparation-document outlines =='
ast-grep outline crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs --items all --view expanded
ast-grep outline docs/sccm/preparation/issue-330-software-update-point-corpus.md --items all --view expanded || trueLength of output: 17910 🏁 Script executed: #!/bin/bash
set -euo pipefail
head="ac3bbf341c95ac7b86fab1e9752d31d401a4ba2c"
base="$(gh pr view 377 --repo adamgell/cmtraceopen --json baseRefOid --jq .baseRefOid)"
test_file="crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs"
doc_file="docs/sccm/preparation/issue-330-software-update-point-corpus.md"
root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point"
printf '%s\n' '== corrected documentation and contract checks =='
cat -n "$doc_file"
sed -n '250,708p' "$test_file"
sed -n '770,1522p' "$test_file"
sed -n '1533,1765p' "$test_file"
printf '%s\n' '== corpus static consistency audit =='
python3 - <<'PY'
from pathlib import Path
import json, re, sys
root = Path("crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point")
physical_states = {"captured", "capped", "parseFailed"}
nonphysical_states = {"absent", "accessDenied", "skipped", "unsupported"}
errors = []
for mp in sorted(root.glob("*/manifest.json")):
scenario = mp.parent.name
ep = mp.with_name("expected.json")
m = json.loads(mp.read_text())
e = json.loads(ep.read_text())
artifacts = m.get("artifacts", [])
coverage = e.get("coverage", [])
by_id = {a.get("artifactId"): a for a in artifacts}
if len(by_id) != len(artifacts):
errors.append(f"{scenario}: duplicate manifest artifactId")
if [a.get("artifactId") for a in artifacts] != sorted(by_id):
errors.append(f"{scenario}: manifest artifact order is not deterministic")
if [c.get("artifactId") for c in coverage] != sorted(c.get("artifactId") for c in coverage):
errors.append(f"{scenario}: coverage order is not deterministic")
if {c.get("artifactId") for c in coverage} != set(by_id):
errors.append(f"{scenario}: coverage artifact IDs do not exactly project manifest IDs")
for aid, a in by_id.items():
state = a.get("captureState")
physical_fields = {"encoding", "fragmentComplete", "collectionLimit", "bytesCopied", "relativePath"}
found = physical_fields & set(a)
if state in physical_states:
missing = physical_fields - set(a)
if missing:
errors.append(f"{scenario}/{aid}: physical artifact missing {sorted(missing)}")
continue
path = mp.parent / a["relativePath"]
if not path.is_file():
errors.append(f"{scenario}/{aid}: missing evidence {a['relativePath']}")
continue
raw = path.read_bytes()
if len(raw) != a["bytesCopied"]:
errors.append(f"{scenario}/{aid}: bytesCopied differs from evidence length")
if b"SYNTHETIC FIXTURE" not in raw:
errors.append(f"{scenario}/{aid}: evidence lacks synthetic marker")
elif state in nonphysical_states:
if found:
errors.append(f"{scenario}/{aid}: nonphysical artifact has physical fields {sorted(found)}")
else:
errors.append(f"{scenario}/{aid}: unrecognized capture state {state!r}")
citations = []
for tx in e.get("transactions", []):
for phase in tx.get("phases", []):
citations.extend(phase.get("evidence", []))
for c in citations:
aid = c.get("artifactId")
if aid not in by_id:
errors.append(f"{scenario}: citation references unknown artifact {aid!r}")
elif by_id[aid].get("captureState") not in physical_states:
errors.append(f"{scenario}: citation references nonphysical artifact {aid!r}")
if e.get("clientCausalClaims") not in ([], None):
errors.append(f"{scenario}: client causal claims are present")
print(f"scenarios={len(list(root.glob('*/manifest.json')))}")
if errors:
print("\n".join(errors))
sys.exit(1)
print("audit=pass")
PY
printf '%s\n' '== final production and dependency boundary =='
git diff --name-only "$base...$head" -- \
':(exclude)crates/cmtraceopen-parser/tests/**' \
':(exclude)docs/**'
git diff -- "$base...$head" -- crates/cmtraceopen-parser/Cargo.toml
git diff --check "$base...$head"Length of output: 75674 🏁 Script executed: #!/bin/bash
set -euo pipefail
head="ac3bbf341c95ac7b86fab1e9752d31d401a4ba2c"
root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point"
test_file="crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs"
printf '%s\n' '== corrected physical and nonphysical provenance audit =='
python3 - <<'PY'
from pathlib import Path
import json, sys
root = Path("crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point")
physical = {"captured", "capped", "parseFailed"}
nonphysical = {"absent", "accessDenied", "skipped", "unsupported"}
errors = []
summary = []
for mp in sorted(root.glob("*/manifest.json")):
scenario = mp.parent.name
manifest = json.loads(mp.read_text())
expected = json.loads(mp.with_name("expected.json").read_text())
artifacts = manifest["artifacts"]
artifact_ids = [a["artifactId"] for a in artifacts]
coverage = expected["coverage"]
coverage_pairs = [(x["artifactId"], x["state"]) for x in coverage]
projected_pairs = [(a["artifactId"], a["captureState"]) for a in artifacts]
if coverage_pairs != projected_pairs:
errors.append(f"{scenario}: expected coverage is not the exact manifest projection")
for a in artifacts:
aid, state = a["artifactId"], a["captureState"]
top_level = {"encoding", "collectionLimit", "bytesCopied", "relativePath"}
present = top_level & set(a)
fragment = a.get("rotation", {}).get("fragmentComplete")
if state in physical:
missing = top_level - set(a)
if missing or not isinstance(fragment, bool):
errors.append(f"{scenario}/{aid}: physical provenance incomplete; missing={sorted(missing)}, fragment={fragment!r}")
continue
p = mp.parent / a["relativePath"]
if not p.is_file():
errors.append(f"{scenario}/{aid}: missing evidence path")
continue
raw = p.read_bytes()
if a["bytesCopied"] != len(raw):
errors.append(f"{scenario}/{aid}: copied-byte count differs")
if b"SYNTHETIC FIXTURE" not in raw:
errors.append(f"{scenario}/{aid}: synthetic marker absent")
elif state in nonphysical:
if present or fragment is not None:
errors.append(f"{scenario}/{aid}: nonphysical artifact includes physical facts")
else:
errors.append(f"{scenario}/{aid}: unknown coverage state {state}")
summary.append(f"{scenario}: coverage={len(coverage_pairs)}, physical={sum(a['captureState'] in physical for a in artifacts)}")
print("\n".join(summary))
if errors:
print("ERRORS:")
print("\n".join(errors))
sys.exit(1)
print("audit=pass")
PY
printf '%s\n' '== coverage projection implementation =='
sed -n '846,892p' "$test_file"
printf '%s\n' '== nonphysical fixture coverage rows =='
for manifest in "$root"/*/manifest.json; do
scenario="$(basename "$(dirname "$manifest")")"
jq -r --arg scenario "$scenario" \
'.artifacts[] | select(.captureState != "captured") | "\($scenario) \(.artifactId) \(.captureState)"' \
"$manifest"
done | sort
printf '%s\n' '== MSRV declaration and relevant is_none_or sites =='
sed -n '/^\[package\]/,/^\[/p' crates/cmtraceopen-parser/Cargo.toml | rg -n -C2 'rust-version|name|version'
rg -n -C2 '\.is_none_or\s*\(' crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs
printf '%s\n' '== full requested-head whitespace and source scope =='
base="$(gh pr view 377 --repo adamgell/cmtraceopen --json baseRefOid --jq .baseRefOid)"
git diff --check "$base...$head"
git diff --name-only "$base...$head" -- crates/cmtraceopen-parser/src src src-tauriLength of output: 7690
I found one documentation issue.
The corrected physical-provenance rule is otherwise consistent with the contract. The static audit passed for all 10 scenarios. It verified manifest-to-coverage projection, physical and nonphysical field separation, evidence paths, copied-byte counts, and synthetic markers. No production source files changed. The Rust 1.77.2 concern does not apply. I could not run Rust or TypeScript verification in this sandbox. The result is based on static inspection. ✏️ Learnings added
✅ Action performedReview finished.
|
|
CodeRabbit findings are addressed in exact head
Current gates: focused 8/8; server intake 1/1; Rust 1.88 full parser 662/662; strict project Clippy; Rust 1.88 wasm32; TypeScript; scoped Rust 1.88 format; JSON and diff checks all pass. @coderabbitai review Please perform a fresh substantive exact-head review of |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
head="b1f318df021352be9cee26c744a46b7b47fbea30"
prior="ac3bbf341c95ac7b86fab1e9752d31d401a4ba2c"
repo="adamgell/cmtraceopen"
test_file="crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs"
doc_file="docs/sccm/preparation/issue-330-software-update-point-corpus.md"
fixture_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point"
printf '%s\n' '== target and pull request =='
git rev-parse HEAD
git cat-file -t "$head"
git show -s --format='commit=%H%nparents=%P%nsubject=%s' "$head"
git merge-base --is-ancestor "$prior" "$head"
gh pr view 377 --repo "$repo" --json baseRefOid,headRefOid,headRefName \
--jq '{baseRefOid,headRefOid,headRefName}'
printf '%s\n' '== exact-head delta from prior review =='
git diff --check "$prior" "$head"
git diff --name-status "$prior" "$head"
git diff --stat "$prior" "$head"
git diff --unified=100 "$prior" "$head" -- "$test_file" "$doc_file"
printf '%s\n' '== contract test structure and relevant assertions =='
ast-grep outline "$test_file" --items all --view expanded
rg -n -C 4 \
'fn |artifactId|transactionId|observationId|find\(|position\(|collision|bytesCopied|optional|skipped|confidence|confirmed|coverage|physical|manifest artifact' \
"$test_file"
printf '%s\n' '== preparation document =='
cat -n "$doc_file"
printf '%s\n' '== static fixture consistency audit =='
python3 - <<'PY'
from pathlib import Path
import json, sys
root = Path("crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point")
physical = {"captured", "capped", "parseFailed"}
nonphysical = {"absent", "accessDenied", "skipped", "unsupported"}
errors = []
for manifest_path in sorted(root.glob("*/manifest.json")):
scenario = manifest_path.parent.name
expected_path = manifest_path.with_name("expected.json")
manifest = json.loads(manifest_path.read_text())
expected = json.loads(expected_path.read_text())
artifacts = manifest["artifacts"]
coverage = expected["coverage"]
artifact_ids = [artifact["artifactId"] for artifact in artifacts]
if len(set(artifact_ids)) != len(artifact_ids):
errors.append(f"{scenario}: duplicate manifest artifact IDs")
if artifact_ids != sorted(artifact_ids):
errors.append(f"{scenario}: nondeterministic manifest artifact order")
if [(row["artifactId"], row["state"]) for row in coverage] != [
(artifact["artifactId"], artifact["captureState"]) for artifact in artifacts
]:
errors.append(f"{scenario}: coverage is not the exact all-artifact manifest projection")
for artifact in artifacts:
artifact_id = artifact["artifactId"]
state = artifact["captureState"]
fields = {"encoding", "collectionLimit", "bytesCopied", "relativePath"}
found = fields & set(artifact)
fragment_complete = artifact.get("rotation", {}).get("fragmentComplete")
if state in physical:
missing = fields - set(artifact)
if missing or not isinstance(fragment_complete, bool):
errors.append(f"{scenario}/{artifact_id}: incomplete physical provenance")
continue
evidence = manifest_path.parent / artifact["relativePath"]
if not evidence.is_file():
errors.append(f"{scenario}/{artifact_id}: missing physical evidence")
continue
raw = evidence.read_bytes()
if len(raw) != artifact["bytesCopied"]:
errors.append(f"{scenario}/{artifact_id}: copied-byte mismatch")
if b"SYNTHETIC FIXTURE" not in raw:
errors.append(f"{scenario}/{artifact_id}: missing synthetic marker")
elif state in nonphysical:
if found or fragment_complete is not None:
errors.append(f"{scenario}/{artifact_id}: nonphysical artifact contains physical facts")
else:
errors.append(f"{scenario}/{artifact_id}: unknown capture state {state!r}")
for transaction in expected.get("transactions", []):
for phase in transaction.get("phases", []):
for citation in phase.get("evidence", []):
artifact_id = citation["artifactId"]
by_id = {artifact["artifactId"]: artifact for artifact in artifacts}
if artifact_id not in by_id:
errors.append(f"{scenario}: citation has unknown artifact {artifact_id}")
elif by_id[artifact_id]["captureState"] not in physical:
errors.append(f"{scenario}: citation uses nonphysical artifact {artifact_id}")
if expected.get("clientCausalClaims") not in (None, []):
errors.append(f"{scenario}: client causal claims must be absent")
if errors:
print("\n".join(errors))
sys.exit(1)
print(f"scenarios={len(list(root.glob('*/manifest.json')))} audit=pass")
PY
printf '%s\n' '== full PR scope and whitespace =='
base="$(gh pr view 377 --repo "$repo" --json baseRefOid --jq .baseRefOid)"
git diff --name-only "$base...$head"
git diff --check "$base...$head"
git diff --name-only "$base...$head" -- crates/cmtraceopen-parser/src src src-tauriLength of output: 115431
I found one documentation issue.
The new stable-ID lookup helpers remove the positional mutation targets. The physical-collision mutation now keeps copied-byte consistency. The new optional-gap test rejects high confidence and accepts the medium ceiling for a terminal confirmed failure. The static corpus audit passed for all 10 scenarios. It confirmed all-artifact coverage projection, physical and nonphysical provenance separation, copied-byte consistency, synthetic markers, citation eligibility, and absence of client causal claims. No production source files changed. I did not execute Rust, WebAssembly, TypeScript, or Clippy checks in this sandbox. You are interacting with an AI system. |
adamgell
left a comment
There was a problem hiding this comment.
BLOCKED at exact head b1f318df021352be9cee26c744a46b7b47fbea30 (base 25b37333affde22b4ef8a19f4a5f3d89c082b599).
The committed focused suite is green (8/8), but an external read-only Rust harness compiled from this exact test source proved that the validator accepts invalid contract mutations. Two findings are merge-blocking:
sync-successstill validates after deletingsync-01-02-synchronize, despite the documented six-distinct-phase outcome. Add a permanent mutation test such assync_success_rejects_missing_required_synchronize_phaseand enforce the scenario-specific required phase/cardinality contract, not only monotonic ordering.rotation-boundarystill validates whenrotation-02-lo.relativePathis changed toevidence/server-sup-sync/site/current/./wsyncmgr.logandbytesCopiedis matched to current. That path aliases the current artifact while raw-string uniqueness treats it as distinct. Addrotation_boundary_rejects_dot_segment_alias_collisionand require canonical collision-safe relative paths before reading/comparing them.
The same executable probe also accepted: SYNTHETIC://../../Users/Real/WCM.log, empty synthetic: fingerprint payload, empty 5.00.TEST. version suffix, non-string rolesObserved/stateChain members silently filtered, and arbitrary observation-ID rename. Add focused rejection mutations for these admission/schema cases or document and enforce a narrower reviewed rule.
CodeRabbit did provide a substantive exact-head comment and separately identified the line-115 physical/nonphysical documentation contradiction. Its only GitHub APPROVED review is still anchored to 2fcaa9c, not this head, so I am not treating the stale approval as the b1f318d gate.
Verification captured so far: focused #330 8/8 green; server-intake contract 1/1 green; full parser 662/662 green. Strict Clippy is currently red on 59 pre-existing uninlined_format_args findings in unchanged parser source; no finding is in this PR diff. Keep #330 open and PR #377 draft until the permanent red/green mutations and exact-head rereview pass.
|
CodeRabbit gate disposition for exact head
Human exact-head blockers and permanent-test requirements: #377 (review) |
|
@coderabbitai review Fresh substantive review requested at exact head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="adamgell/cmtraceopen"
head="1ad3eab81493b91aacb7fb4311b57668f1266392"
prior="b1f318df021352be9cee26c744a46b7b47fbea30"
test_file="crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs"
doc_file="docs/sccm/preparation/issue-330-software-update-point-corpus.md"
fixture_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point"
printf '%s\n' '== exact commit and PR head =='
git rev-parse HEAD
git cat-file -t "$head"
git show -s --format='commit=%H%nparents=%P%nsubject=%s' "$head"
git merge-base --is-ancestor "$prior" "$head"
gh pr view 377 --repo "$repo" --json baseRefOid,headRefOid,headRefName \
--jq '{baseRefOid,headRefOid,headRefName}'
printf '%s\n' '== delta since prior reviewed head =='
git diff --check "$prior" "$head"
git diff --name-status "$prior" "$head"
git diff --stat "$prior" "$head"
git diff --unified=100 "$prior" "$head" -- "$test_file" "$doc_file"
printf '%s\n' '== test map and mutation-related implementations =='
ast-grep outline "$test_file" --items all --view expanded
rg -n -C 5 \
'fn |mutation|mutate|unwrap_err|assert.*err|artifactId|transactionId|observationId|coverage|citation|terminal|rotation|confidence|collision|physical|nonphysical|client' \
"$test_file"
printf '%s\n' '== preparation document =='
cat -n "$doc_file"
printf '%s\n' '== corpus and source-boundary audit =='
python3 - <<'PY'
from pathlib import Path
import json
import sys
root = Path("crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point")
physical = {"captured", "capped", "parseFailed"}
nonphysical = {"absent", "accessDenied", "skipped", "unsupported"}
errors = []
for manifest_path in sorted(root.glob("*/manifest.json")):
scenario = manifest_path.parent.name
expected_path = manifest_path.with_name("expected.json")
manifest = json.loads(manifest_path.read_text())
expected = json.loads(expected_path.read_text())
artifacts = manifest.get("artifacts", [])
coverage = expected.get("coverage", [])
ids = [a.get("artifactId") for a in artifacts]
if len(ids) != len(set(ids)):
errors.append(f"{scenario}: duplicate artifact ID")
if ids != sorted(ids):
errors.append(f"{scenario}: unordered artifact IDs")
if [(x.get("artifactId"), x.get("state")) for x in coverage] != [
(x.get("artifactId"), x.get("captureState")) for x in artifacts
]:
errors.append(f"{scenario}: coverage is not an exact manifest projection")
by_id = {a["artifactId"]: a for a in artifacts}
for artifact in artifacts:
aid = artifact["artifactId"]
state = artifact.get("captureState")
physical_fields = {"encoding", "collectionLimit", "bytesCopied", "relativePath"}
present = physical_fields & artifact.keys()
fragment = artifact.get("rotation", {}).get("fragmentComplete")
if state in physical:
missing = physical_fields - artifact.keys()
if missing or not isinstance(fragment, bool):
errors.append(f"{scenario}/{aid}: incomplete physical provenance")
continue
evidence = manifest_path.parent / artifact["relativePath"]
if not evidence.is_file():
errors.append(f"{scenario}/{aid}: evidence file missing")
continue
raw = evidence.read_bytes()
if len(raw) != artifact["bytesCopied"]:
errors.append(f"{scenario}/{aid}: copied bytes mismatch")
if b"SYNTHETIC FIXTURE" not in raw:
errors.append(f"{scenario}/{aid}: missing synthetic marker")
elif state in nonphysical:
if present or fragment is not None:
errors.append(f"{scenario}/{aid}: nonphysical artifact includes physical facts")
else:
errors.append(f"{scenario}/{aid}: unknown capture state {state!r}")
for transaction in expected.get("transactions", []):
for phase in transaction.get("phases", []):
for citation in phase.get("evidence", []):
artifact = by_id.get(citation.get("artifactId"))
if artifact is None:
errors.append(f"{scenario}: citation has unknown artifact")
elif artifact.get("captureState") not in physical:
errors.append(f"{scenario}: citation has nonphysical artifact")
if expected.get("clientCausalClaims") not in (None, []):
errors.append(f"{scenario}: client causal claim present")
if errors:
print("\n".join(errors))
sys.exit(1)
print(f"scenarios={len(list(root.glob('*/manifest.json')))} audit=pass")
PY
base="$(gh pr view 377 --repo "$repo" --json baseRefOid --jq .baseRefOid)"
printf '%s\n' '== full PR scope and whitespace =='
git diff --name-only "$base...$head"
git diff --check "$base...$head"
printf '%s\n' '== changed production sources =='
git diff --name-only "$base...$head" -- crates/cmtraceopen-parser/src src src-tauriLength of output: 150970
I found one blocking documentation issue.
The new contract checks are otherwise consistent with the requested fail-closed behavior. They enforce required observation identity and phase chains, reject The static corpus audit passed for all 10 scenarios. It confirmed coverage projection, physical/nonphysical provenance separation, citation eligibility, synthetic markers, and client-causality isolation. No production source files changed. I could not execute Rust tests in this sandbox. I therefore could not independently verify execution of the eight permanent mutations. You are interacting with an AI system. |
adamgell
left a comment
There was a problem hiding this comment.
BLOCKED at exact head 1ad3eab81493b91aacb7fb4311b57668f1266392 (base 25b37333affde22b4ef8a19f4a5f3d89c082b599).
One merge blocker remains:
docs/sccm/preparation/issue-330-software-update-point-corpus.md:115says every request reason must be backed by matching “noncomplete physical coverage.” The same contract explicitly permitscoverageAbsentandcoverageAccessDenied, and theincompletescenario uses both;absentandaccessDeniedare intentionally nonphysical coverage states. This contradicts the additive SCCM coverage contract and could incorrectly exclude the exact bounded requests the corpus claims to preserve. Replace this with “noncomplete manifest coverage” or equivalent, then request exact-head rereview.
CodeRabbit independently found the same issue in its substantive exact-head review: #377 (comment). Local CodeRabbit CLI 0.7.1 was also attempted against the exact committed range and returned a recoverable one-minute rate limit; that result is not counted as approval.
The eight previously accepted mutations are now permanent and reject at this exact head: missing required phase, renamed observation ID, dot-segment destination alias, unsafe sanitized path, empty fingerprint suffix, empty source-version suffix, non-string rolesObserved entry, and non-string stateChain entry. The focused mutation test passed 1/1 and the full #330 target passed 9/9.
Fresh verification at this SHA:
- server intake fixture contract: 1/1
- SCCM spine: 61/61
- full parser: 663/663
- Rust 1.88 wasm32 check: pass
- TypeScript no-emit check: pass
- scoped Rust 1.88 rustfmt, JSON parse, changed-scope audit,
git diff --check, and clean detached worktree: pass
Repository-wide cargo fmt --check --all remains red only in unchanged baseline files. Exact strict all-target Clippy remains red on 59 pre-existing uninlined_format_args findings in unchanged parser source; this PR changes no production source. Keep #330 open and PR #377 draft until the documentation contradiction is fixed and the new exact head receives fresh CodeRabbit plus independent review.
|
@coderabbitai review Fresh substantive review requested at exact head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="adamgell/cmtraceopen"
head="649a5f204352d53100e73d7519971d06ec1d2445"
prior="1ad3eab81493b91aacb7fb4311b57668f1266392"
test_file="crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs"
doc_file="docs/sccm/preparation/issue-330-software-update-point-corpus.md"
fixture_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point"
printf '%s\n' '== target identity and PR head =='
git rev-parse HEAD
git cat-file -t "$head"
git show -s --format='commit=%H%nparents=%P%nsubject=%s' "$head"
git merge-base --is-ancestor "$prior" "$head"
gh pr view 377 --repo "$repo" --json baseRefOid,headRefOid,headRefName \
--jq '{baseRefOid,headRefOid,headRefName}'
printf '%s\n' '== exact delta from prior reviewed commit =='
git diff --check "$prior" "$head"
git diff --name-status "$prior" "$head"
git diff --stat "$prior" "$head"
git diff --unified=120 "$prior" "$head" -- "$test_file" "$doc_file"
printf '%s\n' '== contract test map =='
ast-grep outline "$test_file" --items all --view expanded
printf '%s\n' '== request coverage and regression-test references =='
rg -n -C 6 \
'noncomplete|manifest coverage|physical coverage|coverageAbsent|coverageAccessDenied|artifactRequests|reasonCode|mutation|regression|request' \
"$test_file" "$doc_file"
printf '%s\n' '== fixture scenario map =='
fd -t f -d 2 'manifest.json|expected.json' "$fixture_root" | sortLength of output: 93006 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="adamgell/cmtraceopen"
head="649a5f204352d53100e73d7519971d06ec1d2445"
base="$(gh pr view 377 --repo "$repo" --json baseRefOid --jq .baseRefOid)"
test_file="crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs"
fixture_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point"
printf '%s\n' '== request and confidence validator implementation =='
sed -n '1315,1455p' "$test_file"
sed -n '1629,1715p' "$test_file"
printf '%s\n' '== manifest provenance and expected coverage implementation =='
sed -n '431,708p' "$test_file"
sed -n '955,1080p' "$test_file"
printf '%s\n' '== static corpus audit =='
python3 - <<'PY'
from pathlib import Path
import json
import sys
root = Path("crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point")
physical = {"captured", "capped", "parseFailed"}
nonphysical = {"absent", "accessDenied", "skipped", "unsupported"}
reason_state = {
"coverageAbsent": {"absent"},
"coverageAccessDenied": {"accessDenied"},
"coverageCapped": {"capped"},
"coverageMalformed": {"parseFailed"},
}
errors = []
for mp in sorted(root.glob("*/manifest.json")):
scenario = mp.parent.name
manifest = json.loads(mp.read_text())
expected = json.loads(mp.with_name("expected.json").read_text())
artifacts = manifest["artifacts"]
by_id = {a["artifactId"]: a for a in artifacts}
if len(by_id) != len(artifacts):
errors.append(f"{scenario}: duplicate artifact ID")
if [a["artifactId"] for a in artifacts] != sorted(by_id):
errors.append(f"{scenario}: unsorted artifact IDs")
actual_coverage = [(x["artifactId"], x["state"]) for x in expected["coverage"]]
projected_coverage = [(x["artifactId"], x["captureState"]) for x in artifacts]
if actual_coverage != projected_coverage:
errors.append(f"{scenario}: coverage is not the exact manifest projection")
for a in artifacts:
state = a["captureState"]
physical_fields = {"encoding", "collectionLimit", "bytesCopied", "relativePath"}
fragment = a.get("rotation", {}).get("fragmentComplete")
if state in physical:
missing = physical_fields - set(a)
if missing or not isinstance(fragment, bool):
errors.append(f"{scenario}/{a['artifactId']}: incomplete physical provenance")
continue
evidence = mp.parent / a["relativePath"]
if not evidence.is_file():
errors.append(f"{scenario}/{a['artifactId']}: evidence file absent")
continue
raw = evidence.read_bytes()
if len(raw) != a["bytesCopied"]:
errors.append(f"{scenario}/{a['artifactId']}: bytesCopied mismatch")
if b"SYNTHETIC FIXTURE" not in raw:
errors.append(f"{scenario}/{a['artifactId']}: no synthetic marker")
elif state in nonphysical:
if physical_fields & set(a) or fragment is not None:
errors.append(f"{scenario}/{a['artifactId']}: nonphysical facts present")
else:
errors.append(f"{scenario}/{a['artifactId']}: invalid capture state {state!r}")
for request in expected["artifactRequests"]:
source = request["sourceId"]
reason = request["reasonCode"]
matches = [
a for a in artifacts
if a["sourceId"] == source
and (
a["captureState"] in reason_state.get(reason, set())
or (reason == "coverageRotationSplit"
and a["captureState"] in {"captured", "capped"}
and a["rotation"]["fragmentComplete"] is False)
)
]
if not matches:
errors.append(f"{scenario}: {source}/{reason} lacks matching manifest coverage")
for tx in expected["transactions"]:
for obs in tx["observations"]:
for cite in obs["evidence"]:
artifact = by_id.get(cite["artifactId"])
if artifact is None or artifact["captureState"] not in physical:
errors.append(f"{scenario}: citation is not physical evidence")
if expected["clientCausalClaims"] != []:
errors.append(f"{scenario}: client causal claims are present")
if errors:
print("\n".join(errors))
sys.exit(1)
print(f"scenarios={len(list(root.glob('*/manifest.json')))} audit=pass")
PY
printf '%s\n' '== PR production and dependency boundary =='
git diff --name-only "$base...$head"
git diff --name-only "$base...$head" -- crates/cmtraceopen-parser/src src src-tauri
git diff --check "$base...$head"Length of output: 35793 🏁 Script executed: #!/bin/bash
set -euo pipefail
test_file="crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs"
doc_file="docs/sccm/preparation/issue-330-software-update-point-corpus.md"
printf '%s\n' '== remaining physical-coverage terminology =='
rg -n -i -C 3 'physical coverage|physical manifest projection|noncomplete manifest coverage' \
"$test_file" "$doc_file"
printf '%s\n' '== precise relevant lines =='
nl -ba "$doc_file" | sed -n '80,118p'
nl -ba "$test_file" | sed -n '1035,1065p'Length of output: 5852
I found one remaining documentation-contract inconsistency.
The new Line 115 wording is correct. The added regression test prevents return of the previous request-specific contradiction. The static corpus audit passed for all 10 scenarios. It verified all-artifact coverage projection, request-to-state binding, physical and nonphysical provenance separation, citation eligibility, synthetic markers, and client-causality isolation. No production source files changed. I did not execute Rust, WebAssembly, TypeScript, or Clippy checks in this sandbox. You are interacting with an AI system. |
adamgell
left a comment
There was a problem hiding this comment.
BLOCKED at exact head 649a5f204352d53100e73d7519971d06ec1d2445 (base 25b37333affde22b4ef8a19f4a5f3d89c082b599).
One merge-blocking contract inconsistency remains at two sites:
docs/sccm/preparation/issue-330-software-update-point-corpus.md:88says “incomplete physical coverage remains insufficientEvidence.” Theincompletefixture reachesinsufficientEvidencefromabsentandaccessDeniedartifacts, which are intentionally nonphysical SCCM manifest coverage states. This must say “incomplete manifest coverage” (or equally explicit all-state wording).crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs:1069reports that coverage is not the exact sorted “physical manifest projection,” although the validator correctly compares all manifest artifacts, including nonphysical states. The diagnostic must say “manifest projection.”
The new bounded-request sentence at docs line 115 is correct, but its phrase-specific regression only pins that sentence and does not reject the contradictory line 88 or validator diagnostic. A read-only exact-head terminology audit is RED at both locations.
The prior eight executable adversarial mutations do reject at this SHA: focused mutation test 1/1 and full #330 contract 10/10. Fresh gates also passed: server intake 1/1; SCCM spine 61/61; full parser 664/664; strict project Clippy; Rust 1.88 wasm32 check; TypeScript no-emit; git diff --check; detached worktree clean.
Hosted CodeRabbit independently reported this same exact-head blocker: #377 (comment). Its stale older approval is not counted. Keep PR #377 draft and issue #330 open until these two terms are corrected, pinned, and rereviewed at the new SHA.
|
@coderabbitai review Fresh substantive review requested at exact head |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="adamgell/cmtraceopen"
head="a398d1ef595f173339e0566edfd1949cb740c904"
prior="649a5f204352d53100e73d7519971d06ec1d2445"
test_file="crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs"
doc_file="docs/sccm/preparation/issue-330-software-update-point-corpus.md"
fixture_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point"
printf '%s\n' '== requested commit and PR head =='
git rev-parse HEAD
git cat-file -t "$head"
git show -s --format='commit=%H%nparents=%P%nsubject=%s' "$head"
git merge-base --is-ancestor "$prior" "$head"
gh pr view 377 --repo "$repo" --json baseRefOid,headRefOid,headRefName \
--jq '{baseRefOid,headRefOid,headRefName}'
printf '%s\n' '== delta from prior reviewed head =='
git diff --check "$prior" "$head"
git diff --name-status "$prior" "$head"
git diff --stat "$prior" "$head"
git diff --unified=120 "$prior" "$head" -- "$test_file" "$doc_file"
printf '%s\n' '== relevant test structure =='
ast-grep outline "$test_file" --items all --view expanded
printf '%s\n' '== terminology and documentation-regression checks =='
rg -n -i -C 6 \
'incomplete manifest coverage|incomplete physical coverage|noncomplete manifest coverage|noncomplete physical coverage|exact sorted manifest projection|physical manifest projection|documentation|terminology|regression' \
"$test_file" "$doc_file"
printf '%s\n' '== relevant validator and regression-test ranges =='
rg -n -C 3 \
'expected coverage|coverage.*projection|artifactRequests|reasonCode|coverageAbsent|coverageAccessDenied' \
"$test_file"
printf '%s\n' '== static corpus audit =='
python3 - <<'PY'
from pathlib import Path
import json
import sys
root = Path("crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point")
physical = {"captured", "capped", "parseFailed"}
nonphysical = {"absent", "accessDenied", "skipped", "unsupported"}
reason_state = {
"coverageAbsent": {"absent"},
"coverageAccessDenied": {"accessDenied"},
"coverageCapped": {"capped"},
"coverageMalformed": {"parseFailed"},
}
errors = []
for manifest_path in sorted(root.glob("*/manifest.json")):
scenario = manifest_path.parent.name
expected_path = manifest_path.with_name("expected.json")
manifest = json.loads(manifest_path.read_text())
expected = json.loads(expected_path.read_text())
artifacts = manifest["artifacts"]
by_id = {artifact["artifactId"]: artifact for artifact in artifacts}
if len(by_id) != len(artifacts):
errors.append(f"{scenario}: duplicate artifact ID")
if [artifact["artifactId"] for artifact in artifacts] != sorted(by_id):
errors.append(f"{scenario}: artifact IDs are not sorted")
projected = [(artifact["artifactId"], artifact["captureState"]) for artifact in artifacts]
coverage = [(row["artifactId"], row["state"]) for row in expected["coverage"]]
if coverage != projected:
errors.append(f"{scenario}: coverage is not the exact all-artifact manifest projection")
for artifact in artifacts:
state = artifact["captureState"]
physical_fields = {"encoding", "collectionLimit", "bytesCopied", "relativePath"}
fragment_complete = artifact.get("rotation", {}).get("fragmentComplete")
if state in physical:
missing = physical_fields - set(artifact)
if missing or not isinstance(fragment_complete, bool):
errors.append(f"{scenario}/{artifact['artifactId']}: incomplete physical provenance")
continue
evidence = manifest_path.parent / artifact["relativePath"]
if not evidence.is_file():
errors.append(f"{scenario}/{artifact['artifactId']}: missing evidence file")
continue
raw = evidence.read_bytes()
if len(raw) != artifact["bytesCopied"]:
errors.append(f"{scenario}/{artifact['artifactId']}: copied-byte mismatch")
if b"SYNTHETIC FIXTURE" not in raw:
errors.append(f"{scenario}/{artifact['artifactId']}: missing synthetic marker")
elif state in nonphysical:
if physical_fields & set(artifact) or fragment_complete is not None:
errors.append(f"{scenario}/{artifact['artifactId']}: nonphysical artifact has physical facts")
else:
errors.append(f"{scenario}/{artifact['artifactId']}: unknown capture state {state!r}")
for request in expected["artifactRequests"]:
source_id = request["sourceId"]
reason_code = request["reasonCode"]
matching_coverage = [
artifact for artifact in artifacts
if artifact["sourceId"] == source_id
and (
artifact["captureState"] in reason_state.get(reason_code, set())
or (
reason_code == "coverageRotationSplit"
and artifact["captureState"] in {"captured", "capped"}
and artifact["rotation"]["fragmentComplete"] is False
)
)
]
if not matching_coverage:
errors.append(f"{scenario}: request {source_id}/{reason_code} lacks matching manifest coverage")
for transaction in expected["transactions"]:
for observation in transaction["observations"]:
for citation in observation["evidence"]:
artifact = by_id.get(citation["artifactId"])
if artifact is None or artifact["captureState"] not in physical:
errors.append(f"{scenario}: citation does not reference physical evidence")
if expected["clientCausalClaims"] != []:
errors.append(f"{scenario}: client causal claim is present")
if errors:
print("\n".join(errors))
sys.exit(1)
print(f"scenarios={len(list(root.glob('*/manifest.json')))} audit=pass")
PY
base="$(gh pr view 377 --repo "$repo" --json baseRefOid --jq .baseRefOid)"
printf '%s\n' '== full PR scope and whitespace =='
git diff --name-only "$base...$head"
git diff --check "$base...$head"
printf '%s\n' '== changed production and dependency files =='
git diff --name-only "$base...$head" -- crates/cmtraceopen-parser/src src src-tauri
git diff -- "$base...$head" -- crates/cmtraceopen-parser/Cargo.tomlLength of output: 50669
No blocking findings. The corrected terms are consistent with the contract:
The static corpus audit passed for all 10 scenarios. It verified deterministic all-artifact coverage projection, physical and nonphysical provenance separation, bounded request binding, physical citation eligibility, synthetic markers, and absence of client causal claims. No production source or dependency files changed. I did not execute Rust, WebAssembly, TypeScript, or Clippy checks in this sandbox. ✅ Action performedReview finished.
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs (1)
373-389: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExtract the shared path-segment safety check.
source_path_is_bounded(Lines 378-384) andsanitized_source_path_is_safe(Lines 395-401) validate path segments with the identical rule: reject empty segments, reject.and.., and allow only ASCII alphanumeric plus.,_,-. Duplicated logic increases the risk that a future hardening change (for example, a new forbidden character or segment) updates one function but not the other, silently reopening a path-traversal gap in only one validator.Extract one helper and call it from both functions.
♻️ Proposed refactor
+fn path_segments_are_safe(value: &str) -> bool { + !value.contains('\\') + && value.split('/').all(|segment| { + !segment.is_empty() + && !matches!(segment, "." | "..") + && segment + .bytes() + .all(|byte| byte.is_ascii_alphanumeric() || matches!(byte, b'.' | b'_' | b'-')) + }) +} + fn source_path_is_bounded(relative_path: &str, basename: &str) -> bool { !relative_path.is_empty() && relative_path.starts_with("evidence/") && !relative_path.starts_with('/') - && !relative_path.contains('\\') - && relative_path.split('/').all(|segment| { - !segment.is_empty() - && !matches!(segment, "." | "..") - && segment - .bytes() - .all(|byte| byte.is_ascii_alphanumeric() || matches!(byte, b'.' | b'_' | b'-')) - }) + && path_segments_are_safe(relative_path) && relative_path .rsplit('/') .next() .is_some_and(|candidate| candidate == basename) } fn sanitized_source_path_is_safe(value: &str) -> bool { - value.strip_prefix("SYNTHETIC://").is_some_and(|suffix| { - !suffix.is_empty() - && !suffix.contains('\\') - && suffix.split('/').all(|segment| { - !segment.is_empty() - && !matches!(segment, "." | "..") - && segment.bytes().all(|byte| { - byte.is_ascii_alphanumeric() || matches!(byte, b'.' | b'_' | b'-') - }) - }) - }) + value + .strip_prefix("SYNTHETIC://") + .is_some_and(|suffix| !suffix.is_empty() && path_segments_are_safe(suffix)) }Also applies to: 391-412
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs` around lines 373 - 389, Extract the duplicated path-segment validation from source_path_is_bounded and sanitized_source_path_is_safe into one shared helper, then call that helper from both validators. Preserve the existing rules rejecting empty, "." and ".." segments and allowing only ASCII alphanumeric characters plus '.', '_', and '-'; leave each function’s other path and basename checks unchanged.
🤖 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/tests/sccm_server_software_update_point_fixture_contract.rs`:
- Around line 373-389: Extract the duplicated path-segment validation from
source_path_is_bounded and sanitized_source_path_is_safe into one shared helper,
then call that helper from both validators. Preserve the existing rules
rejecting empty, "." and ".." segments and allowing only ASCII alphanumeric
characters plus '.', '_', and '-'; leave each function’s other path and basename
checks unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: f334807d-4073-4540-a550-bd57ac43af53
📒 Files selected for processing (2)
crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rsdocs/sccm/preparation/issue-330-software-update-point-corpus.md
🚧 Files skipped from review as they are similar to previous changes (1)
- docs/sccm/preparation/issue-330-software-update-point-corpus.md
adamgell
left a comment
There was a problem hiding this comment.
BLOCKED at exact head a398d1ef595f173339e0566edfd1949cb740c904 (base 25b37333affde22b4ef8a19f4a5f3d89c082b599).
The prior eight executable mutations now reject, and the absent/accessDenied coverage terminology is consistently manifest-wide. One fail-closed schema blocker remains at two arrays:
coverageGapArtifactIdsis parsed withfilter_map(Value::as_str)without checking that every input member was a string. An external read-only Rust harness compiled from this exact committed test source appended JSON number7to the valid skipped-coverage array;mutation_was_accepted(...)returnedtrue.sourceLocalObservations[].artifactIdshas the same filtering behavior. Appending JSON number7to the valid rotation-split artifact list also returnedtrue.
This silently admits malformed, versioned expected-output identity data. Add permanent red-to-green mutations for both arrays and require every array member to be a string before sorting or semantic projection (for example, compare the source-array length with the parsed-string length or use one strict helper).
Fresh verification at this SHA: prior-review mutation test 1/1; full #330 target 10/10; server intake 1/1; SCCM spine 61/61; full parser 664/664; prescribed strict Clippy pass; Rust 1.88 wasm32 check pass; TypeScript no-emit pass; scoped Rustfmt, all corpus JSON, git diff --check, remote SHA, and clean detached worktree pass. Repository-wide cargo +1.88.0 fmt --check --all remains red only in unchanged baseline files. Local CodeRabbit CLI 0.7.1 was attempted against this exact range and rate-limited for 15 minutes; that is not approval. Keep PR #377 draft and issue #330 open pending permanent mutations and a new exact-head rereview.
|
P1 correction work is active from exact head
I will push the smallest fixture-contract correction after focused green and the prescribed aggregate gates, then request a fresh exact-head substantive CodeRabbit review. No merge is being attempted. |
|
Exact-head correction is now |
|
@coderabbitai review Please perform a fresh substantive review for exact head
Also verify that no production reducer/native collector/cross-side causal scope was added and that parser purity/wasm compatibility is unchanged. Please report blocking findings against this exact head. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="adamgell/cmtraceopen"
head="6c5565e3900114190082d0a9d34eeb3d547abb83"
prior="a398d1ef595f173339e0566edfd1949cb740c904"
test_file="crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs"
fixture_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point"
printf '%s\n' '== exact commit identity =='
git rev-parse HEAD
git cat-file -t "$head"
git show -s --format='commit=%H%nparents=%P%nsubject=%s' "$head"
git merge-base --is-ancestor "$prior" "$head"
printf '%s\n' '== pull request metadata =='
gh pr view 377 --repo "$repo" --json baseRefOid,headRefOid,headRefName \
--jq '{baseRefOid,headRefOid,headRefName}'
printf '%s\n' '== delta from prior reviewed commit =='
git diff --check "$prior" "$head"
git diff --name-status "$prior" "$head"
git diff --stat "$prior" "$head"
git diff --unified=100 "$prior" "$head" -- "$test_file" "$fixture_root"
printf '%s\n' '== contract test outline =='
ast-grep outline "$test_file" --items all --view expanded
printf '%s\n' '== rotation and asset-closure references =='
rg -n -C 5 \
'rotation|current|lo_|numbered|timestamped|canonical|basename|lineage|collision|evidence destination|asset|closure|mutation-only|test-only|physical artifact|coverage' \
"$test_file"
printf '%s\n' '== full PR scope and production/dependency boundary =='
base="$(gh pr view 377 --repo "$repo" --json baseRefOid --jq .baseRefOid)"
git diff --name-status "$base...$head"
git diff --name-only "$base...$head" -- \
crates/cmtraceopen-parser/src \
crates/cmtraceopen-parser/Cargo.toml \
src \
src-tauri
git diff --check "$base...$head"Length of output: 190039 🏁 Script executed: #!/bin/bash
set -euo pipefail
root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point"
assets="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point_mutation_assets"
doc="docs/sccm/preparation/issue-330-software-update-point-corpus.md"
test_file="crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs"
printf '%s\n' '== mutation-asset manifest and document boundary =='
jq -S . "$assets/manifest.json"
cat -n "$doc"
printf '%s\n' '== focused contract ranges =='
sed -n '444,510p' "$test_file"
sed -n '740,990p' "$test_file"
sed -n '2000,2152p' "$test_file"
sed -n '2170,2300p' "$test_file"
sed -n '2830,2932p' "$test_file"
printf '%s\n' '== data-level corpus and test-asset audit =='
python3 - <<'PY'
from pathlib import Path
import hashlib
import json
import sys
root = Path("crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point")
asset_root = Path("crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point_mutation_assets")
physical_states = {"captured", "capped", "parseFailed"}
errors = []
all_evidence_hashes = {}
def checked_json(path):
try:
return json.loads(path.read_text())
except Exception as exc:
errors.append(f"{path}: invalid JSON: {exc}")
return {}
for manifest_path in sorted(root.glob("*/manifest.json")):
scenario = manifest_path.parent.name
expected_path = manifest_path.with_name("expected.json")
manifest = checked_json(manifest_path)
expected = checked_json(expected_path)
artifacts = manifest.get("artifacts", [])
coverage = expected.get("coverage", [])
physical_by_path = {}
for artifact in artifacts:
if artifact.get("captureState") in physical_states:
path = artifact.get("relativePath")
aid = artifact.get("artifactId")
if not isinstance(path, str) or not isinstance(aid, str):
errors.append(f"{scenario}: physical artifact lacks string ID/path")
continue
if path in physical_by_path:
errors.append(f"{scenario}: multiple physical artifacts declare {path}")
physical_by_path[path] = aid
evidence = manifest_path.parent / path
if not evidence.is_file():
errors.append(f"{scenario}/{aid}: declared evidence does not exist: {path}")
continue
raw = evidence.read_bytes()
if artifact.get("bytesCopied") != len(raw):
errors.append(f"{scenario}/{aid}: bytesCopied mismatch")
if b"SYNTHETIC FIXTURE" not in raw:
errors.append(f"{scenario}/{aid}: no synthetic marker")
all_evidence_hashes.setdefault(hashlib.sha256(raw).hexdigest(), []).append(
f"{scenario}/{path}"
)
disk_paths = {
p.relative_to(manifest_path.parent).as_posix()
for p in (manifest_path.parent / "evidence").rglob("*")
if p.is_file()
}
if disk_paths != set(physical_by_path):
errors.append(
f"{scenario}: disk/manifest mismatch "
f"disk_only={sorted(disk_paths - set(physical_by_path))} "
f"manifest_only={sorted(set(physical_by_path) - disk_paths)}"
)
coverage_ids = [row.get("artifactId") for row in coverage]
if len(coverage_ids) != len(set(coverage_ids)):
errors.append(f"{scenario}: duplicate coverage IDs")
for path, aid in physical_by_path.items():
if aid not in coverage_ids:
errors.append(f"{scenario}/{aid}: physical artifact has no expected coverage row")
for artifact in artifacts:
rotation = artifact.get("rotation", {})
print(
f"rotation {scenario}/{artifact.get('artifactId')}: "
f"{rotation.get('kind')!r} value={rotation.get('value')!r} "
f"lineage={rotation.get('lineageId')!r} "
f"source={artifact.get('sanitizedSourcePath')!r} "
f"destination={artifact.get('relativePath')!r}"
)
asset_manifest = checked_json(asset_root / "manifest.json")
declared = {}
for asset in asset_manifest.get("assets", []):
path = asset.get("relativePath")
aid = asset.get("assetId")
if not isinstance(path, str) or not isinstance(aid, str):
errors.append("mutation assets: asset lacks string ID/path")
continue
if path in declared:
errors.append(f"mutation assets: duplicate declared path {path}")
declared[path] = asset
actual = {
p.relative_to(asset_root).as_posix()
for p in asset_root.rglob("*")
if p.is_file() and p.name != "manifest.json"
}
if actual != set(declared):
errors.append(
f"mutation assets: declaration mismatch "
f"disk_only={sorted(actual - set(declared))} "
f"manifest_only={sorted(set(declared) - actual)}"
)
for path, asset in sorted(declared.items()):
raw = (asset_root / path).read_bytes()
digest = hashlib.sha256(raw).hexdigest()
if asset.get("bytesCopied") != len(raw):
errors.append(f"mutation asset {path}: bytesCopied mismatch")
if b"SYNTHETIC FIXTURE" not in raw:
errors.append(f"mutation asset {path}: no synthetic marker")
print(f"asset {path}: bytes={len(raw)} sha256={digest} purpose={asset.get('testPurpose')!r}")
if digest in all_evidence_hashes:
print(f"asset {path}: identical scenario evidence={all_evidence_hashes[digest]}")
if errors:
print("ERRORS:")
print("\n".join(errors))
sys.exit(1)
print("audit=pass")
PY
printf '%s\n' '== repository symlinks in reviewed fixture roots =='
find "$root" "$assets" -type l -printf '%p -> %l\n' || true
printf '%s\n' '== raw mutation asset bytes, shown as text only =='
for path in "$assets"/*.log; do
printf '\n--- %s ---\n' "$path"
cat -n "$path"
doneLength of output: 54089 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="adamgell/cmtraceopen"
head="6c5565e3900114190082d0a9d34eeb3d547abb83"
fixture_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point"
asset_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point_mutation_assets"
test_file="crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs"
doc_file="docs/sccm/preparation/issue-330-software-update-point-corpus.md"
base="$(gh pr view 377 --repo "$repo" --json baseRefOid --jq .baseRefOid)"
printf '%s\n' '== exact changed-file classes =='
git diff --name-only "$base...$head" | awk '
/^crates\/cmtraceopen-parser\/tests\// { tests++ }
/^docs\// { docs++ }
/^crates\/cmtraceopen-parser\/src\// { production++ }
/^src\// || /^src-tauri\// { application++ }
/(^|\/)(Cargo\.toml|Cargo\.lock|package\.json|pnpm-lock\.yaml|yarn\.lock)$/ { dependencies++ }
{ all++ }
END {
printf "all=%d tests=%d docs=%d production=%d application=%d dependencies=%d\n",
all, tests, docs, production, application, dependencies
}'
printf '%s\n' '== Git modes for reviewed fixture and mutation-asset files =='
git ls-tree -r "$head" -- "$fixture_root" "$asset_root"
printf '%s\n' '== added corpus content scan for live/sensitive paths and causal claims =='
git diff --unified=0 "$base...$head" -- "$fixture_root" "$asset_root" "$doc_file" \
| rg -n -i '^\+.*(password|secret|credential|api[_-]?key|token|[a-z]:\\\\|/users/|/home/|\\\\users\\\\|https?://|customer|production reducer|native collector|cross-side caus)' \
|| true
printf '%s\n' '== production-boundary assertions and imports =='
rg -n -C 2 \
'normalize_ccm_artifact|ParserKind::Sccm|production reducer|native collector|cross-side|wasm32|pure Rust|clientCausalClaims' \
"$test_file" "$doc_file"
printf '%s\n' '== final exact-range integrity =='
git diff --check "$base...$head"
git status --shortLength of output: 16874
No blocking findings. I verified both P1 corrections.
The full PR changes 49 test files and 1 documentation file. It changes no production reducer, native collector, application source, dependency manifest, or lockfile. The contract continues to use the existing
You are interacting with an AI system. |
adamgell
left a comment
There was a problem hiding this comment.
BLOCKED at exact head 6c5565e3900114190082d0a9d34eeb3d547abb83 (base 25b37333affde22b4ef8a19f4a5f3d89c082b599).
The prior rotation/source/destination/physical-identity/privacy and recursive scenario-closure blockers are closed. One new merge-blocking test-only boundary bypass remains: the mutation-asset contract does not reject unknown top-level or asset-row fields. A read-only external harness copied this exact committed test and fixtures, added artifactId, sourceId, and captureState: "captured" to the first mutation-asset row, and the exact test mutation_assets_have_an_explicit_separate_test_contract still passed 1/1. This permits an asset labeled test-only to carry captured-artifact vocabulary while the documentation says those bytes cannot masquerade as collected scenario evidence.
Close both manifest and asset-row schemas, explicitly forbid production capture/artifact fields, and add a permanent RED-to-GREEN mutation for this construction.
Fresh exact-head verification:
- focused #330: 16/16
- server intake: 1/1
- SCCM spine: 61/61
- full parser: 670/670
- Rust 1.88 wasm32, active strict Clippy, TypeScript no-emit, all 21 corpus JSON files, changed-file Rust 1.88 rustfmt,
git diff --check, remote SHA, and detached cleanliness: pass - independent control-bearing lineage, raw Windows/absolute path, invalid calendar timestamp, and zero-number rotation probes: reject
- Rust 1.88 strict Clippy exposes only 59 pre-existing
uninlined_format_argsfindings with zero owned-test mentions; allowing that documented baseline passes - workspace Rust 1.88 fmt remains red only in 17 unchanged baseline files, with no #330 hunk
The substantive exact-head CodeRabbit response was independently checked: #377 (comment). Its no-blocker result is superseded by the executable bypass above; local CodeRabbit CLI 0.7.1 is authenticated but rate-limited. Keep PR #377 draft/open and issue #330 open pending correction plus a new exact-head independent and substantive CodeRabbit readback.
|
@coderabbitai 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
repo="adamgell/cmtraceopen"
head="e3eb43a6113718f71309df26a5665e7e257832d2"
prior="6c5565e3900114190082d0a9d34eeb3d547abb83"
test_file="crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs"
fixture_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point"
asset_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point_mutation_assets"
doc_file="docs/sccm/preparation/issue-330-software-update-point-corpus.md"
printf '%s\n' '== exact commit and PR state =='
git rev-parse HEAD
git cat-file -t "$head"
git show -s --format='commit=%H%nparents=%P%nsubject=%s' "$head"
git merge-base --is-ancestor "$prior" "$head"
gh pr view 377 --repo "$repo" --json baseRefOid,headRefOid,headRefName \
--jq '{baseRefOid,headRefOid,headRefName}'
printf '%s\n' '== delta from prior reviewed head =='
git diff --check "$prior" "$head"
git diff --name-status "$prior" "$head"
git diff --stat "$prior" "$head"
git diff --unified=120 "$prior" "$head" -- "$test_file" "$asset_root" "$doc_file"
printf '%s\n' '== contract test outline and schema-boundary references =='
ast-grep outline "$test_file" --items all --view expanded
rg -n -C 5 \
'mutation.asset|mutationAsset|assetId|testPurpose|schema|unknown|forbidden|artifactId|sourceId|captureState|collection|masquerad|synthetic|production' \
"$test_file" "$doc_file"
printf '%s\n' '== mutation asset manifest =='
jq -S . "$asset_root/manifest.json"
printf '%s\n' '== mutation asset file map =='
fd -t f . "$asset_root" | sort
printf '%s\n' '== changed scope and whitespace =='
base="$(gh pr view 377 --repo "$repo" --json baseRefOid --jq .baseRefOid)"
git diff --name-status "$base...$head"
git diff --name-only "$base...$head" -- \
crates/cmtraceopen-parser/src \
crates/cmtraceopen-parser/Cargo.toml \
Cargo.lock \
src \
src-tauri \
package.json \
pnpm-lock.yaml \
yarn.lock
git diff --check "$base...$head"Length of output: 164988 🏁 Script executed: #!/bin/bash
set -euo pipefail
test_file="crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs"
fixture_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point"
asset_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point_mutation_assets"
printf '%s\n' '== schema helper primitives and full mutation-asset tests =='
sed -n '166,290p' "$test_file"
sed -n '1978,2242p' "$test_file"
printf '%s\n' '== manifest and expected contract validation ranges =='
sed -n '530,1018p' "$test_file"
sed -n '1083,1940p' "$test_file"
printf '%s\n' '== independent asset and evidence closure audit =='
python3 - <<'PY'
from pathlib import Path
import hashlib
import json
import os
import sys
fixture_root = Path("crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point")
asset_root = Path("crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point_mutation_assets")
physical_states = {"captured", "capped", "parseFailed"}
allowed_top = {"contractVersion", "syntheticFixture", "testOnly", "assets"}
allowed_row = {"assetId", "relativePath", "bytesCopied", "testPurpose"}
errors = []
def load(path):
try:
return json.loads(path.read_text(encoding="utf-8"))
except Exception as exc:
errors.append(f"{path}: invalid JSON: {exc}")
return None
assets_manifest = load(asset_root / "manifest.json")
if not isinstance(assets_manifest, dict):
errors.append("mutation asset manifest must be an object")
else:
keys = set(assets_manifest)
if keys != allowed_top:
errors.append(f"mutation asset top-level fields={sorted(keys)}")
if (assets_manifest.get("contractVersion") != 1
or assets_manifest.get("syntheticFixture") is not True
or assets_manifest.get("testOnly") is not True):
errors.append("mutation asset boundary flags are invalid")
rows = assets_manifest.get("assets")
if not isinstance(rows, list):
errors.append("mutation asset assets is not an array")
rows = []
ids, paths = set(), set()
for index, row in enumerate(rows):
if not isinstance(row, dict):
errors.append(f"asset row {index} is not an object")
continue
if set(row) != allowed_row:
errors.append(f"asset row {index} fields={sorted(row)}")
for field in ("assetId", "relativePath", "testPurpose"):
if not isinstance(row.get(field), str) or not row[field]:
errors.append(f"asset row {index}.{field} is not a nonempty string")
if not isinstance(row.get("bytesCopied"), int) or isinstance(row.get("bytesCopied"), bool) or row["bytesCopied"] < 0:
errors.append(f"asset row {index}.bytesCopied is not an unsigned integer")
if row.get("assetId") in ids:
errors.append(f"duplicate assetId {row.get('assetId')!r}")
ids.add(row.get("assetId"))
path = row.get("relativePath")
if path in paths:
errors.append(f"duplicate asset relativePath {path!r}")
paths.add(path)
if not isinstance(path, str) or not path or Path(path).is_absolute() or ".." in Path(path).parts or path == "manifest.json":
errors.append(f"unsafe asset relativePath {path!r}")
continue
target = asset_root / path
if not target.is_file() or target.is_symlink():
errors.append(f"asset path is not a regular file: {path}")
continue
data = target.read_bytes()
if row.get("bytesCopied") != len(data):
errors.append(f"asset byte count mismatch: {path}")
if b"SYNTHETIC FIXTURE" not in data:
errors.append(f"asset lacks synthetic marker: {path}")
actual = {
path.relative_to(asset_root).as_posix()
for path in asset_root.rglob("*")
if path.is_file() and path.name != "manifest.json"
}
if actual != paths:
errors.append(f"asset disk/manifest mismatch disk_only={sorted(actual-paths)} manifest_only={sorted(paths-actual)}")
for manifest_path in sorted(fixture_root.glob("*/manifest.json")):
scenario_root = manifest_path.parent
scenario = scenario_root.name
manifest = load(manifest_path)
expected = load(scenario_root / "expected.json")
if not isinstance(manifest, dict) or not isinstance(expected, dict):
continue
artifacts = manifest.get("artifacts")
coverage = expected.get("coverage")
if not isinstance(artifacts, list) or not isinstance(coverage, list):
errors.append(f"{scenario}: artifacts or coverage is not an array")
continue
physical = {}
for artifact in artifacts:
if not isinstance(artifact, dict):
errors.append(f"{scenario}: non-object artifact")
continue
if artifact.get("captureState") in physical_states:
aid, path = artifact.get("artifactId"), artifact.get("relativePath")
if not isinstance(aid, str) or not isinstance(path, str):
errors.append(f"{scenario}: physical artifact lacks ID/path")
continue
if path in physical:
errors.append(f"{scenario}: duplicate physical path {path}")
physical[path] = aid
target = scenario_root / path
if not target.is_file() or target.is_symlink():
errors.append(f"{scenario}/{aid}: physical path is not a regular file")
continue
raw = target.read_bytes()
if artifact.get("bytesCopied") != len(raw):
errors.append(f"{scenario}/{aid}: copied-byte mismatch")
if b"SYNTHETIC FIXTURE" not in raw:
errors.append(f"{scenario}/{aid}: missing synthetic marker")
disk = {
path.relative_to(scenario_root).as_posix()
for path in (scenario_root / "evidence").rglob("*")
if path.is_file()
}
if disk != set(physical):
errors.append(f"{scenario}: evidence closure mismatch disk_only={sorted(disk-set(physical))} manifest_only={sorted(set(physical)-disk)}")
projected = [(a.get("artifactId"), a.get("captureState")) for a in artifacts]
actual_coverage = [(row.get("artifactId"), row.get("state")) for row in coverage if isinstance(row, dict)]
if actual_coverage != projected:
errors.append(f"{scenario}: coverage is not the exact manifest projection")
for root in (fixture_root, asset_root):
for path in root.rglob("*"):
if path.is_symlink():
errors.append(f"symlink in reviewed fixture root: {path}")
if errors:
print("\n".join(errors))
sys.exit(1)
print("asset schema, mutation bytes, scenario evidence closure, coverage projection, and symlink audit: pass")
PY
printf '%s\n' '== exact production and dependency boundary =='
base="25b37333affde22b4ef8a19f4a5f3d89c082b599"
head="e3eb43a6113718f71309df26a5665e7e257832d2"
git diff --name-only "$base...$head" -- crates/cmtraceopen-parser/src src src-tauri \
crates/cmtraceopen-parser/Cargo.toml Cargo.toml Cargo.lock \
package.json package-lock.json pnpm-lock.yaml yarn.lock
git diff --check "$base...$head"Length of output: 78530
No blocking findings. The mutation-asset boundary is schema-closed.
The existing SUP/WSUS fixture contract remains consistent.
The full PR range changes no production source, dependency manifest, or lockfile. I could not execute Rust, WebAssembly, TypeScript, or Clippy checks in this sandbox. You are interacting with an AI system. |
adamgell
left a comment
There was a problem hiding this comment.
BLOCKED at exact head e3eb43a6113718f71309df26a5665e7e257832d2 (base 25b37333affde22b4ef8a19f4a5f3d89c082b599).
The mutation-only asset schema correction is closed and the fresh hosted CodeRabbit response is substantive at this head. One new P1 remains: source-version/profile compatibility fails open. A detached external exact-head regression copied the committed contract, then proved both of these mutations return Ok while the output retains selectedSynthetic, exact/topology-gated eligibility, and high confidence:
- every sync-success artifact changed from
5.00.TEST.0001to unknown5.00.TEST.UNKNOWN; - only
sync-success-01-wcmchanged to5.00.TEST.0002, producing a mixed-version transaction.
Inline evidence: #377 (comment)
Add permanent RED-to-GREEN mutations for unknown and mixed source versions, bind the admitted source-version set to the declared extraction profile, and ensure incompatible or unknown versions cannot retain exact/high results.
Fresh committed-head verification before the disposable probe: focused #330 17/17; server intake 1/1; SCCM spine 61/61; full parser aggregate green; strict Clippy; Rust 1.88 wasm32; TypeScript no-emit; changed-file Rust 1.88 rustfmt; and git diff --check all pass. The two-case disposable probe is RED exactly as described. No implementation branch was edited or pushed.
The fresh CodeRabbit no-blocker result is superseded by this executable exact-head bypass. Keep PR #377 draft/open and issue #330 open pending correction, a new substantive CodeRabbit readback, and a different exact-head independent review.
Exact-head source-version/profile correction pushed
|
|
@coderabbitai 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
repo="adamgell/cmtraceopen"
base="25b37333affde22b4ef8a19f4a5f3d89c082b599"
head="26576748a5855c35991ba793b854803c1b69cd56"
prior="e3eb43a6113718f71309df26a5665e7e257832d2"
test_file="crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs"
fixture_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point"
asset_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point_mutation_assets"
doc_file="docs/sccm/preparation/issue-330-software-update-point-corpus.md"
printf '%s\n' '== exact commit identity =='
git rev-parse HEAD
git cat-file -t "$base"
git cat-file -t "$head"
git show -s --format='commit=%H%nparents=%P%nsubject=%s' "$head"
git merge-base --is-ancestor "$base" "$head"
git merge-base --is-ancestor "$prior" "$head"
printf '%s\n' '== pull request state =='
gh pr view 377 --repo "$repo" --json baseRefOid,headRefOid,headRefName \
--jq '{baseRefOid,headRefOid,headRefName}'
printf '%s\n' '== exact delta from prior reviewed commit =='
git diff --check "$prior" "$head"
git diff --name-status "$prior" "$head"
git diff --stat "$prior" "$head"
git diff --unified=100 "$prior" "$head" -- "$test_file" "$fixture_root" "$asset_root" "$doc_file"
printf '%s\n' '== contract structure =='
ast-grep outline "$test_file" --items all --view expanded
printf '%s\n' '== source-version and profile validator references =='
rg -n -C 6 \
'sourceVersion|source version|sup-server-5\.00\.test-v1|5\.00\.TEST\.0001|UNKNOWN|mixed.version|profile|mutation|version' \
"$test_file" "$fixture_root" "$doc_file"
printf '%s\n' '== full PR scope and changed boundaries =='
git diff --name-status "$base...$head"
git diff --name-only "$base...$head" -- \
crates/cmtraceopen-parser/src \
crates/cmtraceopen-parser/Cargo.toml \
Cargo.toml Cargo.lock \
src src-tauri \
package.json package-lock.json pnpm-lock.yaml yarn.lock
git diff --check "$base...$head"Length of output: 202503 🏁 Script executed: #!/bin/bash
set -euo pipefail
base="25b37333affde22b4ef8a19f4a5f3d89c082b599"
head="26576748a5855c35991ba793b854803c1b69cd56"
test_file="crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs"
fixture_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point"
asset_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point_mutation_assets"
doc_file="docs/sccm/preparation/issue-330-software-update-point-corpus.md"
printf '%s\n' '== exact source-version/profile implementation =='
rg -n -C 8 \
'PROFILE|profile.*version|version.*profile|sourceVersion|extractionProfile|selectedSynthetic' \
"$test_file"
sed -n '880,1120p' "$test_file"
sed -n '3020,3055p' "$test_file"
printf '%s\n' '== physical provenance, expected output, and request validators =='
sed -n '440,880p' "$test_file"
sed -n '1120,1550p' "$test_file"
printf '%s\n' '== independent fixture and mutation-asset audit =='
python3 - <<'PY'
from pathlib import Path
import hashlib, json, re, sys
root = Path("crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point")
asset_root = Path("crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point_mutation_assets")
physical_states = {"captured", "capped", "parseFailed"}
nonphysical_states = {"absent", "accessDenied", "skipped", "unsupported"}
reason_states = {
"coverageAbsent": {"absent"},
"coverageAccessDenied": {"accessDenied"},
"coverageCapped": {"capped"},
"coverageMalformed": {"parseFailed"},
}
errors = []
scenario_count = 0
physical_count = 0
def require(condition, message):
if not condition:
errors.append(message)
for manifest_path in sorted(root.glob("*/manifest.json")):
scenario_count += 1
scenario = manifest_path.parent.name
manifest = json.loads(manifest_path.read_text(encoding="utf-8"))
expected = json.loads(manifest_path.with_name("expected.json").read_text(encoding="utf-8"))
artifacts = manifest.get("artifacts")
require(isinstance(artifacts, list) and artifacts, f"{scenario}: artifacts is not a nonempty array")
if not isinstance(artifacts, list):
continue
profile = expected.get("extractionProfile", {})
require(profile.get("profileId") == "sup-server-5.00.test-v1",
f"{scenario}: unexpected profile ID {profile.get('profileId')!r}")
ids = [a.get("artifactId") for a in artifacts if isinstance(a, dict)]
require(len(ids) == len(artifacts) and len(set(ids)) == len(ids) and ids == sorted(ids),
f"{scenario}: artifact IDs are not unique sorted strings")
projection = [(a.get("artifactId"), a.get("captureState")) for a in artifacts if isinstance(a, dict)]
coverage = expected.get("coverage")
require(isinstance(coverage, list), f"{scenario}: coverage is not an array")
if isinstance(coverage, list):
actual = [(r.get("artifactId"), r.get("state")) for r in coverage if isinstance(r, dict)]
require(actual == projection, f"{scenario}: coverage is not the exact sorted manifest projection")
by_id = {a.get("artifactId"): a for a in artifacts if isinstance(a, dict)}
for artifact in artifacts:
if not isinstance(artifact, dict):
continue
aid = artifact.get("artifactId")
state = artifact.get("captureState")
require(artifact.get("sourceVersion") == "5.00.TEST.0001",
f"{scenario}/{aid}: source version is not exact selected version")
rotation = artifact.get("rotation", {})
physical_fields = {"encoding", "collectionLimit", "bytesCopied", "relativePath"}
present = physical_fields & set(artifact)
fragment = rotation.get("fragmentComplete") if isinstance(rotation, dict) else None
if state in physical_states:
physical_count += 1
require(not (physical_fields - set(artifact)),
f"{scenario}/{aid}: physical provenance missing fields")
require(isinstance(fragment, bool), f"{scenario}/{aid}: physical artifact lacks fragmentComplete")
path = artifact.get("relativePath")
if isinstance(path, str):
evidence = manifest_path.parent / path
require(evidence.is_file() and not evidence.is_symlink(),
f"{scenario}/{aid}: evidence is not a regular file")
if evidence.is_file() and not evidence.is_symlink():
raw = evidence.read_bytes()
require(artifact.get("bytesCopied") == len(raw),
f"{scenario}/{aid}: copied-byte mismatch")
require(b"SYNTHETIC FIXTURE" in raw,
f"{scenario}/{aid}: no synthetic marker")
else:
errors.append(f"{scenario}/{aid}: physical path is not a string")
elif state in nonphysical_states:
require(not present and fragment is None,
f"{scenario}/{aid}: nonphysical artifact has physical facts")
else:
errors.append(f"{scenario}/{aid}: unknown capture state {state!r}")
disk = {
path.relative_to(manifest_path.parent).as_posix()
for path in (manifest_path.parent / "evidence").rglob("*")
if path.is_file()
}
declared = {
a["relativePath"] for a in artifacts
if isinstance(a, dict) and a.get("captureState") in physical_states
and isinstance(a.get("relativePath"), str)
}
require(disk == declared, f"{scenario}: physical evidence closure mismatch")
for request in expected.get("artifactRequests", []):
if not isinstance(request, dict):
errors.append(f"{scenario}: non-object artifact request")
continue
source, reason = request.get("sourceId"), request.get("reasonCode")
matching = [
a for a in artifacts if isinstance(a, dict) and a.get("sourceId") == source
and (a.get("captureState") in reason_states.get(reason, set())
or (reason == "coverageRotationSplit"
and a.get("captureState") in {"captured", "capped"}
and a.get("rotation", {}).get("fragmentComplete") is False))
]
require(bool(matching), f"{scenario}: request {source}/{reason} lacks matching coverage")
for tx in expected.get("transactions", []):
if not isinstance(tx, dict):
errors.append(f"{scenario}: non-object transaction")
continue
require(tx.get("key", {}).get("extractionProfileId") == "sup-server-5.00.test-v1",
f"{scenario}: transaction lacks selected profile ID")
for observation in tx.get("observations", []):
if not isinstance(observation, dict):
errors.append(f"{scenario}: non-object observation")
continue
for citation in observation.get("evidence", []):
artifact = by_id.get(citation.get("artifactId")) if isinstance(citation, dict) else None
require(artifact is not None and artifact.get("captureState") in physical_states,
f"{scenario}: citation is not physical declared evidence")
require(expected.get("clientCausalClaims") == [],
f"{scenario}: client causal claims are not empty")
asset = json.loads((asset_root / "manifest.json").read_text(encoding="utf-8"))
require(set(asset) == {"contractVersion", "syntheticFixture", "testOnly", "assets"},
"mutation assets: top-level schema is not closed")
require(asset.get("contractVersion") == 1 and asset.get("syntheticFixture") is True and asset.get("testOnly") is True,
"mutation assets: boundary flags are invalid")
rows = asset.get("assets", [])
declared_assets = set()
for row in rows if isinstance(rows, list) else []:
require(isinstance(row, dict) and set(row) == {"assetId", "relativePath", "bytesCopied", "testPurpose"},
"mutation assets: asset-row schema is not closed")
if not isinstance(row, dict):
continue
path = row.get("relativePath")
declared_assets.add(path)
target = asset_root / path if isinstance(path, str) else asset_root
require(target.is_file() and not target.is_symlink(), f"mutation asset {path!r}: not a regular file")
if target.is_file() and not target.is_symlink():
raw = target.read_bytes()
require(row.get("bytesCopied") == len(raw), f"mutation asset {path}: copied-byte mismatch")
require(b"SYNTHETIC FIXTURE" in raw, f"mutation asset {path}: no synthetic marker")
actual_assets = {
path.relative_to(asset_root).as_posix()
for path in asset_root.rglob("*") if path.is_file() and path.name != "manifest.json"
}
require(actual_assets == declared_assets, "mutation assets: disk/manifest closure mismatch")
for scan_root in (root, asset_root):
require(not any(path.is_symlink() for path in scan_root.rglob("*")),
f"{scan_root}: symbolic link found")
if errors:
print("\n".join(errors))
sys.exit(1)
print(f"scenarios={scenario_count} physical_artifacts={physical_count} audit=pass")
PY
printf '%s\n' '== exact diff of source-version change =='
git diff --unified=80 "e3eb43a6113718f71309df26a5665e7e257832d2" "$head" -- "$test_file"
printf '%s\n' '== documentation and production-boundary terms =='
rg -n -C 3 \
'production reducer|native collector|ParserKind|cross-side|client causal|live Windows|sourceVersion|profile' \
"$doc_file" "$fixture_root/README.md" "$test_file"Length of output: 109890
No blocking findings. The source-version/profile binding fails closed.
The existing
The reviewed PR range changes fixtures, tests, and documentation only. It changes no production reducer, native collector, parser family, dependency manifest, or lockfile. I did not execute Rust, WebAssembly, TypeScript, or Clippy checks in this sandbox. You are interacting with an AI system. |
|
🟢 Restack claim for #330: root owns the merge-only foundation restack in isolated worktree Owned scope is only merge/restack and verification state; no workflow semantics will be edited in this step. Target is merged #318 foundation |
…cm-330-restack-a8a
|
🟢 #330 restack is pushed at exact head Scope/dependency state:
Verification at exact
The substantive CodeRabbit review at |
|
@coderabbitai full review Please perform a fresh full-range review of exact head |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="adamgell/cmtraceopen"
base="a8a367c661cd17bd1e73b87724c143ec8565ffc7"
head="8559357f61f640940b41bd159783db5454fb18d3"
test_file="crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs"
fixture_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point"
asset_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point_mutation_assets"
doc_file="docs/sccm/preparation/issue-330-software-update-point-corpus.md"
printf '%s\n' '== exact range identity =='
git rev-parse HEAD
git cat-file -t "$base"
git cat-file -t "$head"
git show -s --format='commit=%H%nparents=%P%nsubject=%s' "$head"
git merge-base --is-ancestor "$base" "$head"
printf '%s\n' 'base is an ancestor of requested head'
printf '%s\n' '== pull request state =='
gh pr view 377 --repo "$repo" --json baseRefOid,headRefOid,headRefName,isDraft \
--jq '{baseRefOid,headRefOid,headRefName,isDraft}'
printf '%s\n' '== full-range scope =='
git diff --name-status "$base...$head"
git diff --stat "$base...$head"
git diff --check "$base...$head"
printf '%s\n' '== production/dependency changes, if any =='
git diff --name-only "$base...$head" -- \
crates/cmtraceopen-parser/src crates/cmtraceopen-parser/Cargo.toml \
Cargo.toml Cargo.lock src src-tauri \
package.json package-lock.json pnpm-lock.yaml yarn.lock
printf '%s\n' '== contract structure =='
ast-grep outline "$test_file" --items all --view expanded
printf '%s\n' '== validator and mutation-test map =='
rg -n -C 4 \
'fn validate_|fn .*mutation|topology|producer|subject|sourceVersion|extractionProfile|rotation|collision|coverage|transaction|updateKey|terminal|confidence|artifactRequests|clientCausalClaims|determin|privacy|synthetic' \
"$test_file"
printf '%s\n' '== preparation contract =='
cat -n "$doc_file"
printf '%s\n' '== normalized fixture manifests and expected outputs =='
while IFS= read -r file; do
printf '\n--- %s ---\n' "$file"
jq -S . "$file"
done < <(fd -t f -e json . "$fixture_root" | sort)
printf '%s\n' '== mutation-asset manifest =='
jq -S . "$asset_root/manifest.json"Length of output: 117516 🏁 Script executed: #!/bin/bash
set -euo pipefail
test_file="crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs"
fixture_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point"
asset_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point_mutation_assets"
printf '%s\n' '== manifest validator: provenance, topology, rotation, and physical evidence =='
sed -n '531,1022p' "$test_file"
printf '%s\n' '== expected validator: keys, coverage, terminality, confidence, source-local, and requests =='
sed -n '1047,1940p' "$test_file"
printf '%s\n' '== independent corpus audit =='
python3 - <<'PY'
from pathlib import Path
from collections import Counter
import hashlib
import json
import re
import sys
root = Path("crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point")
asset_root = Path("crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point_mutation_assets")
physical_states = {"captured", "capped", "parseFailed"}
nonphysical_states = {"absent", "accessDenied", "skipped", "unsupported"}
required_topology = {
"siteCode": "LAB",
"supHandle": "safe:sup:lab-sup-01",
"wsusHandle": "safe:wsus:lab-wsus-01",
}
reason_states = {
"coverageAbsent": {"absent"},
"coverageAccessDenied": {"accessDenied"},
"coverageCapped": {"capped"},
"coverageMalformed": {"parseFailed"},
}
errors = []
summary = []
def fail(message):
errors.append(message)
for manifest_path in sorted(root.glob("*/manifest.json")):
scenario_root = manifest_path.parent
scenario = scenario_root.name
expected_path = scenario_root / "expected.json"
try:
manifest = json.loads(manifest_path.read_text(encoding="utf-8"))
expected = json.loads(expected_path.read_text(encoding="utf-8"))
except Exception as exc:
fail(f"{scenario}: JSON parse failure: {exc}")
continue
topology = manifest.get("topology", {})
for field, value in required_topology.items():
if topology.get(field) != value:
fail(f"{scenario}: topology {field} is {topology.get(field)!r}, expected {value!r}")
artifacts = manifest.get("artifacts")
coverage = expected.get("coverage")
if not isinstance(artifacts, list) or not isinstance(coverage, list):
fail(f"{scenario}: artifacts or coverage is not an array")
continue
ids = [a.get("artifactId") for a in artifacts if isinstance(a, dict)]
if len(ids) != len(artifacts) or any(not isinstance(x, str) for x in ids):
fail(f"{scenario}: artifact IDs are not exact strings")
if ids != sorted(ids) or len(set(ids)) != len(ids):
fail(f"{scenario}: artifact IDs are not unique sorted values")
projection = [(a.get("artifactId"), a.get("captureState")) for a in artifacts]
coverage_projection = [(c.get("artifactId"), c.get("state")) for c in coverage if isinstance(c, dict)]
if coverage_projection != projection:
fail(f"{scenario}: coverage is not the exact artifact projection")
physical_paths = {}
for artifact in artifacts:
if not isinstance(artifact, dict):
fail(f"{scenario}: artifact is not an object")
continue
aid = artifact.get("artifactId")
state = artifact.get("captureState")
if artifact.get("sourceVersion") != "5.00.TEST.0001":
fail(f"{scenario}/{aid}: source version is not exact")
if artifact.get("workflowSubjectRole") != "softwareUpdatePoint" or artifact.get("workflowSubjectHandle") != required_topology["supHandle"]:
fail(f"{scenario}/{aid}: workflow subject is not the exact SUP")
if state in physical_states:
path = artifact.get("relativePath")
if not isinstance(path, str) or path in physical_paths:
fail(f"{scenario}/{aid}: invalid or colliding physical path {path!r}")
continue
physical_paths[path] = aid
target = scenario_root / path
if not target.is_file() or target.is_symlink():
fail(f"{scenario}/{aid}: physical asset is missing or not regular")
continue
raw = target.read_bytes()
if artifact.get("bytesCopied") != len(raw):
fail(f"{scenario}/{aid}: bytesCopied mismatch")
if b"SYNTHETIC FIXTURE" not in raw:
fail(f"{scenario}/{aid}: no synthetic marker")
rotation = artifact.get("rotation", {})
if not isinstance(rotation.get("fragmentComplete"), bool):
fail(f"{scenario}/{aid}: physical artifact has no boolean fragmentComplete")
elif state in nonphysical_states:
forbidden = {"relativePath", "bytesCopied", "encoding", "collectionLimit"} & set(artifact)
if forbidden or artifact.get("rotation", {}).get("fragmentComplete") is not None:
fail(f"{scenario}/{aid}: nonphysical artifact has physical fields {sorted(forbidden)}")
else:
fail(f"{scenario}/{aid}: unknown capture state {state!r}")
disk_paths = {
item.relative_to(scenario_root).as_posix()
for item in (scenario_root / "evidence").rglob("*")
if item.is_file()
}
if disk_paths != set(physical_paths):
fail(f"{scenario}: evidence closure disk_only={sorted(disk_paths-set(physical_paths))} manifest_only={sorted(set(physical_paths)-disk_paths)}")
by_id = {a.get("artifactId"): a for a in artifacts if isinstance(a, dict)}
for tx in expected.get("transactions", []):
key = tx.get("key", {})
if key.get("siteCode") != "LAB" or key.get("supHandle") != required_topology["supHandle"] or key.get("extractionProfileId") != "sup-server-5.00.test-v1":
fail(f"{scenario}: transaction key is outside exact profile/topology")
gaps = tx.get("coverageGapArtifactIds")
if not isinstance(gaps, list) or any(not isinstance(x, str) for x in gaps) or gaps != sorted(gaps):
fail(f"{scenario}: transaction coverage gaps are not exact sorted strings")
for observation in tx.get("observations", []):
evidence = observation.get("evidence")
if not isinstance(evidence, list) or not evidence:
fail(f"{scenario}: transaction observation has non-array or empty evidence")
continue
for cite in evidence:
artifact = by_id.get(cite.get("artifactId")) if isinstance(cite, dict) else None
if artifact is None or artifact.get("captureState") not in physical_states:
fail(f"{scenario}: citation is not declared physical evidence")
for request in expected.get("artifactRequests", []):
source, reason = request.get("sourceId"), request.get("reasonCode")
matched = any(
a.get("sourceId") == source and (
a.get("captureState") in reason_states.get(reason, set())
or (reason == "coverageRotationSplit"
and a.get("captureState") in {"captured", "capped"}
and a.get("rotation", {}).get("fragmentComplete") is False)
)
for a in artifacts if isinstance(a, dict)
)
if not matched:
fail(f"{scenario}: unbound request {source!r}/{reason!r}")
if expected.get("clientCausalClaims") != []:
fail(f"{scenario}: client causal claims are present")
summary.append(f"{scenario}: artifacts={len(artifacts)} physical={len(physical_paths)} transactions={len(expected.get('transactions', []))}")
asset_manifest = json.loads((asset_root / "manifest.json").read_text(encoding="utf-8"))
if set(asset_manifest) != {"contractVersion", "syntheticFixture", "testOnly", "assets"}:
fail("mutation assets: top-level schema is not closed")
declared_assets = set()
for row in asset_manifest.get("assets", []):
if set(row) != {"assetId", "relativePath", "bytesCopied", "testPurpose"}:
fail(f"mutation assets: row schema is not closed: {sorted(row)}")
continue
path = row["relativePath"]
declared_assets.add(path)
target = asset_root / path
if not target.is_file() or target.is_symlink():
fail(f"mutation asset {path}: missing or nonregular")
continue
raw = target.read_bytes()
if len(raw) != row["bytesCopied"] or b"SYNTHETIC FIXTURE" not in raw:
fail(f"mutation asset {path}: invalid bytes or marker")
actual_assets = {p.relative_to(asset_root).as_posix() for p in asset_root.rglob("*") if p.is_file() and p.name != "manifest.json"}
if actual_assets != declared_assets:
fail(f"mutation assets: disk closure mismatch")
for scan_root in (root, asset_root):
for path in scan_root.rglob("*"):
if path.is_symlink():
fail(f"symbolic link found: {path}")
print("\n".join(summary))
if errors:
print("ERRORS:")
print("\n".join(errors))
sys.exit(1)
print("audit=pass")
PY
printf '%s\n' '== raw physical evidence =='
while IFS= read -r file; do
printf '\n--- %s ---\n' "$file"
cat -n "$file"
done < <(find "$fixture_root" -type f -name '*.log' | sort)Length of output: 67956 🏁 Script executed: #!/bin/bash
set -euo pipefail
base="a8a367c661cd17bd1e73b87724c143ec8565ffc7"
head="8559357f61f640940b41bd159783db5454fb18d3"
test_file="crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs"
fixture_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point"
asset_root="crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point_mutation_assets"
printf '%s\n' '== path, rotation, source-catalogue, and evidence-reference helpers =='
sed -n '333,510p' "$test_file"
sed -n '1023,1083p' "$test_file"
printf '%s\n' '== raw committed evidence =='
find "$fixture_root" -type f -name '*.log' -print | sort | while IFS= read -r file; do
printf '\n--- %s ---\n' "$file"
cat -n "$file"
done
printf '%s\n' '== independent citation, rotation, and privacy audit =='
python3 - <<'PY'
from pathlib import Path
import json
import re
import sys
root = Path("crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point")
errors = []
physical = {"captured", "capped", "parseFailed"}
rotation_source = {
"current": lambda basename, value: basename,
"lo_": lambda basename, value: basename[:-4] + ".lo_" if basename.endswith(".log") else None,
"numbered": lambda basename, value: f"{basename}.{value}",
"timestamped": lambda basename, value: f"{basename}.{value}",
}
destination = {
"current": lambda value: "current",
"lo_": lambda value: "lo_",
"numbered": lambda value: f"numbered-{value}",
"timestamped": lambda value: f"timestamped-{value}",
}
sensitive = re.compile(
r"(?i)(password|credential|api[_-]?key|secret|token|"
r"[a-z]:[\\/](?:users|home)[\\/]|/(?:users|home)/|"
r"microsoft\.com|https?://)"
)
for manifest_path in sorted(root.glob("*/manifest.json")):
scenario_root = manifest_path.parent
scenario = scenario_root.name
manifest = json.loads(manifest_path.read_text())
expected = json.loads((scenario_root / "expected.json").read_text())
by_id = {a["artifactId"]: a for a in manifest["artifacts"]}
cited = set()
for artifact in manifest["artifacts"]:
aid = artifact["artifactId"]
rot = artifact["rotation"]
kind = rot["kind"]
if kind not in rotation_source:
errors.append(f"{scenario}/{aid}: unknown rotation kind")
continue
if artifact["captureState"] in physical:
source_name = artifact["sanitizedSourcePath"].rsplit("/", 1)[-1]
expected_source = rotation_source[kind](artifact["originalBasename"], rot.get("value"))
segment = artifact["relativePath"].split("/")[-2]
expected_segment = destination[kind](rot.get("value"))
if source_name != expected_source:
errors.append(f"{scenario}/{aid}: rotation source binding mismatch")
if segment != expected_segment:
errors.append(f"{scenario}/{aid}: rotation destination binding mismatch")
for tx in expected["transactions"]:
seen = set()
for observation in tx["observations"]:
for evidence in observation["evidence"]:
aid = evidence["artifactId"]
start, end = evidence["startLine"], evidence["endLine"]
artifact = by_id.get(aid)
if artifact is None or artifact["captureState"] not in physical:
errors.append(f"{scenario}: citation {aid} is not physical")
continue
lines = (scenario_root / artifact["relativePath"]).read_text(encoding="utf-8").splitlines()
if not (1 <= start <= end <= len(lines)):
errors.append(f"{scenario}: citation {aid}:{start}-{end} is outside evidence")
continue
identity = (aid, start, end)
if identity in seen:
errors.append(f"{scenario}: duplicate transaction logical citation {identity}")
seen.add(identity)
cited.add(identity)
excerpt = "\n".join(lines[start - 1:end])
if "SYNTHETIC FIXTURE" not in excerpt:
errors.append(f"{scenario}: citation {identity} lacks synthetic marker")
for key, value in tx["key"].items():
if key == "confidence" or value is None:
continue
fixture_key = {
"syncRunId": "SyncRunId",
"siteCode": "SiteCode",
"supHandle": "SupHandle",
"updateId": "UpdateId",
"kbId": "KbId",
"extractionProfileId": "ProfileId",
}[key]
if f"{fixture_key}={value}" not in excerpt:
errors.append(f"{scenario}: citation {identity} does not repeat {fixture_key}")
for path in scenario_root.rglob("*"):
if path.is_file() and sensitive.search(path.read_text(encoding="utf-8", errors="replace")):
errors.append(f"{scenario}: sensitive/live token in {path.relative_to(scenario_root)}")
if errors:
print("ERRORS:")
print("\n".join(errors))
sys.exit(1)
print("citation, rotation, and privacy audit=pass")
PY
printf '%s\n' '== added-content scan and exact range integrity =='
git diff --unified=0 "$base...$head" -- "$fixture_root" "$asset_root" \
| rg -n -i '^\+.*(password|credential|api[_-]?key|secret|token|[a-z]:\\\\(users|home)\\\\|/(users|home)/|https?://|customer data|real hostname|live (sccm|windows|wsus)|client.*caus)' \
|| true
git diff --check "$base...$head"Length of output: 29192
No blocking findings. I verified these areas:
The static corpus, citation, rotation, and privacy audits passed. I did not run Rust, WebAssembly, TypeScript, or Clippy checks in this sandbox. ✅ 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 39 minutes. |
adamgell
left a comment
There was a problem hiding this comment.
Independent adversarial review at exact head 8559357 (restack of foundation a8a367c; git merge-base HEAD a8a367c prints the foundation SHA). All commands were run in a detached exact-head worktree; no fixture or source drift remained afterward (git status clean).
Verdict: PASS.
Battery at this head:
- Focused #330 contract (sccm_server_software_update_point_fixture_contract): 18/18
- sccm_spine_contract: 136/136
- Full cmtraceopen-parser suite: 747 passed, 0 failed
- cargo clippy -p cmtraceopen-parser --all-targets -- -D warnings: zero warnings
- cargo check -p cmtraceopen-parser --target wasm32-unknown-unknown: clean
- Independent probe harness (validator included verbatim, 9 adversarial probes plus the 18 committed tests): 27/27
- rustfmt --check on the contract test: clean; non-ASCII scan of all 50 changed files: no hits
Per-thread adjudication (all seven unresolved threads):
-
Exact required phase set: FIXED-AT-HEAD. The permanent mutation test required_phase_identity_and_manifest_strings_fail_closed removes sync-01-02-synchronize and the validator pins the exact per-scenario observation signature (id, phase, disposition, terminal). Independent probes rejected both removal and a same-cardinality phase swap with "exact required observation chain". An on-disk fixture mutation removing the observation turned 4 committed tests RED with the same message; reverted.
-
Dot-segment destination aliases: FIXED-AT-HEAD. source_path_is_bounded and sanitized_source_path_is_safe reject empty, ".", "..", and backslash segments lexically. The probe alias evidence/server-sup-sync/site/current/./wsyncmgr.log with matching bytesCopied was rejected with "unsafe or mismatched evidence path"; a dot-segment sanitized source path was rejected with "leaks or omits path provenance". The permanent dot-alias mutation exists in the committed test.
-
filter_map(Value::as_str) drops: FIXED-AT-HEAD. All four remaining filter_map sites (rolesObserved, stateChain, coverageGapArtifactIds, source-local artifactIds) carry length guards. Probes appending JSON number 7 were rejected with the array-specific messages; permanent mutations exist for all four arrays.
-
Source-local schema and identity bypasses: FIXED-AT-HEAD. All five probes from the 04f41a6 review were independently rejected: renamed rotation-01-split ("exact source-local observation identities"), duplicated observation ID ("duplicate source-local observationId"), unknown string artifact ID ("cites unknown artifact ID aaa-unknown-artifact"), non-array evidence ("must be an array"), duplicate citation ("cites one physical logical record more than once"). The permanent test covers all five.
-
Captured incomplete fragments as noncomplete coverage: FIXED-AT-HEAD. The gap projection requires every non-client artifact that is not captured with fragmentComplete=true to appear in coverageGapArtifactIds, and required-source gaps forfeit high-confidence success. The captured-partial probe (182-byte headless fragment matching declared bytesCopied) was rejected with "does not disclose every noncomplete server artifact" and with no byte-count, marker, or fragment-exposure contamination.
-
parseFailed normalization: FIXED-AT-HEAD. parseFailed artifacts are now normalized in the physical branch and any usable logical record rejects with "parseFailed but contains usable normalized CCM evidence". The probe redirected rotation-03-malformed to a complete valid 326-byte CCM record and was rejected by that guard only.
-
Rotation split family binding: FIXED-AT-HEAD. rotationSplit membership now requires one source, role, producer host, workflow subject role and handle, source version, canonical basename, and nonempty lineage, plus at least two distinct rotation forms on incomplete captured/capped fragments. The cross-family WCM.log probe and a divergent-lineage probe were both rejected with "classification is detached from physical semantics".
Fresh-eyes checks beyond the threads, all rejecting correctly: reordered manifest artifacts, stale expected coverage labels, one record cited from two observations of one transaction, nonphysical line-range citations, absent artifacts inventing physical metadata, duplicate artifact identity under a second label, and decoded-value privacy (a path-like decoded field value is rejected by the bounded value grammar, not merely by serialized-byte checks).
Privacy sweep of the lane fixture and mutation-asset directories: clean. All handles are safe:* tokens, the site code is LAB, paths use the SYNTHETIC:// scheme, every log carries the SYNTHETIC FIXTURE marker, and there are no GUIDs, IP addresses, real hostnames, or user paths. The only grep hits were the substring "C:/" inside "SYNTHETIC://" and "corp" inside "corpus".
The diff is purely additive (3940 insertions, 0 deletions, 50 files) and confined to the SUP lane. This review applies to head 8559357 only.
There was a problem hiding this comment.
Pull request overview
Prepares the SCCM Server Software Update Point (SUP) / WSUS diagnostic fixture corpus for issue #330 by adding a synthetic, role-aware evidence matrix plus a strict fixture-contract integration test that validates manifest/expected-output invariants (keys, provenance, coverage states, ordering, and fail-closed mutation behavior) without introducing any production reducer, new parser family, or native collection.
Changes:
- Added a new preparation document defining the SUP/WSUS corpus boundary, source catalog, key/coverage rules, and scenario matrix.
- Added a closed, adversarial fixture-contract test (
sccm_server_software_update_point_fixture_contract) that loads the corpus, enforces schema/provenance constraints, and rejects mutations. - Added the synthetic SUP/WSUS fixture corpus scenarios plus a separate mutation-asset contract to ensure adversarial bytes cannot masquerade as collected evidence.
Reviewed changes
Copilot reviewed 23 out of 50 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| docs/sccm/preparation/issue-330-software-update-point-corpus.md | Documents the #330 SUP/WSUS preparation boundary, source/role contract, keys, coverage, and scenario matrix. |
| crates/cmtraceopen-parser/tests/sccm_server_software_update_point_fixture_contract.rs | Adds the closed fixture-contract integration test + adversarial mutation checks for the corpus. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/README.md | Corpus README describing scope and non-claims for the synthetic SUP/WSUS fixtures. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/incomplete/manifest.json | Scenario manifest: incomplete coverage (absent/accessDenied) while preserving role observation. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/incomplete/expected.json | Scenario expected output: incomplete/insufficient-evidence transaction + bounded requests. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/incomplete/evidence/server-sup-sync/site/current/WCM.log | Scenario evidence: synthetic CCM WCM record for configure phase. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/metadata-failure/manifest.json | Scenario manifest: metadata failure case inputs and provenance. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/metadata-failure/expected.json | Scenario expected output: confirmed failure at import/metadata stage. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/metadata-failure/evidence/server-sup-sync/site/current/WCM.log | Scenario evidence: synthetic CCM WCM configure success. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/metadata-failure/evidence/server-sup-sync/site/current/wsyncmgr.log | Scenario evidence: synthetic CCM wsyncmgr sync success + metadata failure. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/rotation-boundary/manifest.json | Scenario manifest: split rotation fragments + parseFailed evidence case. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/rotation-boundary/expected.json | Scenario expected output: source-local observations + bounded coverage requests, no transaction. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/rotation-boundary/evidence/server-sup-sync/site/current/wsyncmgr.log | Scenario evidence: partial/fragmented synthetic bytes (rotation boundary). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/rotation-boundary/evidence/server-sup-sync/site/lo_/wsyncmgr.log | Scenario evidence: partial/fragmented synthetic bytes (lo_ rotation). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/rotation-boundary/evidence/server-sup-sync/sup/current/WSUSCtrl.log | Scenario evidence: synthetic malformed bytes for parseFailed coverage state. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sup-setup-failure/manifest.json | Scenario manifest: SUP setup/config failure input/provenance. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sup-setup-failure/expected.json | Scenario expected output: confirmed failure from SUPSetup evidence. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sup-setup-failure/evidence/server-sup-sync/sup/current/SUPSetup.log | Scenario evidence: synthetic CCM SUPSetup configure failure. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/supplemental-wsus-skipped/manifest.json | Scenario manifest: optional WSUS supplemental source present-but-skipped. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/supplemental-wsus-skipped/expected.json | Scenario expected output: success with lowered confidence ceiling due to skipped optional coverage. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/supplemental-wsus-skipped/evidence/server-sup-sync/site/current/WCM.log | Scenario evidence: synthetic CCM WCM configure success. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/supplemental-wsus-skipped/evidence/server-sup-sync/site/current/wsyncmgr.log | Scenario evidence: synthetic CCM wsyncmgr sync/import/publish success. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/supplemental-wsus-skipped/evidence/server-sup-sync/sup/current/WSUSCtrl.log | Scenario evidence: synthetic CCM WSUSCtrl validate/terminal success. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sync-retry/manifest.json | Scenario manifest: retry/deferred synchronization input/provenance. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sync-retry/expected.json | Scenario expected output: deferred/blockedOrDeferred classification. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sync-retry/evidence/server-sup-sync/site/current/WCM.log | Scenario evidence: synthetic CCM WCM configure success. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sync-retry/evidence/server-sup-sync/site/current/wsyncmgr.log | Scenario evidence: synthetic CCM wsyncmgr retrying disposition. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sync-success/manifest.json | Scenario manifest: successful SUP sync/WSUS validation input/provenance. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sync-success/expected.json | Scenario expected output: success transaction across all phases with high confidence. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sync-success/evidence/server-sup-sync/site/current/WCM.log | Scenario evidence: synthetic CCM WCM configure success. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sync-success/evidence/server-sup-sync/site/current/wsyncmgr.log | Scenario evidence: synthetic CCM wsyncmgr sync/import/publish success. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/sync-success/evidence/server-sup-sync/sup/current/WSUSCtrl.log | Scenario evidence: synthetic CCM WSUSCtrl validate/terminal success. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/unrelated-update-key/manifest.json | Scenario manifest: includes same-time client evidence as an ignored control input. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/unrelated-update-key/expected.json | Scenario expected output: server transaction unaffected; client evidence recorded as source-local ignored. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/unrelated-update-key/evidence/client-updates-control/current/WUAHandler.log | Scenario evidence: synthetic CCM client record (ignoredClientEvidence control). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/unrelated-update-key/evidence/server-sup-sync/site/current/WCM.log | Scenario evidence: synthetic CCM WCM configure success (server). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/unrelated-update-key/evidence/server-sup-sync/site/current/wsyncmgr.log | Scenario evidence: synthetic CCM wsyncmgr sync/import/publish success (server). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/unrelated-update-key/evidence/server-sup-sync/sup/current/WSUSCtrl.log | Scenario evidence: synthetic CCM WSUSCtrl validate/terminal success (server). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/wcm-configuration-failure/manifest.json | Scenario manifest: WCM configuration failure input/provenance. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/wcm-configuration-failure/expected.json | Scenario expected output: confirmed failure with no invented prior success. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/wcm-configuration-failure/evidence/server-sup-sync/site/current/WCM.log | Scenario evidence: synthetic CCM WCM configure failure (terminal). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/wsus-health-failure/manifest.json | Scenario manifest: WSUS validation/health failure input/provenance. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/wsus-health-failure/expected.json | Scenario expected output: confirmed failure at validateWsus with lastSuccessfulPhase preserved. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/wsus-health-failure/evidence/server-sup-sync/site/current/WCM.log | Scenario evidence: synthetic CCM WCM configure success. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/wsus-health-failure/evidence/server-sup-sync/site/current/wsyncmgr.log | Scenario evidence: synthetic CCM wsyncmgr sync/import success. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point/wsus-health-failure/evidence/server-sup-sync/sup/current/WSUSCtrl.log | Scenario evidence: synthetic CCM WSUSCtrl validate failure (terminal). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point_mutation_assets/manifest.json | Defines the closed schema for mutation-only bytes (test-only assets). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point_mutation_assets/cross-family-lo-wcm.log | Mutation asset bytes for rejecting cross-family rotation grouping. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point_mutation_assets/incomplete-required-numbered-wsyncmgr.log | Mutation asset bytes for rejecting incomplete required rotation high-confidence success. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/software_update_point_mutation_assets/parse-failed-valid-numbered-wsusctrl.log | Mutation asset bytes for rejecting parseFailed that still normalizes to usable CCM. |
Closes no issue; preparation slice for #330.
Scope
Adds the synthetic, role-aware Software Update Point and WSUS fixture corpus, a closed fixture-contract test, and the preparation boundary document. This intentionally does not add the production reducer or native collector while #318 remains under exact-head review. It adds no parser family and keeps raw CCM as transport.
Fixture matrix
The tests bind exact source/producer/subject topology, profile-valid keys, UTC/capture provenance, physical identity and byte facts, citations, exact transaction and source-local observation identities, state/terminality, confidence ceilings, bounded requests, source-local controls, deterministic ordering, and no client causal claim.
TDD evidence
04f41a63582e4f222bb7db9e64512497ea45106a: arbitrary observation rename, duplicate observation ID, unknown string artifact ID, non-array evidence, and duplicate ignored-client citation were accepted.00af7f85a62b8f2cac7bae43d120d26cd0a9fc67: all three probes were accepted—a captured incomplete required rotation retained high-confidence success, parse-failed bytes contained usable normalized CCM, and a rotation split crossed canonical log families.a79a679508fa078175a9f9bd3041ea3467e5c3db: permanent adversarial fixtures and mutations require partial physical captures in transaction coverage gaps, verify parse-failed CCM bytes against normalization, and bind rotation splits to one canonical basename, role/host, workflow subject, source version/profile, and lineage.Verification
cargo +1.88.0 test --locked -p cmtraceopen-parser --test sccm_server_software_update_point_fixture_contract— 12/12cargo +1.88.0 test --locked -p cmtraceopen-parser --test sccm_server_intake_fixture_contract— 1/1cargo +1.88.0 test --locked -p cmtraceopen-parser --test sccm_spine_contract— 61/61cargo +1.88.0 test --locked -p cmtraceopen-parser— 666/666cargo clippy --locked -p cmtraceopen-parser --all-targets -- -D warnings— passcargo +1.88.0 check --locked -p cmtraceopen-parser --target wasm32-unknown-unknown— passnpx tsc --noEmit— passgit diff --check— passRepository-wide Rust 1.88
cargo fmt --check --allremains blocked by unrelated pre-existing formatting drift outside this slice; no unrelated files were changed. The extra Rust 1.88 strict-Clippy invocation exposes the existing repository-wideuninlined_format_argsbaseline, while the exact prescribed strict-Clippy command above passes.Dependencies and limits
Production implementation remains blocked on reviewed #318 interfaces and mandatory restack/review. #335 is the role/topology intake boundary. #323 stays independent; #333 owns future correlation. No live Windows, ConfigMgr, SUP, or WSUS validation is claimed. All committed evidence is synthetic and sanitized.
Review state
The independent review at exact
00af7f85a62b8f2cac7bae43d120d26cd0a9fc67was BLOCKED by three physical-evidence fail-open paths. They are fixed and pinned at exacta79a679508fa078175a9f9bd3041ea3467e5c3db. Fresh substantive CodeRabbit and independent exact-head readback are required; superseded approvals and rate-limit/status output do not count.Latest review correction (
e3eb43a6113718f71309df26a5665e7e257832d2)artifactId/sourceId/captureStateand manifest vocabulary.contractVersion,syntheticFixture,testOnly,assets; exact row allowlist isassetId,relativePath,bytesCopied,testPurpose.git diff --check.