Is your feature request related to a problem? Please describe.
After an --eager push, nodes present in the projection are missing from the database. On sample-app, 11 of them.
The missing rows are all type nodes that carry no _module — src/models.ts/User, src/models.ts/Role, src/util.ts/StringUtil/Builder and 8 more. Because they have no _module they are upserted in the shared pass, but their ids sit under a module's prefix (can://<app>/typescript/src/models.ts/…) while being absent from that module's $keys list. purgeModuleStale therefore deletes them as stale.
So the projection and the database disagree, silently, on every eager push.
Describe the solution you'd like
Not stated in the original issue.
Describe alternatives you've considered
Not stated in the original issue.
Additional context
Reproduced on main
Not introduced by any in-flight branch: 133 nodes against 144 expected on main, 144 against 155 on the id-grammar branch — same delta of 11, same node ids.
Why it stayed invisible
The existing assertion counted only module-owned rows and excluded :TSExternal. These nodes are module-less but module-prefixed, so they fell into neither side of that accounting and no test could see them. It surfaced only when the surviving-graph count was written as an exact figure rather than as a label exclusion.
The fix is a judgement call, which is why this is an issue and not a patch
Two directions, and they differ in what they claim about the data:
- Give these nodes a
_module. Says a type declared in a module belongs to it, and lets the existing per-module purge reach it correctly. Changes what the shared pass is for.
- Make
purgeModuleStale spare shared rows. Says a row without _module is not that module's to delete, and the prefix is a coincidence of id shape rather than a claim of ownership.
The second is closer to how the marker already works — only the analyzer that MERGEs a row marks it — but it leaves the question of who does reclaim a stale shared row.
Definition of done
- The projection and the database agree after
--eager on sample-app, asserted as an exact count rather than a label exclusion, so the next node class that falls between the two cannot hide.
Is your feature request related to a problem? Please describe.
After an
--eagerpush, nodes present in the projection are missing from the database. Onsample-app, 11 of them.The missing rows are all type nodes that carry no
_module—src/models.ts/User,src/models.ts/Role,src/util.ts/StringUtil/Builderand 8 more. Because they have no_modulethey are upserted in the shared pass, but their ids sit under a module's prefix (can://<app>/typescript/src/models.ts/…) while being absent from that module's$keyslist.purgeModuleStaletherefore deletes them as stale.So the projection and the database disagree, silently, on every eager push.
Describe the solution you'd like
Not stated in the original issue.
Describe alternatives you've considered
Not stated in the original issue.
Additional context
Reproduced on
mainNot introduced by any in-flight branch: 133 nodes against 144 expected on
main, 144 against 155 on the id-grammar branch — same delta of 11, same node ids.Why it stayed invisible
The existing assertion counted only module-owned rows and excluded
:TSExternal. These nodes are module-less but module-prefixed, so they fell into neither side of that accounting and no test could see them. It surfaced only when the surviving-graph count was written as an exact figure rather than as a label exclusion.The fix is a judgement call, which is why this is an issue and not a patch
Two directions, and they differ in what they claim about the data:
_module. Says a type declared in a module belongs to it, and lets the existing per-module purge reach it correctly. Changes what the shared pass is for.purgeModuleStalespare shared rows. Says a row without_moduleis not that module's to delete, and the prefix is a coincidence of id shape rather than a claim of ownership.The second is closer to how the marker already works — only the analyzer that MERGEs a row marks it — but it leaves the question of who does reclaim a stale shared row.
Definition of done
--eageronsample-app, asserted as an exact count rather than a label exclusion, so the next node class that falls between the two cannot hide.