Repository navigation
Conversation
📝 WalkthroughWalkthroughThis change adds a synthetic SCCM Provider and Admin Service preparation corpus. It includes manifests, expected normalized outputs, rotation evidence, privacy redaction, preparation documentation, and extensive fixture-contract tests. ChangesProvider and Admin Service corpus
Estimated code review effort: 4 (Complex) | ~60 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Comment |
|
@coderabbitai review\n\nPlease review exact head |
|
I will not treat skipped, rate-limited, status-only, or stale-head output as approval. ✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs (1)
428-1139: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider splitting
schema_failuresinto per-section validators.
schema_failuresvalidates manifest identity, topology, artifacts, profiles, coverage, transactions, source-local observations, and artifact requests in one function. Each section already appends to the samefailuresvector, so extraction is mechanical and behavior-preserving. Smaller functions such asmanifest_failures,artifact_failures,transaction_failures, andrequest_failuresmake each gate easier to locate when a mutation case fails.This is optional for this preparation-only PR.
🤖 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_provider_and_admin_service_fixture_contract.rs` around lines 428 - 1139, Optionally split the monolithic schema_failures validator into focused per-section helpers such as manifest/topology, artifact, profile/coverage, transaction, source-local observation, and request validators. Preserve the shared failures accumulation, validation order, and all existing behavior while having schema_failures orchestrate the extracted functions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/sccm/preparation/issue-332-provider-admin-service-corpus.md`:
- Line 18: Update the issue-number sentence beginning “#332 keeps producer
role...” by prefixing it with “Issue,” producing “Issue `#332` keeps producer
role...”. Keep the issue number inline and do not add a space after “#”.
---
Nitpick comments:
In
`@crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs`:
- Around line 428-1139: Optionally split the monolithic schema_failures
validator into focused per-section helpers such as manifest/topology, artifact,
profile/coverage, transaction, source-local observation, and request validators.
Preserve the shared failures accumulation, validation order, and all existing
behavior while having schema_failures orchestrate the extracted functions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 27796d52-61e4-4f7c-b744-15d5a4137228
⛔ Files ignored due to path filters (13)
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-auth-failure/evidence/server-admin-service/admin-service-lab/current/AdminService.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-backend-failure/evidence/server-admin-service/admin-service-lab/current/AdminService.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-success/evidence/server-admin-service/admin-service-lab/current/AdminService.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/evidence/server-admin-service-iis/admin-service-lab/current/u_ex_synthetic.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/evidence/server-admin-service/admin-service-lab/current/AdminService.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/incomplete/evidence/server-admin-service/admin-service-lab/current/AdminService.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/evidence/server-admin-service/admin-service-lab/current/AdminService.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/evidence/server-provider/provider-local/current/Smsprov.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-authz-denied/evidence/server-provider/provider-local/current/Smsprov.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-query-failure/evidence/server-provider/provider-local/current/Smsprov.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-success/evidence/server-provider/provider-local/current/Smsprov.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-timeout/evidence/server-provider/provider-local/current/Smsprov.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/rotation-boundary/evidence/server-provider/provider-local/current/Smsprov.logis excluded by!**/*.log
📒 Files selected for processing (26)
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/README.mdcrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-auth-failure/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-auth-failure/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-backend-failure/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-backend-failure/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-success/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-success/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/incomplete/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/incomplete/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-authz-denied/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-authz-denied/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-query-failure/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-query-failure/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-success/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-success/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-timeout/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-timeout/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/rotation-boundary/evidence/server-provider/provider-local/lo_/Smsprov.lo_crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/rotation-boundary/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/rotation-boundary/manifest.jsoncrates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rsdocs/sccm/preparation/issue-332-provider-admin-service-corpus.md
|
@coderabbitai review Please re-review exact head |
|
I will assess the MD018 fix and the changed corpus. I will not require the intentionally deferred behavior-preserving refactor for this preparation slice. ✅ Action performedReview finished.
|
adamgell
left a comment
There was a problem hiding this comment.
BLOCK at exact head 0e9feef. The shipped 7 focused tests pass, but an uncommitted independent mutation probe demonstrated eight fail-open cases across version admission, topology/provenance, citation integrity, privacy, and exact topology cardinality. The exact-head CodeRabbit approval does not close these adversarial gaps; its second pass was incremental and log fixtures were excluded. Keep this preparation PR draft/open until permanent RED-to-GREEN regressions, aggregate gates, a fresh substantive CodeRabbit pass, and a different exact-head reviewer all clear.
|
Claiming the exact-head #332 correction from |
|
#332 review correction is pushed at exact head RED-to-GREEN matrix:
Minimal contract changes:
Verification:
All six handled independent-review threads were replied to and resolved; unresolved count will be audited after CodeRabbit. PR remains draft/open. No production reducer/native collector/live Windows acceptance claim. Fresh substantive exact-head CodeRabbit plus a different independent exact-head PASS are required before readiness. |
|
@coderabbitai review Please perform a fresh substantive review of exact head |
|
I will review the full Provider/Admin Service contract. I will recheck version-profile admission, endpoint and producer-host binding, redacted provenance, physical-source collision identity, source-local line citations, public-string privacy, topology cardinality, coverage and confidence controls, determinism, and parser purity. I will not treat skipped, rate-limited, status-only, or stale-head output as approval. ✅ Action performedReview finished.
|
adamgell
left a comment
There was a problem hiding this comment.
BLOCK at exact head 8a07abf86864788595a54608e01f407da0e99c63.
The shipped target is green, but disposable adversarial probes reproduced five contract failures, including persisted fixture edits that left all 8 focused tests green: u64 evidence lines wrap to a different u32 logical record; manifest/public privacy leaks survive; split rotations accept divergent lineage; invalid-offset incomplete work accepts a high confidence ceiling; and a generic unbounded request reason is accepted.
Fresh verification on the clean detached exact-head worktree:
- focused #332: 8/8
- server intake: 1/1
- spine: 61/61
- full parser: 662/662
- default strict parser Clippy: pass
- Rust 1.88 wasm32 check: pass
- TypeScript, 22 JSON documents, scoped Rust 1.88 rustfmt, and diff checks: pass
- workspace Rust 1.88 fmt remains the inherited 17-file / 24-hunk baseline; Rust 1.88 strict Clippy remains the inherited 59
uninlined_format_argsdiagnostics, with no changed-file overlap.
CodeRabbit is not yet an exact-head approval: the hosted bot has only acknowledged the 8a07abf8 request, the prior approval is stale at 0e9feef4, and the exact-head CLI review was rate-limited for 16 minutes. Keep this PR draft/open until these findings are fixed, a different reviewer re-runs persisted adversarial probes, and a substantive formal CodeRabbit review is anchored to the new exact head.
|
Correction-round ownership claim (independent review 4826128919)
I will demonstrate focused RED before implementation, run the full prescribed gate matrix, verify the remote head is unchanged, then push non-force to the existing PR branch. I will not merge or expand shared #318 contracts. |
|
#332 second independent-review correction is pushed at exact head RED-to-green matrix:
Focused RED was 8 passed / 5 failed. Focused GREEN is 13/13. Fresh verification at
Inherited baselines remain outside the owned file: Rust 1.88 workspace fmt reports 24 hunks across 17 unrelated files; Rust 1.88 strict Clippy reports 59 unrelated CodeRabbit CLI 0.7.1 was invoked on the one-file uncommitted diff and returned a 15-minute rate limit, which is not approval. A fresh hosted full-range exact-head review is being requested separately. PR remains draft/open. No production reducer, native collector, or live Windows acceptance claim. |
|
@coderabbitai review Please perform a fresh substantive full-range review of exact head The PR remains draft/open. An acknowledgment, skipped review, rate limit, status-only response, incremental stale-head review, or prior approval is not exact-head approval. |
|
Independent exact-head review claim (agent review_332_8c4e_exact)
|
|
Your plan includes PR reviews subject to rate limits. More reviews will be available in 36 minutes. |
adamgell
left a comment
There was a problem hiding this comment.
BLOCK — independent exact-head review at 8c4e0ce. GitHub rejected the attempted REQUEST_CHANGES event because this authenticated identity owns the PR; this formal COMMENT review records the same blocking disposition. Six disposable, on-disk adversarial mutations beyond the 13 shipped regressions each left the full focused corpus 13/13 green; the inline findings identify the fail-open contracts. The issue acceptance also still asks for a retry fixture, and the program workflow gate requires contradictory evidence; neither has an explicit scenario. Clean-head gates are otherwise green: #332 13/13, server intake 1/1, spine 61/61, full parser 667/667, default strict Clippy, Rust 1.88 wasm32, TypeScript, 22 JSON files, scoped rustfmt, and feature diff-check. Rust 1.88 Clippy and workspace fmt reproduce only the inherited 59 uninlined-format-args and 17-file format baselines outside this PR. Hosted CodeRabbit was requested for this exact head but returned a 36-minute fair-use rate limit (not substantive approval); CLI 0.7.1 separately returned a one-minute rate limit. PR must remain draft/open.
|
RED frozen in issue-scoped commit Evidence:
No implementation behavior changed in the RED commit. |
🟢 #332 review-blocker remediation — exact head d27b8f2Pushed two issue-scoped commits without force:
Six formal review findings closed in this slice
RED → GREEN evidenceBefore production changes, the focused provider target had 25 pass / 4 intentional fail:
The SCCM spine privacy test independently failed for both:
After the minimal implementation:
Repository-wide Fixture/dependency state
PR remains draft and unmerged. |
|
@coderabbitai review Please review exact head |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
base='91e4c07bef53ea4e7a5b44cadddb17a02231a25d'
head='d27b8f26cc14662b685d003cccaa71deb489a2de'
contract='crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs'
spine='crates/cmtraceopen-parser/tests/sccm_spine_contract.rs'
evidence='crates/cmtraceopen-parser/src/sccm/evidence.rs'
fixtures='crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service'
echo '== Exact head and ancestry =='
printf 'checked_out='; git rev-parse HEAD
git show -s --format='head=%H%nparents=%P%nsubject=%s' "$head"
git merge-base --is-ancestor "$base" "$head"
echo 'base_is_ancestor=true'
echo '== Correction-range commits and changed paths =='
git log --format='%H %s' "${base}..${head}"
git diff --name-status "${base}..${head}"
git diff --check "${base}..${head}"
echo 'diff_check=clean'
echo '== Changed-source outlines =='
for file in "$evidence" "$contract" "$spine"; do
if git diff --quiet "${base}..${head}" -- "$file"; then
continue
fi
echo "--- $file ---"
ast-grep outline "$file" --items all --type function --view expanded
done
echo '== Privacy projection and rejected-diagnostic changes =='
git diff --unified=40 "${base}..${head}" -- "$evidence" "$spine"
echo '== Fixture contract changes =='
git diff --unified=30 "${base}..${head}" -- "$contract"
echo '== Contract-invariant locations =='
rg -n -C3 --glob 'sccm_server_provider_and_admin_service_fixture_contract.rs' \
'required.*phase|phase.*required|retryableFailure|recovery|coverage|accessDenied|parseFailed|blocked|deferred|preparationOnlyReviewedDependenciesAvailable|rejected.*segment|diagnostic|disposition|confidence|terminal' \
crates/cmtraceopen-parser/tests
echo '== Fixture corpus inventory and JSON syntax =='
fd -e json -t f . "$fixtures" | sort
fd -e json -t f . "$fixtures" -x jq empty '{}'
echo 'json_syntax=valid'
echo '== Production source scope =='
git diff --name-only "${base}..${head}" | awk '
/^crates\/cmtraceopen-parser\/src\// { print "production_source_change=" $0 }
'
echo '== Network/database/process indicators added in production and tests =='
git diff --unified=0 "${base}..${head}" -- \
crates/cmtraceopen-parser/src crates/cmtraceopen-parser/tests |
rg -n '^\+.*\b(TcpStream|UdpSocket|reqwest|hyper|sqlx|rusqlite|diesel|Command|Child|std::process|tokio::net)\b' \
&& exit 1 || true
echo 'impurity_indicators=none'Length of output: 194173 🏁 Script executed: #!/bin/bash
set -euo pipefail
root='crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service'
evidence='crates/cmtraceopen-parser/src/sccm/evidence.rs'
contract='crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs'
echo '== Redaction implementation context =='
sed -n '90,225p' "$evidence"
echo '== Exact contract validation context =='
sed -n '723,1020p;1120,1540p;1815,2060p' "$contract"
echo '== Independent corpus consistency checks =='
python3 - <<'PY'
from __future__ import annotations
import json
import re
from collections import Counter
from pathlib import Path
root = Path("crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service")
required_state = "preparationOnlyReviewedDependenciesAvailable"
states = {"captured", "absent", "accessDenied", "capped", "skipped", "unsupported", "parseFailed"}
private = re.compile(
r"(@|\\\\|https?://|\b(?:select|insert|update|delete|drop|bearer|token|password|secret)\b|"
r"ghp_|github_pat_|eyj)",
re.IGNORECASE,
)
log_re = re.compile(r"<!\[LOG\[(.*?)\]LOG\]!>")
prefix = "SYNTHETIC FIXTURE; "
errors = []
counts = Counter()
def strings(value):
if isinstance(value, str):
yield value
elif isinstance(value, list):
for item in value:
yield from strings(item)
elif isinstance(value, dict):
for item in value.values():
yield from strings(item)
for directory in sorted(path for path in root.iterdir() if path.is_dir()):
scenario = directory.name
manifest_path, expected_path = directory / "manifest.json", directory / "expected.json"
if not manifest_path.is_file() or not expected_path.is_file():
errors.append(f"{scenario}: missing contract document")
continue
counts["scenarios"] += 1
counts["documents"] += 2
manifest = json.loads(manifest_path.read_text())
expected = json.loads(expected_path.read_text())
if expected.get("contractState") != required_state:
errors.append(f"{scenario}: stale contract state")
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
counts["artifacts"] += len(artifacts)
artifact_by_id = {a.get("artifactId"): a for a in artifacts}
if len(artifact_by_id) != len(artifacts):
errors.append(f"{scenario}: duplicate artifact identifier")
if [row.get("artifactId") for row in coverage] != [a.get("artifactId") for a in artifacts]:
errors.append(f"{scenario}: coverage is not the ordered artifact projection")
records = {}
for artifact in artifacts:
aid, state = artifact.get("artifactId"), artifact.get("captureState")
if state not in states:
errors.append(f"{scenario}/{aid}: unsupported coverage state {state!r}")
relative = artifact.get("relativePath")
if state in {"absent", "accessDenied", "skipped", "unsupported"}:
if relative is not None:
errors.append(f"{scenario}/{aid}: nonphysical state has evidence path")
continue
if not isinstance(relative, str):
errors.append(f"{scenario}/{aid}: physical state lacks evidence path")
continue
path = directory / relative
if not path.is_file():
errors.append(f"{scenario}/{aid}: missing evidence file")
continue
raw = path.read_bytes()
if artifact.get("bytesCopied") != len(raw):
errors.append(f"{scenario}/{aid}: byte count mismatch")
for line_no, line in enumerate(path.read_text().splitlines(), 1):
m = log_re.search(line)
if not m or not m.group(1).startswith(prefix):
continue
fields = {}
for part in m.group(1)[len(prefix):].split("; "):
if "=" not in part:
continue
key, value = part.split("=", 1)
fields[key] = value
records[(aid, line_no)] = fields
for document_name, document in (("manifest", manifest), ("expected", expected)):
for text in strings(document):
if private.search(text):
errors.append(f"{scenario}/{document_name}: private exported shape {text!r}")
for transaction in expected.get("transactions", []):
key = transaction.get("key", {})
cited = set()
for observation in transaction.get("observations", []):
for ref in observation.get("evidence", []):
aid, start, end = ref.get("artifactId"), ref.get("startLine"), ref.get("endLine")
if not isinstance(start, int) or not isinstance(end, int) or start < 1 or end < start:
errors.append(f"{scenario}: invalid citation range")
continue
for line in range(start, end + 1):
cited.add((aid, line))
fields = records.get((aid, line))
if fields is None:
errors.append(f"{scenario}: cited record absent {aid}:{line}")
continue
for name, value in {
"RequestId": key.get("requestId"),
"OperationHandle": key.get("operationHandle"),
"EndpointId": key.get("endpointId"),
"Layer": transaction.get("layer"),
"ProfileId": key.get("extractionProfileId"),
"Phase": observation.get("phase"),
"Disposition": observation.get("disposition"),
"Terminal": str(observation.get("terminal")).lower(),
}.items():
if fields.get(name) != value:
errors.append(f"{scenario}: evidence field mismatch {aid}:{line}:{name}")
for (aid, line), fields in records.items():
exact = all((
fields.get("RequestId") == key.get("requestId"),
fields.get("OperationHandle") == key.get("operationHandle"),
fields.get("EndpointId") == key.get("endpointId"),
fields.get("Layer") == transaction.get("layer"),
fields.get("ProfileId") == key.get("extractionProfileId"),
))
if exact and (aid, line) not in cited:
errors.append(f"{scenario}: uncited exact-key record {aid}:{line}")
if any(a.get("captureState") in states - {"captured", "capped"} for a in artifacts):
if expected.get("transactions") and scenario != "blocked-deferred":
errors.append(f"{scenario}: noncaptured coverage produced a transaction")
print(f"scenarios={counts['scenarios']}")
print(f"artifacts={counts['artifacts']}")
print(f"json_documents={counts['documents']}")
if errors:
print("\n".join(errors))
raise SystemExit(1)
print("contract_state=valid")
print("coverage_projections=valid")
print("evidence_binding=valid")
print("public_string_privacy_static_scan=valid")
PY
echo '== Changed production source does not add parsing, IO, or network APIs =='
git diff --unified=0 91e4c07bef53ea4e7a5b44cadddb17a02231a25d..d27b8f26cc14662b685d003cccaa71deb489a2de \
-- "$evidence" |
rg -n '^\+.*\b(fs::|File|read_to|write|Tcp|Udp|http|reqwest|sql|Command|process)\b' \
&& exit 1 || true
echo 'projection_scope=local_string_transformation_only'Length of output: 55204 🏁 Script executed: #!/bin/bash
set -euo pipefail
root='crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service'
echo '== New coverage contracts =='
for scenario in \
admin-service-access-denied \
admin-service-parse-failed \
admin-service-skipped \
blocked-deferred \
provider-source-absent \
provider-source-capped \
provider-source-unsupported
do
echo "--- ${scenario}/manifest.json ---"
jq -S . "$root/$scenario/manifest.json"
echo "--- ${scenario}/expected.json ---"
jq -S . "$root/$scenario/expected.json"
done
echo '== Corrected independent corpus validation =='
python3 - <<'PY'
from __future__ import annotations
import json
import re
from collections import Counter
from pathlib import Path
root = Path("crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service")
private = re.compile(
r"(@|\\\\|https?://|ghp_|github_pat_|eyj|"
r"(?<![a-z-])(?:select|insert|update|delete|drop)(?![a-z-]))",
re.IGNORECASE,
)
states = {"captured", "absent", "accessDenied", "capped", "skipped", "unsupported", "parseFailed"}
errors: list[str] = []
counts: Counter[str] = Counter()
def strings(value):
if isinstance(value, str):
yield value
elif isinstance(value, list):
for item in value:
yield from strings(item)
elif isinstance(value, dict):
for item in value.values():
yield from strings(item)
for directory in sorted(path for path in root.iterdir() if path.is_dir()):
scenario = directory.name
manifest = json.loads((directory / "manifest.json").read_text())
expected = json.loads((directory / "expected.json").read_text())
counts["scenarios"] += 1
counts["documents"] += 2
artifacts = manifest["artifacts"]
counts["artifacts"] += len(artifacts)
if expected.get("contractState") != "preparationOnlyReviewedDependenciesAvailable":
errors.append(f"{scenario}: stale dependency lifecycle")
if [row.get("artifactId") for row in expected.get("coverage", [])] != [
item.get("artifactId") for item in artifacts
]:
errors.append(f"{scenario}: coverage projection mismatch")
noncaptured = False
for artifact in artifacts:
state = artifact.get("captureState")
if state not in states:
errors.append(f"{scenario}: unsupported capture state {state!r}")
noncaptured |= state in states - {"captured", "capped"}
relative = artifact.get("relativePath")
if state in {"absent", "accessDenied", "skipped", "unsupported"}:
if relative is not None:
errors.append(f"{scenario}: nonphysical state has a relativePath")
elif not isinstance(relative, str) or not (directory / relative).is_file():
errors.append(f"{scenario}: physical state has no evidence file")
if noncaptured and expected.get("transactions") and scenario != "blocked-deferred":
errors.append(f"{scenario}: noncaptured coverage has transactions")
for document_name, document in (("manifest", manifest), ("expected", expected)):
for value in strings(document):
if private.search(value):
errors.append(f"{scenario}/{document_name}: unsafe public value {value!r}")
if errors:
print("\n".join(errors))
raise SystemExit(1)
print(f"scenarios={counts['scenarios']}")
print(f"artifacts={counts['artifacts']}")
print(f"json_documents={counts['documents']}")
print("dependency_lifecycle=valid")
print("coverage_and_nonoutcome_semantics=valid")
print("public_string_privacy_static_scan=valid")
PY
echo '== Sensitive-marker test cases in the correction range =='
sed -n '4565,4875p' crates/cmtraceopen-parser/tests/sccm_spine_contract.rsLength of output: 33611
I found no actionable defect in the reviewed range from The correction range includes the six stated controls:
Independent static checks confirmed:
This environment cannot independently run Rust tests, Clippy, TypeScript, or WebAssembly checks. I did not verify those execution results. ✅ Action performedReview finished.
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
crates/cmtraceopen-parser/src/sccm/evidence.rs (1)
236-274: 🔒 Security & Privacy | 🔴 Critical | ⚡ Quick winOverlapping identity matches leak usernames when a longer redaction range extends beyond an earlier match.
The
redact_windows_identitiesfunction merges ranges fromwindows_identity_re()andwindows_user_path_identity_re(), then processes them with a loop that skips ranges wherestart < copied_throughwithout extendingcopied_throughto that range'send. When a shorter match is processed first and a longer overlapping match is skipped, the unredacted tail of the longer match is copied into the output.Example: input
"users\ADMIN\secret"
windows_identity_re()matches(0, 11):"users\ADMIN". This range is kept.windows_user_path_identity_re()identity captures(6, 18):"ADMIN\secret". This range overlaps.- After sorting:
[(0, 11), (6, 18)]- The loop redacts
(0, 11)and setscopied_through = 11. The range(6, 18)is skipped because6 < 11. The final output includes"\secret"unredacted.This affects
message,component, andccm_source_filefields (all routed throughproject_public_text_v1→redact_windows_identities). The fix merges overlapping ranges instead of skipping them:Proposed fix
identity_ranges.sort_unstable(); identity_ranges.dedup(); - for (start, end) in identity_ranges { - if start < copied_through { - continue; - } - + let mut merged_ranges: Vec<(usize, usize)> = Vec::with_capacity(identity_ranges.len()); + for (start, end) in identity_ranges { + match merged_ranges.last_mut() { + Some(last) if start <= last.1 => last.1 = last.1.max(end), + _ => merged_ranges.push((start, end)), + } + } + + for (start, end) in merged_ranges { projected.push_str(&value[copied_through..start]); projected.push_str(PUBLIC_MESSAGE_REDACTION); copied_through = end; }Add a regression test exercising the overlapping case:
#[test] fn export_redacts_username_in_multi_segment_windows_profile_path() { let raw_message = r"Policy stored at C:\Users\CONTOSO\jdoe\AppData\Local\ccmcache"; // ... build artifact/record as in `export_redaction_does_not_mutate_raw_snapshot` // assert exported message/component/ccm_source_file do not contain "jdoe" }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/cmtraceopen-parser/src/sccm/evidence.rs` around lines 236 - 274, Update redact_windows_identities to merge overlapping or adjacent identity_ranges before redaction, extending the existing range’s end rather than skipping a later range that starts before copied_through. Add a regression test for a multi-segment Windows profile path such as the provided jdoe example, verifying exported message, component, and ccm_source_file values contain no username while preserving the raw snapshot.
♻️ Duplicate comments (1)
crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs (1)
274-285: 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick winReport the segment index instead of the parsed field name.
Line 278 interpolates
name.split_once('=')splits on the first=, so a rejected segment can place private text inname. For the segmentBearer private-token=x, the diagnostic containsBearer private-token. The no-=path at line 276 already avoids this by reporting the index only. Apply the same rule to the unsupported-field path.🔒️ Proposed fix
if !allowed.contains(&name) || value.is_empty() { - return Err(format!("unsupported or empty fixture field {name}")); + return Err(format!( + "unsupported or empty fixture field at segment {segment_index}" + )); }Extend
rejected_fixture_segment_diagnostic_omits_raw_valuewith a segment such asBearer private-credential-value=1to keep this closed.🤖 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_provider_and_admin_service_fixture_contract.rs` around lines 274 - 285, Update the unsupported or empty fixture-field error in the segment-validation logic to report segment_index instead of the parsed name, preventing private text before the first '=' from entering diagnostics. Preserve the existing validation behavior and extend rejected_fixture_segment_diagnostic_omits_raw_value with a sensitive segment such as Bearer private-credential-value=1.
🧹 Nitpick comments (1)
crates/cmtraceopen-parser/tests/sccm_spine_contract.rs (1)
4603-4686: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd coverage for the
AuthorizationTokenvariant alongsideAuthorizationHeader.The regex in
evidence.rsrecognizes bothauthorization headerandauthorization tokenvariants, but this test suite only exercisesAuthorizationHeader(case 10, Lines 4650-4654). The past review explicitly asked for "permanent variants" for authorization header/token. Add a case forAuthorizationToken=...to confirm the token variant redacts correctly and preserves the safe tail, closing the validation gap for this security-sensitive fix.✅ Suggested additional case
( "AuthorizationHeader=Custom private-credential-value; status=81", "private-credential-value", Some("status=81"), ), + ( + "AuthorizationToken=private-auth-token-value; status=82", + "private-auth-token-value", + Some("status=82"), + ),🤖 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_spine_contract.rs` around lines 4603 - 4686, Extend the cases in evidence_public_message_projection_redacts_provider_handles_in_all_positions with an AuthorizationToken=... entry alongside the existing AuthorizationHeader case, using a sensitive token value and a status field as the safe tail. Ensure the test verifies the token value is redacted while the status tail remains in the projected message.
🤖 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.
Outside diff comments:
In `@crates/cmtraceopen-parser/src/sccm/evidence.rs`:
- Around line 236-274: Update redact_windows_identities to merge overlapping or
adjacent identity_ranges before redaction, extending the existing range’s end
rather than skipping a later range that starts before copied_through. Add a
regression test for a multi-segment Windows profile path such as the provided
jdoe example, verifying exported message, component, and ccm_source_file values
contain no username while preserving the raw snapshot.
---
Duplicate comments:
In
`@crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs`:
- Around line 274-285: Update the unsupported or empty fixture-field error in
the segment-validation logic to report segment_index instead of the parsed name,
preventing private text before the first '=' from entering diagnostics. Preserve
the existing validation behavior and extend
rejected_fixture_segment_diagnostic_omits_raw_value with a sensitive segment
such as Bearer private-credential-value=1.
---
Nitpick comments:
In `@crates/cmtraceopen-parser/tests/sccm_spine_contract.rs`:
- Around line 4603-4686: Extend the cases in
evidence_public_message_projection_redacts_provider_handles_in_all_positions
with an AuthorizationToken=... entry alongside the existing AuthorizationHeader
case, using a sensitive token value and a status field as the safe tail. Ensure
the test verifies the token value is redacted while the status tail remains in
the projected message.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 8b4261c7-d52e-416f-b95c-7d5cc6b41f88
⛔ Files ignored due to path filters (6)
crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-parse-failed/evidence/server-admin-service/admin-service-lab/current/AdminService.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/blocked-deferred/evidence/server-admin-service/admin-service-lab/current/AdminService.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/evidence/server-admin-service/admin-service-lab/current/AdminService.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/evidence/server-admin-service/admin-service-lab/current/AdminService.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/evidence/server-provider/provider-local/current/Smsprov.logis excluded by!**/*.logcrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-capped/evidence/server-provider/provider-local/current/Smsprov.logis excluded by!**/*.log
📒 Files selected for processing (34)
crates/cmtraceopen-parser/src/sccm/evidence.rscrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/README.mdcrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-access-denied/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-access-denied/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-auth-failure/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-backend-failure/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-parse-failed/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-parse-failed/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-skipped/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-skipped/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-success/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/blocked-deferred/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/blocked-deferred/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/contradictory-evidence/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/incomplete/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-authz-denied/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-query-failure/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-retry/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-absent/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-absent/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-capped/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-capped/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-unsupported/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-unsupported/manifest.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-success/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-timeout/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/rotation-boundary/expected.jsoncrates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rscrates/cmtraceopen-parser/tests/sccm_spine_contract.rsdocs/sccm/preparation/issue-332-provider-admin-service-corpus.md
🚧 Files skipped from review as they are similar to previous changes (15)
- crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/incomplete/expected.json
- crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-backend-failure/expected.json
- crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-authz-denied/expected.json
- crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/manifest.json
- crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-auth-failure/expected.json
- crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/manifest.json
- crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-retry/expected.json
- crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/rotation-boundary/expected.json
- crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-timeout/expected.json
- crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-success/expected.json
- crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-success/expected.json
- crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-query-failure/expected.json
- crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/contradictory-evidence/expected.json
- crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/expected.json
- crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/expected.json
|
Critical exact-head CodeRabbit finding is accepted and assigned to fresh root-owned worktree Review: #380 (review) The overlapping Windows-identity ranges can expose the tail of the longer match across public message/component/ccmSourceFile projections. I am freezing this as a focused RED regression before the minimal range-merge implementation, plus the requested AuthorizationToken permanent case. PR remains draft/unmerged and the current CodeRabbit result is a blocker, not approval. |
Critical CodeRabbit privacy correction — exact head 59af7b5Pushed non-force after guarding remote d27b8f2:
The permanent unit regression proves message, component, and ccmSourceFile public projections omit both private identity segments while the crate-private raw snapshot remains unchanged. The provider-handle matrix now covers AuthorizationToken alongside AuthorizationHeader. Exact-head verification:
CodeRabbit review #4828660001 is addressed. This PR remains draft/unmerged pending a fresh substantive exact-head CodeRabbit result and a different independent exact-head review. No live Windows/SCCM Server acceptance is claimed. |
|
@coderabbitai review Please perform a fresh substantive review of exact head |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
base='d27b8f26cc14662b685d003cccaa71deb489a2de'
head='59af7b5f'
evidence='crates/cmtraceopen-parser/src/sccm/evidence.rs'
spine='crates/cmtraceopen-parser/tests/sccm_spine_contract.rs'
contract='crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs'
fixtures='crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service'
echo '== Exact head and ancestry =='
printf 'checked_out='
git rev-parse HEAD
git rev-parse "${head}^{commit}"
git show -s --format='head=%H%nparents=%P%nsubject=%s' "$head"
git merge-base --is-ancestor "$base" "$head"
echo 'base_is_ancestor=true'
echo '== Reviewed commits and changed paths =='
git log --format='%H %s' "${base}..${head}"
git diff --name-status "${base}..${head}"
git diff --check "${base}..${head}"
echo 'diff_check=clean'
echo '== Changed source outline =='
for file in "$evidence" "$spine" "$contract"; do
if ! git diff --quiet "${base}..${head}" -- "$file"; then
echo "--- ${file} ---"
ast-grep outline "$file" --items all --type function --view expanded
fi
done
echo '== Exact implementation and test diff =='
git diff --unified=60 "${base}..${head}" -- "$evidence" "$spine" "$contract"
echo '== Redaction and diagnostic implementation context =='
rg -n -C5 \
'redact|range|overlap|adjacent|AuthorizationToken|AuthorizationHeader|QueryHandle|CallerHandle|rejected.*segment|segment.*index|ccmSourceFile|raw' \
"$evidence" "$spine" "$contract"
echo '== Focused static source assertions =='
python3 - <<'PY'
from pathlib import Path
import re
evidence = Path("crates/cmtraceopen-parser/src/sccm/evidence.rs").read_text()
spine = Path("crates/cmtraceopen-parser/tests/sccm_spine_contract.rs").read_text()
contract = Path("crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs").read_text()
checks = {
"range_merge_or_union_logic": r"(?:merge|union).{0,160}(?:range|span)|(?:range|span).{0,160}(?:merge|union)",
"authorization_token_supported": r"AuthorizationToken",
"public_projection_tested": r"ccmSourceFile",
"raw_snapshot_tested": r"(?:raw snapshot|raw_snapshot|raw.*unchanged|unchanged.*raw)",
"index_only_diagnostic_tested": r"(?:segment index|segment_index|rejected.*index|index.*rejected)",
}
for name, pattern in checks.items():
corpus = evidence + "\n" + spine + "\n" + contract
if not re.search(pattern, corpus, re.IGNORECASE | re.DOTALL):
raise SystemExit(f"missing_static_indicator={name}")
print(f"{name}=present")
PY
echo '== JSON syntax =='
fd -e json -t f . "$fixtures" -x jq empty '{}'
echo 'json_syntax=valid'
echo '== Newly added impurity indicators =='
git diff --unified=0 "${base}..${head}" -- crates/cmtraceopen-parser/src crates/cmtraceopen-parser/tests |
rg -n '^\+.*\b(TcpStream|UdpSocket|reqwest|hyper|sqlx|rusqlite|diesel|Command|Child|std::process|tokio::net|File|fs::)\b' \
&& exit 1 || true
echo 'added_network_database_process_file_indicators=none'Length of output: 193632 🏁 Script executed: #!/bin/bash
set -euo pipefail
base='d27b8f26cc14662b685d003cccaa71deb489a2de'
head='59af7b5f3315698f9d6fb8da0b2ac756799ec9d4'
evidence='crates/cmtraceopen-parser/src/sccm/evidence.rs'
spine='crates/cmtraceopen-parser/tests/sccm_spine_contract.rs'
contract='crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs'
fixtures='crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service'
echo '== Sensitive labels and public export =='
sed -n '1,180p;300,350p' "$evidence"
echo '== Exact overlap regression body =='
sed -n '420,480p' "$evidence"
echo '== AuthorizationToken regression body =='
sed -n '4600,4692p' "$spine"
echo '== Index-only diagnostic regression body =='
sed -n '240,292p;2936,2962p' "$contract"
echo '== Static implementation assertions =='
python3 - <<'PY'
from pathlib import Path
import re
evidence = Path("crates/cmtraceopen-parser/src/sccm/evidence.rs").read_text()
spine = Path("crates/cmtraceopen-parser/tests/sccm_spine_contract.rs").read_text()
contract = Path("crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs").read_text()
required = {
"authorization_token_sensitive_label": r"authorizationtoken",
"adjacent_or_overlapping_ranges_are_merged": r"if start <= \*merged_end",
"message_component_and_source_file_use_public_projection": (
r"message:\s*project_public_message_v1\(&self\.message\).*?"
r"component:\s*self\.component\.as_deref\(\)\.map\(project_public_text_v1\).*?"
r"ccm_source_file:\s*self\.ccm_source_file\.as_deref\(\)\.map\(project_public_text_v1\)"
),
"overlap_test_checks_all_public_surfaces": (
r"export_merges_overlapping_identity_ranges_without_mutating_raw_snapshot.*?"
r"snapshot\.message.*?snapshot\.component.*?snapshot\.ccm_source_file.*?"
r"exported\.message.*?exported\.component.*?exported\.ccm_source_file"
),
"authorization_token_test": r"AuthorizationToken=private-auth-token-value",
"index_only_diagnostic": r"unsupported or empty fixture field at segment \{segment_index\}",
}
corpus = evidence + "\n" + spine + "\n" + contract
for name, pattern in required.items():
if not re.search(pattern, corpus, re.IGNORECASE | re.DOTALL):
raise SystemExit(f"missing_required_control={name}")
print(f"{name}=present")
PY
echo '== JSON syntax =='
fd -e json -t f . "$fixtures" -x jq empty '{}'
echo 'json_syntax=valid'
echo '== Added impurity indicators =='
if git diff --unified=0 "${base}..${head}" -- crates/cmtraceopen-parser/src crates/cmtraceopen-parser/tests |
rg -n '^\+.*\b(TcpStream|UdpSocket|reqwest|hyper|sqlx|rusqlite|diesel|Command|Child|std::process|tokio::net)\b'
then
exit 1
fi
echo 'added_network_database_process_indicators=none'
echo '== Changed production scope =='
git diff --name-only "${base}..${head}" | awk '
/^crates\/cmtraceopen-parser\/src\// { print }
'Length of output: 19615
I found no actionable defect in the reviewed range. The range contains the two requested commits. Diff whitespace is clean. The redaction change sorts identity ranges and merges ranges when they overlap or are adjacent. The public export applies the projection to The new regression verifies that The sensitive-label grammar covers
I did not independently execute Rust tests, Clippy, TypeScript, or WebAssembly checks in this environment. ✅ Action performedReview finished.
|
|
🟢 Independent exact-head reviewer active in fresh detached worktree |
adamgell
left a comment
There was a problem hiding this comment.
🔴 Independent exact-head review: BLOCK at 59af7b5f3315698f9d6fb8da0b2ac756799ec9d4
Reviewed the full a8a367c661cd17bd1e73b87724c143ec8565ffc7..59af7b5f3315698f9d6fb8da0b2ac756799ec9d4 range in a fresh detached, clean worktree (64 files, +4,846/-4). No review edits or pushes.
[P1] Phase-specific failure claims are not actually bound to the named failed phase. The validator derives failed state from the terminal recordOutcome=failed, but its exact phase-sequence check runs only for succeeded transactions. In a disposable external mutation harness, I changed both the normalized source record and expected transaction so that the claimed failed phase disappeared while the generic terminal failure remained:
- Provider authorization:
authenticateOrAuthorize/failed→receive/succeeded - Admin Service authentication:
authenticateOrAuthorize/failed→receive/succeeded - Provider query:
executeProviderOperation/failed→authenticateOrAuthorize/succeeded - Admin Service backend:
executeBackendOperation/failed→route/succeeded
All four mutations were accepted with their unchanged phase-specific public summaries. The probe failed as intended with: phase-specific failure summaries survived without their named failed phase: [Provider authorization, Admin Service authentication, Provider operation, Admin Service backend operation]. A generic terminal failure proves only that the transaction failed; it does not prove which layer phase failed. This violates the evidence-first, exact phase/disposition, and conservative-claim contract.
Required correction: add permanent RED regressions for all four failure families; bind each phase-specific outcome/public summary to the exact profile-owned failed phase plus the cited terminal recordOutcome; and keep any terminal-only failure generic/conservative when that phase fact is absent. Then run the full gates, request fresh substantive CodeRabbit, and obtain a different exact-head independent review.
Green evidence at this exact head:
- Provider/Admin corpus 29/29; server intake 1/1; spine 137/137
- Full parser 760/760; strict all-target parser Clippy green
- wasm32 green on Rust 1.88 and current Rust 1.92
- Overlapping Windows identity redaction/raw-snapshot immutability regression green
- 40/40 JSON documents parse; scoped rustfmt for all three changed Rust files green;
git diff --checkand status clean - Public redaction covers message/component/ccmSourceFile; raw evidence remains crate-private and unchanged; coverage-state non-outcome tests remain green
Repo-wide cargo fmt --check --all still reports the known inherited formatting delta outside the exact #332 Rust files; this range adds no scoped formatting debt.
CodeRabbit is in the loop, but both hosted exact-head and local CLI review attempts are currently rate-limited. Its generated walkthrough/status is not approval. This review therefore remains BLOCKED pending the semantic correction and fresh review. PR stays draft/open; no production reducer, native collection, or live Windows acceptance is claimed.
|
Claiming the independent-review P1 correction at exact base Ownership is limited to |
|
#332 phase-specific failure correction is pushed at exact head RED → GREEN:
Verification at exact head:
Local CodeRabbit first found a valid missing same-phase/successful-disposition regression; that case was added for all four families and folded into RED. Its final review of the exact two-commit range reports zero findings. The independent P1 thread is replied to and resolved. PR remains draft/open. Fresh hosted exact-head CodeRabbit and a different independent exact-head review are still required; no production reducer, native collection, or live Windows acceptance is claimed. |
|
@coderabbitai review Please perform a fresh substantive review of exact head |
|
I will review the full Provider/Admin Service contract. I will recheck all requested phase, evidence, terminality, privacy, coverage, determinism, purity, and WebAssembly conditions. I will not treat a skipped, rate-limited, status-only, incremental-only, or stale-head result as approval. ✅ Action performedReview finished.
|
|
@coderabbitai full review |
✅ Action performedFull review finished. |
adamgell
left a comment
There was a problem hiding this comment.
Independent adversarial re-review of PR #380 at exact head ea05463.
Verdict: PASS at exact head ea05463.
Descent: merge-base with a8a367c is a8a367c (clean restack on the reviewed spine).
Battery: focused Provider/Admin Service contract test 30 passed, 0 failed; sccm_spine_contract 137 passed, 0 failed; full parser suite 761 passed, 0 failed; cargo clippy --all-targets -D warnings clean; wasm32-unknown-unknown check clean.
P1 verification (phase binding): the prior blocker was that phase-specific failure claims were not bound to a named failed phase. Head ea05463 pins an exact per-failure-scenario phase/disposition sequence and pins summaries and observation identities per scenario. Three adversarial paired-mutation probes (expected output and paired records mutated together) were all rejected specifically by the new phase-binding gate: a failure claim with no named failed phase; a claim whose named phase succeeds with only a terminal recordOutcome failure; and failure evidence relocated to a different phase than the claimed one. A byte-length-preserving mutation of the physical fixture log was independently rejected by the evidence-semantics binding, confirming the gate does not depend on byte accounting.
Prior Critical class (overlapping identity ranges in evidence.rs): confirmed still fixed. Overlapping windows-identity and user-path matches are merged before projection; probes walking decoded JSON strings (not serialized bytes) across message, component, and source-file fields found no leak of the overlap class. The committed regression test remains present at head.
Privacy sweep: all 60 fixture files are synthetic (example.invalid, SYNTHETIC markers only); no real domains, UNC paths, drive paths, or emails. The diff contains only synthetic adversarial strings inside fail-closed mutation tests.
Non-blocking observations for follow-up outside this PR: two identity-recognizer gaps (space-preceded slash-separated home paths; path segments below an already-redacted identity head) exist unchanged at the foundation SHA and are spine-lane scope, not introduced here; one mutation test uses the maintainer's real name as an adversarial identity-bearing path input where a synthetic name would be cleaner; unbounded private query values conservatively swallow trailing diagnostic codes, which is the safe direction.
This verdict applies to exact head ea05463.
There was a problem hiding this comment.
Pull request overview
Prepares the SCCM Server Provider/Admin Service “preparation-only” corpus for issue #332 by adding a bounded synthetic fixture set, a strict contract test to validate manifests/expected outputs, and tightening public evidence redaction behavior for Provider/Admin Service–style sensitive fields.
Changes:
- Added a 20-scenario Provider/Admin Service server fixture corpus (manifests, expected projections, and bounded synthetic evidence artifacts) plus a corpus README describing the contract.
- Added a dedicated fixture-contract test that validates topology/provenance/coverage/transaction shape, citation rules, privacy constraints, and fail-closed mutation behavior.
- Expanded SCCM public message redaction to cover AuthorizationHeader/AuthorizationToken, CallerHandle, and QueryHandle patterns, and fixed identity-range merging during Windows identity redaction.
Reviewed changes
Copilot reviewed 45 out of 64 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/sccm/preparation/issue-332-provider-admin-service-corpus.md | Documents the preparation-only scope, key/privacy/state/coverage contracts, and test-first history for #332. |
| crates/cmtraceopen-parser/src/sccm/evidence.rs | Tightens SCCM public evidence redaction (Provider/Admin Service sensitive handles) and merges overlapping identity ranges safely. |
| crates/cmtraceopen-parser/tests/sccm_spine_contract.rs | Adds a regression test asserting Provider-handle redaction in multiple syntactic positions while preserving safe tails. |
| crates/cmtraceopen-parser/tests/sccm_server_provider_and_admin_service_fixture_contract.rs | Introduces a comprehensive contract test that enforces the corpus schema, privacy, citation, and fail-closed guarantees across scenarios. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/README.md | Corpus-level documentation: scenario matrix, boundaries, and contract invariants. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-access-denied/manifest.json | Scenario manifest: Admin Service access-denied coverage-only case. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-access-denied/expected.json | Expected projection for Admin Service access-denied coverage-only case. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-auth-failure/manifest.json | Scenario manifest: Admin Service authentication failure. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-auth-failure/expected.json | Expected projection for Admin Service authentication failure. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-auth-failure/evidence/server-admin-service/admin-service-lab/current/AdminService.log | Synthetic CCM evidence for Admin Service authentication failure scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-backend-failure/manifest.json | Scenario manifest: Admin Service backend operation failure. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-backend-failure/expected.json | Expected projection for Admin Service backend operation failure. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-backend-failure/evidence/server-admin-service/admin-service-lab/current/AdminService.log | Synthetic CCM evidence for Admin Service backend failure scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-parse-failed/manifest.json | Scenario manifest: Admin Service parse-failed coverage case. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-parse-failed/expected.json | Expected projection for Admin Service parse-failed coverage case. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-parse-failed/evidence/server-admin-service/admin-service-lab/current/AdminService.log | Malformed synthetic evidence used to enforce parse-failed coverage behavior. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-skipped/manifest.json | Scenario manifest: Admin Service skipped coverage case. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-skipped/expected.json | Expected projection for Admin Service skipped coverage case. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-success/manifest.json | Scenario manifest: Admin Service terminal success. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-success/expected.json | Expected projection for Admin Service terminal success. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/admin-service-success/evidence/server-admin-service/admin-service-lab/current/AdminService.log | Synthetic CCM evidence for Admin Service success scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/blocked-deferred/manifest.json | Scenario manifest: blocked/deferred incomplete Admin Service request. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/blocked-deferred/expected.json | Expected projection for blocked/deferred incomplete Admin Service request. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/blocked-deferred/evidence/server-admin-service/admin-service-lab/current/AdminService.log | Synthetic CCM evidence for blocked/deferred incomplete scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/contradictory-evidence/manifest.json | Scenario manifest: Provider contradictory terminal outcomes on same exact key. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/contradictory-evidence/expected.json | Expected projection enforcing incomplete/low-confidence outcome for contradictory terminals. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/contradictory-evidence/evidence/server-provider/provider-local/current/Smsprov.log | Synthetic CCM evidence containing contradictory recordOutcome terminals. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/manifest.json | Scenario manifest: Admin Service success plus supplemental IIS evidence. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/expected.json | Expected projection ensuring IIS remains source-local and non-promotable. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/evidence/server-admin-service/admin-service-lab/current/AdminService.log | Synthetic CCM evidence for Admin Service success in IIS-supplemental scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/iis-supplemental/evidence/server-admin-service-iis/admin-service-lab/current/u_ex_synthetic.log | Synthetic W3C IIS evidence used as supplemental-only context. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/incomplete/manifest.json | Scenario manifest: incomplete Admin Service request (no terminal outcome). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/incomplete/expected.json | Expected projection for incomplete Admin Service request. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/incomplete/evidence/server-admin-service/admin-service-lab/current/AdminService.log | Synthetic CCM evidence for incomplete Admin Service scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/manifest.json | Scenario manifest: privacy-redaction case with sensitive-shaped raw values. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/expected.json | Expected projection verifying sensitive shapes are absent from public output while keys remain stable. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/evidence/server-admin-service/admin-service-lab/current/AdminService.log | Synthetic CCM evidence containing sensitive-shaped Admin Service fields to validate redaction. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/privacy-redaction/evidence/server-provider/provider-local/current/Smsprov.log | Synthetic CCM evidence containing sensitive-shaped Provider fields to validate redaction. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-authz-denied/manifest.json | Scenario manifest: Provider authorization denial (explicit failed authz). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-authz-denied/expected.json | Expected projection for Provider authorization denial scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-authz-denied/evidence/server-provider/provider-local/current/Smsprov.log | Synthetic CCM evidence for Provider authz denial scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-query-failure/manifest.json | Scenario manifest: Provider operation/query failure (explicit terminal failure). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-query-failure/expected.json | Expected projection for Provider query/operation failure scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-query-failure/evidence/server-provider/provider-local/current/Smsprov.log | Synthetic CCM evidence for Provider query/operation failure. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-retry/manifest.json | Scenario manifest: Provider retry then recovery (same-key retry contract). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-retry/expected.json | Expected projection enforcing explicit retryableFailure then same-phase success recovery. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-retry/evidence/server-provider/provider-local/current/Smsprov.log | Synthetic CCM evidence for Provider retry/recovery scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-absent/manifest.json | Scenario manifest: Provider source absent coverage-only case. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-absent/expected.json | Expected projection for Provider absent coverage-only case. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-capped/manifest.json | Scenario manifest: Provider capped collection coverage-only case. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-capped/expected.json | Expected projection for Provider capped coverage-only case. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-capped/evidence/server-provider/provider-local/current/Smsprov.log | Synthetic truncated evidence artifact for capped-coverage contract checks. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-unsupported/manifest.json | Scenario manifest: Provider unsupported source/profile coverage-only case. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-source-unsupported/expected.json | Expected projection for Provider unsupported coverage-only case. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-success/manifest.json | Scenario manifest: Provider terminal success. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-success/expected.json | Expected projection for Provider terminal success. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-success/evidence/server-provider/provider-local/current/Smsprov.log | Synthetic CCM evidence for Provider success scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-timeout/manifest.json | Scenario manifest: Provider incomplete/timeout case with invalid offset. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-timeout/expected.json | Expected projection enforcing incomplete/low-confidence for invalid-offset timeout. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/provider-timeout/evidence/server-provider/provider-local/current/Smsprov.log | Synthetic CCM evidence for Provider timeout/invalid-offset scenario. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/rotation-boundary/manifest.json | Scenario manifest: split-rotation boundary fragments with unknown version. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/rotation-boundary/expected.json | Expected projection enforcing source-local rotationFragment and no transaction key formation. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/rotation-boundary/evidence/server-provider/provider-local/current/Smsprov.log | Synthetic partial-rotation fragment evidence (current). |
| crates/cmtraceopen-parser/tests/fixtures/sccm/server/provider_and_admin_service/rotation-boundary/evidence/server-provider/provider-local/lo_/Smsprov.lo_ | Synthetic partial-rotation fragment evidence (lo_). |
| A later mutation pass reproduced seven fail-open cases before correction: | ||
| control-bearing versions, blank rewritten artifact identity, arbitrary | ||
| transaction/source-local observation IDs, high confidence over an incomplete | ||
| fragment, arbitrary outcomes, and omitted required bounded requests. The | ||
| closed contract now rejects all seven. |
| The current twenty-scenario matrix additionally separates absent, | ||
| access-denied, capped, skipped, unsupported, parse-failed/malformed, and | ||
| blocked/deferred coverage. None of those states is promoted into success or | ||
| failure. Every high-success transaction now cites the complete layer-specific | ||
| phase sequence, and every retryable failure requires a later success at the | ||
| same phase. |
Tracks #332
Scope
Preparation-only Provider/Admin Service source, privacy, request-key, topology, coverage, and reducer-test corpus. This PR adds no production reducer, Windows collector, network/database/WMI/Tauri code, or live SCCM acceptance. Production implementation remains blocked on reviewed/stable #318 and #335 interfaces.
Fixture matrix
The corpus contains 11 scenarios, 14 bounded physical artifacts, and 22 manifest/expected JSON files.
Smsprov.logandAdminService.logcontinue to use raw CCM transport; noParserKind::Sccmis introduced. Producer role stays separate from Provider/Admin Service workflow layer.TDD evidence
Verification at exact head
0144448492e3526e989eea12fdfd30b8014aa4b7cargo test --locked -p cmtraceopen-parser --test sccm_server_provider_and_admin_service_fixture_contract— 7/7cargo test --locked -p cmtraceopen-parser --test sccm_server_intake_fixture_contract— 1/1cargo test --locked -p cmtraceopen-parser --test sccm_spine_contract— 61/61cargo test --locked -p cmtraceopen-parser— 661 tests listed, greencargo clippy --locked -p cmtraceopen-parser --all-targets -- -D warnings— greencargo check --locked -p cmtraceopen-parser --target wasm32-unknown-unknown— greennpm exec -- tsc --noEmit— greengit diff --check— greenReview state
Draft pending exact-head CodeRabbit and an independent adversarial review. Issue stays open; compile success alone is not closure.
Summary by CodeRabbit
Documentation
Privacy
Tests