Repository navigation
fix(dx-scoreboard): compare warm-check roots in producer encoding - #7480
Conversation
Decode-both `%25` rejected a checkout whose name contains literal `%25` because the producer writes that path as `%2525`. Encode the expected root instead of decoding both sides. Closes #7274. Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
Summary by CodeRabbit
WalkthroughRoot matching now normalizes path separators and encodes percent signs in the expected checkout path before comparison. Tests cover a literal ChangesRoot matching
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The root comparison matches the normal producer’s percent encoding, and the separate scope-limited error output cannot be admitted. No actionable merge risk remains. Architecture SummaryArchitecture risk: 🟡 Medium · up to The change affects 1 system. Changed systems: Architecture concerns Review details
Pre-merge checks |
|
EffortlessSteven
left a comment
There was a problem hiding this comment.
review-pr (author self-review, COMMENT)
GitHub cannot request changes from the author; this is not approval.
reviewed_head_sha: de0c75cf4d29f2c092c92d7c0422d16c34245589
integration_basis: origin/main e75f17b15a9ce011baf467603114928081eb2f8c
claim_boundary: #7274 local check_admission root compare in producer encoding; check_admission.rs only; no analyzer/cache/CI-lane/xtask Cargo.toml; not a reopen of #7259; not #7273
changed_surfaces_and_semantic_owners_inspected: xtask/src/reports/dx_scoreboard/measure/check_admission.rs — field_matches, encode_expected_root, unify_root_separators, module doc, wrong_subject_is_rejected; consumer admit_check_document / admit_check_sample (DX scoreboard warm-check admission)
blocking_findings: none on source/oracle for this claim
non_blocking_suggestions: Gemini single-pass rewrite of encode_expected_root (allocation nit; replied and resolved without head change). CodeRabbit 50% docstring-coverage warning on unify_root_separators (one-line helper; encode_expected_root already documents the codec; not claimed by #7274).
refuted_or_stale_findings: decode-both portable_root is the defect; encoding both sides would still reject %25 vs %2525; slash-only would fail the existing % vs %25 control.
proof_and_ci_observed: local discriminator red on decode-both then green; 11/11 check_admission tests; cargo fmt --check; cargo xtask check-fast (10 ran, 1 skipped check-fixture-contracts, 1 file changed matching git diff); cargo xtask precommit exit 0; CodeRabbit no actionable comments; Gemini COMMENT nit only; hosted required Ripr Rust Small Result not yet terminal on this Ready head
proof_or_review_missing: exact-head hosted required checks (Ripr Rust Small Result and any other required merge-gate contexts) still running/pending; classic branch-protection JSON 403 (evidence gap, not absence); ruleset 18845973 has required_approving_review_count=0 and required_review_thread_resolution=true
affected_currentness_dimensions: production implementation, test stimulus, test oracle, public claim (module doc); generated/conflict/integration unchanged
residual_assumptions_and_non_claims: local compare is not stable_path_text (no invalid-byte codec); current corpus roots are not %25-bearing; #7273 mode-draft and analyzer/cache unchanged
disposition: REVIEW_INCOMPLETE
Lanes
- Authority/provenance: local xtask admission remains the owner; no public ripr API; expected root is the harness checkout, producer root is JSON already encoded.
- Correctness: encode expected only. Observed: expected
/tmp/corpus%25avs producer/tmp/corpus%2525arejected under decode-both, admitted after encode-expected. Different root/tmp/corpus%25bstill rejects. Windows\\vs/and%vs%25still admit. - Stimulus/oracle: tests call
admit_check_documenton a nonempty complete document. Removal experiment: restoringportable_rootdecode-both fails the new control. Encoding both sides would also fail it. - Rendered behavior: no CLI/JSON product output change; scoreboard admission predicate only.
- Contract parity: module doc updated to producer encoding; no schema/support-tier change.
- Platform: separator unify is string replace; no OS-specific branch. Invalid-byte Unix codec intentionally omitted.
- Exact-head CI: Ready-triggered routed rust is in flight. Do not treat skipped-by-policy lanes as pass.
Disposition stays REVIEW_INCOMPLETE until the exact published head has current required-check receipts. Merge convergence waits on that.
There was a problem hiding this comment.
Refuted
- encode_expected_root might be applied to the producer (actual) side, inverting direction and admitting mismatched roots; refuted because: field_matches explicitly encodes expected and only unifies separators on actual; module doc states expected checkout is encoded into producer spelling; %25a admit and %25b reject tests both fail under inversion.
Parked follow-ups
- Seeded gemini-code-assist suggested a single-pass char loop with pre-allocated capacity to avoid replace().replace() allocation; this is a micro-optimization parked for a follow-up, not a boundary or scope defect.
Summary
Warm-check admission compared roots by decoding
%25on both the expected checkout path and the producer JSON root. A checkout whose name contains literal%25is written by the producer as%2525, so decode-both compared%25to%and rejected a valid complete sample.This PR encodes the expected harness root into producer spelling (
\→/, then%→%25) and compares that to the producer root after separator unification only.Closes #7274.
Swarm / Source Boundary
This PR targets
EffortlessMetrics/ripr-swarm, the normal development trunk fortrusted same-repo
riprwork. Confirm the change belongs here:dependency, or repo-ops development for
ripr-swarmsurface
Source-of-truth Links
Proposal: n/a
Spec: n/a (local xtask admission predicate; residual of #7259 / #7271)
ADR: n/a
Plan item: n/a
Governing issue or accepted claim: #7274
Acceptance delta (one sentence): expected
.../%25aadmits against producer.../%2525awhile Windows/%cases and different-root rejection stay.Candidate Relationships
Candidate branch (GitHub PR head is authoritative after publication):
cursor/dx-scoreboard-producer-path-encoding-13a8Stack parent or prerequisite PR (if any): none
Proposed replacement of PR (if any; not yet accepted): none
Acceptance retained from a replaced candidate (if any): n/a
Accepted winner and losing candidate disposition (when decided): n/a
Scope
Local root-identity compare in
xtask/src/reports/dx_scoreboard/measure/check_admission.rsonly.Scope Classification
This PR is scoped by:
Production delta:
field_matchesforrootencodes the expected checkout into producer encoding instead of decoding%25on both sides.Evidence/support delta:
\vs/and ordinary%vs%25admission./tmp/corpus%25avs producer/tmp/corpus%2525aadmission.%25-bearing sibling path.Single acceptance criterion:
rootis the producer encoding of the expected checkout is admitted, including a literal%25path, and a different root is still rejected.Non-goals:
stable_path_textor add a public ripr API.--mode draft) or reopen fix(dx-scoreboard): admit warm-check samples only after complete analysis #7271.xtask/Cargo.tomlchange.Support-tier Impact
docs/status/SUPPORT_TIERS.mdClaim/proof notes:
%25-bearing checkout names.Policy Impact
Ledger or exception notes:
Proof
Result, failures, or skipped proof:
portable_rootdecode-both (%25avs%2525a).check_admissiontests passed, including Windows, ordinary%/%25,%25/%2525, and different-root rejection.Claim Boundary
What may be claimed after this PR? What must not be claimed yet?
%25is not rejected when the producer emits%2525.stable_path_text(no invalid-byte codec); that current scoreboard corpus roots contain%25; that analysis completeness, cache, or--mode draft(dx-scoreboard: bind warm-check mode to the effective measured command #7273) changed.Rollback
How can this PR be reverted safely?
%and Windows separators and wrong only for literal%25checkout names.Spec-Test-Code Traceability
reports::dx_scoreboard::measure::check_admission::tests::wrong_subject_is_rejectedencode_expected_root/field_matchesinxtask/src/reports/dx_scoreboard/measure/check_admission.rsStatic Language Check
killed,survived,untested,proven, andadequate.CI Economics
Engineering Check
panic,unwrap,expect,todo, orunimplementedin production code.panic,unwrap,expect,todo, orunimplementedin tests.Gates
Local focused proof ran as listed above. Hosted PR CI owns the required merge-gate matrix.
precommit/check-faston the committed candidate are recorded in follow-up if they complete before Ready.Exact candidate SHA at publication:
de0c75cf4d29f2c092c92d7c0422d16c34245589