Skip to content

pm(queue-guard): enumerateRows reads diff-tree without -z, so a governed path with a non-ASCII or control character is quoted and matches no governed prefix #33620

Open

Description

@objectstack-fleet

domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb

Filing gate: ① (a follow-up owed by work in flight: at-tier delta review 6888217778 on PR #33531, card #33501, found this outside its diff, from reading the code, not from a run).

scripts/pm/check-governed-queue-guard.mjs enumerateRows lists a merge group's paths with git diff-tree -r --no-commit-id --no-renames --name-only (both the range read and the per-commit read) without -z, and nothing sets core.quotePath=false. Git then prints a path holding a non-ASCII or control character as a C-quoted string ("skills/x/\346\226\207.md"), which matches no governed prefix. Inside the low-risk arm this fails closed to Tier H; outside it, the queue leg does not see that governed file at all.

What lands

  1. Every path read in enumerateRows (and any sibling read in check-governed-merges.mjs that lists paths for a governed match) uses -z and splits on NUL, as the arm's own catalogFilesOf and the carried-head read (git diff -z --name-only --no-renames) already do.
  2. A self-test row with a non-ASCII path and a path with a newline under a governed prefix, read through the real-git fixture (gitFreeEnv()), proving the path is governed.

Wait for #33531 to merge first (same file). Sized p2.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions