GeezerVison is showing github.com — impl(pm-stack F): reference record schema + access check (component E, #9084 slice 1) · Issue #12803 · developing-today/code
impl(pm-stack F): reference record schema + access check (component E, #9084 slice 1) #12803DescriptionPart of #9084 (component F design, doc/2026-11-23T03-04-00Z_design_content-addressed-media-data-plane). Slice 1 of 6.
Build the reference record in component E's (#9083) tenancy schema: rows carrying (content ID per #9106 Part A, partition = jurisdiction + sensitivity tier per #3401, class, created-by, tombstone state), the access check of design §5 (live reference in an authorized DB, or publication reference in the public DB), and reference create/remove outbox events for the index and GC consumers.
Acceptance: schema + access-check implementation with tests covering live/tombstoned references, cross-partition refusal, and restricted-class minting. Activitydeveloping-today commented on Nov 23, 2026 dezren39 commented on Nov 23, 2026 Pickup — xaltha lane, slice 1 of #9084/component F.
Scope as filed: reference record schema (content ID per #9106 Part A, partition = jurisdiction + sensitivity tier per #3401, class, created-by, tombstone state) in the component E tenant/public DB plane, the design §5 access check (live reference in an authorized DB, or live publication reference in the public DB), and reference create/remove outbox events for the index (#12805) and GC (#12806) consumers.
Boundary vs the in-flight siblings: #12796 (E1) owns pkgs/id/hosted-worker/tenancy/ (central tenancy DB) and #12825 owns the PM tenant store schema — this slice touches neither. It lands in pkgs/id/hosted-worker/references/ (migration) + src/references.ts + test/references.test.ts, following the landed blobs pattern in src/user-do.ts. package.json is deliberately left untouched so the E1 lane's test wiring cannot conflict; the new test runs standalone (noted on the PR).
Branch: xaltha/12803-reference-record. dezren39 commented on Nov 23, 2026 Progress — slice landed as PR #13050 (OPEN, MERGEABLE, +793/−0, 3 files; says Closes #12803).
Built
references/migrations/0001_reference_record.sql — content_reference (content ID, jurisdiction + sensitivity tier as the stored partition, class standard|restricted|publication, created-by, tombstone state; partial unique index = one live reference per content/partition/class/writer) + reference_outbox (reference.created/reference.removed, seq cursor, event_id dedupe) for the impl(pm-stack F): derived reference/location index builder (#9084 slice 3) #12805 index and impl(pm-stack F): GC mark-and-sweep worker — epochs, grace, fenced delete (#9084 slice 4) #12806 GC consumers.
src/references.ts — ReferenceStore (partition-bound, over the package's SqlStorage interface) + checkAccess implementing design §5: live reference in an authorized DB in the object's own partition with a permitting class, or live publication reference in the public DB (tier public only). Minting guards: restricted class needs a source-authorized writer; publication class only in the public DB; staging not referenceable.
test/references.test.ts — 15 tests covering the acceptance list: live/tombstoned, cross-partition refusal (jurisdiction and tier), restricted-class minting, plus publication/unpublish, unauthorized-DB refusal, hash-alone-grants-nothing, idempotent create, outbox paging, schema-drift pin.
Evidence (sandbox)
- New tests: 15 passed / 0 failed (
node --experimental-transform-types --test test/references.test.ts)
- Package suite
npm test: 36 passed / 0 failed
tsc --noEmit: clean
Boundary kept: tenancy/ (#12796) and the PM tenant store (#12825) untouched; package.json unchanged by design (see PR body) — wiring test/references.test.ts into the package test script is a one-line follow-up once the E1 lane's wiring lands.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|