You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
datasource-autoconnect.test.ts federated-query case fails locally on clean main — engine.find returns 8 duplicated rows for 2 seeded (CI green, so likely environment-sensitive) #4102
Hit while running the @objectstack/runtime suite for unrelated work. Filing rather than chasing it, since it is not mine and not obviously broken for everyone.
Symptom
packages/runtime/src/datasource-autoconnect.test.ts → ADR-0062 declared-datasource auto-connect › makes the federated object queryable through the engine with zero app code:
engine.find returns eight rows, and the sorted head is all 'first' — so the federated read is multiplying rows rather than returning the two that were written.
Reproduction / scoping
Clean main at 7ac1995, fresh full pnpm build, node v22.22.2.
Fails both in the full package suite (1 failed | 913 passed) and when the file is run alone (1 failed | 9 passed), so it is not cross-file order pollution.
Reproduces with unrelated local edits stashed, so it is not caused by them.
Important caveat
CI's Test Core job was green on #4084 against this same base, so this does not reproduce everywhere — it is likely sensitive to something environmental (driver/adapter build, platform, or a timing assumption in the federated read path) rather than plainly broken on main. Worth someone confirming whether the runtime suite's datasource-autoconnect case is actually in CI's scope, because if it is and it passes there, the row multiplication is real but conditional — and a conditional duplicate-rows bug in the federated read path is worth more than a flaky-test label.
Activity
os-zhuang commentedon Aug 2, 2026
🔒 CLAIM — pm-dispatch round 6
branch:
claude/issue-4102-federated-find-row-multiplicationworktree:
objectstack-issue-4102本轮由 PM 会话派发给 os-dev agent。若另有会话已在做此题,以本 issue 更早的 CLAIM 评论为准,后到者退出。
Generated by Claude Code
os-zhuang commentedon Aug 2, 2026
PM 裁决:关闭为 #4083 的重复,不改任何代码。
复核证据(第 6 轮 agent 实测,非推断):
origin/main(868718e)全新 worktree、node v22.22.2(与报告者同版本):该文件连续四次 11/11 全绿,跑完后树里不存在.objectstack/目录;datasource-autoconnect.test.tsfederated-query case fails locally on clean main — engine.find returns 8 duplicated rows for 2 seeded (CI green, so likely environment-sensitive) #4102 提交于 2026-07-30 09:54 UTC,基于 7ac1995;修同一症状的 974c6d4(datasource-autoconnect 的联邦查询测试在本地必现失败:ext_note 读到 6~12 行而非 2 行(CI 绿,需第二台机器复核) #4083 的修复 PR fix(datasource): amemorydatasource is ephemeral, and each pool gets its own store (#4083) #4111)在 30 分钟后合入,commit message 逐字描述了本 issue 的现象与机理——工厂建的内存池继承persistence:'auto',写进进程级相对路径.objectstack/data/memory-driver.json,下次启动复读 → "干净 checkout 2 行、同树第 N 次跑 2×N 行,CI 永远是第 1 次所以全绿"。报告者看到的 8 行 = 第 4 次运行,"clean main" 不会清掉这个 untracked 状态文件,与 caveat 完全吻合;memorydatasource is ephemeral, and each pool gets its own store (#4083) #4111 随修复落地的 pin 钉死(datasource-autoconnect.test.ts的 ADR-0062 D1 段 + 工厂测试 93 行:不落状态文件、二次启动为空、用flush()消除计时竞态)。再加 pin 是重复覆盖;在engine.find里加去重则是规则明令禁止的消费端容错,会藏住未来的生产者 bug。给报告者:你的树
git pull即自愈(#4111 之后工厂不再读旧状态文件);手动删掉遗留的.objectstack/data/memory-driver.json可顺手清树。Generated by Claude Code