Skip to content

Parse pnpm 12 two-document pnpm-lock.yaml (pilot false positive) - #18

Closed
irvingpop wants to merge 2 commits into
mainfrom
irvingpop/phase4-k
Closed

irvingpop wants to merge 2 commits into
mainfrom
irvingpop/phase4-k

Conversation

@irvingpop

Copy link
Copy Markdown
Member

Fixes the first pilot false positive.

pnpm 12 writes pnpm-lock.yaml as two YAML documents: an env lockfile (the package manager itself) and the normal lockfileVersion 9.0 lockfile. The parser loaded one document, so every OperationCode/front-end PR that touched the lockfile hit the hard block "dependency data incomplete: does not parse" (first seen on front-end#2027).

  • Same safe unique-key loader for every document. One document: unchanged. Two documents: only the strict pnpm 12 shape (env doc shape; main doc limited to pnpm's top-level keys). Anything else fails closed.
  • Packages from both documents go through every dependency check. An env entry cannot take another package's identity; env deps must match packages the walker emits.
  • The shared YAML loader expands merge keys before the duplicate-key check (stricter only; used by pnpm and yarn berry parsers).
  • Design doc lockfile lines and K-16 updated.

Real lockfiles parse: front-end PR head (1602 packages) and main (1604). Unit tests 2668 passed; release tests 2 passed. Eval not run.

Review: adversarial review (other model family) found 2 Important + 1 Minor; all fixed with tests; scoped re-review clean. Open minor (pre-existing): nested merge aliases grow about 2^depth before the duplicate check; only the byte cap limits it.

Goes live only with a release (Console job_workflow_ref + both rulesets' sha).

🤖 Generated with Claude Code

irvingpop and others added 2 commits October 29, 2026 08:58
pnpm 12 writes the env lockfile (pnpm itself) as a first YAML document
before the main lockfile. The single-document load raised ComposerError,
so every front-end PR that changed the lockfile got the false hard block
"incomplete dependency data".

Read every document with the same unique-key safe loader. Accept one
document, or exactly two with an env document of the known shape. Each
document needs a supported lockfileVersion, and every env dependency
needs a packages entry. Packages from both documents get every check.
Anything else stays a parse failure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of 01d3cb3 found that an env package entry could take another
package's identity through its own name and version, so pnpm could pass
the env check and then skip every check. The env check now refuses an
entry whose name or version differs from its key, and checks each env
dependency against the packages the walker emits.

The main document of a two-document file had no shape check. It may now
hold only the top-level keys of pnpm 12's main lockfile. The
one-document form keeps its old check.

The shared YAML loader expands merge keys before the duplicate-key
check, so a merged key that repeats another key is a parse failure.

Tests cover both scenarios, cross-document aliases, unsafe tags in each
document, merge-key collisions, end markers, a BOM, a document marker in
a block scalar, and a malformed two-document base in collect (K-10).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@irvingpop
irvingpop requested a review from a team as a code owner October 29, 2026 16:12
@github-actions

Copy link
Copy Markdown

🔴 FAIL: OC Claude review did not complete

Caution

Incomplete file coverage blocks this PR. No waiver can clear it.
Next step for the author: fix the cause named in the row, then push. The review runs again on the new commit.

Severity Effect Where Finding Found by
🚫 Hard block Blocks, no waiver review/tests/unit/test_collect.py Incomplete file coverage: file content not scanned: unterminated-private-key, in review/tests/unit/test_collect.py File checks (code, no model)
⚠️ Not run Blocks, no waiver Review pass authentication failed. The pass returned no result. Workflow (code, no model)
⚠️ Not run Blocks, no waiver Security pass authentication failed. The pass returned no result. Workflow (code, no model)
⚠️ Not run Blocks, no waiver Supply chain pass authentication failed. The pass returned no result. Workflow (code, no model)
⚠️ Not run Blocks, no waiver Gate A required job did not succeed: dependency-review: failure Workflow (code, no model)
⚠️ Not run Blocks, no waiver Gate Dependency review did not succeed: job result failure Workflow (code, no model)
⚠️ Not run Blocks, no waiver Gate Dependency review did not succeed: step outcome failure Workflow (code, no model)
File checks Review Security Supply chain Dependency review Coverage
🚫 1 hard block, 2 signals ❌ failed ❌ failed ❌ failed ❌ failed 🚫 incomplete

Run 40909207812, attempt 1 for head ee4f1a2 into main. The required workflow in the merge box is the result that counts. This bot never approves a PR.

📋 Full review record: reasons, checks, signals, finding details, model summaries, token usage

Reviewed snapshot

Head SHA Merge base SHA Base branch Run
ee4f1a23a526fdc48136bb75cd14750970f4f455 03e1b8d09c322bf215d1699da0e793f0064f2974 main 40909207812, attempt 1

Reasons the gate failed

Reason Waivable? Detail
A required job did not succeed 🚫 no dependency-review: failure
Dependency review did not succeed 🚫 no job result failure
Dependency review did not succeed 🚫 no step outcome failure
A review pass failed 🚫 no pass review failed: authentication failed
A review pass failed 🚫 no pass security failed: authentication failed
A review pass failed 🚫 no pass supply-chain failed: authentication failed
Hard block from the file checks 🚫 no incomplete-coverage in review/tests/unit/test_collect.py
Hard block from the file checks 🚫 no incomplete-coverage (coverage record is not complete)

No waiver line is shown. At least one reason cannot be waived, so a waiver would not change the result.

Checks (code, no model)

Check Result Detail
Hard block 🚫 blocks Incomplete file coverage: file content not scanned: unterminated-private-key, in review/tests/unit/test_collect.py
Coverage 🚫 NOT complete files in comparison 5, files collected 5, trees complete
Unavailable file ⚠️ unavailable review/tests/unit/test_collect.py: unterminated-private-key
Dependency changes ✅ none
Dependency review job ❌ failed

Signals (context only, never block)

  • ℹ️ Very long line: lines longer than 500 characters, in docs/claude-review-design.md, lines 988
  • ℹ️ Hidden zero-width character: zero-width characters U+FEFF, in review/tests/unit/test_deps.py, lines 496

Dependency changes

None.

Finding details

Model output from untrusted input. Check it before you act on it. Verified means only that the quoted text is at that place. It does not mean the claim is true.

Blocking is decided by code from category and severity, never by the model. A finding in a blocking category blocks only at high or critical severity.

No findings from the passes that ran. The Review, Security, Supply chain pass did not run, so this is not a clean result.

Model summaries

Model output from untrusted input. Check it before you act on it. Verified means only that the quoted text is at that place. It does not mean the claim is true.

Pass Status Model Summary
Review ❌ failed No summary. Reason: authentication failed
Security ❌ failed No summary. Reason: authentication failed
Supply chain ❌ failed No summary. Reason: authentication failed

Token usage

Pass Input Output Cache write Cache read Attempts
Review not recorded not recorded not recorded not recorded not recorded
Security not recorded not recorded not recorded not recorded not recorded
Supply chain not recorded not recorded not recorded not recorded not recorded
Recorded total not recorded not recorded not recorded not recorded not recorded

@irvingpop

Copy link
Copy Markdown
Member Author

Combined into #20.

@irvingpop irvingpop closed this Oct 29, 2026
@irvingpop
irvingpop deleted the irvingpop/phase4-k branch October 29, 2026 19:17
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.

1 participant