Repository navigation
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 a public SCCM client-health analysis module that parses normalized evidence, resolves health phases and recovery through chronology-aware state resolution, emits phase-aware findings and coverage requests, enforces deterministic sanitized output, and validates behavior through 1,327 lines of integration tests. ChangesSCCM client health analysis
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant Bundle as SccmNormalizedBundle
participant Analyzer as analyze_client_health
participant EvidenceParse as Evidence parsing
participant PhaseResolve as Phase resolution
participant FindingBuild as Finding construction
participant Output as SccmHealthAnalysis
Bundle->>Analyzer: normalized client evidence
Analyzer->>EvidenceParse: filter and parse artifacts
EvidenceParse-->>Analyzer: validated evidence facts
Analyzer->>PhaseResolve: resolve setup and transport states
PhaseResolve-->>Analyzer: phase outcomes and chronology
Analyzer->>FindingBuild: construct findings and coverage gaps
FindingBuild-->>Analyzer: insufficient-evidence, symptom, or confirmed-failure
Analyzer->>Output: deterministic sorted analysis with requests
Output-->>Analyzer: sanitized public output
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Comment |
#320 RED-to-GREEN implementation checkpointExact pushed head: Scope is limited to the client setup/service/identity/site-assignment/management-point/transport reducer, its issue-owned tests, and two fixture corrections required by the reviewed #318 finding validator. It consumes the #321-stack Commits:
Fixture matrix: success, setup terminal, identity terminal, no site/MP, transport terminal, contradictory bootstrap IDs, rotation boundary, malformed logical record, and incomplete/access-denied identity. Permanent mutations cover zero error/status, same-key recovery versus different key, client/request/host mismatch, source mismatch, missing/unknown profile, partial/access-denied/capped/skipped/unsupported/parse-failed coverage, inverted/invalid timestamp provenance, request-before-terminal ordering, later success/failure resolution, unsafe artifact provenance, and raw public-output leakage. Verification:
The PR remains draft. The existing CodeRabbit status is a skipped-draft run, not approval. Fresh exact-head CodeRabbit review and a different independent reviewer are required before any base change or merge. Native Windows/lab acceptance remains explicitly pending and is not claimed. |
|
@coderabbitai full review Please perform a substantive review of exact head |
|
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (5)
crates/cmtraceopen-parser/src/sccm/client/health.rs (2)
712-718: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRename
fact_is_strictly_afterto match its parameter order.
fact_is_strictly_after(earlier, later)returns true whenearliersorts beforelater. The name states the opposite of what the first parameter does. All three call sites pass arguments in the correct order, so behavior is right today, but the name invites an inverted call during later edits. The ordering rules here are the fail-closed gate for terminal findings, so an inverted call would be a silent correctness change.
known_inversionreads correctly and needs no change.♻️ Proposed rename
-fn fact_is_strictly_after(earlier: &HealthFact, later: &HealthFact) -> bool { +fn fact_is_strictly_before(earlier: &HealthFact, later: &HealthFact) -> bool { compare_fact_order(earlier, later) == Some(std::cmp::Ordering::Less) }Update the three call sites at Lines 607, 713, and 729.
🤖 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/client/health.rs` around lines 712 - 718, Rename fact_is_strictly_after to reflect that it returns true when the first parameter sorts before the second, updating its definition and all three call sites while preserving argument order and behavior. Leave known_inversion unchanged.
249-275: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueCollapse the repeated
has_captured_without_recordbranches.The same predicate is evaluated in three separate inline
ifexpressions to pick the finding ID, title, and summary. Select the triple once. The bare block at Line 273 also adds no scope; assign directly.♻️ Proposed refactor
- findings.push(insufficient_finding( - if has_captured_without_record { - "health-service-malformed" - } else { - "health-service-coverage-gap" - }, - SccmHealthPhase::Service, - last_successful_phase, - if has_captured_without_record { - "Client service evidence is malformed" - } else { - "Client service evidence is incomplete" - }, - if has_captured_without_record { - "A captured service artifact contained no complete version-profiled logical record." - } else { - "No complete version-profiled service or evaluation outcome was available." - }, + let (finding_id, title, summary) = if has_captured_without_record { + ( + "health-service-malformed", + "Client service evidence is malformed", + "A captured service artifact contained no complete version-profiled logical record.", + ) + } else { + ( + "health-service-coverage-gap", + "Client service evidence is incomplete", + "No complete version-profiled service or evaluation outcome was available.", + ) + }; + findings.push(insufficient_finding( + finding_id, + SccmHealthPhase::Service, + last_successful_phase, + title, + summary, Vec::new(), coverage_gaps_for_missing_group(&service_artifacts, CLIENT_EVALUATION_GROUP, false), request_for_phase(SccmHealthPhase::Service), )); return finalize_health_analysis(last_successful_phase, findings); }; - { - last_successful_phase = Some(SccmHealthPhase::Service); - } + last_successful_phase = Some(SccmHealthPhase::Service);🤖 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/client/health.rs` around lines 249 - 275, The service finding construction in the health analysis flow repeats has_captured_without_record for the ID, title, and summary; select these three values once before findings.push and reuse them in insufficient_finding. Remove the unnecessary bare scope block and assign last_successful_phase directly before returning, preserving the existing values and behavior.crates/cmtraceopen-parser/tests/sccm_client_health.rs (2)
142-162: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueNormalize the expected coverage-gap order.
actual_finding_projectionsortsgap_idsat Line 191, butexpected_finding_projectionpassesfinding["coverageGapArtifactIds"]through unsorted. The two values are then compared withassert_eq!. Every current fixture declares at most one gap ID, so the mismatch is not visible. A future fixture that lists two IDs in a different order fails the test even when the analyzer is correct.Sort the expected list with the same key.
♻️ Proposed refactor
.map(|finding| { + let mut gap_ids = finding["coverageGapArtifactIds"] + .as_array() + .cloned() + .unwrap_or_default(); + gap_ids.sort_by_key(Value::to_string); json!({ "findingId": finding["findingId"], "healthPhase": finding["phase"], "class": finding["class"], "confidence": finding["confidence"], - "coverageGapArtifactIds": finding["coverageGapArtifactIds"], + "coverageGapArtifactIds": gap_ids,🤖 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_client_health.rs` around lines 142 - 162, Update expected_finding_projection to normalize finding["coverageGapArtifactIds"] by sorting its IDs with the same ordering used by actual_finding_projection before inserting them into the JSON projection. Preserve the existing null and field mappings, and ensure multi-ID fixtures compare order-independently.
393-397: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueTwo test-robustness notes.
Line 393 compares
Option<SccmHealthPhase>with>=. That relies on the variant declaration order inSccmHealthPhaseas a semantic phase ordering. Reordering the variants would silently change what this assertion accepts. State the intent explicitly, for example withmatches!(phase, Some(SccmHealthPhase::ManagementPoint | SccmHealthPhase::Transport)).Line 472 pushes the same message for all four coverage states in the loop. Include the state so a failure names the input.
♻️ Proposed refactor for the loop diagnostic
if analyze_client_health(&incomplete_coverage) .last_successful_phase .is_some() { - accepted.push("non-captured coverage created a successful phase"); + accepted.push(format!( + "non-captured coverage {coverage:?} created a successful phase" + )); }
acceptedthen holdsStringvalues; change the otheraccepted.pushcalls to.to_owned()or declareVec<String>.Also applies to: 458-474
🤖 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_client_health.rs` around lines 393 - 397, Update the `last_successful_phase` assertion to use an explicit `matches!` check for `ManagementPoint` or `Transport` instead of relying on `Option` ordering. In the coverage-state loop, include the current state in the accepted diagnostic message, and make `accepted` consistently store `String` values by converting the other pushed literals as needed.crates/cmtraceopen-parser/tests/fixtures/sccm/client/health/no-site-or-mp/expected.json (1)
8-8: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueThe gap ID matches the reducer; the site branch reports a group instead of artifacts.
coverageGapArtifactIdsnow containsclient-location. That matchesanalyze_client_health, which hardcodes a single gap withartifact_id: CLIENT_LOCATION_GROUPandcoverage: Partialin the missing-site branch (health.rs Lines 363-367).Every other stage builds its gaps through
coverage_gaps_for_missing_group, which reports one gap per artifact with that artifact's real coverage state. The site branch is the only one that reports a group name and a fixedPartialstate. In this scenario the location artifact iscaptured, so the emittedPartialstate does not describe any artifact. Consider routing this branch throughcoverage_gaps_for_missing_groupwith the location artifacts, for consistency with the management-point branch at Line 405.Confirm the intent before changing, because the fixture freezes the current shape.
🤖 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/fixtures/sccm/client/health/no-site-or-mp/expected.json` at line 8, Update the missing-site branch in analyze_client_health to build coverage gaps via coverage_gaps_for_missing_group using the location artifacts, matching the management-point branch’s per-artifact coverage behavior. Preserve the client-location gap identity and ensure each emitted gap uses the corresponding artifact’s actual coverage state rather than a group-level Partial value; update the affected fixture expectation accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/cmtraceopen-parser/src/sccm/client/health.rs`:
- Around line 912-921: Normalize stored client GUID values to a consistent
lowercase representation in every parse_*_fact path that assigns client_guid,
matching policy.rs extract_uuid_label behavior. Keep valid_guid validation
unchanged, and ensure all downstream comparisons in matching_service, the
identity search, and matching_site receive normalized GUIDs.
- Around line 412-426: Update the Succeeded branch of resolve_transport handling
in the health analysis flow: when chain_has_known_inversion returns true, emit
the existing health-transport-chronology-uncertain finding using started and
response as evidence, then prevent fallthrough to the misleading
health-transport-insufficient result. Preserve the current successful Transport
finalization when no inversion exists.
- Around line 277-311: Update the identity-failure handling around the visible
IdentityFailed lookup to ignore failures superseded by a later IdentitySucceeded
fact for the same client_guid, reusing the existing is_later_in_same_artifact
chronology check used by resolve_setup. Preserve terminal and
chronology-uncertain findings only for unrecovered failures, and add a
health-analysis test scenario covering a failure followed by a same-GUID
success.
- Around line 878-903: Update field_value to accept a marker match only when the
character immediately before the matched key is absent or non-alphanumeric,
preventing longer keys such as httperror, httpstatus, or prefixed clientGuid
identifiers from matching. Preserve the existing multiple-match rejection and
value parsing behavior.
In `@crates/cmtraceopen-parser/tests/sccm_client_health.rs`:
- Around line 254-261: Update the evidence omission assertion in the
expected_ranges loop to match each expected reference by artifactId, lineStart,
and lineEnd. Ensure one actual reference cannot satisfy multiple expected ranges
within the same artifact, while preserving the existing scenario and finding_id
failure message.
- Around line 647-650: Update the assertion in the unrelated_analysis test to
validate the findings count before accessing findings[0], ensuring a missing
finding produces a clear assertion failure rather than an index-out-of-bounds
panic. Keep the existing health-setup-contradictory ID assertion after the count
check.
---
Nitpick comments:
In `@crates/cmtraceopen-parser/src/sccm/client/health.rs`:
- Around line 712-718: Rename fact_is_strictly_after to reflect that it returns
true when the first parameter sorts before the second, updating its definition
and all three call sites while preserving argument order and behavior. Leave
known_inversion unchanged.
- Around line 249-275: The service finding construction in the health analysis
flow repeats has_captured_without_record for the ID, title, and summary; select
these three values once before findings.push and reuse them in
insufficient_finding. Remove the unnecessary bare scope block and assign
last_successful_phase directly before returning, preserving the existing values
and behavior.
In
`@crates/cmtraceopen-parser/tests/fixtures/sccm/client/health/no-site-or-mp/expected.json`:
- Line 8: Update the missing-site branch in analyze_client_health to build
coverage gaps via coverage_gaps_for_missing_group using the location artifacts,
matching the management-point branch’s per-artifact coverage behavior. Preserve
the client-location gap identity and ensure each emitted gap uses the
corresponding artifact’s actual coverage state rather than a group-level Partial
value; update the affected fixture expectation accordingly.
In `@crates/cmtraceopen-parser/tests/sccm_client_health.rs`:
- Around line 142-162: Update expected_finding_projection to normalize
finding["coverageGapArtifactIds"] by sorting its IDs with the same ordering used
by actual_finding_projection before inserting them into the JSON projection.
Preserve the existing null and field mappings, and ensure multi-ID fixtures
compare order-independently.
- Around line 393-397: Update the `last_successful_phase` assertion to use an
explicit `matches!` check for `ManagementPoint` or `Transport` instead of
relying on `Option` ordering. In the coverage-state loop, include the current
state in the accepted diagnostic message, and make `accepted` consistently store
`String` values by converting the other pushed literals as needed.
🪄 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: 7723c446-3d08-4a12-afbe-355e51eda16e
📒 Files selected for processing (5)
crates/cmtraceopen-parser/src/sccm/client/health.rscrates/cmtraceopen-parser/src/sccm/client/mod.rscrates/cmtraceopen-parser/tests/fixtures/sccm/client/health/malformed/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/client/health/no-site-or-mp/expected.jsoncrates/cmtraceopen-parser/tests/sccm_client_health.rs
adamgell
left a comment
There was a problem hiding this comment.
Independent exact-head review verdict: BLOCK at 990211d19a4415300ce77322836b6da3488cd082 against temporary stack base 1e5a3174ceaaf2f7d045d4e36a4e1955a8b06f91. (GitHub does not permit the PR author's account to submit a formal REQUEST_CHANGES event, so this formal review is COMMENTED with an explicit blocking verdict.)
Two additional fail-closed blockers are inline: duplicate artifact identities can make input order authoritative and can panic the public analyzer, and equal-UTC opposing same-key transport outcomes can be promoted to a high-confidence terminal result by artifact-ID sort order.
Disposable probes also independently reproduced three hosted CodeRabbit blockers: UUID case variants split one client key, a later same-artifact/same-GUID identity success does not recover a terminal failure, and httperror= is accepted as the exact error= field. The committed evidence-range assertion also matches expected citations by artifact ID without requiring each expected line range. All probes were reverted; the review worktree is clean.
Fresh baseline gates passed: health 6/6, actual intake contract 3/3, spine 136/136, full parser suite, strict parser Clippy, Rust 1.88 wasm32 check, frontend build, all 18 health JSON files, scoped rustfmt, and diff checks. Global cargo fmt --check --all still reports inherited formatting outside all five #320-owned paths. Local CodeRabbit exact-range review was authenticated and correctly scoped but rate-limited for 19 minutes; that is not approval. Hosted CodeRabbit is exact-head CHANGES_REQUESTED.
Please keep #392 draft/open, add focused regression tests for every confirmed mutation, and rerun both substantive CodeRabbit and a different independent review on the corrected exact head. The PR remains stacked only for SccmNormalizedBundle; it must not merge before the #321 base disposition is explicit.
#320 corrective RED → GREEN at exact head
|
|
@coderabbitai review Please run a fresh substantive review of exact head |
|
The review will include the corrective RED-to-GREEN tests and the reachability rationale for the intentionally open minor thread. I will not treat a skipped, stale, rate-limited, or prior-head result as approval. ✏️ Learnings added
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
crates/cmtraceopen-parser/tests/sccm_client_health.rs (1)
720-750: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDerive the diagnostic message from the coverage state.
SccmCoverageStatederivesDebug. Replace the variantmatchwithformat!("non-captured coverage {coverage:?} created a successful phase"). ChangeacceptedtoVec<String>and convert the other diagnostic literals with.to_owned().🤖 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_client_health.rs` around lines 720 - 750, Update the test diagnostics around analyze_client_health to use a Vec<String> for accepted, derive the coverage name directly with format!("non-captured coverage {coverage:?} created a successful phase"), and convert the remaining literal diagnostics to owned Strings. Remove the redundant SccmCoverageState match while preserving the existing failure reporting behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/cmtraceopen-parser/tests/sccm_client_health.rs`:
- Around line 545-548: In the test assertion around unrelated_analysis, first
assert that unrelated_analysis.findings contains the expected number of
findings, then index findings[0] to verify its finding_id. Follow the
established assertion pattern from
health_same_key_setup_recovery_does_not_cross_bootstrap_identity.
- Around line 459-480: Update health_guid_matching_is_case_insensitive to assert
that each GUID replacement changes the expected evidence and that the Bootstrap
completed setup evidence is found, failing immediately when the fixture no
longer matches. Retain the existing case-mutation and final
analyze_client_health assertion after confirming the mutations were applied.
---
Nitpick comments:
In `@crates/cmtraceopen-parser/tests/sccm_client_health.rs`:
- Around line 720-750: Update the test diagnostics around analyze_client_health
to use a Vec<String> for accepted, derive the coverage name directly with
format!("non-captured coverage {coverage:?} created a successful phase"), and
convert the remaining literal diagnostics to owned Strings. Remove the redundant
SccmCoverageState match while preserving the existing failure reporting
behavior.
🪄 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: cb249ccc-6a77-4da1-b7ff-34d5e72b49de
📒 Files selected for processing (2)
crates/cmtraceopen-parser/src/sccm/client/health.rscrates/cmtraceopen-parser/tests/sccm_client_health.rs
🚧 Files skipped from review as they are similar to previous changes (1)
- crates/cmtraceopen-parser/src/sccm/client/health.rs
adamgell
left a comment
There was a problem hiding this comment.
Independent exact-head review verdict: BLOCK at 3c7d8123769cc2af3a080c0c2a531574229a7a98 against temporary stack base 1e5a3174ceaaf2f7d045d4e36a4e1955a8b06f91. GitHub does not permit the PR author account to submit REQUEST_CHANGES, so this formal review is COMMENTED with an explicit blocking verdict.
The six prior semantic blockers now reproduce green: duplicate artifact IDs are deterministic/non-panicking, equal-time opposing same-key outcomes stay contradictory/low, GUID joins are case-normalized, same-artifact same-GUID identity recovery works, embedded httperror= is rejected, and every expected citation range is required.
Two additional fail-closed blockers remain:
- quoted terminal marker is promoted to high failure: a disposable probe changed only the prefix to
Narrative quotes Transport terminal failure ...; the analyzer still emittedhealth-transport-terminal/ConfirmedFailure/Highbecause event grammars use substring matching. - exact cross-rotation recovery cannot suppress a stale high identity failure: a failure in canonical
ClientIDManagerStartup.lo_followed by exact same-GUID success in currentClientIDManagerStartup.logat laterNormalizedUtcstill emittedhealth-identity-terminal/High. This conflicts with the plan requirement to use resolved UTC across artifacts when provenance permits it.
Hosted CodeRabbit also completed an exact-head review as CHANGES_REQUESTED: the GUID-case regression can pass vacuously if fixture text drifts, and the unrelated-GUID test indexes findings[0] before asserting cardinality. Its older inverted-success thread is not a code-reachability blocker: service, identity, site, MP, and start selection each reject Greater on the same adjacent comparisons, while start-to-outcome requires strict Less; therefore TransportResolution::Succeeded cannot reach the chain_has_known_inversion == true arm.
Fresh exact-head verification:
- health
12/12; actual intake contract3/3; spine136/136; full parser754/754; - strict parser Clippy; Rust 1.88 wasm32; TypeScript/Vite frontend build; all 18 health JSON files; scoped rustfmt; diff check; detached status clean;
- the plan-literal
sccm_client_intaketarget is absent; the repository target issccm_client_intake_fixture_contract; - repo-wide format still reports only 17 inherited paths, none owned by #320;
- local CodeRabbit v0.7.1 was authenticated and exact-range scoped but rate-limited for 13 minutes, which is not approval.
Keep #392 draft/open and stacked on #321 only for SccmNormalizedBundle. Add focused RED to GREEN tests for both semantic blockers, harden the two current CodeRabbit test contracts, then request a fresh exact-head CodeRabbit review and a different independent review. No native Windows acceptance is claimed.
|
🟢 #320 round-2 fixer active in fresh isolated worktree from exact head 3c7d812. I am freezing both independent-review P1s as permanent RED tests before implementation, hardening the two current CodeRabbit tests, and preserving the documented unreachable inverted-success rationale. I will not push until focused/aggregate parser, strict Clippy, Rust 1.88 wasm32, frontend, fixture JSON, scoped formatting/diff, and clean-status gates are recorded. Guarded non-force push only; PR stays draft. |
#320 round-2 RED to GREEN correctionExact pushed head: Commits:
TDD evidence:
Behavior now requires the versioned public-message envelope plus an exact allowed event prefix before any phase record is admitted. Identity recovery uses strict logical ordering: physical line order within one artifact, or usable normalized UTC across artifacts. Unknown or unusable cross-artifact time remains non-recovery. The rotation test covers canonical CodeRabbit test findings are hardened: GUID mutations prove every replacement occurred before asserting case-insensitive matching, and the unrelated-GUID finding count is asserted before indexing. The noncaptured diagnostic now derives from Verification at exact code:
Local CodeRabbit CLI v0.7.1 was authenticated and exact-range scoped from PR remains draft/open and stacked on #321 only for |
|
@coderabbitai review Please run a fresh substantive review of exact head |
|
The review will include ✅ 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 29 minutes. |
|
Review-gate clarification: CodeRabbit submitted an exact-head formal approval and independently confirmed/withdrew the prior inverted-success comment, leaving zero unresolved threads. However, its full-review response also states that the fair-usage limit was reached and the next included review is in 29 minutes. Under the program rule that a rate-limited result is not substantive approval, this is recorded but not accepted as merge clearance. PR remains draft; a different independent exact-head review is still required, and a fresh non-rate-limited CodeRabbit run remains the conservative gate. |
adamgell
left a comment
There was a problem hiding this comment.
Independent exact-head review verdict: BLOCK at 665f75bbf7670d0242325fe8868b0cda631851bd against temporary stack base 1e5a3174ceaaf2f7d045d4e36a4e1955a8b06f91. GitHub does not allow the PR author account to submit REQUEST_CHANGES, so this formal review is COMMENTED with an explicit blocking verdict.
The requested round-2 fixes reproduce green: quoted/incidental terminal text is rejected; exact same-GUID .lo_ to current identity recovery works only with strict NormalizedUtc; the GUID mutation cannot pass vacuously; and finding cardinality is asserted before indexing. Four additional plan-backed fail-closed cases remain, detailed inline.
Disposable external harness (the review worktree stayed clean): cargo test --offline -- --nocapture — 4/4 adversarial assertions failed for punctuation-prefixed terminal fields, canonical setup recovery, conflicting duplicate evidence identity, and invalid cross-artifact chronology. Fresh repository gates: health 14/14; intake 3/3; spine 136/136; full parser pass; strict Clippy pass; Rust 1.88 wasm32 pass; frontend build pass; 18 JSON pass; owned rustfmt/diff/status pass. Repo-wide formatting still differs only in inherited non-#320 paths. Local CodeRabbit v0.7.1 was authenticated/exact-range scoped but rate-limited for 27 minutes; hosted CodeRabbit is a separate gate and its rate-limited approval is not this independent review.
Keep #392 draft/open. Freeze these four probes RED, implement the smallest fail-closed behavior, rerun the aggregate gates, obtain a fresh non-rate-limited CodeRabbit review, then request another independent exact-head review. No native Windows acceptance is claimed.
|
Round-3 correction claimed from exact head 665f75b in isolated branch codex/sccm-320-665f-round3. I am reproducing all four blockers from review 4828846565 as permanent RED tests before production changes. After focused GREEN and aggregate gates, I will push non-force only if the remote head is still this lineage, reply/resolve each handled thread, and request fresh substantive exact-head CodeRabbit. This remains draft and requires a different independent exact-head re-review. |
|
@coderabbitai review\n\nFresh substantive exact-head review requested for fc2cf5d. Please review the full 665f75b..fc2cf5d correction range. The local CLI attempt was authenticated and exact-range scoped but rate-limited; that is not approval. |
|
I will review the correction range from ✅ Action performedReview finished.
|
|
Round-3 RED-to-GREEN correction is pushed to draft PR #392 at exact head fc2cf5d.\n\nScope:\n- exact whitespace field boundaries reject http-error= and http_error= as terminal error evidence;\n- same-bootstrap setup recovery crosses canonical ccmsetup.lo_ to ccmsetup.log only with strict comparable order and matching filename/rotation provenance;\n- duplicate evidence IDs or duplicate exact evidence references fail closed before reduction;\n- complete Transport success requires a fully usable ordered prerequisite chain; invalid cross-artifact timestamps emit a cited low-confidence chronology result instead.\n\nCommits:\n- RED 11024ad: 18 focused tests, 14 prior pass and 4 intended semantic failures.\n- GREEN fc2cf5d: focused health 18/18.\n\nFixture/mutation matrix:\n- both punctuation-prefixed terminal fields;\n- normalized-UTC lo_ failure then current success, reversed vectors, and rotation metadata mismatch;\n- conflicting records sharing both identities, duplicate evidence ID alone, and duplicate reference alone;\n- every success-chain timestamp OffsetInvalid with no UTC, seven cited chain references, and reversed vectors.\n\nFresh verification:\n- health 18/18; available intake contract sccm_client_intake_fixture_contract 3/3; spine 136/136;\n- full cmtraceopen-parser suite passed;\n- strict all-target parser Clippy passed;\n- Rust 1.88.0 wasm32 check passed;\n- frontend TypeScript/Vite build passed;\n- all 18 health JSON files passed jq validation;\n- owned rustfmt, git diff --check, remote/head equality, and clean status passed.\nThe plan-literal sccm_client_intake target is absent on this stacked base; Cargo exposes sccm_client_intake_fixture_contract. Repo-wide formatting still reports 24 inherited hunks across 17 unchanged non-#320 paths; neither owned #320 file is reported.\n\nDependency/review state:\n- PR remains draft/open and stacked on #321 only for SccmNormalizedBundle; no policy output dependency was introduced.\n- All four round-3 blocking threads have exact-head replies and are resolved.\n- Local CodeRabbit 0.7.1 was authenticated and exact-range scoped but rate-limited for eight minutes. Hosted CodeRabbit was requested at #392 (comment) and returned a two-minute review-limit response. Neither rate-limited result is approval; a substantive exact-head retry remains required.\n- A different independent exact-head re-review remains required. No native Windows or live SCCM acceptance is claimed. |
|
@coderabbitai full review\n\nRetry after the review-limit window: perform a fresh substantive full review of exact head fc2cf5d, including both issue-owned files and the permanent RED-to-GREEN adversarial tests. A stale, skipped, or rate-limited result is not approval. |
|
I will review both issue-owned files and the permanent RED-to-GREEN adversarial tests. I will not treat a stale, skipped, or rate-limited result as approval. ✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (4)
crates/cmtraceopen-parser/src/sccm/client/health.rs (1)
567-589: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExtract the duplicated phase and source-group mapping.
Lines 567-589 and Lines 631-654 contain the same family-to-phase match and the same phase-to-group match. A new family or phase must be added in two places. Extract two helpers, for example
phase_for_display_name(display_name: &str) -> SccmHealthPhaseandsource_group_for_phase(phase: SccmHealthPhase) -> &'static str, and call them from both functions.🤖 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/client/health.rs` around lines 567 - 589, The duplicated artifact-family-to-phase and phase-to-source-group mappings should be centralized. Add helpers such as phase_for_display_name and source_group_for_phase, move the existing match logic into them, and update both affected functions—including the duplicate-id phase flow—to call these helpers so future mappings are maintained in one place.crates/cmtraceopen-parser/tests/sccm_client_health.rs (3)
649-658: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winThe loop assigns one
evidence_idto every matching record.Lines 649-653 set the same
evidence_idand the sameentry_idon each evidence record whosereference.artifact_idequalsoriginal_identity_id. The test passes because the identity artifact currently contributes exactly one record.If the
identity-failurefixture later adds a second record to that artifact, the loop creates duplicate evidence identities.analyze_client_healththen returnshealth-evidence-identity-collisionwithlast_successful_phase == None, and the guard at line 655 fails with a message about terminal admission rather than about the duplicate identity. Assert the count first, or derive a unique suffix per record.♻️ Proposed change
+ let identity_record_count = bundle + .evidence + .iter() + .filter(|evidence| evidence.reference.artifact_id == original_identity_id) + .count(); + assert_eq!( + identity_record_count, 1, + "this rotation test assumes a single identity evidence record" + ); for evidence in &mut bundle.evidence {🤖 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_client_health.rs` around lines 649 - 658, Update the evidence-rewriting loop in the identity-failure fixture to ensure every matching record receives a unique evidence_id and entry_id, or assert that exactly one record matches before assigning the canonical values. Preserve the existing canonical rotation-failure assertion while making duplicate identity failures surface explicitly.
1083-1089: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winTwo tests select the fixture artifact by vector index. Both tests mutate
bundle.artifacts[0]from thesetup-failurefixture.load_bundlesorts artifacts byartifact_id, so index 0 is deterministic only while the fixture keeps its current artifact set. The shared root cause is index-based selection instead of selection bydisplay_name, which the rest of this file already uses witheq_ignore_ascii_case.
crates/cmtraceopen-parser/tests/sccm_client_health.rs#L1083-L1089: select theccmsetup.logartifact bydisplay_name, then re-point the evidence whosereference.artifact_idmatches that artifact. Index drift here makes the leak assertions at lines 1101-1105 pass without citing the unsafe provenance.crates/cmtraceopen-parser/tests/sccm_client_health.rs#L1151-L1229: select theccmsetup.logartifact bydisplay_namebefore rotating it toccmsetup.lo_. Index drift here produces a confusing phase-assertion failure instead of a clear fixture error.🤖 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_client_health.rs` around lines 1083 - 1089, Replace index-based artifact selection in both affected test sites (crates/cmtraceopen-parser/tests/sccm_client_health.rs lines 1083-1089 and 1151-1229) with lookup by display_name using the file’s existing eq_ignore_ascii_case pattern. In the first site, re-point the matching evidence reference to the selected ccmsetup.log artifact; in the second, select that artifact before rotating it to ccmsetup.lo_.
169-189: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMake an unmapped logical ID fail the test instead of projecting
null.
source_group_for_requestreturnsNonefor any logical ID that is not in the match arms. Line 189 then projectsnextArtifactLogicalIdasValue::Null. An expected finding that declares nonextArtifactsalso projectsnullat line 163. If the analyzer introduces a new logical artifact ID, or renames an existing one, the projection collapses tonulland the comparison can still pass.Panic on an unmapped ID so the mapping table stays in sync with
request_for_phase.♻️ Proposed change
-fn source_group_for_request(logical_id: &str) -> Option<&'static str> { +fn source_group_for_request(logical_id: &str) -> &'static str { match logical_id { - "ccmSetup" => Some("client-ccmsetup"), - "ccmEval" | "ccmExec" | "ccmRestart" => Some("client-evaluation"), - "clientIdManagerStartup" => Some("client-identity"), - "clientLocation" | "locationServices" | "ccmMessaging" => Some("client-location"), - _ => None, + "ccmSetup" => "client-ccmsetup", + "ccmEval" | "ccmExec" | "ccmRestart" => "client-evaluation", + "clientIdManagerStartup" => "client-identity", + "clientLocation" | "locationServices" | "ccmMessaging" => "client-location", + other => panic!("unmapped health request logical ID {other}"), } }let next_group = finding["nextArtifacts"] .as_array() .and_then(|requests| requests.first()) .and_then(|request| request["logicalId"].as_str()) - .and_then(source_group_for_request); + .map(source_group_for_request);🤖 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_client_health.rs` around lines 169 - 189, Update actual_finding_projection and source_group_for_request so an existing nextArtifacts entry with an unmapped logicalId fails the test immediately instead of producing Value::Null; preserve null only when no next artifact is declared. Keep the mapping synchronized with request_for_phase by panicking or otherwise asserting on unknown IDs.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/cmtraceopen-parser/src/sccm/client/health.rs`:
- Around line 556-566: Scope collision checks to client-role data: in
crates/cmtraceopen-parser/src/sccm/client/health.rs lines 556-566, filter
bundle.artifacts by artifact.role == SccmRole::Client before sorting and
duplicate_id detection; in lines 597-626, apply evidence.role ==
SccmRole::Client in both the counting loop and collision_artifact_ids iterator.
Use the existing client analysis flow unchanged for all other processing.
---
Nitpick comments:
In `@crates/cmtraceopen-parser/src/sccm/client/health.rs`:
- Around line 567-589: The duplicated artifact-family-to-phase and
phase-to-source-group mappings should be centralized. Add helpers such as
phase_for_display_name and source_group_for_phase, move the existing match logic
into them, and update both affected functions—including the duplicate-id phase
flow—to call these helpers so future mappings are maintained in one place.
In `@crates/cmtraceopen-parser/tests/sccm_client_health.rs`:
- Around line 649-658: Update the evidence-rewriting loop in the
identity-failure fixture to ensure every matching record receives a unique
evidence_id and entry_id, or assert that exactly one record matches before
assigning the canonical values. Preserve the existing canonical rotation-failure
assertion while making duplicate identity failures surface explicitly.
- Around line 1083-1089: Replace index-based artifact selection in both affected
test sites (crates/cmtraceopen-parser/tests/sccm_client_health.rs lines
1083-1089 and 1151-1229) with lookup by display_name using the file’s existing
eq_ignore_ascii_case pattern. In the first site, re-point the matching evidence
reference to the selected ccmsetup.log artifact; in the second, select that
artifact before rotating it to ccmsetup.lo_.
- Around line 169-189: Update actual_finding_projection and
source_group_for_request so an existing nextArtifacts entry with an unmapped
logicalId fails the test immediately instead of producing Value::Null; preserve
null only when no next artifact is declared. Keep the mapping synchronized with
request_for_phase by panicking or otherwise asserting on unknown IDs.
🪄 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: d0fe7126-1f6c-4896-b2b2-29c91de2e858
📒 Files selected for processing (5)
crates/cmtraceopen-parser/src/sccm/client/health.rscrates/cmtraceopen-parser/src/sccm/client/mod.rscrates/cmtraceopen-parser/tests/fixtures/sccm/client/health/malformed/expected.jsoncrates/cmtraceopen-parser/tests/fixtures/sccm/client/health/no-site-or-mp/expected.jsoncrates/cmtraceopen-parser/tests/sccm_client_health.rs
|
Substantive CodeRabbit exact-head review 4829080212 requested changes at The P1 client-role collision-scope finding is accepted. A server-role artifact/evidence identity must not alter client-health output. I have claimed the correction in fresh isolated worktree I will first preserve a focused RED cross-role collision regression, then implement the smallest client-role filter. The four test/maintainability nits will be resolved in the same issue-scoped slice without changing behavior. PR remains draft/open. |
A ManagementPoint artifact reusing the client ccmsetup artifact id must not select an admission authority by vector order: forward and reversed analyses must both equal the client-only success baseline. Refs #320
Filter the health admission artifact map to SccmRole::Client so an out-of-scope artifact reusing a client artifact id can no longer shadow client evidence or be selected as an authority by vector order. Refs #320
The #321 restructure moved SccmNormalizedBundle out of sccm/client/mod.rs into sccm/ingest.rs, re-exported through sccm/mod.rs. The rebase applied cleanly but health.rs still imported it from its parent module, so the crate failed to build with an unresolved import plus six cascading String comparison errors in analyze_client_health. Point the import at crate::sccm, matching the sibling policy reducer. The public path is unchanged, so this resolves to the same type and no health analysis behavior changes. Refs #320
080a376 to
4b56322
Compare
There was a problem hiding this comment.
Pull request overview
Adds a new SCCM client health reducer to cmtraceopen-parser, alongside a large frozen-contract test suite and fixture expectation updates, to analyze evidence across setup → service → identity → site assignment → management point → transport.
Changes:
- Introduces
analyze_client_healthand associated public analysis/output types undercrates/cmtraceopen-parser/src/sccm/client/health.rs. - Adds an extensive fixture-driven regression test suite (
sccm_client_health.rs) covering determinism, fail-closed behavior, adversarial inputs, and evidence-citation rules. - Updates fixture expectations for coverage gaps and classification in select scenarios.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| crates/cmtraceopen-parser/tests/sccm_client_health.rs | Adds frozen-contract + adversarial tests for the new SCCM client-health reducer and its public JSON shape. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/client/health/no-site-or-mp/expected.json | Updates expected coverage-gap artifact IDs for the site-assignment insufficient-evidence finding. |
| crates/cmtraceopen-parser/tests/fixtures/sccm/client/health/malformed/expected.json | Updates expected class for the malformed service finding to insufficientEvidence. |
| crates/cmtraceopen-parser/src/sccm/client/mod.rs | Registers and re-exports the new health module. |
| crates/cmtraceopen-parser/src/sccm/client/health.rs | Implements analyze_client_health, evidence admission, phase chaining, contradiction handling, and redaction-safe output shaping. |
compare_fact_order compared only line_start inside one artifact, so two distinct records claiming the same span were treated as simultaneous. latest_comparable_fact then picked one arbitrarily and the reducer admitted a full transport success off unorderable evidence. Order source-local records by disjoint line spans, reserve Equal for the same record, and leave shared or overlapping spans incomparable so every ordered claim fails closed. Refs #320
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Suppressed comments (2)
crates/cmtraceopen-parser/src/sccm/client/health.rs:701
resolve_setupreturnssuccesses[0]as the authoritative setup success when multiple success records exist for the same (bootstrapId, clientGuid). Becausefactsare sorted source-locally, this can select an earlier success that predates a later terminal failure/recovery sequence, which can incorrectly allow downstream phases to be admitted based on an outdated setup outcome. Prefer selecting the latest comparable success fact for the unique key.
if unique_successes.len() == 1 {
return SetupResolution::Succeeded {
fact: successes[0].0,
client_guid: successes[0].2,
};
crates/cmtraceopen-parser/src/sccm/client/health.rs:420
- When
SiteAssignedevidence is missing, the finding always reports aclient-locationcoverage gap withPartialcoverage. If location artifacts are actually absent (or only present with non-Capturedcoverage likeAccessDenied), this misstates the coverage state and can hide the real capture gap. Derive the coverage gap from the actual location artifacts, usingPartialonly when at least one captured location artifact exists.
vec![SccmFindingCoverageGap {
artifact_id: CLIENT_LOCATION_GROUP.to_owned(),
role: SccmRole::Client,
coverage: SccmCoverageState::Partial,
}],
) The CI workflow triggers only on `main`, but the entire SCCM program stacks on `codex/parser-family-skeleton`. Seven open pull requests (#391, #392, #394, #404, #405, #407, #420) therefore run none of the six jobs -- no cargo check/test, no clippy, no MSRV check, no tsc, no Playwright E2E, and no platform builds -- while still reporting as mergeable. GitHub gives no signal for this: a pull request whose base branch is absent from the trigger list is not "pending" or "skipped", it simply has no checks, which is easy to misread as a passing PR with light gating. Add the integration branch to both triggers so lane PRs are gated before they land on it, and so the branch itself is checked after each merge. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
|
🔴 Independent exact-head NO-GO for #320 / PR #392 Reviewed PR head Blockers:
Fixture corpus audited: success, setup-failure, identity-failure, no-site-or-mp, transport-failure, rotation-boundary, incomplete, malformed, contradictory. Fresh gates: health 21/21, #319 fixture 3/3, spine 136/136, full parser 784, strict Clippy, Rust 1.88 wasm32, scoped format/JSON/diff all green. Local CodeRabbit found 0, but hosted CodeRabbit was skipped because the PR is draft and no hosted CI reviewed this head. Required repair order: establish a reviewed normalized #319 input contract; port #320 alone onto it; bind fixtures through public intake; add RED tests for the three reproduced failures and missing phases; then fresh independent/CodeRabbit/Copilot/CI review. Do not merge PR #392. |
1bdcd9c to
486e982
Compare
|
Superseded on main. The current health analyzer consumes sealed admitted evidence, carries 11 scenarios (versus 9 here), and includes equal-time/lifecycle regression oracles; latest lane correction 320267e. This stacked head was promoted and hardened through PR #490, so it is not an independent merge candidate. |
Summary
Production implementation for #320, stacked temporarily on #391 only to reuse the pure normalized SCCM bundle input while keeping this issue diff isolated.
Current TDD state
RED commit
397dca6:cargo test --locked -p cmtraceopen-parser --test sccm_client_healthfails becauseanalyze_client_healthdoes not yet exist. Implementation and full gates follow in later issue-scoped commits.Closes no issue until production behavior, exact-head review, CodeRabbit, and required validation gates are complete.
Summary by CodeRabbit
New Features
Bug Fixes