Skip to content

pr-queue config: .gitattributes encoding bypass, symlink-config docs, case-only duplicate (#419 minors) #424

Closed

Description

@scuttletoby

Minors from the #419 lens (pr-queue head check: config mode/type guard): #419 (comment) (verdict SAFE). None blocked the merge.

  1. .gitattributes can change what the queue reads without changing the config (already on main; same kind as #403 minors: config file mode not checked (symlink/submodule stalls queue), race wording, cap tests #413 item 1). A PR adds working-tree-encoding=UTF-16 for the config path: the tree entry is unchanged, so the head check skips it and passes; the queue's sparse checkout writes UTF-16 and config.load raises UnicodeDecodeError, which except OSError (config.py:148) does not catch, so the queue stops. The gate itself still works, and the change still needs a lens. Fix: read the config with git show <base>:<path> instead of from a checkout (preferred: no checkout filters at all), or refuse a merge that changes a .gitattributes applying to the config path; also catch decode errors as a clear refusal.
  2. Docs: RELEASE-NOTES.md:50 and head-check: config file mode + #403 follow-ups (#413) #419's body say a symlink base config is "no lock". True only if the link text parses as a config. A real symlink (path as text) or a submodule entry makes the head check refuse every PR, the fix too ("not JSON"), so the owner must push the fix by hand. Say so.
  3. Nit: a second config file whose name differs only in case passes the check. Fine on Linux; on a case-insensitive self-hosted runner the checkout picks one unpredictably. Refuse case-only duplicates of the config path.

State question for any fix: what happens when this runs again, stops half-way, or meets existing, old or empty state?

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions