Raw event cursors still count every repository's raw events
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 40/100
調査の方向性
Take #78's typed-event fix as the template — per-target counter, insert-lock trigger, per-target purge mark — because the raw path must mirror it. Read faucet/pgstore/queries/rawevents.sql:90 and :235 for the shared MAX(id) head, then the four call sites that surface it: faucet/rawpoll.go:190, faucet/rawsubscribe.go:167, faucet/rawdeliver.go:72 and :100. Reproduce the leak with a two-repository test before editing. Done when the four checks in the issue hold and an old r1. cursor restarts as truncated.
索引モデルが issue の本文から書いたものです。
説明
Raw event cursors still let a caller count other repositories' raw events and time their arrival. #78 fixed this for typed events only.
Raw events are off unless FAUCET_RAW_EVENTS is set, and production does not set it. docs/security.md already names this as a known gap. Fix it before anyone turns raw events on.
Where the shared number reaches a caller (main 157e81b)
All raw positions are faucet_raw_events.id, one sequence for every repository:
faucet/pgstore/queries/rawevents.sql:90and:235: the head isMAX(id)over the whole table.faucet/rawpoll.go:190: theevents/pollcursor for a raw name (r1.<n>plus the lease).faucet/rawsubscribe.go:167: the subscribe reply cursor.faucet/rawdeliver.go:72and:100: the push watermark and the raw gap cursor.
Suggested fix
Do what #78 did for typed events. Give each target its own count of raw events, assigned under the insert lock by a trigger so an old build keeps numbering during a rolling deploy. Give each target its own purge mark. Return only positions on the named target's count. Never translate an old r1. cursor: restart it as truncated.
Done when
The checks from #78 hold for raw names:
- A reader of a quiet repository gets the same values whether or not other repositories receive raw events or get purged.
- A
maxAgeMsand cursor sweep gives the same answers with or without other repositories' traffic. - A resumed read skips and repeats nothing.
- A hand-made cursor stays on the reader's own count.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
- 主要言語
- Go
- スター
- 1
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
coder/faucet のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 28/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
slavakurilyak/awesome-ai-agents#1026 ·
-
GetBatchResponseById panics for items without a body (204/302) and for unknown ids対応中かも @0z5a が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
JuliusBrussee/caveman#1567 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
bug postgresql
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信