Skip to content

Commit fb6eb80

Browse files
fix(pm): mkdtempSync completeness fails tests and tooling, reports shipped package source (#36368)
<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} --> _Requested by **Steedos** · [project thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbCxiFE11rsKwyNffJZKYqJs)_ Fixes #35611 Clause-②: no Metadata-protocol: none Ruling-ref: 7075362923 ## 维护者速读 - 用户能看到什么变化:用户无感;车队门禁的「临时目录扫描」不再因为发布代码里由用户运行时决定位置的暂存目录而判红,测试和仓库脚本照旧判红。 - 为什么做:执行你选的「扫描只管仓内运行的代码」裁决,解开技能安装「失败可回滚」修复被撤回的卡点。 - 出错会怎样:最坏是发布代码里一个真会落进仓库的暂存目录只被报告、不被拦下;今天这一类为零,撤回本改动即可恢复原判法。 - 要你做什么:本改动碰到门禁本身,需要你批准后才能合入。 ## What changes The `mkdtempSync` completeness rule of the directory-creating sweep in `scripts/pm/dispatch-gates.mjs` now judges an UNRESOLVED site by its **file population**, as ruling record 7075362923 orders. The maintainer's choice, verbatim: 「扫描只管仓内运行的代码」; the option's stated consequence, verbatim: 「完整性规则只管测试与仓库脚本,发布代码同类调用只报告不判红;门禁小幅收窄,技能安装修复原样重新合入。」 - **Test files and repo tooling: still FAIL** on an unresolved `mkdtempSync` base, exactly as before. - **Shipped package source: REPORTED, not failed.** The live case names each such site on its own line and stays green. - **The boundary is one predicate, `isShippedPackageSource(rel, members)`:** a non-test source under the own `src/` of a workspace member whose manifest is not `private: true` (members come from `workspacePackages`' `{dir, manifest}` pairs; a private member, or one whose manifest does not parse, stays on the failing side). "Non-test" reuses the runner-env gate's `isProductSource` (a test by file name or by directory, `.d.ts` excluded). That is the stricter of the tree's test predicates, so a helper under `src/__tests__/` is still held. "Workspace package" means a workspace-enumerator member that holds a published (non-`private`) manifest. The predicate keeps no list of its own. The filter is the file, never "in-tree", because an unresolved site is exactly the one whose location is unknown. It is also not `isTestFilePath` alone, which would drop the 344 tooling sites. - `mkdtempCompleteness(unresolved, { members })` (default: `workspacePackages(ROOT)`) returns `{ failing, reported }`. The live slow case and the new fast pins call the same function. - The in-tree/uncovered rule (`exposedScratchDirs`) is unchanged for every population. No new gate, derivation row, ratchet or constant (`instrument-discipline.md`). - Header: the stale "359 sites, 4 in the tree" is replaced with a dated reading taken through the scan's own exports, plus the boundary in one sentence. - Riders, per the ruling record's seat reading: the #30467 site stays as landed. Spellings 7 and 8 stay as they are for test fixtures, and this diff does not touch either. After this merges, #35079's lane re-lands the #35495 staged swap as written. This PR does not re-land it. Files to read first (risk order): 1. `scripts/pm/dispatch-gates.mjs`, `isShippedPackageSource` / `mkdtempCompleteness` (just above `isTrackedIgnoreSource`). This is the narrowing hunk: the predicate decides which unresolved sites stop failing. 2. `scripts/pm/dispatch-gates.self-test.mjs`, the live case "no mkdtempSync site in a test file or repo tooling takes a base the scan cannot read" (slow section). 3. `scripts/pm/dispatch-gates.self-test.mjs`, the new fast-tier block "Which UNRESOLVED mkdtempSync site fails completeness". Two-minute check: `node scripts/pm/dispatch-gates.mjs --self-test --fast 2>&1 | grep -A11 "REPORTED, not failed"` should print twelve `✓` lines: the shipped arm reported, plus the private-member, non-own-`src/`, test, `__tests__` and tooling arms failing, each next to its control. ## Tests New fast-tier pins (the tier a pull request's lane runs), on the exact spelling that turned main red (`mkdtempSync(join(dir, SKILLS_STAGING_PREFIX))`): | Arm | Verdict | Control one step away | |:--|:--|:--| | `packages/cli/src/utils/skills-install-state.ts` | reported, not failed | same file, `packages/cli` not a workspace package: FAILS; same package, outside `src/`: FAILS | | the same site in a `private: true` member's `src/` | FAILS | the published member: reported | | `packages/cli/scripts/src/staging.ts` (a `src/` that is not the member's own) | FAILS | the member's own `src/`: reported | | `…/skills-install-state.test.ts` (by name), `src/__tests__/…` (by directory) | FAILS | the test file on a `tmpdir()` base: in neither list | | `scripts/pm/stage-skills.mjs` (repo tooling) | FAILS | the tooling file on a `tmpdir()` base: in neither list | | unresolved `mkdirSync` | in neither list | (that half was never held to completeness) | | this tree's own workspace (default `members`) | shipped arm reported, tooling arm FAILS | n/a | Runs at `f7e942e8` (before the rework; this branch merged with `origin/main` `d8599c2c`). At the rework head `3ec2a452` the dev reran both tiers, exit 0: fast 2264 case(s) · slow 315 case(s), 2579 cases pass, including the 12 boundary pins (os-dev-report 7077315476). <details><summary>Both tiers, the slow section that holds the live case included: <code>node scripts/pm/dispatch-gates.mjs --self-test</code>, exit 0</summary> ```text ✓ a caller's-directory mkdtempSync base in shipped package source is REPORTED, not failed ✓ CONTROL: the same file in a directory that holds no workspace package still FAILS ✓ CONTROL: and in the package but outside its own src/ (one directory up), it still FAILS ✓ the same site in a test file FAILS — beside the shipped file, by name ✓ and in a test helper under src/__tests__/, by directory — the stricter test predicate holds it ✓ CONTROL: the test file with a base the scan CAN read (the system temp directory) is in neither list ✓ the same site in repo tooling FAILS — the tooling population is not dropped with the test predicate ✓ CONTROL: the tooling file with a base the scan CAN read is in neither list ✓ and an unresolved mkdirSync site is in neither list — that half was never held to completeness ✓ on this tree's own workspace, the shipped arm is REPORTED and the tooling arm FAILS ... ✓ the sweep really read this tree (3145 directory-creating site(s) across 23403 tracked source(s)) ✓ and it really found in-tree fixture roots (93), so the coverage case below judges something ✓ no mkdtempSync site in a test file or repo tooling takes a base the scan cannot read ... dispatch-gates self-test tiers: fast 2262 case(s) in 1009.1s · slow 315 case(s) in 1825.0s. ✓ dispatch-gates self-test: 2577 cases pass. ``` </details> <details><summary>Fast tier as CI runs it: <code>pnpm check:pm-dispatch-gates</code>, exit 0</summary> ```text ✓ dispatch-gates self-test (fast tier): 2262 cases pass; 9 slow section(s) deferred. check:pm-dispatch-gates: the battery (the fast tier) took 562.7s on this box. ``` </details> ## Acceptance notes - **The #35495 spelling passes the slow case now (scratch copy, not re-landed here).** I checked out a scratch worktree at this branch's head and applied #35495's merge diff (`578d3b1d66`: the skills-install-state source, its test, its changeset). I then ran the slow case's own logic on that tree through the scan's exports (`exposedScratchDirs` + `mkdtempCompleteness`). Result: origin/main's rule FAILS, `UNRESOLVED: packages/cli/src/utils/skills-install-state.ts:246 (dir is not bound in this file)`; this branch's rule has failing 0 and reported 1 (the same site), so the case passes. Exposed: 0. - **Boundary reading, resolved by the seat (reading B, rework 3ec2a45).** The maintainer's words 「扫描只管仓内运行的代码」 and 「发布代码同类调用只报告不判红」: a `private: true` member (`examples/*`, `apps/docs`, QA harnesses, the eslint plugin…) is not published code, so its `src/` keeps failing. L2 7076625985 graded the literal-rider reading M1; L1-d had preferred the literal reading (7076590966) and accepted the seat's ruling. Pins: a private member's `src/` site FAILS with the published arm as control, and `packages/cli/scripts/src/staging.ts` FAILS as the control for "the member's own `src/`" (L2 S1). The header's measurement is dated by base tree `d8599c2c`: 1823 sites, 1465 test (47 in-tree), 344 other, 14 shipped (tmpdir), 0 unresolved. - **Ablation not run.** The diff is a repo script, and the dispatch contract does not ablate scripts. The fast pins carry their own controls, and each control flips the verdict. - The live case's title changed from "no mkdtempSync site in this tree…" to "no mkdtempSync site in a test file or repo tooling…". No other file names the old text (`git grep` 0 hits). ## Verification <details><summary>Derived gate families: 63 derived, 62 run, 1 NOT MEASURED, 0 unrun (at f7e942e)</summary> - `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 63 families. Each was run with its exit code captured before any pipe, then reconciled: `node scripts/pm/dispatch-gates.mjs --ran ran.list --repo objectstack-ai/objectstack` → `✓ dispatch-gates --ran: 63 derived famil(ies) accounted for — 62 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3).` - 62 exit 0, including `pnpm check:pm-dispatch-gates`, `pnpm check:nul-bytes`, `pnpm check:pm-governed-prose`, `pnpm check:pm-governed-merges`, `node scripts/pm/check-governed-queue-guard.mjs --self-test`, `node scripts/check-closing-keyword-parity.mjs` (+ `--self-test`) and `node scripts/check-self-test-wired.mjs` (+ `--self-test`). - NOT MEASURED: `pnpm check:i18n-coverage`, exit 3 (PREREQUISITE NOT MET: the package `dist/` builds it lints against are not built in this worktree, and this diff touches no package). CI runs it. - `node scripts/check-self-test-workflow-commands.mjs` first refused with `spawnSync node ETIMEDOUT` (load average 11 on a shared box, so no verdict). It was rerun at load 7.4 on the same head: exit 0. - `node scripts/pm/overlap-check.mjs --branch=claude/issue-35611-mkdtemp-shipped-report` → `VERDICT clean exit 0` before each push. - Body gate: `node scripts/check-closing-keyword-parity.mjs --body` binds exactly one declaration, this card's, on the line under the header. </details> Tier H: `scripts/pm/dispatch-gates.mjs` is a governed guard instrument, so this lands only on the maintainer's approval. `skip-changeset`: `scripts/pm/**` publishes nothing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- signed: repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent dcc9b07 commit fb6eb80

2 files changed

Lines changed: 174 additions & 13 deletions

File tree

‎scripts/pm/dispatch-gates.mjs‎

Lines changed: 68 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ import { SCANNED_ROOTS as RUNNER_ENV_SCANNED_ROOTS, findRunnerEnvReads, isProduc
468468
import { findViolations as findErrorCodeCasingViolations } from '../check-error-code-casing.mjs';
469469
// The workspace parse the README claim net (#31292) reads its population through, the one the gate itself imports.
470470
// Dependency-free, and it declares no path population of its own.
471-
import { WORKSPACE_FILE, parseWorkspaceGlobs, workspacePackageDirs } from '../workspace-enumerator.mjs';
471+
import { WORKSPACE_FILE, parseWorkspaceGlobs, workspacePackageDirs, workspacePackages } from '../workspace-enumerator.mjs';
472472
// The hand-written tables — ledgers, marker grammars, the change-kind roster, the tier globs — are
473473
// DATA, and live beside this file; this engine loads them, matches paths against them and derives.
474474
// Every table is re-exported under the name it always had, so no consumer moved.
@@ -8713,13 +8713,24 @@ export function trackedPrefixes(files) {
87138713
// absolute literal — is outside the tree by construction. So the classifier has
87148714
// THREE answers, and the third carries the honesty: a site whose base it cannot
87158715
// resolve is UNRESOLVED, never "probably fine". For `mkdtempSync` — the shape
8716-
// every in-tree fixture in this tree is built from — an unresolved site is a
8717-
// FAILURE. A detector that silently skipped what it could not read would be
8718-
// this card's own defect one level up: green over the sites nobody measured.
8716+
// every in-tree fixture in this tree is built from — an unresolved site in a
8717+
// test file or in repo tooling is a FAILURE. A detector that silently skipped
8718+
// what it could not read would be this card's own defect one level up: green
8719+
// over the sites nobody measured.
87198720
//
8720-
// Measured on the tree at the time of writing: 359 `mkdtempSync` sites — 4 in
8721-
// the tree (the four `packages/cli` fixtures the convention names), the rest in
8722-
// the system temp directory, 0 unresolved.
8721+
// The boundary of that rule is the FILE POPULATION: an unresolved site in
8722+
// shipped package source (a non-test file under the own `src/` of a workspace
8723+
// member whose manifest is not `private: true`, `isShippedPackageSource`) is
8724+
// REPORTED and not failed, because its base is chosen at run time by whoever
8725+
// runs the published code (ruling record 7075362923).
8726+
//
8727+
// Measured on 2026-11-22 on the tree of d8599c2c through
8728+
// `scratchDirSitesInSource` and `isShippedPackageSource`: 1823 `mkdtempSync`
8729+
// sites — 1465 in `isTestFilePath` test files (47 in the tree), 344 in every
8730+
// other source outside shipped package source (repo tooling, package scripts,
8731+
// test helpers and tests by directory; 0 in the tree; 0 of them under a private
8732+
// member's `src/`), 14 in shipped package source (all in the system temp
8733+
// directory); 0 unresolved in any population.
87238734
//
87248735
// `mkdirSync` is swept too and deliberately NOT held to completeness: of its
87258736
// sites, ~124 take a base this resolver cannot see (a function parameter, a
@@ -9992,6 +10003,56 @@ export function exposedScratchDirs({ cwd = ROOT, files = null } = {}) {
999210003
return { ...sweep, exposed, covered };
999310004
}
999410005

10006+
/**
10007+
* ── Which UNRESOLVED `mkdtempSync` site fails completeness: the FILE ──────────
10008+
*
10009+
* In a test file or a repo script the base of a scratch directory is something
10010+
* this tree chose, so a base the scan cannot read is a gap in the reading and
10011+
* fails. Shipped package source is the population where that stops holding: a
10012+
* published command stages beside a directory its USER names at run time (a
10013+
* cwd-relative argument), and no reading of this tree can say whether that
10014+
* lands inside a checkout. Failing it forces a spelling that only hides the
10015+
* base, never a safer directory. So that population is reported and not
10016+
* failed (ruling record 7075362923, 「扫描只管仓内运行的代码」).
10017+
*
10018+
* The boundary is the site's FILE, never its resolution: "in the tree" is
10019+
* exactly what an unresolved site does not know. ⛔ Nor is it "not a test
10020+
* file" alone — repo tooling is code this checkout runs, and it stays held.
10021+
*
10022+
* Shipped package source = a non-test source under the own `src/` of a
10023+
* published workspace member. "Non-test" is the runner-env gate's
10024+
* `isProductSource` (a test by name or by directory, `.d.ts` excluded), the
10025+
* stricter of the tree's test predicates, so a helper under `src/__tests__/`
10026+
* stays held. "Published member" is a workspace member whose manifest is not
10027+
* `private: true`, as the enumerator's `workspacePackages` pairs them: a
10028+
* private member (an example app, a QA harness, the docs app) is not published
10029+
* code and has no such user, so its `src/` is code this checkout runs and stays
10030+
* held, as does a member whose manifest does not parse. Neither half is a list
10031+
* kept here.
10032+
*
10033+
* `members` is `workspacePackages(root)`'s shape: `{ dir, manifest }` pairs.
10034+
*/
10035+
export function isShippedPackageSource(rel, members) {
10036+
return isRunnerEnvProductSource(rel)
10037+
&& members.some(({ dir, manifest }) => manifest?.private !== true && rel.startsWith(`${dir}/src/`));
10038+
}
10039+
10040+
/**
10041+
* The completeness rule's verdict over a sweep's `unresolved` sites: `failing`
10042+
* is what reds the live case, `reported` the shipped-source remainder it names
10043+
* and does not fail. A `mkdirSync` site is in neither — that half was never
10044+
* held to completeness (the header above).
10045+
*/
10046+
export function mkdtempCompleteness(unresolved, { members = workspacePackages(ROOT) } = {}) {
10047+
const failing = [];
10048+
const reported = [];
10049+
for (const site of unresolved) {
10050+
if (site.call !== 'mkdtempSync') continue;
10051+
(isShippedPackageSource(site.file, members) ? reported : failing).push(site);
10052+
}
10053+
return { failing, reported };
10054+
}
10055+
999510056
/** An ignore file every clone has, as opposed to one local to whoever ran this. */
999610057
function isTrackedIgnoreSource(source) {
999710058
if (!source) return false;

‎scripts/pm/dispatch-gates.self-test.mjs‎

Lines changed: 106 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ import {
185185
isInRootTsProgram,
186186
isNonPathNamespace,
187187
isPlainTopLevelDir,
188+
isShippedPackageSource,
188189
isTestFilePath,
189190
isTypeCheckInvocation,
190191
jobFilterOutputRefs,
@@ -210,6 +211,7 @@ import {
210211
maskShellComments,
211212
metadataFormModulePaths,
212213
metadataFormsSurfaceIsExtracted,
214+
mkdtempCompleteness,
213215
liveDerivationInputs,
214216
narrowToDerivationInputs,
215217
notRunnableCommandSet,
@@ -11452,6 +11454,97 @@ export function selfTest({ tier = 'full' } = {}) {
1145211454
wrapperBodyScan,
1145311455
);
1145411456

11457+
// ── Which UNRESOLVED mkdtempSync site fails completeness: the FILE ─────────
11458+
//
11459+
// The live completeness case in the slow section below fails an unresolved
11460+
// mkdtempSync site in a test file or repo tooling, and REPORTS one in shipped
11461+
// package source, whose base the user names at run time (ruling record
11462+
// 7075362923). The boundary is pinned here, in the fast tier a pull request's
11463+
// lane runs, on the exact spelling that redded main: a staging directory
11464+
// beside a caller's directory. Each arm has a control one step away.
11465+
const callerDirSource = 'const staging = mkdtempSync(join(dir, SKILLS_STAGING_PREFIX));';
11466+
const tmpdirSource = 'const staging = mkdtempSync(join(tmpdir(), SKILLS_STAGING_PREFIX));';
11467+
const completenessPackages = [{ dir: 'packages/cli', manifest: { name: '@objectstack/cli' } }];
11468+
const completenessOf = (rel, source = callerDirSource, members = completenessPackages) =>
11469+
mkdtempCompleteness(scratchDirSitesInSource(rel, source).unresolved, { members });
11470+
const verdictIs = (v, failing, reported) => v.failing.length === failing && v.reported.length === reported;
11471+
const shippedVerdict = completenessOf('packages/cli/src/utils/skills-install-state.ts');
11472+
t(
11473+
"a caller's-directory mkdtempSync base in shipped package source is REPORTED, not failed",
11474+
verdictIs(shippedVerdict, 0, 1) && shippedVerdict.reported[0].file === 'packages/cli/src/utils/skills-install-state.ts',
11475+
shippedVerdict,
11476+
);
11477+
t(
11478+
'CONTROL: the same file in a directory that holds no workspace package still FAILS',
11479+
verdictIs(
11480+
completenessOf('packages/cli/src/utils/skills-install-state.ts', callerDirSource, [{ dir: 'packages/core', manifest: {} }]),
11481+
1,
11482+
0,
11483+
),
11484+
);
11485+
t(
11486+
"CONTROL: and in the package but outside its own src/ (one directory up), it still FAILS",
11487+
verdictIs(completenessOf('packages/cli/utils/skills-install-state.ts'), 1, 0),
11488+
);
11489+
// A src/ segment of the member's that is NOT its own src/: product source by
11490+
// name (so `isProductSource` alone would pass it), under the member, and red
11491+
// the day the member prefix is loosened from MEMBER/src/ to MEMBER/.
11492+
t(
11493+
"CONTROL: under the member but in a src/ that is not the member's own (packages/cli/scripts/src/), it still FAILS",
11494+
verdictIs(completenessOf('packages/cli/scripts/src/staging.ts'), 1, 0)
11495+
&& runnerEnvIsProductSource('packages/cli/scripts/src/staging.ts'),
11496+
);
11497+
// A private member is not published code: its src/ is code this checkout
11498+
// runs (an example app, a QA harness), so the same site there FAILS. The
11499+
// control is the published arm above, the same path with the flag absent.
11500+
t(
11501+
"a private: true member's src/ is not shipped source — the same site there FAILS",
11502+
verdictIs(
11503+
completenessOf('packages/cli/src/utils/skills-install-state.ts', callerDirSource, [
11504+
{ dir: 'packages/cli', manifest: { name: '@objectstack/cli', private: true } },
11505+
]),
11506+
1,
11507+
0,
11508+
),
11509+
);
11510+
t(
11511+
'the same site in a test file FAILS — beside the shipped file, by name',
11512+
verdictIs(completenessOf('packages/cli/src/utils/skills-install-state.test.ts'), 1, 0),
11513+
);
11514+
t(
11515+
'and in a test helper under src/__tests__/, by directory — the stricter test predicate holds it',
11516+
verdictIs(completenessOf('packages/cli/src/__tests__/staging-helper.ts'), 1, 0),
11517+
);
11518+
t(
11519+
'CONTROL: the test file with a base the scan CAN read (the system temp directory) is in neither list',
11520+
verdictIs(completenessOf('packages/cli/src/utils/skills-install-state.test.ts', tmpdirSource), 0, 0),
11521+
);
11522+
t(
11523+
'the same site in repo tooling FAILS — the tooling population is not dropped with the test predicate',
11524+
verdictIs(completenessOf('scripts/pm/stage-skills.mjs'), 1, 0) && !isTestFilePath('scripts/pm/stage-skills.mjs'),
11525+
);
11526+
t(
11527+
'CONTROL: the tooling file with a base the scan CAN read is in neither list',
11528+
verdictIs(completenessOf('scripts/pm/stage-skills.mjs', tmpdirSource), 0, 0),
11529+
);
11530+
t(
11531+
'and an unresolved mkdirSync site is in neither list — that half was never held to completeness',
11532+
verdictIs(completenessOf('scripts/pm/stage-skills.mjs', 'mkdirSync(join(dir, SKILLS_STAGING_PREFIX));'), 0, 0)
11533+
&& scratchDirSitesInSource('scripts/pm/stage-skills.mjs', 'mkdirSync(join(dir, SKILLS_STAGING_PREFIX));').unresolved.length === 1,
11534+
);
11535+
// The default member list is THIS tree's workspace, read from its manifest
11536+
// globs and manifests: the arms above hold on it too, not only on a
11537+
// hand-built list — packages/qa/dogfood is a private member of this tree.
11538+
const liveDefault = (rel) => mkdtempCompleteness(scratchDirSitesInSource(rel, callerDirSource).unresolved);
11539+
t(
11540+
"on this tree's own workspace, the shipped arm is REPORTED, the tooling and private-member arms FAIL",
11541+
verdictIs(liveDefault('packages/cli/src/utils/skills-install-state.ts'), 0, 1)
11542+
&& verdictIs(liveDefault('scripts/pm/stage-skills.mjs'), 1, 0)
11543+
&& verdictIs(liveDefault('packages/qa/dogfood/src/staging.ts'), 1, 0)
11544+
&& JSON.parse(readFileSync(nodePath.join(ROOT, 'packages/qa/dogfood/package.json'), 'utf8')).private === true
11545+
&& isShippedPackageSource('packages/cli/src/utils/skills-install-state.ts', completenessPackages),
11546+
);
11547+
1145511548
slow("the change set derived from git — temporary repositories with real history", () => {
1145611549
// ── The change set derived from git (#9320) ───────────────────────────────
1145711550
//
@@ -11851,14 +11944,21 @@ export function selfTest({ tier = 'full' } = {}) {
1185111944
}`,
1185211945
liveScratch.exposed.length === 0,
1185311946
);
11854-
const unreadableTempSites = liveScratch.unresolved.filter((s) => s.call === 'mkdtempSync');
11855-
t(
11856-
`no mkdtempSync site in this tree takes a base the scan cannot read${
11857-
unreadableTempSites.length
11858-
? ` — UNRESOLVED: ${unreadableTempSites.map((s) => `${s.file}:${s.line} (${s.why})`).join(', ')}`
11947+
// Completeness holds in test files and repo tooling; an unresolved site in
11948+
// shipped package source is REPORTED on this line and not failed, because
11949+
// its base is the user's run-time choice (`mkdtempCompleteness`, pinned in
11950+
// the fast tier; ruling record 7075362923).
11951+
const completeness = mkdtempCompleteness(liveScratch.unresolved);
11952+
const siteList = (sites) => sites.map((s) => `${s.file}:${s.line} (${s.why})`).join(', ');
11953+
t(
11954+
`no mkdtempSync site in a test file or repo tooling takes a base the scan cannot read${
11955+
completeness.failing.length ? ` — UNRESOLVED: ${siteList(completeness.failing)}` : ''
11956+
}${
11957+
completeness.reported.length
11958+
? ` — reported, not failed (shipped package source, base chosen at run time): ${siteList(completeness.reported)}`
1185911959
: ''
1186011960
}`,
11861-
unreadableTempSites.length === 0,
11961+
completeness.failing.length === 0,
1186211962
);
1186311963
} finally {
1186411964
rmSync(gitTmp, { recursive: true, force: true });

0 commit comments

Comments
 (0)