test: IssueStore Durable Object tests via runInDurableObject (test-leg slice 3)#170
Merged
Conversation
…t-leg slice 3) Third slice of the CI test leg (#165): the IssueStore Durable Object (DO-embedded SQLite structured store), tested inside workerd with runInDurableObject. IssueStore self-initializes its schema in the constructor, so no migration step is needed. A minimal entry (src/test-do-entry.ts) re-exports only IssueStore so the pool can bind it as a SQLite DO without loading the full worker graph (mcp/oauth/pipeline + Vectorize/AI, which have no local emulation). The existing workers config gains the DO binding alongside the D1 one; both *.workers.test.ts files share the pool. Covers: - issue upsert/get round-trip (incl label/assignee array (de)serialization) - ON CONFLICT (repo, number) idempotent upsert (update, no duplicate) - listIssuesByRepo state filter / updated_at DESC ordering / limit - getWatermark/setWatermark round-trip + empty-etag -> undefined normalization IssueStore(DO 内蔵 SQLite の構造化ストア)を runInDurableObject で実機寄りに検証。 ポーリング watermark の往復も pin した。Vectorize/AI 依存面は引き続き #165 に残置。 Refs #165
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
github-rag-mcp | ade18ff | Jun 21 2026, 02:10 AM |
liplus-lin-lay
commented
Jun 21, 2026
liplus-lin-lay
left a comment
Member
Author
There was a problem hiding this comment.
AI セルフレビュー (auto mode)
- ✅ CI 全 green:
testジョブで node 42 + workers 15(D1 9 + DO 6、workerd/miniflare の実 SQLite)+tsc --noEmit+ wrangler dry-run / Workers Builds。ローカルでも反復で安定確認。 - ✅
src/Worker 本体コードは無変更。差分はテスト + 最小エントリ(test-do-entry.ts)+ 設定のみ。 - ✅ IssueStore の構造化ストア(issue CRUD 冪等性 +
listIssuesByRepoフィルタ/順序 + ポーリング watermark 往復)を実 DO(runInDurableObject)で pin。テストごとユニーク DO インスタンスで分離。 - リリース種別: 本体無変更で patch 相当。テスト基盤のため本 PR では release しない。
self-review pass。auto mode のため squash merge。#165 は残スコープ(oauth フロー全体 / Vectorize・AI)のため open 継続。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
#165(テスト脚の復元)スライス3。IssueStore Durable Object(DO 内蔵 SQLite の構造化ストア)を workerd 内で
runInDurableObjectを使って検証。IssueStore はコンストラクタでスキーマを自己初期化(idempotentCREATE TABLE IF NOT EXISTS)するため migration 不要。構成
src/test-do-entry.tsが IssueStore のみ re-export → pool が SQLite DO としてバインド。full worker graph(mcp/oauth/pipeline + Vectorize/AI、ローカル emulation 無し)をロードせずに済む。*.workers.test.tsが同一 pool を共有。idFromName)で storage を分離。カバレッジ(DO 統合 6 件)
ON CONFLICT (repo, number)冪等 upsert(update、重複行無し)listIssuesByRepoの state フィルタ /updated_at DESC順 / limitgetWatermark/setWatermark往復 + 空 etag→undefined 正規化(ポーリング watermark の正しさ)影響範囲
src/の Worker 本体コードは無変更。差分はテスト + 最小エントリ + 設定のみ。挙動変更なし → patch 相当。本 PR では release しない。残(#165)
Refs #165