Skip to content

test: make override status fixture platform-independent - #13476

Merged
zkochan merged 1 commit into
mainfrom
fix-override-status-windows-test
Jul 28, 2026
Merged

zkochan merged 1 commit into
mainfrom
fix-override-status-windows-test

Conversation

@zkochan

@zkochan zkochan commented Jul 28, 2026 •

Copy link
Copy Markdown
Member

Summary

Makes the checkDepsStatus registry and link: override test internally consistent across platforms.

The test recorded overrides in the mocked workspace state but omitted them from its mocked lockfile, and also used a manifest dependency absent from that lockfile. It passed only while timestamp and path handling avoided deeper lockfile validation. Windows reached that validation while running the checks for #13464 and correctly reported the inconsistent fixture as stale.

This change supplies matching current and wanted lockfiles and removes the unrelated manifest dependency. It changes tests only; no TypeScript/Rust runtime parity work or changeset is needed.

Squash Commit Body

Make the registry and link override status test independent of whether
platform-specific timestamp and path handling reaches lockfile validation.
Keep the mocked workspace state, lockfiles, and manifest mutually consistent
so the test isolates local-file override classification.

Related to pnpm/pnpm#13464.

Checklist

  • Added or updated tests.

Written by an agent (Codex, GPT-5).


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Tests
    • Updated dependency status coverage to verify registry and link: overrides are correctly recognized as up to date.
    • Improved test setup to consistently apply override settings across lockfile and workspace state scenarios.

Copilot AI review requested due to automatic review settings July 28, 2026 21:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9f7d3b4d-07a3-4f04-aa58-c83789fcf30f

📥 Commits

Reviewing files that changed from the base of the PR and between 2b03cea and d04793f.

📒 Files selected for processing (1)
  • pnpm11/deps/status/test/checkDepsStatus.test.ts

📝 Walkthrough

Walkthrough

The dependency status test now shares override data between workspace settings and current/wanted lockfile mocks, while removing the prior root manifest dependency fixture.

Changes

Dependency status test updates

Layer / File(s) Summary
Align override test fixtures
pnpm11/deps/status/test/checkDepsStatus.test.ts
The test adds overrides to the lockfile and workspace settings, mocks both lockfile reads with that lockfile, and passes an empty root project manifest while retaining the upToDate: true assertion.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested labels: product: pnpm@11

Suggested reviewers: copilot

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-override-status-windows-test

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Make override status fixture platform-independent

🧪 Tests 🐞 Bug fix 🕐 Less than 10 minutes

Grey Divider

AI Description

• Synchronizes override metadata across workspace state and both mocked lockfiles.
• Removes an unrelated manifest dependency to isolate registry and link override classification.
• Prevents platform-specific lockfile validation from failing the status test on Windows.
Diagram

graph TD
  A["Override Fixture"] --> B["Workspace State"] --> E["checkDepsStatus"] --> F["Up-to-date Result"]
  A --> C["Current Lockfile"] --> E
  A --> D["Wanted Lockfile"] --> E
Loading
High-Level Assessment

Synchronizing all mocked persistence layers is the most reliable approach because it preserves realistic lockfile validation while isolating override classification. Bypassing validation or adding platform-specific timestamp behavior would conceal the inconsistent fixture rather than correct it.

Files changed (1) +4 / -3

Tests (1) +4 / -3
checkDepsStatus.test.tsSynchronize override status test fixtures +4/-3

Synchronize override status test fixtures

• Adds matching override metadata to mocked current and wanted lockfiles. Removes the unrelated manifest dependency so the test consistently isolates registry and link override handling across platforms.

pnpm11/deps/status/test/checkDepsStatus.test.ts

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge because the test continues to exercise registry and link override classification with internally consistent fixtures.

The empty manifest does not prevent override classification, both mocked lockfiles use the valid top-level override representation, and the status-check implementation does not mutate the shared fixture.

Reviews (1): Last reviewed commit: "test: make override status fixture platf..." | Re-trigger Greptile

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Jul 28, 2026
@blacksmith-sh

This comment has been minimized.

@zkochan

zkochan commented Jul 28, 2026

Copy link
Copy Markdown
Member Author

The Ubuntu Node 24 shard failed because pnpr could not reach the live npm registry. The log shows upstream 504 Gateway Timeout responses, followed by pnpr's circuit breaker returning repeated 503 Service Unavailable responses. Two unrelated monorepo installs consequently reached their 180-second command timeout.

The checkDepsStatus test changed by this PR passed. I reran the failed shard; no code change is warranted for this failure.


Written by an agent (Codex, GPT-5).

@zkochan
zkochan merged commit 3e6f930 into main Jul 28, 2026
38 of 40 checks passed
@zkochan
zkochan deleted the fix-override-status-windows-test branch July 28, 2026 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product: pnpm@11 reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants