Skip to content

feat(spec,security): OrgScopingEntitlement grows platform-global exemption + unbounded-admin suppression, consumed by Layer 0 arming - #12704

Merged
hotlong merged 3 commits into
mainfrom
claude/issue-12699-org-scoping-entitlement
Aug 27, 2026
Merged

hotlong merged 3 commits into
mainfrom
claude/issue-12699-org-scoping-entitlement

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Fixes #12699
Part of objectstack-ai/cloud#1653

What

OrgScopingEntitlement (packages/spec/src/security/tenancy-posture.ts) grows two per-deployment wall-shaping keys, both declared by the mounted org-scoping service (per-deployment, never authorable app metadata), both consumed by plugin-security when arming the Layer 0 organization wall, both fail closed — an absent (or junk) declaration leaves behaviour byte-identical to today:

  1. platformGlobalObjects — objects THIS deployment declares platform-global. Layer 0 does not wall them here, exactly as if the object had declared tenancy: { enabled: false } itself — but only on this deployment. It composes with, never replaces, the per-object authoring channel, which stays wrong for these objects because they DO wall on tenant runtimes (same object, different deployments, different wall).
  2. suppressUnboundedOrgAdminGrant — arming a walled posture must not auto-grant organization_admin's unbounded viewAllRecords/modifyAllRecords superbits: the membership-driven auto-grant hands out organization_admin_no_bypass instead (the epic's measured regression: sys_secret 403-to-200, 17 objects regaining cross-tenant writes, cloud#1257's write gate voided by the posture flip).

Dead seams stay dead, per the ruling: host self-declaration of the boundary is not revived (the org-create gate is untouched — only a mounted enterprise runtime can declare anything here), and nothing rides through objectExtensions (the merge silently drops tenancy — objectstack#12680).

Consumer contract — for cloud Phase 2 (objectstack-ai/cloud#1664)

Key names and TypeScript shapes (verbatim)

export interface OrgScopingEntitlement {
  readonly supportedPostures?: readonly TenancyPosture[];      // pre-existing (ADR-0105 D12)
  readonly platformGlobalObjects?: readonly string[];          // NEW
  readonly suppressUnboundedOrgAdminGrant?: boolean;           // NEW
}
  • platformGlobalObjects entries are exact object machine names (regex ^[a-z_][a-z0-9_]*$) — no wildcards, no globs, no empty strings. One junk entry voids the whole key (refused loudly, never partially honoured), and refusal resolves to "absent" = everything walls.
  • Runtime twins exported from @objectstack/spec/security: OrgScopingEntitlementSchema (non-strict object — a live service instance's extra machinery never disqualifies its declaration) and PlatformGlobalObjectsSchema (+ type alias PlatformGlobalObjects). Consumers validate per key: junk in one key never voids the other's valid declaration.

Declaration-site pattern

The keys are readonly properties on the object registered as the org-scoping service — the same object that already declares supportedPostures. The in-repo model is SimulatedOrgScopingPlugin in packages/verify/src/harness.ts; the cloud runtime declares the same way:

class ControlPlaneOrgScopingPlugin {
  readonly providesServices = ['org-scoping'];
  readonly supportedPostures = ['isolated'] as const;
  readonly platformGlobalObjects = ['sys_setting', 'sys_job' /* , the bucket-(b) list */] as const;
  readonly suppressUnboundedOrgAdminGrant = true;
  async init(ctx) { ctx.registerService('org-scoping', this); }
}

Read-timing semantics

  • Posture is unchanged: SecurityPlugin captures it once at start().
  • The entitlement is read LIVE via getService('org-scoping') at each consuming decision — mirroring the seam's one pre-existing consumer, plugin-auth's probeEntitledPostures (auth-plugin.ts:581, live per call because the provider registers after the reader's init). Validation is memoized per service instance (WeakMap); a junk key warns once per boot, naming the key and the declared value, and fails closed.
  • The exemption folds into the per-object security meta (getObjectSecurityMeta), which is cached per object and invalidated on metadata change or restart. Effective contract for the declarer: declare at registration and treat the declaration as immutable for the kernel's life; a re-registered service instance re-validates. Live resolution is ordering-robust by construction: a deployment where the wall is ARMED had org-scoping registered before start() captured the posture, so the declaration is present from the first read; where it registered too late, posture resolves single and Layer 0 is inert, so the exemption decides nothing.
  • Suppression is read live at each sys_member reconcile and at the kernel:ready backfill ("org-admin grant backfill complete" in boot logs). Toggling it converges standing grants in BOTH directions via the existing superseded-variant reconcile — proven in tests, so the fail-closed default protects any deployment that RELIES on today's auto-grant.
  • A walled boot logs the declaration at arming time: the carve-out count + sorted names, and the suppression line — grep [security/#12699].

What the exemption reaches — and deliberately does not

Reaches, through the single meta fold (all proven or structurally derived in this PR):

  • the Layer 0 read wall (computeTenantLayer0Filter's tenancyDisabled input);
  • the ADR-0123 D2 write refusal and the forge guard — computeWriteTenantCheckFilter IS the same layer0, so read and write cannot disagree;
  • the Layer 1 wildcard organization_id policy drop (the sys_package cross-org-catalog precedent — without it every read of an exempted catalog would return zero rows);
  • posturePermitsCrossTenant and the superuser write-check bypass — an exempted object carries full platform-global posture semantics on this deployment.

Deliberately NOT reached — boundaries Phase 2 must know:

  • Engine/driver native scope: buildDriverOptions (objectql engine.ts) still threads tenantId for exempted objects (it reads schema-declared tenancy only), and SqlDriver's per-table scope is fail-open on NULL org (organization_id equals the active org OR IS NULL) — so NULL-org platform rows stay readable and behaviour is byte-identical to today. Session-context inserts still stamp the active org at the driver, also today's behaviour. Widening this would change behaviour beyond the ruling; if Phase 2 measures a need, that is a new card.
  • objectql system-write refusal (system-write-organization.ts) keys on schema-declared tenancy, and the sys_ / cloud_ / ai_ namespaces are excluded by construction — declare exempted platform tables in those namespaces (every control-plane table already is).
  • postureStampsOrganization has no consumer in this repo; the D5 stamper is the enterprise runtime — the declarer itself, which holds the exemption list first-hand.

Dispatch mechanism assumptions — verified

  1. supportedPostures consumer found. The dispatch premise "no consumer inside plugin-security" is confirmed — and the seam is NOT dormant: plugin-auth consumes it (auth-plugin.ts:581 feeding createTenancyService.probeEntitledPostures, evaluated live inside isolationActive()). SecurityPlugin reads the entitlement via getService('org-scoping') directly, mirroring that pattern rather than widening TenancyService (which stays posture-only — routing deployment declarations through it would grow a second interface for zero consumer benefit).
  2. Single choke point confirmed. The two predicate sites the card names (now at security-plugin.ts ~6383 getObjectSecurityMeta and ~6677 loadObjectFieldNames) merge into one local in computeLayeredRlsFilter; the write path derives from the same layer0. The fold lands in getObjectSecurityMeta alone and every consumer follows. Genuinely separate wall-adjacent consumers (driver native scope, system-write refusal, D5 stamper) are enumerated above with the argument for leaving each untouched — none produces the "exempt from read wall but still refused/required to stamp" inconsistency: the only refusal seam (ADR-0123 D2) derives from the exempted layer0, and driver stamping never refuses.
  3. Superbit grant located and suppressed without orphaning. The grant is orgAdminSetNameForPosture (auto-org-admin-grant.ts), wired from SecurityPlugin's sys_member middleware and the kernel:ready backfill (the "org-admin grant backfill" boot log). Suppression flips BOTH the granted and the superseded variant, so the existing convergence machinery revokes the stale one on the next reconcile — and the fail-closed default (absent = today's grant) is pinned by the untouched ADR-0105 D4 test block plus an explicit suppressUnboundedOrgAdminGrant: false case.

Tests

New/extended, all green at b49ebc290:

  • packages/plugins/plugin-security/src/deployment-platform-global-exemption.test.ts (12 cases): exempted object not walled (isolated + group, read AND the D2 write derivation) / non-exempted sibling still walled / absent declaration byte-identical (regression pin) / junk shapes refused loudly (bare string, wildcard entry poisoning the whole key, junk suppress flag not voiding the valid key, warn-once-per-boot) / tenancy.enabled:false composition / single posture inertness / arming-log surface.
  • packages/plugins/plugin-security/src/auto-org-admin-grant.test.ts (+6 cases): suppression on (isolated + group) / explicit off byte-identical / convergence both directions / backfill threading incl. the orphan sweep.
  • packages/spec/src/security/tenancy-posture.test.ts (19 cases): schema accepts valid declarations and live-service shapes, refuses junk; schema/interface parity witness.

Suites: plugin-security full suite 87 files / 1578 tests passed; spec security domain 7 files / 197 tests passed; pnpm --filter @objectstack/spec typecheck and pnpm --filter @objectstack/plugin-security typecheck green. plugin-security's test layer sits outside every tsc program (pre-existing: tsconfig.json excludes test files and the package has no test-typecheck sibling), so the new test files' types are NOT MEASURED by tsc — same posture as every existing test there; check:type-check-coverage and check:type-check-debt --re-measure both green.

Ablation, one leg per key (vitest runs on src/ via relative imports — no dist resolution in the loop; mutation and restore both proven on disk by anchor grep -c, restore additionally by an empty git diff HEAD):

  • Key 1: removed the meta fold (platformGlobalObjects.has(object) anchor 1 to 0 on disk) — 4 of 12 exemption cases went red (both read postures, the write-choke case, the valid-exemption-standing case); restored (anchor back to 1, clean diff), 12/12 green.
  • Key 2: removed the suppression veto (postureEnforcesWall(posture) && !suppressUnbounded anchor 1 to 0 on disk) — exactly the 4 suppression cases went red; restored (anchor 1, clean diff), 32/32 green.

Gates

Derived from the real changeset via node scripts/pm/dispatch-gates.mjs (answer taken from this worktree at 1e61a0de5, re-checked at head b49ebc290). All derived families ran locally and green, including: check:generated ("All 14 generated artifacts are up to date"), check:i18n ("OK (9 package(s)…)" after building the CLI), check:type-check-debt --re-measure ("none above its recorded number"), check:engine-double-contract, check:where-matcher, check:cross-package-test-inputs, check:test-source-alias, check-changeset-no-major, check:nul-bytes, and the docs family (the reference-doc regeneration in this diff is generator output). scripts/pm/check-half-states.mjs ran authenticated and is report-only. The two docs-drift-check.yml scripts are PR-context CI jobs and run on this PR. Changeset-family gates re-ran on the final head b49ebc290.

Verification mode declaration: this ran on a macOS host where scripts/pm/os-verify-lock.sh has no usable flock — every build/test above went through the entry point in its DECLARED UNLOCKED MODE (its own VERDICT lines record UNLOCKED (declared)); nothing was serialized against sibling agents.

Generated-artifact churn in this diff (api-surface/security.json, export-origins/security.json, authorable-surface/security.json, json-schema.manifest/security.json, content/docs/references/index.mdx, content/docs/references/security/misc.mdx) is generator output for the three new spec exports, proven stale-then-regenerated by check:generated --fix (never the whole set).

Session: https://claude.ai/code/session_71836b57-5db6-459d-ae4d-c6d9d7dd2cc6

Generated by Claude Code

os-zhuang and others added 3 commits August 27, 2026 19:04
…+ unbounded-admin suppression

Part of objectstack-ai/cloud#1653 (Phase 1).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…cts type alias

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/plugin-security, @objectstack/spec, touching 23 documentable anchor(s). ⚠️ 4 changed file(s) yielded no anchor (packages/spec/api-surface/security.json, packages/spec/authorable-surface/security.json, packages/spec/export-origins/security.json, …), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

5 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/deployment/tenancy-modes.mdx (via ABSENT (symbol), supportedPostures (symbol))
  • content/docs/permissions/field-level-security.mdx (via SecurityPlugin (symbol))
  • content/docs/permissions/index.mdx (via SecurityPlugin (symbol))
  • content/docs/plugins/packages.mdx (via SecurityPlugin (symbol))
  • content/docs/ui/forms.mdx (via SecurityPlugin (symbol))

⛔ 1 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/implementation-status.mdx (via SecurityPlugin (symbol))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 4 changed file(s) yielded no anchor (packages/spec/api-surface/security.json, packages/spec/authorable-surface/security.json, packages/spec/export-origins/security.json, …) — pages documenting those are invisible to this run
  • 3 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 47 of 219 client-bound route-ledger rows — the other 172 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 172: 14 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 56 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 102 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.

Coarse fallback — 129 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 15bf9e859e56862e6ebe7b5c42404de103362457 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from f262c14437f5343972b5672e345b652f1824accb — the merge of head b49ebc290c0161fe48e0a7940603620af85a70ad into base 15bf9e859e56862e6ebe7b5c42404de103362457, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin f262c14437f5343972b5672e345b652f1824accb && git checkout f262c14437f5343972b5672e345b652f1824accb
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 15bf9e859e56862e6ebe7b5c42404de103362457 b49ebc290c0161fe48e0a7940603620af85a70ad && git checkout -B drift-repro 15bf9e859e56862e6ebe7b5c42404de103362457 && git merge --no-ff b49ebc290c0161fe48e0a7940603620af85a70ad

node scripts/docs-audit/affected-docs.mjs --json 15bf9e859e56862e6ebe7b5c42404de103362457

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 15bf9e859e56862e6ebe7b5c42404de103362457 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Aug 27, 2026
@os-zhuang os-zhuang added the needs:contract-review Marker only — PR awaits its at-tier Contract review PASS; no check reads it, the record decides label Aug 27, 2026
@os-zhuang os-zhuang removed the needs:contract-review Marker only — PR awaits its at-tier Contract review PASS; no check reads it, the record decides label Aug 27, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review August 27, 2026 13:18
@hotlong
hotlong added this pull request to the merge queue Aug 27, 2026
@os-zhuang

Copy link
Copy Markdown
Contributor Author

Enqueue attribution note: the merge-queue enqueue mutation for this PR was fired with the hotlong account's token (surgical per-command GH_TOKEN injection; the machine's active gh account stays os-zhuang), on the maintainer's approval, because the shared os-zhuang GraphQL pool was under chronic contention — every review, claim and verdict on this card remains os-zhuang. Queue state verified directly: position 1, AWAITING_CHECKS.

Merged via the queue into main with commit a65db76 Aug 27, 2026
40 checks passed
@hotlong
hotlong deleted the claude/issue-12699-org-scoping-entitlement branch August 27, 2026 14:43
os-sales pushed a commit that referenced this pull request Aug 27, 2026
os-regen-merge four-step: merge commit first (deferral recorded), then the
deliberate manifest + surface-baseline deletions re-applied on the merged
tree and the whole chain regenerated with repo tooling. Both sides' sources
verified present (retirement tombstone + registry entries; #12704
OrgScopingEntitlement tenancy-posture + capabilities).

Co-Authored-By: Claude <noreply@anthropic.com>
rajeev-kumar-se pushed a commit to rajeev-kumar-se/objectstack that referenced this pull request Nov 10, 2026
…g figures, centre in the card (objectstack-ai#32227)

<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBQJTzhd1vVrNNMHrh2CgZpe)_

Part of objectstack-ai#32165 (item 2, the KPI cards; item 1, one batched dataset query
per render, stays open on objectstack-ai#32200)

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 改了什么:仪表盘和大屏上的 KPI 卡片不再把标题再写一遍做副标题(「Avg Progress / 47.0 / Avg
Progress」变成「Avg Progress /
47.0」),大屏上的长金额「$1,090,000.00」整串显示不再被截成「$1,090,0…」。卡片「高而空」不在本 PR 改:按
objectui#12704 的裁定,这是 showcase 元数据把 KPI 写成两行高(`h: 2`)造成的,修法是元数据改 `h:
1`,渲染器有意保留两行卡片的留白(E2E 用例守着)。
- 为什么改:QA(objectstack-ai#32135)在 showcase 上看到卡片高而空、副标题重复标题、Command Center
的预算被截断,用户读不到完整数字。
- 风险与回滚:只动 `@object-ui/plugin-dashboard`
一个包的渲染,无服务器、spec、元数据改动;卡片高度与网格完全不变;短数值保持原字号;回滚即 revert 本 PR。
- 先看:`ui/packages/plugin-dashboard/src/metricTile.ts`(唯一的副标题规则
`metricTileSubtitle` 与大屏字号阶梯
`METRIC_TILE_BARE_VALUE_LADDER`)、`ui/packages/plugin-dashboard/src/MetricWidget.tsx`(副标题与大屏数值改读它)、`ui/packages/plugin-dashboard/src/DatasetWidget.tsx`(数据集卡片的说明行改读同一规则)。
- 两分钟验证:`pnpm --dir ui exec vitest run
packages/plugin-dashboard/src/__tests__/metricTileLayout-12623.test.tsx
packages/plugin-dashboard/src/__tests__/metricTileValueScale-12942.test.tsx`,预期
29 个测试全绿。
- 需要你做的:无,席位落地。

## What changes

- **One subtitle rule** (`metricTileSubtitle` in `metricTile.ts`): the
first candidate whose localized text is not the localized title,
compared after trimming, collapsing spaces and folding case. Read by
every tile that draws a subtitle, so there are no per-tile copies:
- the dataset-bound tile (`DatasetWidget`): caption = description, else
measure label, each only if it is not the title. This is where the Chart
Gallery's "Avg Progress" came from: the widget title and the dataset
measure label are both authored "Avg Progress"
(`chart-gallery.dataset.ts` measure `avg_progress`,
`chart-gallery.dashboard.ts` widget `kpi_avg_progress`). Delivery
Operations' "Total Budget" and Chart Gallery's "Total Spent" had the
same repeat. The example metadata is left as it is; the render rule
fixes every app.
- `MetricWidget` (and so `ObjectMetricWidget` / every `object-metric`
block): description, else the trend label, both localized (a known trend
phrase translated) before the comparison. A description that repeats the
label gives way to the trend label.
  - `MetricCard`: its description.
- The title tooltip (`metricTileTooltip`) no longer stacks the same line
twice.
- **The truncation was the `bare` face, not the card tile.** Command
Center's six-across hero strip draws `object-metric` with `variant:
'bare'`, whose value was a fixed `text-[2rem] truncate`; the card tiles
already had the objectui#12942 ladder. Measured at 1440×900: each hero
tile is 166 px wide, `$1,090,000.00` is 7.36 em by `metricTileValueEm`,
235 px at 32 px. The bare value now reads
`METRIC_TILE_BARE_VALUE_LADDER` against the tile's own box (`@container`
on the bare root): short values keep `text-[2rem]` at every width; a
longer value climbs 14 → 16 → 18 → 20 → 24 → 30 → 32 px, each step at
`ceil(maxEm × px)`. The budget draws at 20 px, whole (`scrollWidth ==
clientWidth`), with the full figure as its tooltip. The line box is a
fixed 32 px (`leading-8`, placed after the size classes because `cn`
drops a line-height written before a font size), so the label under a
scaled value lines up with its neighbours'.
- **The height is not changed here (round 2).** A dataset-bound metric
card authored `h: 2` spans two `minmax(5rem, auto)` grid rows (176 px
measured) while its content is about 90 px. Round 1 centred the tile in
the card; `Build & E2E UI` went red on
`e2e/dashboard-metric-tile-height.spec.ts` (objectui#12704), whose
CONTROL keeps "the empty lower half the metadata fix removes … for a
tile that asks for it": per objectstack-ai#12704 the fix for a tall tile is the
metadata (`h: 1`, the designer's default, which hugs its content), and
the renderer's half is that a two-row tile stays two rows with its
content at the top. The centring is reverted, so the card's "tall and
mostly empty" is answered by objectstack-ai#12704's height-hugging alone. Every
showcase metric widget is authored `h: 2` (12 of 12); changing that is a
metadata edit, outside this card's "no metadata change" order, so it is
reported as a finding, not done.
- **Root changeset** `.changeset/32165-metric-tile-subtitle-fit.md`,
`@object-ui/plugin-dashboard` patch, with the two declaration lines.

`Clause-②: no` measured: `metricTile.ts` is not re-exported from the
package entry (`index.tsx` names none of it), and no published prop or
type changes.

## Tests

- `metricTileLayout-12623.test.tsx` (the tile layout harness), new
top-level describes:
- *a subtitle equal to the title is not drawn (objectstack#32165)*:
dataset tile with measure label = title draws no caption, tooltip names
it once; equal up to case and spacing; description = title gives way to
a distinct measure label; CONTROL distinct measure label kept;
`MetricWidget` description = label hidden; localized (zh-CN) comparison;
trend label kept and takes the place of a repeated description; CONTROL
distinct description kept; `MetricCard` hidden + CONTROL;
`object-metric` hidden.
- `metricTileValueScale-12942.test.tsx` (the value ladder harness), new
describe *the bare tile's value ladder*: every step re-derived from
`ceil(maxEm × px)`; CONTROL a short value keeps 32 px and no tooltip;
the exact Command Center value `$1,090,000.00` at the measured 166 px
draws at 20 px and fits (and did not at 32 px), tooltip carries it,
`leading-8`.

<details><summary>Ablations (scripts/ablation-replace.mjs, each restored
with blob == HEAD and git diff HEAD empty)</summary>

1. `metricTile.ts`: `if (title && metricTileSameText(title, candidate))
continue;` → `if (false /* ablated-32165 */) continue;` (the old
subtitle choice): 8 failed / 3 passed in the subtitle describe (every
hide pin red, the three CONTROLs green).
2. `MetricWidget.tsx`: the bare value's
`metricTileValueClass(displayValue, METRIC_TILE_BARE_VALUE_LADDER)` →
`'text-[2rem] truncate tabular-nums'` (the old face): the Command Center
budget pin red, 2 passed.

</details>

## Acceptance notes

- QA's three readings are gone on a fresh showcase boot from this
branch's source (shots below): no title-equal subtitle on Delivery
Operations / Chart Gallery, and Command Center's budget whole. The
tall-card reading is left to the metadata (see The height).
- Delivery Operations' `$1,090,000.00` (dataset tile, 238 px) was never
truncated: it fits at 24 px before and after.
- **Finding, per-widget duplicate query (not fixed, item 1 is
objectstack-ai#32200's):** on the dev boot every dataset widget posts its
`/analytics/dataset/query` twice (Delivery Operations 9 dataset widgets
→ 18 posts; Chart Gallery and System Overview the same pattern,
identical bodies). The Console mounts under `<StrictMode>`
(`ui/apps/console/src/main.tsx`), which runs each mount effect twice in
development, so this is most likely the dev double-effect, not a
production double fetch; a production build was not measured here. No
batching layer, queue or cache was added.
- **System Overview skeletons (read only):** on a full page load of
`/apps/setup/dashboard/system_overview` (dev Vite, warm server) the
skeletons cleared at 7.1 s. The wait is the app shell, not this widget:
the dev module graph took ~5.1 s before the first app request, then
shell reads (`auth/me/permissions`, `meta/app`, `meta/app/setup/bundle`,
`sys_user_preference`) to ~5.6 s, `meta/dashboard` + `meta/view` to
~5.65 s, `/packages` to ~6.23 s; the 14 dataset queries (7 widgets ×2)
started at 6.09 s and all answered by 6.36 s (150–270 ms each); the
remaining ~0.7 s is chart chunk load and paint. Nothing inside the
metric widget holds the skeleton, so no fix here.

## Verification

<details><summary>Browser: showcase dev boot from this branch (main
8523ef9 + this diff), Console Vite over branch source, 1440×900, shots
in the project folder ui-orders/32165-shots/</summary>

- The `after-*.png` shots were taken at round 1 and also show the
since-reverted centring of the Chart Gallery and Delivery Operations KPI
cards; the subtitle and Command Center readings are unchanged by the
revert.
- `before-*.png` taken with the four touched files restored to `main`
(served-code marker count 0), `after-*.png` with the branch (marker
count 3), Vite restarted with `--force` per leg.
- Chart Gallery: before "Avg Progress / 47.0 / Avg Progress", "Total
Spent / $616,000.00 / Total Spent"; after "Avg Progress / 47.0", "Total
Spent / $616,000.00", "Total Tasks / 10 / Tasks" (distinct caption
kept).
- Delivery Operations: "Total Budget / $1,090,000.00 / Total Budget" →
"Total Budget / $1,090,000.00"; "Active Projects / 2 / Projects" kept.
- Command Center: budget at 32 px "$1,090,0…" → 20 px "$1,090,000.00",
`scrollWidth == clientWidth` 166, title attribute the full figure; the
five short values stay 32 px; every hero tile 52 px tall with a 32 px
value line.

</details>

<details><summary>Gates</summary>

At head `2a39b46a` (round 2; merge base `8523ef9a`):

- `pnpm --dir ui exec vitest run packages/plugin-dashboard/` → 203
files, 1974 passed, 6 skipped; `pnpm --filter
@object-ui/plugin-dashboard type-check` exit 0.
- `pnpm --dir ui exec playwright test
e2e/dashboard-metric-tile-height.spec.ts --trace off --project=chromium`
→ 2 passed (the objectui#12704 pin that went red at round 1;
firefox/webkit are not installed in the dev container and fail at
launch).
- `node scripts/pm/dispatch-gates.mjs --commands`: 36 derived (the same
set as round 1), 36 run, all exit 0; `--ran`: 36 accounted, 0
NOT-MEASURED, exit 0. Extra: `pnpm check:changeset-fixed` 0.
- Round 1, unchanged since (no file they read moved): ADR-0060 ratchet
34 passed; `pnpm --dir ui run check:spec-symbols` 0; plugin-dashboard +
console build 0, then `check:eager-closure` 0 (2214.0 KB of 2431.6 KB);
eslint 0 errors on the touched files; `check:new-line-citations` 0 new.

</details>

_Generated by [Claude
Code](https://claude.ai/code/session_01WGufzhXhSR1mxHQLxKoszd)_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01WGufzhXhSR1mxHQLxKoszd

<!-- signed: domain:ui#2 · os-support-ai ·
session_01WGufzhXhSR1mxHQLxKoszd -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(spec,security): OrgScopingEntitlement grows platform-global exemption + unbounded-admin suppression, consumed by Layer 0 arming

2 participants