queue: no test executes the worker's raw SQL, so a type-resolution error would ship green
メンテナーはふだん 4 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- postgresql, typescript
調査の方向性
queue.test.ts と worker-concurrency.test.ts から始め、その後、既存の postgres:18 CI サービスと、移行済みデータベースのセットアップを確認します。生 SQL の実行、reclaim の述語、legacy ロック、DEAD_LETTER と PENDING の更新、および記載されたインデックス計画を対象とする、Postgres ベースのテストファイルを追加します。Prisma のモックを使わずに、これらの動作と型解決に関するリスクが検証されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Raised repeatedly during the #224 review rounds, and it is the structural limit of the current approach rather than anything wrong with the tests that exist.
The gap
Every claim and reclaim assertion in queue.test.ts and worker-concurrency.test.ts is a substring match against mock.calls[0][0].join(' ') — the template literal's static fragments. The tests mock prisma, so CI never executes the SQL either.
Unverified anywhere, and all of it is load-bearing:
gen_random_uuid()::text(jsonb ->> "Job".type)::double precision— the per-type timeout lookup<param> * INTERVAL '1 millisecond'operator resolution against Prisma's parameter typingLEAST(<float8>, $n)with a Prisma-typed integer parameter — a classic "could not determine data type of parameter" shapePOWER,random(),left(job.error, 200), and the string concatenation on theerrorcolumn- type unification across the
CASEarms UPDATE ... RETURNING "claimToken"semantics- whether the planner actually uses
Job_status_lockUntil_idx— a property asserted as fact in bothschema.prismaand the migration, and only provable byEXPLAIN
Why it is worth doing now
A type-resolution error in reclaimStaleJobs fails on the first poll of every replica, with CI fully green — the sweep is the first statement of every poll. That is a fleet-wide failure that no gate we have can catch.
Behavioural gaps that fall out of the same absence:
- The reclaim predicate has no behavioural test. The premise of #224 is "reclaim on the deadline the claiming worker recorded", and no test asserts which rows that predicate actually selects. Wanted:
lockUntil = now + 120sis left alone by a worker whosedefaultTimeoutMsis 5s;lockUntil = now - 1sis left alone (inside the grace);lockUntil = now - 31sis reclaimed. - The legacy arm is untested behaviourally —
lockUntil IS NULLwithlockedAt20 min ago reclaims, 5 min ago does not. - The DEAD_LETTER vs PENDING branch is untested —
attempts + 1 >= maxAttemptsdrives three different columns. A row atattempts=4, maxAttempts=5must landDEAD_LETTERwithcompletedAtset andrunAtuntouched; atattempts=0,PENDINGwith a futurerunAtandcompletedAtNULL.
Shape
The repo already runs a postgres:18 service in CI. One Postgres-backed test file against a migrated database would cover every item above at once, and queue.test.ts's own header has said integration tests "should be added separately" since it was written — with no owner and no link. This is that link.
- 主要言語
- TypeScript
- スター
- 10
- フォーク
- 4
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 7
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CopilotKit/outpost のほかの issue
-
area: docs area: security roadmap: now
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
CopilotKit/outpost#277 ·
メンテナーはふだん 4 日以内に返信
-
area: infrastructure roadmap roadmap: later
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
CopilotKit/outpost#179 ·
メンテナーはふだん 4 日以内に返信
-
area: ai roadmap roadmap: now
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
CopilotKit/outpost#145 ·
メンテナーはふだん 4 日以内に返信
-
area: integrations priority: low roadmap roadmap: later
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
CopilotKit/outpost#124 · コメント 3 件 ·
メンテナーはふだん 4 日以内に返信
-
area: integrations priority: low roadmap roadmap: later
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
CopilotKit/outpost#123 · コメント 2 件 ·
メンテナーはふだん 4 日以内に返信
CopilotKit/outpost の issue をすべて見る
似ている issue
-
triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
github/docs#46222 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
agent-ready area: config area: skills type: chore upstream: brain-kit
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
-
enhancement priority:low ready-for-dev
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
bug escritorio mapa
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
marcosferr/reporte-ciudadano#4 · コメント 1 件 ·
-
area: material/sort gemini-triaged needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
angular/components#33933 ·
メンテナーはふだん 1 日以内に返信