Skip to content

fix: porcelain -z parsing, setup-nodejs runner tests, parameterized solidity-review-artifacts - #1701

Closed
kalverra wants to merge 3 commits into
DX-5569/use-misefrom
DX-5569/review-fixes
Closed

kalverra wants to merge 3 commits into
DX-5569/use-misefrom
DX-5569/review-fixes

Conversation

@kalverra

@kalverra kalverra commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review fixes from the DX-5569 dependency-modernization stack review. Refs DX-5569. Builds on #1695.

Why

The stack review surfaced two unresolved review threads, a correctness bug in signed-commits porcelain parsing, and a class of integration bug invisible to the existing unit tests.

Notes

  • signed-commits now reads git status --porcelain=v1 -z (NUL-delimited, never quoted) instead of the line-based format, which C-quotes paths containing spaces or special characters (e.g. ?? "new dir/file.txt"). Those quoted strings failed readFileSync, so such files were silently skipped from the signed commit — resolves the review thread on [DX-5569] Dependency Updates! #1688 (repo-status.ts:122). The skip-with-warning fallback remains only for genuinely unreadable entries (directories, broken symlinks).
  • New test-setup-nodejs.yml exercises the full action wiring (mise-action → resolve-versions.sh → setup-node → pnpm/action-setup → PATH) on a real runner over a fixture matrix. resolve-versions.test.sh covers the script in isolation; nothing covered the runner integration — the exact surface that broke feat: asdf -> mise #1695's CI.
  • solidity-review-artifacts.yml now exposes node-version-file/pnpm-version as workflow-call inputs mirroring reusable-docusaurus, instead of hardcoding them at three call sites — resolves the review thread on [DX-5569] Dependency Updates! #1688. Behavior is unchanged for existing callers.

Changes

signed-commits parses status with -z
  • getGitStatusPorcelainV1 + parser rewritten for NUL-delimited records; rename records (new\0old) reconstruct the original -> new composite downstream code expects.
  • Regression test: file names with spaces and a double quote are parsed unquoted and committed, with no skip warnings.
Runner-level matrix test for setup-nodejs
  • 5 scenarios: mise bare strings, mise + .tool-versions (mise wins), .tool-versions, .nvmrc, no files (pnpm ^12 fallback). Fixture versions (node 24.14.1 / pnpm 10.6.5) differ from fallbacks so assertions prove provenance.
solidity-review-artifacts node/pnpm inputs
  • New node-version-file / pnpm-version workflow-call inputs (auto-detect / file-driven defaults); the three setup-nodejs call sites now pass them through.

Merge Danger

Rating Why
Revert 🟢 trivial Three independent commits; the -z fix is one module + its test + dist.
Blast radius 🟡 medium signed-commits dist changes the signed-commit path for every consumer; new workflow is repo-only.

…ommit

The line-based porcelain format C-quotes paths containing spaces or
special characters (e.g. `?? "new dir/file.txt"`), and the quoted
strings failed readFileSync, so those files were silently skipped from
the signed commit (PR review: repo-status.ts:122). Switch to -z
(NUL-delimited, never quoted or escaped) and reconstruct the
'original -> new' composite for renames, so every readable file
commits regardless of its name. The skip-with-warning fallback stays
for genuinely unreadable entries (directories, broken symlinks).

Adds a regression test with spaces and a double quote in file names.
…rtifacts

Mirror reusable-docusaurus: expose node-version-file and pnpm-version
as workflow_call inputs (auto-detect / file-driven defaults) instead
of hardcoding them at three setup-nodejs call sites. Resolves the
review thread asking this reusable workflow to match
reusable-docusaurus; behavior is unchanged for existing callers.
resolve-versions.test.sh covers the script in isolation, but nothing
exercised the full action wiring (mise-action, resolve script,
setup-node, pnpm/action-setup, PATH ordering) on a real runner — the
exact surface that broke CI when .tool-versions was deleted. Matrix
over mise / tool-versions / nvmrc / no-files / mise-precedence
fixtures with versions that differ from the fallbacks, asserting on
the installed node and pnpm versions.
@kalverra
kalverra added this pull request to stack #1694 October 14, 2026 20:55
@github-actions

Copy link
Copy Markdown
Contributor

🦋 Changeset is good to go

Latest commit: 92d9d5d

We got this.

Not sure what this means? Click here to learn what changesets are.

@kalverra kalverra changed the title DX 5569/review fixes fix: porcelain -z parsing, setup-nodejs runner tests, parameterized solidity-review-artifacts Oct 14, 2026
@kalverra
kalverra marked this pull request as ready for review October 14, 2026 20:56
@kalverra
kalverra requested a review from a team as a code owner October 14, 2026 20:56
const repoPath = await createRepo(name);

fs.mkdirSync(`${repoPath}/new dir`);
fs.writeFileSync(`${repoPath}/new dir/old file.txt`, "Old content");
);

// untracked paths whose names trigger C-quoting in the line-based format
fs.writeFileSync(`${repoPath}/new dir/untracked file.txt`, "Untracked");

// untracked paths whose names trigger C-quoting in the line-based format
fs.writeFileSync(`${repoPath}/new dir/untracked file.txt`, "Untracked");
fs.writeFileSync(`${repoPath}/quote"name.txt`, "Quoted name");
@kalverra kalverra closed this Oct 15, 2026
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