Skip to content

Commit 001c820

Browse files
committed
fix(scripts): register the tenancy census artefact with the merge driver (#14957)
CI red on `pnpm check:merge-driver`: `gen:platform-object-tenancy-census` had no recorded merge disposition, and every generator must be in one of the two ledgers in `scripts/regen-artifacts.mjs`. The honest answer is `REGEN_ARTIFACTS`, not `NOT_DRIVER_MANAGED`. `renderArtefact` renders the whole file in memory, its `$comment` preamble included, so nothing on disk survives into the output and there is no hand-written region a deferral could launder — which is the question that table exists to ask. No `mixed` for the same reason. The routing earns its place: two PRs that each add an object land disjoint row sets, and the merged tree's census equals neither side — its `totals` and `reasonTotals` least of all, which a union of rows would leave arithmetically wrong while looking merged. ⚠️ The driver is LOCAL and is never the protection. The load-bearing half is `check:platform-object-tenancy-census` in `lint.yml`, on `pull_request` and `merge_group` with no `paths:` filter, re-deriving from the tree rather than reading the file back — so it also catches the silent case where two branches' rows do not overlap and the text merge exits 0 over a file describing neither. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
1 parent 2a96299 commit 001c820

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,4 @@ content/docs/references/** merge=os-regen
154154
content/docs/permissions/system-context.mdx merge=os-regen
155155
skills/*/references/_index.md merge=os-regen
156156
skills/objectstack-ui/references/react-blocks.md merge=os-regen
157+
scripts/platform-object-tenancy-census.json merge=os-regen

scripts/regen-artifacts.mjs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,36 @@ export const REGEN_ARTIFACTS = Object.freeze([
341341
gen: 'gen:react-blocks',
342342
check: 'check:react-blocks',
343343
},
344+
// #14957. The platform-object tenancy census — which platform-namespace objects
345+
// the tenancy machinery can reach, and the declaration on each excluded object's
346+
// own schema that puts it outside. Generated WHOLE: `renderArtefact` renders the
347+
// entire file in memory, its `$comment` preamble included, so nothing on disk
348+
// survives into the output and there is no hand-written region for a deferral to
349+
// launder — which is the question this table exists to ask. ⇒ `REGEN_ARTIFACTS`
350+
// rather than `NOT_DRIVER_MANAGED`, and no `mixed`.
351+
//
352+
// Two PRs that each add an object land disjoint row sets; the merged tree's
353+
// census equals NEITHER side, and its `totals` / `reasonTotals` equal neither
354+
// either — the same "no text merge can reach the answer" property as its
355+
// neighbours above, sharpened by the aggregates, which a union of rows would
356+
// leave arithmetically wrong while looking merged.
357+
//
358+
// Same cheap-half caveat as its neighbours, same answer: the driver is LOCAL and
359+
// is never the protection. `check:platform-object-tenancy-census` runs in
360+
// `lint.yml` on `pull_request` and `merge_group` with no `paths:` filter, and it
361+
// RE-DERIVES the census from the tree rather than reading the file back, so it
362+
// catches the silent case too — two branches whose rows do not overlap merging to
363+
// exit 0 over a file describing neither side.
364+
//
365+
// No `readsDist`/`readsSchemaTree`: the generator loads its predicate and every
366+
// object declaration from SOURCE (no build), so a merged tree is the whole
367+
// prerequisite.
368+
{
369+
path: 'scripts/platform-object-tenancy-census.json',
370+
gen: 'gen:platform-object-tenancy-census',
371+
check: 'check:platform-object-tenancy-census',
372+
owner: ROOT_OWNER,
373+
},
344374
]);
345375

346376
/**

0 commit comments

Comments
 (0)