Skip to content

fix(dx-scoreboard): compare warm-check roots in producer encoding - #7480

Merged
EffortlessSteven merged 1 commit into
mainfrom
cursor/dx-scoreboard-producer-path-encoding-13a8
Oct 12, 2026
Merged

EffortlessSteven merged 1 commit into
mainfrom
cursor/dx-scoreboard-producer-path-encoding-13a8

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

Warm-check admission compared roots by decoding %25 on both the expected checkout path and the producer JSON root. A checkout whose name contains literal %25 is written by the producer as %2525, so decode-both compared %25 to % 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 for
trusted same-repo ripr work. Confirm the change belongs here:

  • ordinary feature, analyzer, editor, docs, spec, fixture, badge,
    dependency, or repo-ops development for ripr-swarm
  • repair or follow-up for a same-repo swarm PR
  • swarm-only CI, runner, routing, source-of-truth, or agent-operating
    surface
  • other swarm-scoped work:

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 .../%25a admits against producer .../%2525a while Windows/% cases and different-root rejection stay.

Candidate Relationships

Candidate branch (GitHub PR head is authoritative after publication): cursor/dx-scoreboard-producer-path-encoding-13a8
Stack 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.rs only.

Scope Classification

This PR is scoped by:

  • One production behavior
  • One public contract
  • One architectural seam
  • Docs/spec/test-only evidence package
  • Other:

Production delta:

  • field_matches for root encodes the expected checkout into producer encoding instead of decoding %25 on both sides.

Evidence/support delta:

  • Keep Windows \ vs / and ordinary % vs %25 admission.
  • Add expected /tmp/corpus%25a vs producer /tmp/corpus%2525a admission.
  • Keep / add genuinely different-root rejection, including a %25-bearing sibling path.

Single acceptance criterion:

  • A complete check document whose producer root is the producer encoding of the expected checkout is admitted, including a literal %25 path, and a different root is still rejected.

Non-goals:

Support-tier Impact

  • none
  • updates docs/status/SUPPORT_TIERS.md
  • changes a README, release, docs, CLI, JSON, editor, CI, or package claim

Claim/proof notes:

  • Scoreboard admission only. Does not claim runtime mutation outcomes or that the current corpus uses %25-bearing checkout names.

Policy Impact

  • none
  • doc artifacts
  • CI lane
  • package boundary
  • lint / Clippy
  • no-panic
  • file policy
  • generated artifact
  • dependency
  • process/network

Ledger or exception notes:

  • none

Proof

cargo xtask worktree doctor
cargo xtask check-fast                    # on exact origin/main base; 0 files changed
cargo check -p xtask --all-targets        # on exact origin/main base
cargo test -p xtask --bin xtask reports::dx_scoreboard::measure::check_admission::tests::wrong_subject_is_rejected -- --exact
# red on decode-both; green after encode-expected
cargo test -p xtask --bin xtask reports::dx_scoreboard::measure::check_admission::tests
cargo fmt --all -- --check

Result, failures, or skipped proof:

  • Discriminator failed on pre-repair portable_root decode-both (%25a vs %2525a).
  • After encode-expected, 11/11 check_admission tests passed, including Windows, ordinary %/%25, %25/%2525, and different-root rejection.
  • Hosted required checks are not claimed until they run on the published head.

Claim Boundary

What may be claimed after this PR? What must not be claimed yet?

  • May claim: the local admission predicate compares roots in producer encoding, so a checkout named with literal %25 is not rejected when the producer emits %2525.
  • Must not claim: this copies or is equivalent to 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?

  • Revert the single-file commit. Admission falls back to decode-both, which is correct for ordinary % and Windows separators and wrong only for literal %25 checkout names.

Spec-Test-Code Traceability

Static Language Check

  • Static output avoids killed, survived, untested, proven, and adequate.
  • Unknowns include stop reasons where applicable.

CI Economics

  • LEM impact: n/a (no workflow/lane change)
  • Workflows touched: none
  • Branch protection impact: none
  • Failure mode caught: n/a
  • Cheaper signal considered: n/a
  • Required lanes affected: ordinary PR routing only
  • Advisory lanes affected: none
  • On-demand/release lanes affected: none
  • Labels that alter behavior: none
  • Artifact families affected: none
  • Rollback path: revert the single file; no workflow rollback

Engineering Check

  • No new panic, unwrap, expect, todo, or unimplemented in production code.
  • No new panic, unwrap, expect, todo, or unimplemented in tests.
  • New non-Rust programming files are allowlisted with owner, surface, and reason.
  • New generated, dependency, process-spawn, or network surfaces are allowlisted with owner and reason.
  • Errors are reported with actionable context.
  • Public JSON/schema changes are documented.

Gates

Local focused proof ran as listed above. Hosted PR CI owns the required merge-gate matrix. precommit / check-fast on the committed candidate are recorded in follow-up if they complete before Ready.

Exact candidate SHA at publication: de0c75cf4d29f2c092c92d7c0422d16c34245589

Open in Web Open in Cursor 

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>
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 6aea52fe-b01a-47a4-bb44-2d1b1f32fc99


📥 Commits

Reviewing files that changed from the base of the PR and between e75f17b and de0c75c.



📒 Files selected for processing (1)
  • xtask/src/reports/dx_scoreboard/measure/check_admission.rs


🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:



Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.




Summary by CodeRabbit

  • Bug Fixes
    • Corrected root matching for checkout paths containing percent signs, while continuing to reject paths that point to a different root.

Walkthrough

Root matching now normalizes path separators and encodes percent signs in the expected checkout path before comparison. Tests cover a literal %25 checkout path and rejection of a different root.

Changes

Root matching

Layer / File(s) Summary
Root comparison and test coverage
xtask/src/reports/dx_scoreboard/measure/check_admission.rs
The comparison encodes percent signs in the expected root and normalizes separators on both roots. Tests verify that %25 matches producer-encoded %2525 and that a different root is rejected.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to de0c7

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 Summary

Architecture risk: 🟡 Medium · up to de0c7

The change affects 1 system.

Changed systems: xtask

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — xtask (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in xtask/src/reports/dx_scoreboard/measure/check_admission.rs: The root-identity documentation now specifies producer-style encoding: normalize separators and encode % as %25 on the expected root, then normalize separators on the producer root. It clarifies that decoding %25 would miscompare checkouts containing literal %25.
  • observed — Modified behavior in xtask/src/reports/dx_scoreboard/measure/check_admission.rs: field_matches now compares roots by encoding the expected root’s percent signs as %25 and normalizing separators on both values. This replaces portable_root, which decoded %25 on both sides; non-root fields still require exact equality.
  • observed — Modified behavior in xtask/src/reports/dx_scoreboard/measure/check_admission.rs: The subject-matching test adds coverage that a checkout root containing literal %25 matches producer-encoded %2525, while a different %25-bearing root is rejected.

Reliability and maintainability

  • inferred — Risk-relevant change factors for xtask: blast_radius_2; direct_dependents_2


Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Issue #7274 requires producer-encoded root comparison, admission for expected /tmp/corpus%25a versus producer /tmp/corpus%2525a, retention of Windows separator and ordinary %/%25 cases, and re…
Out of Scope Changes check Passed The available change summary identifies one changed production file: xtask/src/reports/dx_scoreboard/measure/check_admission.rs. The implementation and added tests directly support issue #7274 root …
Title check Passed The title clearly and concisely describes the main change: comparing warm-check roots using producer encoding.
Description check Passed The description is complete and directly aligned with the change. It documents scope, acceptance criteria, tests, proof results, claim boundaries, rollback, and policy impact. Hosted CI results are ex…

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR



🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR



  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checked the roots at night
And matched the paths by encoded sign
It hopped past slashes, neat and true
Then tested roots that did not match
And tucked the proof beside its stew

Comment @coderabbitai help to get the list of available commands.

gemini-code-assist[bot]

This comment was marked as resolved.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 12, 2026 07:20

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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%25a vs producer /tmp/corpus%2525a rejected under decode-both, admitted after encode-expected. Different root /tmp/corpus%25b still rejects. Windows \\ vs / and % vs %25 still admit.
  • Stimulus/oracle: tests call admit_check_document on a nonempty complete document. Removal experiment: restoring portable_root decode-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.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@EffortlessSteven
EffortlessSteven merged commit 026595a into main Oct 12, 2026
40 of 41 checks passed
@EffortlessSteven
EffortlessSteven deleted the cursor/dx-scoreboard-producer-path-encoding-13a8 branch October 12, 2026 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dx-scoreboard: compare warm-check roots with producer path encoding

2 participants