Skip to content

fix(windows): docs gate keeps role bytes under autocrlf; Windows-safe root fixtures (#16105) - #16110

Merged
EffortlessSteven merged 5 commits into
mainfrom
claude/project-thread-607pf6
Nov 22, 2026
Merged

EffortlessSteven merged 5 commits into
mainfrom
claude/project-thread-607pf6

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Requested by Steven · project thread

Summary

Repairs the eleven #16105 failures from the 22 Nov Windows Advisory nightly (run 44988831219): ten repeated_failure and one unstable. The other four repeated failures in that run belong to #16074 and are not touched here.

Failure Cause Class Fix
docs_gate::scoped_docs_gate_checks_unchanged_document_roles_in_the_subject_tree git archive applies core.autocrlf=true (Git for Windows and hosted runner default), so every archived role file gets CRLF and mismatches its blob; the revision gate widened on every Windows checkout product bug (repo-policy tool) archive child runs with -c core.autocrlf=false -c core.eol=lf; an in-tree eol attribute still widens
8 × mcp::repair::tests::* (positive control: the on-disk receipt spells the root) test searched serialized JSON for the raw root; a Windows root serializes with doubled backslashes. The positive control failed, and both leak checks were vacuous on Windows test assumes Unix compare JSON-escaped spellings; the naive rewrite also strips a backslash-joined root on Windows
task_first_facade::continue_on_a_terminal_attempt_is_already_complete the printed root is shell_arg-quoted ("D:\..." console form on Windows); the test matched unquoted bytes test assumes Unix decode the printed command with the existing printed_words host decoder and compare the --root argument
python_test_style_matrix::every_supported_python_test_style_reads_its_weak_test_as_weakly_exposed (unstable) clock-named temp root (pid-nanos) and fatal cleanup; remove … Access is denied in one sample test harness sequence-named roots; bounded cleanup retry that reports a leftover instead of failing the reading

Source-of-truth Links

Governing issue or accepted claim: #16105
Acceptance delta (one sentence): The eleven #16105 Windows Advisory failures pass natively without weakening their claims, and the docs gate's revision mode no longer widens on autocrlf checkouts.

Candidate Relationships

Candidate branch: claude/project-thread-607pf6
Stack parent or prerequisite PR (if any): none
Proposed replacement of PR (if any; not yet accepted): none
Related: #16074 (the other four failures in the same run), #15601.

Scope Classification

  • Docs/spec/test-only evidence package, plus one repo-policy tool fix

Production delta: none in the ripr package. tools/repo-policy docs gate archive invocation.

Single acceptance criterion: the eleven #16105 tests pass natively on Windows without weakening their claims.

Non-goals: the four #16074 failures; other clock-named temp roots not observed failing.

Proof

# docs gate: reproduce on Linux, fix, discriminate
GIT_CONFIG_GLOBAL=<file with core.autocrlf=true> cargo test -p repo-policy --test docs_gate   # FAILED on main with the same widen reason; 26/26 pass with the fix
cargo test -p repo-policy --test docs_gate autocrlf   # new test: passes with fix, FAILS with the fix reverted
cargo test -p ripr --test task_first_facade continue_on_a_terminal_attempt   # pass (Linux)
cargo check -p ripr --lib --tests   # pass
cargo fmt --check                    # pass

New test revision_docs_gate_reads_committed_role_bytes_under_autocrlf sets core.autocrlf=true in the fixture repo, so it is host-independent. It asserts the gate checks roles (and finds the seeded violation) under autocrlf, and its negative control asserts an in-tree *.md text eol=crlf still widens.

Not established locally: the ripr lib unit tests (MCP repair, Python matrix) cannot be built in this 16 GB container. They first run on hosted CI. The Windows claims are proved only by a Windows Advisory dispatch on this branch; result to be recorded here.

Claim Boundary

May claim: the docs gate's revision mode no longer widens on autocrlf Windows checkouts; the listed tests no longer encode Unix root spelling. Must not claim: a Windows pass until the dispatched advisory run reads green for these tests.

Rollback

Revert the squash commit; no schema, output or workflow change.

Static Language Check

  • No static output wording changed.

CI Economics

n/a


Generated by Claude Code

… and temp fixtures (#16105)

- repo-policy docs gate: pin core.autocrlf=false and core.eol=lf on the
  revision archive so role inputs keep their blob bytes on Windows; an
  in-tree eol attribute still widens. Reproduced on Linux with autocrlf.
- mcp repair receipt tests: compare JSON-escaped root spellings (the
  positive control failed and both leak checks were vacuous on Windows)
  and strip a backslash-joined root in the naive rewrite.
- task-first facade: decode the printed Next/Full status commands with
  the host's shell rules instead of matching the unquoted root bytes.
- Python style matrix: sequence-named temp roots and a bounded,
  non-failing cleanup retry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmmg7vikhoqvShdExLy
@EffortlessSteven EffortlessSteven self-assigned this Nov 22, 2026
@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 145 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: cdce35df-4173-4920-97d1-a3e0cd047f2e
Commits

Reviewing files that changed from the base of the PR and between 21c3140 and 78c3fc2.

Files selected for processing: 6

  • changelog.d/windows-nightly-16105.md
  • crates/ripr/src/app/tests/python_test_style_matrix.rs
  • crates/ripr/src/mcp/repair.rs
  • crates/ripr/tests/task_first_facade.rs
  • tools/repo-policy/src/docs_gate.rs
  • tools/repo-policy/tests/docs_gate.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

gemini-code-assist[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Member Author

windows-advisory-subset failed on this head (run 45008104483) at Verify the native fixture producer denominator: mocha reported 39 tests / 31 passes / 8 pending, and the step pins 38/31/7 (.github/workflows/windows-advisory.yml:1844). The eighth pending test is Developer setup capability boundary a process reaped between the stat open and read is not alive, which main added in f1bda84 (#15915) without updating the pin. The 22 Nov nightly at cc54ff1 predates that commit and passed. This PR touches no VS Code or workflow file, so the failure is not this PR's. It is base-side and will turn tonight's nightly subset red too. It needs a one-line pin update in the workflow, which I'm handing to a separate lane. The full-suite windows-advisory job that proves the #16105 tests is still running.


Generated by Claude Code

The already-complete summary prints the bound root, which renders with
`/` separators on Windows (#4287), so D:\a\b prints as D:/a/b. The
hosted Windows run on cffe6dc showed the decoded argument differing
only by separator. Compare it as a Path, which is separator-insensitive
on Windows and byte-exact on Unix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmmg7vikhoqvShdExLy
…ds (#16105)

The hosted Windows run on cffe6dc passed the positive control but the
naive-rewrite parity failed on one field: repair_attempt.manifest is
recorded as D:/a/.../attempt.json (bound-root display, #4287), which
production projects and the naive rewrite did not. On Windows the
naive rewrite now also matches the forward-slash twin of each root
spelling, and the projection must not leak that twin either.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmmg7vikhoqvShdExLy

Copy link
Copy Markdown
Member Author

Windows Advisory on cffe6dc (run 45008104483) narrowed #16105 to two remaining fixture issues, both fixed on the current head cf829d7:

  • docs_gate scoped test and the new autocrlf test: ok natively. python_test_style_matrix weak/strong matrix: ok.
  • task_first_facade::continue_on_a_terminal_attempt_is_already_complete: the summary prints the bound root as D:/a/... (forward slashes by design, fix(0.11): bind generated commands to the selected repository root (#3999, #4001, #4000 partial) #4287), not quoted. a9cb127 compares the decoded argument as a Path.
  • 8 × mcp::repair::tests: the positive control now passes; the naive-rewrite parity differed only in repair_attempt.manifest, which records D:/a/.../attempt.json. cf829d7 adds the forward-slash root twin to the naive rewrite on Windows and asserts that twin is not leaked.

A new Windows Advisory dispatch runs on cf829d7.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Native Windows handoff at cf829d77a7736237fe9ac0c846a03913a9d98fbe (integration artifacts, not qualification). I downloaded the three integration artifacts from 45028120521, checked each SHA-256 against Actions metadata, and read the two process status files per shard:

  • D–O and remaining targets both have 0/0. The committed-role core.autocrlf control and terminal-attempt facade control respectively report ok in both samples.
  • A–C shows GitHub job success, but the two retained test-process statuses are 101/101. Both fail only the cli_smoke invalid-config and missing-root JSON refusal controls, separately proved on #16074. The subset separately hit the old denominator corrected by ci(windows-advisory): pin the eighth POSIX-only fixture producer control #16120. This branch’s advisory badges do not prove that the current composition passed.

Please retain the unit verdict separately for the eight MCP receipt controls. When qualifying the reviewed composition, use one run containing these fixes plus the already-landed #16074 and #16120 rather than repeating this pre-fix tree. No rerun or branch change from this review.

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

Independent source review of cf829d77 against the PR base and sampled current main 8b1865f5. The six-file delta keeps the docs revision pin, changed-path and checkout binding, archive safety checks, and ls-tree/raw-blob verification. Only the archive child disables checkout-level CRLF defaults; an explicit committed CRLF attribute still widens the check. The receipt controls verify the root exists on disk, then require the exposed projection to exclude native, canonical and slash-normalized forms and equal the separately scrubbed projection. The terminal control checks the decoded --root value; the Python fixture retains its outcome assertions and bounds cleanup retries.

The exact native d–o and rest samples passed both docs controls and terminal-attempt twice. Native full sample 1 passed all eight receipt controls and the previously unstable Python case. The earlier lines are Rust-only preflight, not a second full sample. Full sample 2/final artifact remains pending. The a–c captured job hides two actual failures on this older base; the subset also remains red. Recheck the targeted final artifact and current composition with #16074, #16120, #16137 and #16112 before any whole-lane claim. No additional dispatch requested.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review November 22, 2026 17:17
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

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

SOURCE_REVIEW_READY

Source review of cf829d7 from another session. I read the full diff against its base 21c3140 (6 files, +147/-16) and the owning code around each hunk.

  • tools/repo-policy/src/docs_gate.rs: -c core.autocrlf=false -c core.eol=lf is placed before the archive subcommand. offline_git() adds only environment, so these are valid global options and apply to that child only. In-tree eol/text attributes still convert, and verify_archived_roles then widens. The new revision_docs_gate_reads_committed_role_bytes_under_autocrlf covers both sides: under a repository-local core.autocrlf=true the gate stays eligible and reports the seeded ## Decision violation, and after *.md text eol=crlf it widens with "archived role inputs differ". Because the setting is repository-local, the test does not depend on the host.
  • mcp/repair.rs tests: the leak and positive-control checks now search for the JSON-escaped spelling built through Value::String(..).to_string(). On Unix that is identical to the raw text, so Linux grip is unchanged, and on Windows the checks are no longer vacuous. The forward-slash leak assertion and the extra {root}\ rewrite apply only on Windows, so they are no-ops elsewhere.
  • tests/task_first_facade.rs: the printed command is decoded with the existing printed_words helper (module declared at line 15). The --root value is compared with Path equality, which treats / and \ as the same separator on Windows. The test now also requires --root <value> to be the last argument, a stricter check, and the error text says so.
  • python_test_style_matrix.rs: temp roots are named by pid and an atomic sequence instead of a clock value, so parallel cases in one process cannot collide. Cleanup retries 5 times at 100 ms and then reports the leftover on stderr instead of failing the reading. That is a deliberate narrowing: temp removal is not what the matrix claims to test.
  • Changelog fragment matches the change.

Residual, not blocking: a tree left behind after the five retries keeps its pid-and-sequence name. A later run that reuses the same pid could write into that leftover directory. This needs pid reuse plus a failed cleanup, and the fixture writes the same file set.

Not established by this review: I executed nothing. Hosted Windows run 45028120521 sample 2 was reported as still running when this review was requested.


Generated by Claude Code

@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 2 potential issues.

Devin Review

Comment thread changelog.d/windows-nightly-16105.md Resolved
Comment thread crates/ripr/tests/task_first_facade.rs Resolved
…ngelog claim (#16105)

Devin review: the last-token check accepted `--root R --extra R`. Match
the final two decoded words instead, as the original byte check did.
The changelog no longer says every Windows checkout widened: a
repository that pins eol=lf (this one does) kept its role bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmmg7vikhoqvShdExLy

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

SOURCE_REVIEW_READY

Source review of a7a3167 from another session. It carries forward my review of cf829d7 (pullrequestreview-6013466032). I read the delta cf829d7..a7a3167 (one commit, 2 files) in full.

  • tests/task_first_facade.rs: the assertion now uses slice matching ([.., flag, value]), so the final decoded pair must be --root followed by a value that is Path-equal to the selected root. The earlier version found the first --root and compared its value with the last word. It would therefore accept a command whose last word happened to equal the root while --root appeared earlier. The new form is exact and matches the original byte check (--root <root> before the closing backtick). On Unix, Path equality of the two strings reduces to byte equality, so Linux grip is unchanged.
  • Changelog: the narrowed claim is accurate. This repository's .gitattributes pins * text=auto eol=lf, so the widening affected repositories without such an attribute. "separator-agnostic" describes the Path comparison correctly.

My earlier residual note (a leftover fixture tree reused under a recycled pid) is unchanged and not blocking.

Not established by this review: I executed nothing, and I did not inspect any hosted or native Windows result on this head.


Generated by Claude Code

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Native Windows check of the docs-gate premise, from the Reviewer (read-only, no build).

I reproduced the archive conversion on this box (Windows 11, git version 2.54.0.windows.1) in a throwaway repo with one LF file and no .gitattributes:

git archive invocation archived role.md
-c core.autocrlf=true 20 bytes, 2 CR, 2 LF
-c core.autocrlf=false 18 bytes, 0 CR, 2 LF
-c core.eol=lf alone 20 bytes, 2 CR, 2 LF
-c core.autocrlf=false -c core.eol=lf 18 bytes, 0 CR, 2 LF
no -c (this box's default) 20 bytes, 2 CR, 2 LF

So the two flags materialize_tree now passes do keep the committed bytes, and core.eol=lf alone would not have been enough. With an in-tree *.md text eol=crlf attribute committed, the same fixed invocation still produced 20 bytes / 2 CR, so the negative control's premise holds: the gate must widen there rather than check converted bytes.

This confirms the mechanism on the target platform, not the eleven #16105 tests; those still need the Windows Advisory dispatch the PR body names. No disposition change: the source marker at a7a3167 stands.

The Windows full run on cf829d7 showed check-local-context refusing a
`D:/a/...` example in a repair.rs comment (xtask
count_policy_gates_have_no_stale_bounds and the policy facade test).
Describe the spelling in words instead. Comment-only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmmg7vikhoqvShdExLy

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

SOURCE_REVIEW_READY

Source review of 78c3fc2 from another session. It carries forward my reviews of cf829d7 and a7a3167.

I read the delta a7a3167..78c3fc2 (one commit, 2 files) in full. Every changed line is a // comment: two comments in mcp/repair.rs tests and one in tests/task_first_facade.rs. They now describe the drive-root spelling in words instead of a literal drive path, and their meaning is unchanged. No code, test stimulus or assertion changed.

Not established by this review: I executed nothing.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Completed native artifact readback, exact cf829d77a7736237fe9ac0c846a03913a9d98fbe. Verified the SHA-256 of the unit/verdict ZIP against Actions metadata. Both raw samples explicitly report ok for all eight MCP repair receipt cases named in #16105 and the previously unstable Python weak-style case. Together with the integration artifacts, the #16105 original failures were not reproduced on that candidate. The complete samples each reached 471 targets and all 15 current release-seam controls report pass in both.

Not qualification: the exact composition still reports 101/101 and six repeated failures. Four are the separately addressed #16074 cases (including the platform-excluded filename case); two are policy tests reporting the local-path source policy in fixtures/comments. The independently retained file-policy facade exited 101 and no-default-features test exited 124; those are distinct from the passing cases above. The current head 78c3fc27 has the subsequent facade assertion/changelog changes and local-path comment cleanup; no native evidence is being carried forward as an exact-head pass. For the owner’s next reviewed native run, use a composition with #16074 and #16120 present, re-check the exact facade and eight receipt cases, and record the file-policy and no-default-features results separately. No rerun, approval, or branch change from this readback.

@EffortlessSteven
EffortlessSteven added this pull request to the merge queue Nov 22, 2026
Merged via the queue into main with commit 12329e3 Nov 22, 2026
19 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/project-thread-607pf6 branch November 22, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants