Skip to content

Commit b2bcae1

Browse files
committed
fix(runtime,sharing,examples): app-plugin position sections, runtime recipient enum, D1 grandfather stamps — dogfood 39/39 green
- app-plugin: stack section registration positions→'position' kind (the seeding gap: declared positions never reached the registry); standalone artifact surface roles→positions; CLI diff/stats keys. - sys_sharing_rule.recipient_type runtime enum role→position (seeding inserted 'position' and was rejected by the stale enum), description updated to the BU-subtree semantics of unit_and_subordinates. - ADR-0090 D1 grandfather stamps: explicit `sharingModel: 'public_read_write'` on showcase/dogfood fixture objects whose isolation is RLS-owned or intentionally public (they carry an auto-injected owner_id, so the new unset⇒private default would owner-filter them). - dogfood expectations updated to v2 semantics (recipient 'position'; appDefaultPermissionSetName is isDefault-only). - service-datasource test: explicit casts for Response.json() unknowns (latent, surfaced by the affected-package typecheck). Full dogfood suite 39 files / 191 tests green; repo-wide typecheck clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012oLzaP8n7A3YKFmgaHWC8H
1 parent 14db71b commit b2bcae1

23 files changed

Lines changed: 82 additions & 19 deletions

examples/app-showcase/src/data/objects/account.object.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ import { P } from '@objectstack/spec';
1414
*/
1515
export const Account = ObjectSchema.create({
1616
name: 'showcase_account',
17+
// [ADR-0090 D1] Explicit grandfather stamp: record isolation for this demo
18+
// object is RLS-owned / intentionally public; without this the new secure
19+
// default (unset OWD => private) would owner-filter it.
20+
sharingModel: 'public_read_write',
1721
label: 'Account',
1822
pluralLabel: 'Accounts',
1923
icon: 'building',

examples/app-showcase/src/data/objects/business-unit.object.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
1010
*/
1111
export const BusinessUnit = ObjectSchema.create({
1212
name: 'showcase_business_unit',
13+
// [ADR-0090 D1] Explicit grandfather stamp: record isolation for this demo
14+
// object is RLS-owned / intentionally public; without this the new secure
15+
// default (unset OWD => private) would owner-filter it.
16+
sharingModel: 'public_read_write',
1317
label: 'Business Unit',
1418
pluralLabel: 'Business Units',
1519
icon: 'network',

examples/app-showcase/src/data/objects/category.object.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
88
*/
99
export const Category = ObjectSchema.create({
1010
name: 'showcase_category',
11+
// [ADR-0090 D1] Explicit grandfather stamp: record isolation for this demo
12+
// object is RLS-owned / intentionally public; without this the new secure
13+
// default (unset OWD => private) would owner-filter it.
14+
sharingModel: 'public_read_write',
1115
label: 'Category',
1216
pluralLabel: 'Categories',
1317
icon: 'list-tree',

examples/app-showcase/src/data/objects/external/customer.object.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
1111
*/
1212
export const ExternalCustomer = ObjectSchema.create({
1313
name: 'showcase_ext_customer',
14+
// [ADR-0090 D1] Explicit grandfather stamp: record isolation for this demo
15+
// object is RLS-owned / intentionally public; without this the new secure
16+
// default (unset OWD => private) would owner-filter it.
17+
sharingModel: 'public_read_write',
1418
label: 'External Customer',
1519
pluralLabel: 'External Customers',
1620
icon: 'database',

examples/app-showcase/src/data/objects/external/order.object.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
99
*/
1010
export const ExternalOrder = ObjectSchema.create({
1111
name: 'showcase_ext_order',
12+
// [ADR-0090 D1] Explicit grandfather stamp: record isolation for this demo
13+
// object is RLS-owned / intentionally public; without this the new secure
14+
// default (unset OWD => private) would owner-filter it.
15+
sharingModel: 'public_read_write',
1216
label: 'External Order',
1317
pluralLabel: 'External Orders',
1418
icon: 'shopping-cart',

examples/app-showcase/src/data/objects/field-zoo.object.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ import { cel } from '@objectstack/spec';
1919
*/
2020
export const FieldZoo = ObjectSchema.create({
2121
name: 'showcase_field_zoo',
22+
// [ADR-0090 D1] Explicit grandfather stamp: record isolation for this demo
23+
// object is RLS-owned / intentionally public; without this the new secure
24+
// default (unset OWD => private) would owner-filter it.
25+
sharingModel: 'public_read_write',
2226
label: 'Field Zoo',
2327
pluralLabel: 'Field Zoo',
2428
icon: 'shapes',

examples/app-showcase/src/data/objects/invoice.object.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import { cel, P } from '@objectstack/spec';
1212
*/
1313
export const Product = ObjectSchema.create({
1414
name: 'showcase_product',
15+
// [ADR-0090 D1] grandfather stamp: public demo catalog data.
16+
sharingModel: 'public_read_write',
1517
label: 'Product',
1618
pluralLabel: 'Products',
1719
icon: 'package',
@@ -37,6 +39,8 @@ export const Product = ObjectSchema.create({
3739
*/
3840
export const Invoice = ObjectSchema.create({
3941
name: 'showcase_invoice',
42+
// [ADR-0090 D1] grandfather stamp: isolation is RLS-owned (owner == current_user.email); lines derive via controlled_by_parent.
43+
sharingModel: 'public_read_write',
4044
label: 'Invoice',
4145
pluralLabel: 'Invoices',
4246
icon: 'receipt',

examples/app-showcase/src/data/objects/preference.object.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
99
*/
1010
export const Preference = ObjectSchema.create({
1111
name: 'showcase_preference',
12+
// [ADR-0090 D1] Explicit grandfather stamp: record isolation for this demo
13+
// object is RLS-owned / intentionally public; without this the new secure
14+
// default (unset OWD => private) would owner-filter it.
15+
sharingModel: 'public_read_write',
1216
label: 'Setting',
1317
pluralLabel: 'Settings',
1418
icon: 'settings',

examples/app-showcase/src/data/objects/project.object.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ import { cel, P } from '@objectstack/spec';
1010
*/
1111
export const Project = ObjectSchema.create({
1212
name: 'showcase_project',
13+
// [ADR-0090 D1] Explicit grandfather stamp: record isolation for this demo
14+
// object is RLS-owned / intentionally public; without this the new secure
15+
// default (unset OWD => private) would owner-filter it.
16+
sharingModel: 'public_read_write',
1317
label: 'Project',
1418
pluralLabel: 'Projects',
1519
icon: 'folder-kanban',

examples/app-showcase/src/data/objects/semantic-zoo.object.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
2222

2323
export const SemanticZoo = ObjectSchema.create({
2424
name: 'showcase_semantic_zoo',
25+
// [ADR-0090 D1] Explicit grandfather stamp: record isolation for this demo
26+
// object is RLS-owned / intentionally public; without this the new secure
27+
// default (unset OWD => private) would owner-filter it.
28+
sharingModel: 'public_read_write',
2529
label: 'Semantic Zoo',
2630
pluralLabel: 'Semantic Zoos',
2731
icon: 'flask-conical',

0 commit comments

Comments
 (0)