Skip to content

pr-queue: follow-ups from #431 lenses (no lazy fetch, test gaps, base_config decode) #435

Closed

Description

@scuttletoby

Follow-ups from the two lenses on #431 (merged): state #431 (comment), gate-trust #431 (comment). Trust unaffected (blob checked by hash, token read-only).

  1. minor fork-ci/actions/pr-queue/pr_queue.py:359 (and :325): in the caller's partial clone (blob:none from sparse checkout), git cat-file blob lazily fetches a blob the sparse pattern did not match (config names with [ ] * ?, leading !/#, trailing space, backslash), using the token actions/checkout stored, with no timeout. Before pr-queue: read the config with git; head check refuses case-only twins (#424) #431 that case was refused. Fix: GIT_NO_LAZY_FETCH=1 on the read and a timeout; test it.
  2. minor test gaps: the exact-name check (pr_queue.py:352, without it :(top)x.json reads x.json), GIT_SAFE on the config read (:325; a leftover refs/replace changes the read without it), and no token in the read's env (:326) have no test (mutations survived).
  3. minor (older, on main) head_check.py:426 base_config crashes with UnicodeDecodeError (exit 1) on a non-UTF-8 base config instead of the "not UTF-8" refusal (exit 2). Fails closed.
  4. nit case-twin rule (head_check.py:490): only folders above the last level are checked (a symlink/submodule .GitHub next to .github/ passes); casefold misses NFC/NFD twins and HFS+-ignored characters. Low impact now the queue reads git, not the disk.
  5. nit head_check.py:486: an ignored ls-tree failure in case_matches fails no test.
  6. nit (older) the queue's git calls inherit GIT_DIR, GIT_OBJECT_DIRECTORY, GIT_CONFIG_PARAMETERS from the job env (owner-controlled only). Scrub them in GIT_ENV.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions