Skip to content

[removed] - #71

Closed
wongmjane wants to merge 2 commits into
pnpm:mainfrom
wongmjane:verification-cache-install-owner
Closed

wongmjane wants to merge 2 commits into
pnpm:mainfrom
wongmjane:verification-cache-install-owner

Conversation

@wongmjane

@wongmjane wongmjane commented Oct 2, 2026 •

Copy link
Copy Markdown

No description provided.

Copilot AI balanced review requested due to automatic review settings October 2, 2026 20:24
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 8bbc32b9-a036-4041-aefa-965613631172

📥 Commits

Reviewing files that changed from the base of the PR and between 397d056 and 8d622b3.

📒 Files selected for processing (2)
  • .github/workflows/pr-check.yaml
  • src/pnpm-install/index.ts
💤 Files with no reviewable changes (1)
  • src/pnpm-install/index.ts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: Greptile Review
🔇 Additional comments (1)
.github/workflows/pr-check.yaml (1)

24-26: LGTM!


📝 Walkthrough

Walkthrough

The install function now returns a success result. Cache publication uses that result for action-owned installs and uses install ownership to control the post step. Subprocess tests cover publication scenarios, and the README documents the behavior.

Changes

Lockfile verification cache

Layer / File(s) Summary
Install result and cache publication
src/pnpm-install/index.ts, src/index.ts
runPnpmInstall returns true after a successful install and false for the described skip and failure paths. The main step awaits an action-owned install and saves the cache only after success. The post step saves only when installation is deferred. The runtime-name callback formatting and main().catch callback parameter changed without changing behavior.
Ownership scenarios and documentation
src/lockfile-verification-cache/ownership.test.mjs, package.json, .github/workflows/pr-check.yaml, README.md
Subprocess tests cover install outcomes, cache collisions and transport errors, restored verdicts, and deferred installs. The test script includes the suite, and the workflow runs the tests before building the distribution file. The README documents when cache publication occurs.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant runMain
  participant runPnpmInstall
  participant saveVerificationCache
  participant runPost
  runMain->>runPnpmInstall: run action-owned install
  runPnpmInstall-->>runMain: return success or failure
  runMain->>saveVerificationCache: save only after success
  runPost->>saveVerificationCache: save only when install is deferred
Loading

Merge Risk: ⚪ Minimal · up to 8d622

The install-owned and deferred-install publication paths match the documented ownership split, and the new tests run on the workflow’s compatible platform. No actionable merge-blocking issue is evident.

Architecture Summary

Architecture risk: 🔵 Low · up to 8d622

The change affects 3 systems.

Changed systems: src, package.json, README.md

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — src (service) was modified; 3 changed files map to changed impact.
  • observed — package.json (service) was modified; 1 changed file maps to changed impact.
  • observed — README.md (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in README.md: Adds that only a successful action-owned install can publish the verdict; publication ends with that install, with no retry by the post step, and skipped or failed installs do not publish.
  • observed — Modified behavior in package.json: The test script adds the lockfile-verification-cache test files to the Node test command.
  • observed — Modified behavior in src/index.ts: The callback that maps runtimes to names was reformatted; the runtime names and destination passed to getInstalledRuntimeVersions are unchanged.
  • observed — Modified behavior in src/index.ts: When inputs.install is true, runMain now awaits pnpmInstall and calls saveVerificationCache(1) only if the install call returns a truthy value. Previously, it did not await the install call and always saved the verification cache.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 3 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: keeping verification-cache publication tied to the install that owns it.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 3 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

A rabbit checks the install light,
Success lets cache records take flight.
If steps are later, post can save,
If installs fail, no log to pave.
The tests hop through each outcome,
While README shares the rules throughout.

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The implementation matches the stated ownership semantics and includes comprehensive integration coverage.

Review effort: Balanced
Findings: None

What changed in this PR

This PR ties verification-cache publication to the install that owns it, preventing unsafe post-step retries.

Changes:

  • Reports whether action-managed installation succeeded.
  • Publishes only after successful owned installs; preserves post publication for external installs.
  • Adds process-isolated ownership tests and documentation.
File Description
src/​pnpm-install/​index.ts Returns installation success status.
src/​index.ts Enforces publication ownership and timing.
src/​lockfile-verification-cache/​ownership.test.mjs Tests main/post publication scenarios.
README.md Documents publication behavior.
package.json Includes verification-cache tests.
dist/​index.js Regenerates the distributed action bundle.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@greptile-apps

greptile-apps Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Changes when the verification cache publishes during install.

The PR appears safe to merge; no outstanding blocking issue was identified.

Reviews (2) · Last reviewed commit: "test: include verification ownership in ..."

Comment thread src/pnpm-install/index.ts
@@ -5,7 +5,11 @@ import path from 'path'
import { Inputs } from '../inputs'
import { lockfileDir } from './lockfile'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Comments narrate the code The new JSDoc restates what the boolean return type and return paths already show. The new explanatory comments in src/index.ts and the ownership test follow the same pattern. The repository requires comments not to narrate code, so this requirement must be addressed before merging.

Context Used: Comments and docs in code are suspicious. Is test coverage not sufficient the reason why a comment was added? Comments should not replace tests. Comments should also not narrate code. Is the code hard to understand? Then it should be refactored to ma... (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment thread package.json
@wongmjane wongmjane closed this Oct 2, 2026
@wongmjane wongmjane changed the title fix: keep verification cache publication with its install owner [removed] Oct 2, 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