breg: keep `resultEffects` in the Action description for a profile that can read a Proposal but not start it
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
調査の方向性
Start with the Proposal metadata loop in crates/registry-breg/src/api/mod.rs:675-716 and the result effect filtering in crates/registry-breg/src/artifacts.rs:1331 and :1554-1566. Read the existing schema test at crates/registry-breg/src/tests/artifacts_response_schema_tests.rs:360-375, then add coverage for readable and hidden record types and confirm the reader still receives no routes. Done means reader-visible effects are filtered by record type, the existing populated-list test passes, and any changed schemas are regenerated.
索引モデルが issue の本文から書いたものです。
説明
Problem
A profile with a Proposal get grant but no Start grant receives an Action description in GET /v1/metadata. The description hides the routes, which is deliberate: the profile cannot start the Action. It also sets resultEffects to an empty list. A client cannot then tell which record fields or record types the Action changes, so it has to guess, for example when it shows a reader what a Proposal would do once applied.
The blanking may have been deliberate. Neither the code nor the pull request that introduced it (#2040) says why. If it exists to avoid disclosing effects on record types the reader cannot see, the fix should keep that protection rather than blank everything.
Evidence
All line numbers are on origin/main at 36d25ef652.
crates/registry-breg/src/api/mod.rs:675to:716: the loop that adds a description for each visible Proposalgetgrant. It emptiesroutes(:706), removesrouteandconditionRoute, emptiesrequiredConditionKeys, then setsresultEffectsto[]at:716. The comment at:675states only the input-disclosure intent.crates/registry-breg/src/artifacts.rs:1331: the public Action entry buildsresultEffectsby filteringaction.effectsthroughselected_result_effects.crates/registry-breg/src/artifacts.rs:1554to:1566(action_selected_result_effects): with a selected profile, effects come only from that profile's Action permissionresults. A reader has no Action permission, so this path also yields an empty set. This is my reading of the code and I have not run it.- The set was introduced by commit 2ec3726883 (#2040, 2026-10-16).
git log -Sfinds no earlier version of the line, and the #2040 description does not mention it. crates/registry-breg/src/tests/artifacts_response_schema_tests.rs:360to:375asserts the populated list for a profile that holds an Action grant. No test asserts the empty list for a reader.- The clients decode the member as required:
crates/registry-breg-client/src/metadata.rs:3310, andresultEffectsincrates/registry-breg-client-node/client.d.ts:539.
Proposed change
- Stop blanking
resultEffectsfor a Proposal reader. Derive the list fromaction.result_effects(the effects a Proposal applies), not from an Action permission. - Keep record-type disclosure intact: list only effects whose
recordTypethe profile may see in the same metadata response. Decide whether an effect on a hidden record type is omitted or listed without detail, and record the decision. - Leave
routes,route,conditionRouteandrequiredConditionKeysas they are. - Document the field for readers on the Proposals configuration page.
Acceptance
- A test shows a Proposal reader sees the Action's effects for record types it can read.
- A test shows an effect on a record type the reader cannot read is not disclosed.
- A test shows the reader still gets no routes.
- The existing populated-list test still passes.
- The OpenAPI and metadata schema documents are regenerated with their generators if the change alters them.
- 主要言語
- Rust
- スター
- 2
- フォーク
- 0
- 平均マージ
- 9時間 48分
- マージ済み PR(30日)
- 151
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
registrystack/registry-stack のほかの issue
-
area:breg enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
registrystack/registry-stack#2765 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
registrystack/registry-stack#2761 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
registrystack/registry-stack#2743 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
registrystack/registry-stack#2706 ·
メンテナーはふだん 1 日以内に返信
-
macOS contributor gates: Messaging config tests fail under the symlinked macOS temporary directoryオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
registrystack/registry-stack#2704 ·
メンテナーはふだん 1 日以内に返信
registrystack/registry-stack の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
AstrBotDevs/AstrBot-desktop#197 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
stackabletech/airflow-operator#898 ·
メンテナーはふだん 1 日以内に返信
-
2 advisory ignore entries no longer match anything (`bytes`, `time` already patched in `Cargo.lock`)対応中かも @zyl71 が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100