Repository navigation
fix(coverage): run pnpm 9 evidence without --trust-lockfile #1258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
seonghobae
merged 4 commits into
main
from
fix/coverage-pnpm9-trust-lockfile-and-js-provider
Aug 24, 2026
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
a6ea72c
fix(coverage): run pnpm 9 evidence without --trust-lockfile
seonghobae 1b6f4d7
fix(coverage): gate --trust-lockfile on pnpm 11 and keep Jest coverage
seonghobae 9b5dba9
fix(coverage): pass --trust-lockfile only on pnpm 11.3+
seonghobae 897819c
fix(coverage): keep missing frontend coverage fail-closed
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| # OpenCode coverage pnpm lock compatibility | ||
|
|
||
| 검토 기준일: **2026-08-23** | ||
|
|
||
| ## Decision | ||
|
|
||
| OpenCode coverage-evidence honors the repository-owned `packageManager` | ||
| pin through Corepack. `--trust-lockfile` is valid only on pnpm major | ||
| version 10 and newer. Exact trusted-base lock matching remains mandatory | ||
| before any offline install. The sandbox never invents a JavaScript | ||
| coverage instrumenter when the package did not declare one. | ||
|
|
||
| This keeps LineageWeave and other pnpm 9.x products measurable after | ||
| Corepack started activating the repository pin instead of a central | ||
| pnpm 11.5.3 binary. A paying reviewer of lineage reconstruction would | ||
| otherwise see every frontend head blocked on `Unknown option: | ||
| 'trust-lockfile'` and, after that, on `vitest --coverage` without | ||
| `@vitest/coverage-v8`. | ||
|
|
||
| ## Root-cause analysis | ||
|
|
||
| 1. Coverage images now activate the exact `packageManager` from the | ||
| validated base (for LineageWeave, `pnpm@9.15.9`). | ||
| 2. The install command still passed `--trust-lockfile`, a pnpm 10 flag. | ||
| pnpm 9 exits before reading the store. | ||
| 3. After a successful install, coverage appended `--coverage` to `vitest run` | ||
| even when no coverage provider was declared, so tests never became | ||
| evidence. | ||
|
|
||
| The lock-matching gate is unchanged: a PR-added or PR-mutated | ||
| `pnpm-lock.yaml` is still refused. `--offline`, `--frozen-lockfile`, | ||
| `--ignore-scripts`, and the writable clone of `/opt/pnpm-store` remain | ||
| required. Python still never runs `uv sync --project`. | ||
|
|
||
| ## Remediation | ||
|
|
||
| - When `corepack pnpm --version` reports major version 10 or newer, keep | ||
| `--trust-lockfile` so registry attestation lookups stay suppressed for | ||
| an exact trusted-base lock (pnpm, n.d.). | ||
| - When the major version is below 10, omit that flag. pnpm 9 already | ||
| treats `--frozen-lockfile` plus `--offline` as the integrity boundary. | ||
| - When `package.json` has a test script but no coverage script, coverage | ||
| collector in `scripts.test`, or declared provider | ||
| (`@vitest/coverage-v8`, `@vitest/coverage-istanbul`, `c8`, `nyc`, | ||
| `istanbul`), run the tests without synthesizing `--coverage` and record | ||
| line-coverage as repository-owned rather than a sandbox failure. | ||
|
|
||
| Independent OpenCode, Strix, and Noema review remain authorization | ||
| gates. This change does not approve, merge, or weaken hash-pinned | ||
| Python or npm installs. | ||
|
|
||
| ## APA 7th references | ||
|
|
||
| GitHub, Inc. (n.d.). *Using a package.json file to specify the package | ||
| manager*. GitHub Docs. Retrieved August 23, 2026, from | ||
| https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry | ||
|
|
||
| MITRE. (2026). *CWE-494: Download of code without integrity check*. | ||
| https://cwe.mitre.org/data/definitions/494.html | ||
|
|
||
| National Institute of Standards and Technology. (2022). *Secure software | ||
| development framework (SSDF) version 1.1: Recommendations for mitigating | ||
| the risk of software vulnerabilities* (NIST Special Publication 800-218). | ||
| https://doi.org/10.6028/NIST.SP.800-218 | ||
|
|
||
| pnpm. (n.d.). *pnpm install*. pnpm Docs. Retrieved August 23, 2026, from | ||
| https://pnpm.io/cli/install | ||
|
|
||
| Vitest. (n.d.). *Coverage*. Vitest Docs. Retrieved August 23, 2026, from | ||
| https://vitest.dev/guide/coverage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.