Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
PR Summary by QodoRFC: Package screening pipeline and content-addressed verdict store
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
897dda3 to
ea44382
Compare
| - **Blocked-version UX.** Is `403` + reason body enough for pnpm to render a | ||
| good error today, or does pnpm need a small client change to surface the | ||
| machine-readable reason nicely? |
There was a problem hiding this comment.
hey @zkochan ! I've been looking into this, and 403 plus a reason body isn't enough today, because the client throws the body away before anything can render it.
FetchError keeps only {status, statusText}, so nothing downstream ever sees the body. The 403 is reported as an auth error, telling the user to run pnpm login
Since 403 already means "log in", the client could use something in the body to recognize a policy block. It could be the same { name, version, code, reason} that pnpr's violations frame already emits.
Happy to implement the client side if that's a direction you want. Separately, we could also add parity with npm's policyRestrictions which clearMeta currently drops (though i realize it being there isn't necessarily a reason to adopt it.
For context: I'm a former npm CLI maintainer, still working in this space, and I have interest in seeing this feature work well 😄
Summary
Proposes a screening layer for artifacts pnpr serves (aligned with the registries rename after #16):
name@version, not registry), so identical bytes share analysis across registries and signed verdict bundles can be exchanged between deployments later.minimumReleaseAge), hold/block as explicit403with machine-readable reason (never404, to prevent fall-through), publish-time scanning on hosted registries, operator dispositions, and post-serve revocation surfacing.Independent of, but composable with, the patch-provider RFC (#14): a block reason can advertise an available patched artifact when a patch manifest knows one.