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
Filed from the HotCRM reference app after the third one bit us in a single day. Each was found separately, by a different task, and none is written down anywhere that connects it to the others.
The three behaviours
isSystem: true on a write is used by the seed loader and by internal writers. Across three different packages it changes three unrelated things:
#
package
effect
how we found it
1
ObjectQL (applySystemFields)
owner_id is not injected — the row is written with no platform owner
hotcrm#622: demo_bootstrap had to sweep and stamp ownership after the fact
2
write pipeline
readonly stripping is bypassed — a readonly field CAN be written
hotcrm#613: relied on deliberately, so a seed_key column exists that only the seed loader can write
3
plugin-sharing
grant materialisation is skipped — the record-write hook returns early, so no sys_record_share rows are created
hotcrm#640: every seeded row is isSystem, so a fully-configured sharing rule granted nothing until a rule was re-evaluated
Number 3 is the one that motivated this issue. On a fresh install we had: 9 sharing rules installed, 9 accounts matching their criteria, users holding the right positions — and sys_record_shareempty. Every visible layer said the feature was configured. Nothing anywhere said that the seed path had skipped materialisation, and no amount of reading the sharing metadata could have revealed it.
Why this is worth a single issue rather than three
Individually each is defensible. Together they mean isSystem is not one concept — it is at least three policies (ownership, field protection, sharing) sharing one boolean, implemented in three packages, discoverable only by reading each package's source.
The failure mode is always "configured but inert". In all three cases the metadata is complete and correct; the gap is invisible from the metadata and only observable by querying the resulting rows. For AI-authored metadata this is close to worst-case: the author has no signal, and validation has nothing to complain about.
What we would like
Document the full set. The minimum useful artifact is one table listing every behaviour keyed off isSystem, in one place, maintained as the authority. If there is a fourth we have not hit yet, that table is how we would find out.
Make Implement ObjectStack protocol specification with Zod schemas and TypeScript interfaces #3 observable. A seed run that writes N rows to an object covered by an active sharing rule and materialises 0 grants is worth one INFO line ("sharing materialisation skipped for isSystem writes; re-evaluate rules or restart to backfill"). Today the only way to learn this is to query sys_record_share, find it empty, and go read plugin-sharing's source.
Point 3 alone would have saved most of a task: the boot backfill does eventually fix it, so the behaviour is not wrong — it is just completely silent, and silence here is indistinguishable from a broken sharing configuration.
Filed from the HotCRM reference app after the third one bit us in a single day. Each was found separately, by a different task, and none is written down anywhere that connects it to the others.
The three behaviours
isSystem: trueon a write is used by the seed loader and by internal writers. Across three different packages it changes three unrelated things:applySystemFields)owner_idis not injected — the row is written with no platform ownerdemo_bootstraphad to sweep and stamp ownership after the factreadonlystripping is bypassed — areadonlyfield CAN be writtenseed_keycolumn exists that only the seed loader can writeplugin-sharingsys_record_sharerows are createdisSystem, so a fully-configured sharing rule granted nothing until a rule was re-evaluatedNumber 3 is the one that motivated this issue. On a fresh install we had: 9 sharing rules installed, 9 accounts matching their criteria, users holding the right positions — and
sys_record_shareempty. Every visible layer said the feature was configured. Nothing anywhere said that the seed path had skipped materialisation, and no amount of reading the sharing metadata could have revealed it.Why this is worth a single issue rather than three
Individually each is defensible. Together they mean
isSystemis not one concept — it is at least three policies (ownership, field protection, sharing) sharing one boolean, implemented in three packages, discoverable only by reading each package's source.That has two concrete consequences:
What we would like
isSystem, in one place, maintained as the authority. If there is a fourth we have not hit yet, that table is how we would find out.sys_record_share, find it empty, and go readplugin-sharing's source.Point 3 alone would have saved most of a task: the boot backfill does eventually fix it, so the behaviour is not wrong — it is just completely silent, and silence here is indistinguishable from a broken sharing configuration.
Related: hotcrm#622, hotcrm#613, hotcrm#640 (PR hotcrm#652), #4698.