Skip to content

perf: avoid absent Yarn layout file probes - #70

Merged
adityankale190895 merged 1 commit into
DiffCI:mainfrom
KingEmma7:perf/yarn-layout-inventory
Nov 3, 2026
Merged

adityankale190895 merged 1 commit into
DiffCI:mainfrom
KingEmma7:perf/yarn-layout-inventory

Conversation

@KingEmma7

Copy link
Copy Markdown
Contributor

For an eligible Yarn Classic lockfile change, checking nine alternate layouts currently makes up to 18 git show calls. This replaces those probes with a nonrecursive root listing at base and HEAD, addressing the follow-up on PR #67.

Both revisions must establish absence before narrowing. Any matching root entry or failed/malformed listing keeps full fallback. Root listings include directories and empty trees, and --full-tree keeps the check rooted correctly when the delta API runs from a subdirectory. The existing recursive HEAD inventory and npm/pnpm paths are unchanged.

Synthetic Git fixtures cover all nine alternate names, added/deleted PnP files, a deleted base-only empty tree, nested working directories, literal unusual names, and listing failures at either revision. Isolated checks confirm that the regression rejects the old probe loop and catches implementations that inspect only HEAD or omit --full-tree.

Git Trace2 counts from the public CLI on a supported Yarn fixture fall from 32 to 16 launches: 18 absent-path reads become two root listings. The full plan and stable impact output match; the source-only control remains at 12 calls with identical behavior. These measurements cover process counts in synthetic fixtures; elapsed-time gains were not measured.

Validation (final checks on macOS, Node 24.9.0 / npm 11.6.0):

  • npm ci --offline --cache ../npm-cache --no-audit --fund=false
  • npm run typecheck
  • npm test: 649 passed, zero failures or skips
  • npm run build
  • npm run audit:boundary: 262 reviewed files

Codex-assisted implementation and review. Berry, workspaces and other unsupported Yarn cases retain their existing fallback. Windows and other supported Node versions remain for hosted CI.

Signed-off-by: Emmanuel Mawulolo Tagbor <[email protected]>
@adityankale190895

Copy link
Copy Markdown
Member

Thanks @KingEmma7! This is a clean follow-up to #67: two root listings in place of 18 probes, a safe fallback when a listing can't prove absence, and very thorough tests (unusual names, empty trees, nested cwd, failure injection on both sides). Merging now.

@adityankale190895
adityankale190895 merged commit 221a571 into DiffCI:main Nov 3, 2026
7 checks passed
adityankale190895 added a commit that referenced this pull request Nov 3, 2026
- `check` on repositories whose test script is `tsx --test <glob>` (Core
  itself now) can select and time a subset.
- The workflow guard no longer reports jobs that only mention "diffci" in
  messages, gh api fields, variable names or .json paths as observers.
- `check` summarises blocking workflow findings in one line and points to
  `diffci verify-workflow`.
- Pins @diffci.com/core to 2fc16bc, which adds pnpm-lock.yaml attribution,
  request-only dependency bump narrowing and the Yarn probe fix (#70).

Records the Muse marketplace digest for the 0.3.23 package tree, computed
by the pinned Muse 1.4.11-R6667.1 build from an LF archive (the same
method reproduces 0.3.22's recorded digest).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: adityankale190895 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants