A role refused registration_info gets a forbidden toast on every Applications visit

オープン 初心者向け
#2,067 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
74/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
node.js, react, typescript
領域
api, frontend

調査の方向性

src/features/instance/applications/hooks/useSupportsDeploymentSSE.tsから始めて、再試行やメタデータのオプションを含め、registration_infoクエリがどのように設定されているかをたどってください。次に、queryErrorHandlerと、Issueで言及されているretryUnlessRejected()または拒否の処理を読んでください。registration_infoを拒否されたロールでApplicationsにアクセスするたびにリクエストが繰り返されたりForbiddenトーストが表示されたりしなくなり、バージョンがない場合はstagingを引き続き利用できない状態になれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Problem

A role whose operations allowlist doesn't include registration_info sees a "forbidden" error toast every time it opens the Applications page.

useStagedDeploymentsAvailable (src/features/instance/applications/hooks/useSupportsDeploymentSSE.ts:34) queries registration_info for every user, with React Query's default three retries. That hook is behind the always-mounted redeploy dialog. Harper's allowlist gate refuses the operation to such a role with a 403. Checked on Harper 5.4.0-beta.2: a role with operations: ["deploy_component"] gets 403 for both registration_info and get_configuration. The query retries three times, and then queryErrorHandler toasts it.

Nothing breaks: without a version, staging isn't offered. The only effect is the noise, and the four requests on every visit.

Fix

Either skip the query for a role that can't call it, or give it retry: retryUnlessRejected() and meta: { refusalIsAnAnswer: true }. That meta flag is added to queryErrorHandler in the private-database-copy PR for get_configuration.

Review-Deferral: edc14630cb6cf70a severity=minor category=reliability

🤖 Generated by Anthropic Claude (Claude Code); posted via @dawsontoth.

主要言語
TypeScript
スター
5
フォーク
4
平均マージ
1日 20時間
マージ済み PR(30日)
140

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

HarperFast/studio のほかの issue

HarperFast/studio の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。