Skip to content

Session Handoff [auto-1580]: Pin and Decode Git's Quoting in repo_gate.py's ls-files Read (#1580) #1871

Closed

Description

@ptr727

Next steps, in priority order

  1. Fix repo_gate.py Reads ls-files Without Pinning or Decoding Git's Quoting, So a Non-ASCII Name Crashes It or Leaves Coverage #1580 in .github/actions/repo-gate/repo_gate.py. Re-read the issue first. tracked() reads git ls-files without pinning core.quotePath, so core.quotePath=false makes a non-UTF-8 name crash the strict decode, and the default quoting yields an escaped spelling that check_eol then skips. sh() has the same shape. Apply the fix the issue names, the shape Name the Encoding on Every Text-Mode Subprocess Call #1574 settled in prose_lint.py: pin core.quotePath=true on each invocation so the escaped form is the only form, and decode the escape back into the real name, using prose_lint.py's diff_header_path and its docstring as the working reference rather than inventing a new decoder. Done looks like both symptoms gone for a constructed repository holding one tracked file whose name contains a byte that is not valid UTF-8, a test per symptom in the repo gate's suite that fails when the fix is reverted, the fleet gate set passing locally, and a recorded local-strict-review pass.
  2. Drive the pull request to develop with drive-pr, its body carrying Closes on promotion: #1580, then close this lane out.

External blockers

None known. If sharing a decoder between the two gate scripts turns out to need a layout choice the rules do not settle, keep a local copy in repo_gate.py or park, rather than choosing a new shared module.

Internal dependencies

State

  • No branch, worktree, or pull request exists for this lane yet. Create the worktree per repo-worktree, on feature/auto-1580 from develop.
  • No open pull request touches repo_gate.py at the time this handoff was written. Re-derive that before editing.

The parked decision queue

Zero parked decisions on this lane.

What the last round did

Nothing. This handoff was created by the unattended picker from the open backlog.

What not to repeat

Nothing yet.

New learnings

None yet.

Activity

  1. added
    handoff
    on Sep 26, 2026
  2. ptr727 commented on Sep 26, 2026

    @ptr727
    OwnerAuthor

    Lane closed out. PR #1873 was squash-merged into develop as 6e37b7a. It fixes #1580 and #1872, and its body carries Closes on promotion lines for both.

    In repo_gate.py:

    • tracked() now pins core.quotePath=true and decodes quoted names through the new unquote_path.
    • Output is escaped: main reconfigures its streams to backslashreplace, and a new printable() escapes control characters and lone surrogates in every finding, note, and failure line.
    • git's output is decoded with surrogateescape.

    Each symptom has a test that fails when its fix is reverted.

    Filed along the way: #1872, raised by review and fixed in this PR. #1874, which predates this work: a tracked name starting with :: can forge a GitHub Actions workflow command. It needs a design choice. No lesson issue was filed.

    The worktree, the local branch, and the remote branch have all been removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    handoff

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions