Scope pull request uploads to the pull request
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
Start by reading src/auth.ts, which the issue identifies as enforcing the current upload policy, then trace how cache requests are routed and how vp run addresses cache scopes. The proposal leaves endpoint design, fallback behavior, and retention unresolved, so define those decisions before implementation. Done means same-repository PR runs can write and read their own scope with default-branch fallback, while default-branch builds cannot read PR scopes.
由索引模型根据 Issue 内容生成。
描述
Motivation
A pull request can't reuse cache entries from its own earlier runs. Only push jobs on the namespace's default branch can upload (src/auth.ts), so pull_request runs get 403 write_policy and can only restore what the default branch published. After each new push to a PR, tasks whose inputs differ from the default branch rebuild, even if the PR's previous run already built them.
Uploading PR results into the namespace itself would let unreviewed PR code publish entries that default-branch builds restore, so PR entries need their own scope.
Proposal
- A
pull_requestrun uploads to a scope for its PR, derived from the token'srefclaim (refs/pull/<n>/merge). - PR runs read their PR scope first, falling back to the default branch. Default-branch builds never read PR scopes.
- Default-branch publishing is unchanged.
This covers same-repository PRs only; fork PR runs in public repositories don't get id-token: write.
Open questions
- Endpoint: how a client addresses a PR scope (e.g.
/projects/<namespace>/pulls/<n>), with the write policy checking that the token'srefmatches it. - Fallback: the server could serve default-branch entries on a PR-scope miss, or
vp run(vite-task) could read both endpoints. - Retention: PR scopes should expire soon after the PR closes or goes idle, within the namespace's limits.
- 主要语言
- TypeScript
- 星标
- 8
- 派生
- 0
- 平均合并
- 2 天 15 小时
- 30 天内合并 PR
- 33
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
voidzero-dev/vite-plus-remote-cache-cloudflare 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 35/100
voidzero-dev/vite-plus-remote-cache-cloudflare#6 ·
维护者通常 2 天内回复
查看 voidzero-dev/vite-plus-remote-cache-cloudflare 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
oxidecomputer/skepsis#102 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
voidzero-dev/void#677 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
kunchenguid/gh-axi#247 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
lidge-jun/opencodex#8101 · 2 条评论 ·
维护者通常 1 天内回复