Commit 04f1182
docs(spec): SystemFieldName says which columns are actually injected (#4430)
* docs(spec): SystemFieldName says which columns are actually injected
The table documented `tenant_id` as "Tenant isolation key" while the column
the registry actually provisions is `organization_id` — which had no constant
at all, alongside the equally-missing `created_by` / `updated_by`. Two of the
seven entries (`user_id`, `deleted_at`) are not injected either, with nothing
saying so.
Consumers hand-copying a system-field list read this as the injection set and
drifted accordingly: cloud#982 found three copies carrying `tenant_id`,
`org_id` and `space` between them, none of which any injection site produces,
and cloud#979 was one of those copies claiming a business field named `owner`
so every seeded row shipped it blank.
Additive only — no entry removed, no value changed:
- add ORGANIZATION_ID, CREATED_BY, UPDATED_BY, the three injected columns the
table was missing;
- record per entry whether open-core injects it, so the legacy (`tenant_id`)
and authored (`user_id`) names cannot be mistaken for provisioned ones;
- state in the module doc that this is a NAME registry, not the injected set —
`applySystemFields` decides that per object from `ownership` / `tenancy` /
`systemFields`, so the same name is a system column on one object and
business data on the next. A consumer asking "is this field system-managed
on THIS object" branches on `Field.system`, which is already published for
exactly that and which the doc now points at.
`@objectstack/lint`'s SYSTEM_FIELDS is unaffected in content: it unions this
table with FIELD_GROUP_SYSTEM_FIELDS, which already carried all three added
names.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YRXTo7QC2A6EXXxJ5GKwsS
* chore: add changeset
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YRXTo7QC2A6EXXxJ5GKwsS
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 1ee48bc commit 04f1182
3 files changed
Lines changed: 137 additions & 10 deletions
File tree
- .changeset
- packages/spec/src/system/constants
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
81 | 82 | | |
| 83 | + | |
82 | 84 | | |
| 85 | + | |
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
| |||
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
93 | 120 | | |
94 | 121 | | |
95 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
115 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
121 | 155 | | |
122 | 156 | | |
123 | 157 | | |
| |||
129 | 163 | | |
130 | 164 | | |
131 | 165 | | |
132 | | - | |
| 166 | + | |
133 | 167 | | |
134 | | - | |
| 168 | + | |
135 | 169 | | |
136 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
137 | 173 | | |
138 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
139 | 177 | | |
140 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
141 | 192 | | |
142 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
143 | 199 | | |
144 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
145 | 204 | | |
146 | 205 | | |
147 | 206 | | |
| |||
0 commit comments