feat(bitwarden-code-review): recognize confirmed stack layers when validating findings - #219
Conversation
Claude Code validationResult: Issues found Validated the two changed plugins ( One critical finding: a newly added instruction in Critical
Major
Minor
Validated clean
Checks run
|
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE This adds a stacked-PR carve-out to Not covered: Skill review did not run — this review path cannot launch |
ee94722 to
ea48661
Compare
ea48661 to
b77ea79
Compare
b77ea79 to
65a4290
Compare
65a4290 to
b8a1636
Compare
70ce1c8 to
6f65c83
Compare
6f65c83 to
4bcf27a
Compare
4bcf27a to
d925bc4
Compare
d925bc4 to
1487b3f
Compare
1487b3f to
3713977
Compare
3713977 to
2018c06
Compare
2018c06 to
9672475
Compare
9672475 to
3ca22a5
Compare
…lidating findings A stacked PR is reviewed against the layer below it, so a lower layer legitimately adds exports and types whose callers land above it. The rejection criteria assumed a self-contained diff, which turns that design into dead-code findings on every bottom layer. Detection is gated rather than inferred from the base ref alone: Bitwarden runs release branches with cherry-picks, so rc, hotfix-rc, release/*, and develop all have a non-default base while being ordinary self-contained changes. Confirming a layer needs a corroborating signal, and the relaxation never covers a layer that cannot build alone or a security or correctness defect in code the layer does contain.
3ca22a5 to
6e13bad
Compare
🎟️ Tracking
Layer 3 of 4 in stack #221, bottom to top: #220, #217, #219, #218. Based on #217.
No Jira ticket. Found while adding stacked pull request support to
bitwarden-delivery-tools.📔 Objective
avoiding-false-positivesassumes the diff under review is self contained. A stacked pull request is not. It is reviewed against the layer below it, so a layer adds exports and types whose consumers land in a layer above. Under the previous rules the reviewer reads that as dead code and posts findings for it on every such PR.The hard part is not the relaxation, it is deciding when it applies. Anything the author controls is the wrong signal: the base ref is their choice, and so is the PR description. Bitwarden's server and clients repos run release branches with cherry-picks, so
rc,hotfix-rc, andrelease/*PRs all have a non-default base while being ordinary self-contained changes, and the clients monorepo carries per-client variants likehotfix-rc-desktop. Relaxing completeness scrutiny on those is the opposite of what anyone wants.So confirmation rests on structure instead, and both checks must hold:
gh pr list: either the base ref is another open PR's head, or this PR's own head is another open PR's base. The second direction is what confirms the bottom layer of a stack, whose base is trunk and which is precisely the layer shipping consumers-not-yet-present.developandmain, plus prefix matches onrc,hotfix-rc, andrelease/, so the per-client variants are covered. An unrecognized base falls back to a normal review.A stack claim in the title or body is corroboration only and never satisfies check 1 alone. Status resolves once per review rather than per finding.
The relaxation is scoped to absent consumers. A failing build or compile check stays a finding, read from
gh pr checksrather than guessed at from the diff, and so does any security or correctness defect in code the layer does contain.Bash(gh pr list:*)is added to the agent's grants for both structural checks, matching the grantcode-reviewandcode-review-localalready declare.Version 1.14.2 to 1.15.0. MINOR rather than PATCH: the plugin's own Version Format section reserves MINOR for new organizational patterns, and this adds one.