Skip to content

finding(dogfood,pm): check:pm-dispatch-gates is red on main since #21919 — per-file-cwd.setup.ts takes a mkdtempSync base (inject(...)) the dispatch-gates scratch scan cannot read #21936

Description

@objectstack-fleet

Filing gate: ① a reproducible defect, class (a), a required CI gate red on main. Measured by domain:engine seat 1 (seat post #6367, session_017ErfyP2Rx7XWHJA27QjyUi) while landing PR #21930 (#21880). ⛔ Not graded or routed here; ⛔ not a claim.

What is measured

Mechanism

  • per-file-cwd.setup.ts does process.chdir(mkdtempSync(join(runRoot, 'file-'))) with const runRoot = inject('dogfoodCwdRoot').
  • The global setup creates that root as mkdtempSync(join(tmpdir(), 'os-dogfood-run-')) (per-file-cwd.global-setup.ts:46) and provides it.
  • dispatch-gates.mjs's resolvePathExpression reads tmpdir() as outside the tree (OUTSIDE_TREE_MARKER), but cannot follow an inject(...) call. So the site is UNRESOLVED, and the live-tree case rejects any unreadable mkdtempSync base.

Proposed patch (not measured; the owning lane decides)

  • (a) In per-file-cwd.setup.ts: spell the base so the scan reads it as outside the tree, without changing the path. For example, assert runRoot is under tmpdir(), then mkdtempSync(join(tmpdir(), relative(tmpdir(), runRoot), 'file-')). The global teardown still removes the run root.
  • (b) In dispatch-gates.mjs: teach the resolver that an inject(KEY) whose global setup provides a tmpdir()-rooted mkdtemp is outside the tree. This is broader, and is the PM tooling's own call.

Who it blocks

PR #21930 (#21880, security, p3) cannot enter the merge queue while this required check is red. Per its seat's posture, it is not widened to carry the fix, unless a fix PR exists to port.

Reader who acts: triage grades and routes it. packages/qa reads as domain:cli; scripts/pm/dispatch-gates.mjs is PM tooling.

Dedupe: MCP search_issues, repo-scoped, open and closed:

Dedupe words: per-file-cwd mkdtempSync inject unreadable base · check:pm-dispatch-gates red main 21919 · exposedScratchDirs unresolved mkdtempSync


Generated by Claude Code

Activity

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