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:
AssertionError: expected [ 'first', 'first', 'first', …(5) ] to deeply equal [ 'first', 'second' ]
The test seeds exactly two rows into the live external driver and reads them back through the engine:
awaitdriver.bulkCreate('ext_note',[{id: 'n1',title: 'first'},{id: 'n2',title: 'second'}]);constrows=awaitengine.find('ext_note');expect(rows.map((r)=>r.title).sort()).toEqual(['first','second']);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.
I have not investigated the cause.
Hit while running the
@objectstack/runtimesuite 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:The test seeds exactly two rows into the live external driver and reads them back through the engine:
engine.findreturns 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
mainat7ac1995, fresh fullpnpm build,node v22.22.2.1 failed | 913 passed) and when the file is run alone (1 failed | 9 passed), so it is not cross-file order pollution.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'sdatasource-autoconnectcase 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.I have not investigated the cause.