Repository navigation
Commit 2487242
fix(objectql,metadata-protocol,console): a list view column on a field a disabled package adds no longer fails the whole list (#34979)
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBLW6dHPW6sSheA32XPKZzPV)_
Fixes #34901
repo:objectstack#3 · os-support-ai · session_01WGufzg2evNa1V3zxrQq3KX
Clause-②: yes (widening: the view save door accepts withheld names; one
spec read-decoration member; one locale key; one optional
security-service member, add-only)
Metadata-protocol: none
## 维护者速读
- 改了什么:一个包给别的包的对象加了字段,这个包被停用后,对象的读取接口会在 `_withheldFields`
里说明哪些字段被暂时收起、由哪个包添加;保存视图时按“含停用包字段”的存储对象来校验,所以视图能照常保存;列表和表格在所有查询里都不再带这些字段,列不显示,并在列表上方用一行说明原因。
- 为什么改:之前只要视图引用了停用包的字段,整个列表就报 400 打不开,重命名、置顶或在 Studio 里改视图也会被 422
拒绝;HotCRM 的费用、订单到收款等视图都会碰到,HotCRM 下个版本在等这张卡。
- 风险与回滚:无权读取被收起字段的用户在 `_withheldFields`
里看不到它(按存储定义逐人判断,判断不了就整项不给);不改视图数据,也不写用户的列表偏好;重新启用包后列、排序、分组自动回来。保存校验只对视图放宽,拼错的字段仍会被拒绝,页面、流程等其他写入不受影响。回滚即还原本
PR。
-
先看:`packages/metadata-protocol/src/protocol-authoring-gate.ts`(只对视图写入使用存储对象校验的那一处);`ui/packages/plugin-list/src/ListView.tsx`(各查询参数去掉被收起字段、列的推导、持久化排序保留它);`packages/objectql/src/registry-object-registration.ts`(`includeDisabledExtensions`
与读取被收起字段的方法)。
- 两分钟验证:`pnpm --filter @objectstack/objectql exec vitest run
src/protocol-withheld-extension-fields.test.ts`,应看到 4 个用例通过:停用包后对象读取带
`_withheldFields`、视图能保存进定制包、拼错的列仍被拒绝、页面写入仍被拒绝。
- 需要你做的:无,席位落地。
## What changes
A package can add fields to another package's object
(`objectExtensions`). While that package is disabled, the platform
leaves those fields out of the served object, and the data door refuses
any request that names one. The owner's views keep naming the field on
purpose, so the column, sort and grouping come back when the package is
re-enabled. Until now, those references failed the whole list (`400
INVALID_FIELD`, or `400 INVALID_SORT` for a sort), and re-saving the
view failed with `422`.
**Server (`@objectstack/objectql`, `@objectstack/metadata-protocol`)**
- `SchemaRegistry.getWithheldExtensionFields(name)` returns `{ [field]:
{ packageId } }` for each field that a disabled package's `extend`
contribution adds and that no kept contributor also declares. It reads
the same `withholdDisabledExtensions` computation as the served fold. It
is registered as a `read` in `SCHEMA_REGISTRY_METHOD_KINDS`, because the
registry revision ledger fails to compile without that row.
- `ObjectExtensionFoldOptions.includeDisabledExtensions` folds every
disabled package's extension in, which gives the storage view of the
object. It changes no state.
- **Served marker:** the served face of an object read stamps
`_withheldFields` on `getMetaItem` and on the effective-layer list read.
The execution face, the draft read and the layered editor read never
carry it. It is added to `METADATA_READ_DECORATIONS` in
`@objectstack/spec`, so `stripReadDecorations` removes it at the save
door and before re-parses, and the diagnostics verdict ignores it.
- **View save door:** `judgeRuntimeAuthoringRules` judges a `view` write
against the objects with disabled extensions folded in
(`withDisabledExtensionsFolded`). It applies to the registered and the
stored halves of the merged universe. A withheld name resolves as the
stored field it is. A misspelled name is still refused. Every other
written type keeps the served objects.
**Console (`@object-ui/core`, `@object-ui/plugin-list`,
`@object-ui/plugin-grid`, `@object-ui/i18n`)**
- `@object-ui/core` `withheld-fields.ts` is the one reader:
`readWithheldFieldNames(objectDef)`, `refersToWithheldField`, and
`withheldFieldNamesOfFieldMap`, for a hook that holds only the field
map.
- `ListView` merges the withheld set with the draft-only set
(`queryDropFields`) on every request leg: `$select`, `$filter` (all
three `buildEffectiveFilter` callers), `$orderby` (`serverSort`),
`$searchFields`, the export, and the grouping levels it queries with.
- It hides a withheld column by derivation in `effectiveFields`. Nothing
is written to `hiddenFields`, the view or the user's list preferences.
- One line above the rows names every withheld field the view refers to:
`list.withheldFieldsLeftOut`,
`data-testid="list-withheld-fields-notice"`.
- `emitSortChange` keeps a withheld entry in the sort it persists. The
projection has no entry for that field only while the package is off.
Other refused entries are still dropped.
- **Grid:** the row load drops withheld names from `$select`, the
declared `$orderby` and `$searchFields`. The grouping decisions refuse a
withheld `groupBy` key, the same way they refuse a draft-only key. The
column generator does not draw a withheld authored column. PIN 4
(`projectionFls-6898`) is unedited and green.
- **Locale:** one key, `list.withheldFieldsLeftOut`, in the 11 eager
packs (zh-Hant regenerated by `gen:zh-hant`) and in `ListView`'s default
dictionary. The `list.*` keys live in the eager packs, and no lazy
namespace covers them.
## Tests
<details><summary>New pins (each named against the card's required
pins)</summary>
- `packages/objectql/src/protocol-withheld-extension-fields.test.ts`:
the real protocol over the real `ObjectQL` engine and an in-memory
driver, with P extending Q's object and Q's view naming the field as a
column and as its sort.
- The served object read and the list read carry `_withheldFields`, and
the execution face does not. Re-enabling P clears it (pin 6).
- The view saves into `Q.custom` while P is off and keeps the withheld
column and sort, and is served that way once P is back (pin 1).
- A misspelled column is refused with exactly one issue on its own path
(pin 1).
- A page sorting by the withheld field is still refused
(`page-field-unknown`) while P is off, with controls for P on and for a
served field (pin 2).
- `packages/objectql/src/registry-disabled-package-extensions.test.ts`:
the reader names the withheld field and its package, leaves out a name a
kept contributor also declares, and clears on re-enable.
`includeDisabledExtensions` folds every disabled extension in without
moving the served fold or the disable state.
- `packages/metadata-protocol/src/protocol.read-decorations.test.ts`:
`stripReadDecorations` removes `_withheldFields`. GET, then edit, then
PUT of the served object stores none of it and is byte-identical apart
from the edit. The layered read does not carry it, and nothing withheld
means no marker (pin 3). The existing drift guard now also covers the
new member.
-
`ui/packages/plugin-list/src/__tests__/ListView.withheldFields-34901.test.tsx`:
the data source refuses any request naming the field, as the door does.
- No request names it on `$select`, `$filter`, `$orderby` or
`$searchFields`, each with positive controls. The grid is handed no
column, sort or grouping on it, and the notice names it (pin 5).
- A withheld grouping level is left out and the grid groups by the level
left. The grid that runs its own grouped query gets no filter or
searchable field on it (pin 5).
- The sort builder's write and the grid's header seam both persist the
withheld entry, and a refused non-withheld entry is still dropped (pin
4).
- A definition without the marker draws and requests the column again,
with `onSortChange` never called (pin 6).
- `ui/packages/plugin-grid/src/__tests__/withheldFields-34901.test.tsx`:
a standalone grid never sends the field in `$select`, `$orderby` or
`groupBy`, and draws no column for it. Controls cover P on, and enabling
in place without a reload (pin 5, pin 6).
- `ui/packages/core/src/utils/__tests__/withheld-fields.test.ts`: the
reader, the declared-name guard and the field-map lookup.
</details>
<details><summary>Suites and typecheck (head b76b858 for the ui
reruns; f4ea4f9 for the rest, the only later change being the
regenerated zh-Hant.ts line)</summary>
- `pnpm --filter @objectstack/objectql run test`: Tests 13670 passed
(13670)
- `pnpm --filter @objectstack/metadata-protocol run test`: Tests 23124
passed, 45 skipped (23169)
- `pnpm --filter @objectstack/spec exec vitest run src/kernel`: Tests
1493 passed (1493)
- `pnpm --dir ui exec vitest run packages/core/`: Tests 4450 passed, 27
skipped
- `pnpm --dir ui exec vitest run packages/plugin-grid/`: Tests 2480
passed (2480), `projectionFls-6898` included
- `pnpm --dir ui exec vitest run packages/plugin-list/`: Tests 1880
passed (1880)
- `pnpm --dir ui exec vitest run packages/i18n/` plus the new pins and
PIN 4, rerun on b76b858: Test Files 107 passed, Tests 1927 passed,
13 skipped. The first run went red on `zh-hant-generated.test.ts` until
`gen:zh-hant` regenerated the zh-Hant line.
- Typecheck: `@objectstack/objectql` `typecheck` exit 0 (after the
revision-ledger row), `@objectstack/metadata-protocol` exit 0,
`@objectstack/spec` exit 0; `turbo run type-check` over
`@object-ui/core`, `@object-ui/i18n`, `@object-ui/plugin-grid`,
`@object-ui/plugin-list`: 58 successful of 58 tasks.
- `pnpm --filter @objectstack/spec run check:generated`: all 14
generated artifacts up to date; nothing to regenerate.
</details>
<details><summary>Ablations (commit first, mutate through
ablation-replace, rebuild and preflight where the suite reads
dist)</summary>
1. **Gate fold** (`protocol-authoring-gate.ts`): the `objects:` line was
replaced so every type keeps the served objects. Anchor 1 to 0, blob
`5d6ef7cd64e9` to `c29895708e3a`. `metadata-protocol` was rebuilt, and
the preflight found the marker in 2 dist files.
- Mutated run: 2 failed, 2 passed. The save came back `422
INVALID_METADATA` with `sort-field-unknown` and
`list-view-field-unknown` on the withheld column and sort, which is the
bug. The typo case listed 3 issues instead of 1.
- Restore: blob back to HEAD and `git diff HEAD` empty; rebuilt,
preflight `--absent` across 24 files, 4 passed.
2. **Console drop** (`ListView.tsx` `queryDropFields`): the merge with
the withheld set was short-circuited (blob `73271f53f396` to
`d8d554821983`, source-aliased, no build). Mutated run: 3 failed, 1
passed, with `$filter` naming `crm_project` and `Unknown field
'crm_project'` from the data source. Restored to HEAD.
3. **Persist boundary** (`emitSortChange`): the withheld arm of the keep
filter was disabled. Mutated run: 1 failed (`expected [] to deeply equal
[ [ 'crm_project', 'asc' ] ]`). Restored to HEAD.
</details>
## Acceptance notes
- **Deviations:** the seat accepted deviations 1, 2 and 4 from the
round-3 report. The Clause-② locale-key count is corrected per the seat:
one locale key, in the changeset and in this body.
- **Out of scope, by the claim:**
- Embedded `listViews` on an object write. An object is extended, never
replaced (ADR-0146 D10), and an object write keeps the served judgement.
- Dashboards and reports that name a withheld field. Only `view` writes
get the storage fold, and this PR adds no console leg for those
surfaces.
- **Pin 4, a correction to my round-2 wording:** a column-header click
cannot persist a withheld sort entry. `data-table`'s manual-sorting
`handleSort` replaces the whole sort with the clicked column ("A header
click REPLACES the order"), so the click itself carries no earlier
entry. The pin covers the two places a write crosses: the sort builder's
edit, and `ListView`'s header seam (`handleHeaderSort` then
`emitSortChange`), fed a list that holds the withheld entry.
`ObjectGrid`'s own `manualOnSortChange` filters a multi-entry emission
through the sortability projection before that seam. That file is
outside this claim, and `data-table` never emits more than one entry.
- **Grid grouping note:** the standalone grid drops a withheld `groupBy`
key without a note of its own. The note would render in
`ObjectGrid.tsx`, which is outside the claim. Inside a list view, the
list's own line names the field. As a result the claim's second locale
key is not minted, and the PR adds one key, as the Clause-② line states.
- **How the grouping decisions find the names:**
`useObjectGridGroupingDecisions` receives only `objectSchema.fields`
from `ObjectGrid.tsx`. The row load reads `_withheldFields` off the
definition it fetched before handing the definition on.
`withheldFieldNamesOfFieldMap` answers from a module `WeakMap` keyed on
that payload field map, not on a memo identity, which follows ui
AGENTS.md #10. The alternative is to pass the names from
`ObjectGrid.tsx` as one more argument, which needs that file.
- **Standalone grid `$filter`:** an authored block filter naming a
withheld field is not dropped on a standalone grid. Without a note,
dropping it would silently widen the rows the author filtered. The list
view does drop it from its own filter and names it in the notice.
- **Files:**
- `registry-revision.ts` gains one row. The registry's method-kind
ledger fails to compile without it once the public reader exists.
- `protocol-object-extender-fold.ts` and the stored-collection fold are
unedited. The stored half is folded at the gate, over the merged
universe.
- **Not covered:** kanban, calendar, gallery, timeline, gantt and map
bindings, which name a field per visualization, are not touched by this
card.
- **Eager closure (the merged tree, `origin/main` = BASE
`fff0ad0c180`):** "Console eager closure is 1898.8 KB gzipped across 104
of 2538 chunks (budget: 2431.6 KB, headroom: 532.8 KB)".
`i18n-locale-en` is 60.5 KB against a 78.7 KB ceiling, headroom 18.2 KB.
No ceiling was edited.
- **Governed:** `node scripts/pm/check-governed-merges.mjs --branch
claude/issue-34901-disabled-package-view-column` gives "0 of 32 path(s)
hit the register — NOT governed", with size 1295 changed lines, under
the 3000 threshold. The PR is DRAFT either way.
- **Overlap:** `node scripts/pm/overlap-check.mjs` gives VERDICT clean
exit 0. It merges cleanly with `origin/main`, #34925 (shares
`ListView.tsx` and the locale packs) and #34950 (shares the locale
packs).
## Verification
All local readings are on head `b76b8580b59`, the head this PR opens
with. CI runs every family named here again on the PR. Its check-runs
are still `in_progress` at report time, and this list is the local
subset.
Head `d639b903f34` adds one prose-only commit on top: the changeset's
Clause-② line now counts one locale key. On that head `node
scripts/check-empty-changeset.mjs --base origin/main`, `node
scripts/check-changeset-no-major.mjs --base origin/main` and `pnpm
check:nul-bytes` (scan of 26061 files plus `--self-test`) each exit 0,
and `node scripts/pm/overlap-check.mjs` gives VERDICT clean exit 0
against `origin/main` `0465f4aa401`. The code readings below are
unchanged, because no code changed.
<details><summary>dispatch-gates union and reconciliation</summary>
- `node scripts/pm/dispatch-gates.mjs --commands` derived 101 commands
(74 pnpm, 27 direct node) from 32 paths against merge base `fff0ad0c1`.
All 101 ran on `b76b8580b59`, three at a time, each exit captured before
any pipe.
- `node scripts/pm/dispatch-gates.mjs --ran` with a `COMMAND :: exit N`
record: "101 derived famil(ies) accounted for — 100 run, 1 NOT-MEASURED
(1 DERIVED from a recorded exit 3)".
- 100 exit 0. That count includes `pnpm --dir ui exec vitest run
scripts/`. Two of its tests (`check-vi-mock-specifiers`,
`dollar-dialect-alias-census`) timed out at 15 s in a first run on
`f4ea4f9b7ee` that shared the box with the full test suites, and passed
in this run.
- `pnpm check:dts-closure` exits 0 ("289/289 declared declaration
file(s) present") after `pnpm --dir ui/apps/console run build:plugin`
wrote `ui/apps/console/plugin.d.ts`. Its first exit 1 named only that
missing local artifact.
- NOT MEASURED: `pnpm check:dual-build-cjs-loads`, exit 3, PREREQUISITE
NOT MET. It reads every package's `dist/`, and this worktree built only
the closures this card touches. CI's Build Core measures it.
- `pnpm --filter @objectstack/spec run check:generated`: all 14
generated artifacts up to date.
- `ui` `check:eager-closure`: green, readings under Acceptance notes.
- `check-platform-checklist --changed-from`: not owed. No exported
symbol is renamed or deleted; the reader and the helper functions are
additions.
- Full dogfood: not owed. The title carries no `!`, and the Clause-②
line has no `(narrowing)` arm.
</details>
## Fix round (L2 6963280774)
Head `2a4d8e5a852` (two commits on `da04396946`, no merge: 7
first-parent commits on `main` since the merge base, under 15).
Dev-effort: high.
**M1 (must-fix): measured red on `da04396946`, not fixed in this round.
It needs a seat decision first; the dev report on this PR carries the
options.**
- A real `SecurityPlugin` (its `getMetadataReadableFields`, ADR-0106 D7)
answers `["id","name","amount"]` for all three callers: denied
`crm_project` by a permission set's `readable: false`, denied by the
field's `requiredPermissions`, and allowed. The served schema no longer
carries the field, so the readable set has no entry for it in either
direction, and the projection cannot tell a denied caller from an
allowed one.
- With that service behind each door, a `project`-posture caller is
served `_withheldFields:
{"crm_project":{"packageId":"com.acme.projects"}}` on REST `GET
/meta/object/:name` (cached and uncached), REST `GET /meta/object`, and
the runtime `/metadata/object/:name` and `/metadata/object` reads: 10 of
10 denied-caller pins red (both denial kinds, every door). The cached
read's ETag is `"shared"` for the denied and the allowed caller alike
(no D3 fingerprint for the entry).
- Judging an entry against the stored field needs the caller's
permission-set entry and capability fold for a field the live registry
does not hold. The dispatch layer has no security-service question that
answers that today, so the fix needs a contract choice (a new optional
security-service member, or a wider answer from the existing one) that
the ruling does not settle, and it would add an item to the Clause-②
line. The measurement tests were scratch and are not committed.
**S1 (should-fix): fixed.** A served view's `_diagnostics` (the item
read and the `?layers=true` editor read) now judges names against the
same disabled-package fold as the save door (`viewLintObjectLookup` over
`withDisabledExtensionsFolded`, which moved from
`protocol-authoring-gate.ts` into `metadata-diagnostics.ts` beside the
lint passes; the gate imports it from there). Pins in
`packages/objectql/src/protocol-withheld-extension-fields.test.ts`:
- A view the door accepts while P is off (column, sort, filter, grouping
level, searchable field on `crm_project`) reads back with no warning
naming it, on both reads.
- A code-registered view with a typo'd column still warns, once.
- A form section on the withheld field reads back with no
`form-field-unknown`.
- Ablation: `viewLintObjectLookup` returning the served object (marker
in `metadata-protocol/dist`, 2 files) turned the 2 read pins red with
the four warnings the live reading saw (`columns.2`,
`grouping.fields.0`, `filter.0`, `sections.0.fields.1`). Restored: blob
equals HEAD, `git diff HEAD` empty, rebuilt, marker absent from all 24
dist files, 10/10 green.
**N5: done.** Save-door pins for a filter, a grouping level and a
searchable field on the withheld name, each with a typo control that is
refused at its own path. A form section's unknown field is advisory at
the door (`form-field-unknown` never refuses), so its pin reads the
save's `advisories`: none for the withheld name, one for a typo. The
fold docblocks (`metadata-diagnostics.ts`, `registry-top-level.ts`) now
name every position instead of "a column or sort".
**N3: done.** The comment in `packages/runtime/src/domains/packages.ts`
names all three read decorations. Comment only, so no changeset entry
for `@objectstack/runtime`.
**Files this round adds to the claimed surface:**
`packages/metadata-protocol/src/metadata-diagnostics.ts`,
`packages/metadata-protocol/src/protocol-meta-item-reads.ts`,
`packages/metadata-protocol/src/protocol-meta-layered-reads.ts`,
`packages/runtime/src/domains/packages.ts` (comment). Also edited,
already claimed: `protocol-authoring-gate.ts`, `registry-top-level.ts`
(docblock), the objectql pin file, the changeset (one sentence on the
diagnostics fold). No public export moves.
**Suites on `2a4d8e5a852`:** metadata-protocol 23124 passed, 45 skipped
(360 files); objectql 13731 passed (611 files); typecheck exit 0 on
both. `dispatch-gates --commands`: 103 derived, 101 exit 0; NOT
MEASURED: `check:dual-build-cjs-loads` (exit 3, no dist for untouched
packages here) and `pnpm --dir ui exec vitest run scripts/` (exit 1 on a
module-resolution prerequisite, `@objectstack/client` has no dist in
this worktree; no `ui/` file changed this round).
`check-platform-checklist --changed-from origin/main`: OK, 0 anchors
lost.
Clause-② and Metadata-protocol lines unchanged.
## M1 round (route A)
Head `610ee495e41`. Seat ruling route A (claim amendment 6964496069).
Dev-effort: high. The round restarted after the container was restarted:
the previous dev's local WIP commit was reviewed, finished, squashed
into the commits below, and pushed as a fast-forward of `2a4d8e5a852`.
Merged `origin/main` (`eb7b09d4d2`) because main was 27 first-parent
commits past the merge base (the bar is 15).
**What changes**
- `@objectstack/spec`: `ISecurityService` gains an OPTIONAL member,
`getMetadataReadableWithheldFields(object, context)`, add-only. It
answers which fields a disabled package withholds may be named to the
caller. The docblock says that absence, `undefined` and a throw all mean
"name none".
- `@objectstack/plugin-security`: implements it in a new file,
`security-plugin-withheld-field-readers.ts`. It reads the withheld names
(`getWithheldExtensionFields`) and the storage definition
(`getStorageObject`), and judges each name with the same evaluator the
readable projection uses: the permission-set field entry, the stored
field's own `requiredPermissions`, the D7 fallback set for a caller who
resolves no set, the on-behalf-of delegator's intersection (with the
organization refusal), and the computed-field fold. It is narrower than
the readable projection in two places, and both fail closed: a computed
withheld field that reads through a reference is not admitted, and a
masking rule does not admit a field its capability fold denies. A system
context is told every name. The member is registered on the `security`
service, and the registered-members pin declares it.
- `@objectstack/metadata-core`: for a `project`-posture caller,
`applyObjectSchemaMask` keeps a `_withheldFields` entry only when the
member admits it. It removes the decoration when no entry is left, and
folds each dropped entry into the D3 fingerprint as `withheld:NAME`. The
member is asked once per posture. An absent member, an `undefined`
answer or a throw drops every entry; a throw is logged at warn. The seat
ruled drop, not the D6 5xx, because the caller needs nothing that
depends on it. A `passthrough` posture (D4-exempt caller, D8, no
security service) and an `undetermined` posture keep the decoration as
served. Every outlet that projects through
`resolveObjectSchemaMaskPosture` is covered with no door edit.
- No label in the decoration.
**Pins (each ablated red, then green, restored by blob)**
- plugin-security `get-metadata-readable-withheld-fields.test.ts` (real
`SchemaRegistry`, real plugin): denied by a set's `readable: false`,
denied by `requiredPermissions`, admitted, with the live-field answer as
the control; the computed-field fold; through a reference; the D7
fallback; the delegator; system; no storage read means `undefined`.
- metadata-core `object-schema-fls.test.ts`: drop, admit by reference,
fail closed (member absent, `undefined`, throw), passthrough, a posture
built without the answer, the D3 fingerprint (it differs for different
withheld sets, is equal for the same set, and is qualified), asked once.
- REST `meta-disabled-package-doors.test.ts` and runtime
`meta-disabled-package-doors.test.ts`, with the real protocol, registry
and `SecurityPlugin`: REST `GET /meta/object/:name` cached and uncached,
REST `GET /meta/object`, runtime `/metadata/object/:name` and
`/metadata/object`. Two callers are denied (by a set, by
`requiredPermissions`) and are served no entry; two are admitted and are
served it. The cached ETag differs between the denied and the admitted
callers, and is equal within each group. With a service that lacks the
member, every caller gets no entry.
<details><summary>Ablations (ablation-replace, dist preflight where the
suite reads dist)</summary>
- A1, the projection's drop (`withheldDropped` forced empty,
metadata-core rebuilt, marker in 2 dist files): metadata-core 4 red,
REST 5 red, runtime 2 red. Restored: blob `1541a6b7af54` equals HEAD,
rebuilt, marker absent from 12 dist files, all green.
- A2, fail-closed (the empty fallback set admits every entry): the first
try's marker was constant-folded out of dist, so the preflight refused
it and that reading is void. The re-run used a marker that survives the
build and was found in 2 dist files: the fail-closed pins went red in
metadata-core, REST and runtime (1 each). Restored and green.
- A3, the ETag fold (no `withheld:` entries in the fingerprint): the
metadata-core D3 pin and the REST ETag pin went red. Restored and green.
- P1, the stored `requiredPermissions` not folded (plugin-security
rebuilt): plugin 2 red (capability denial, D7 fallback), REST 4 red,
runtime 1 red. Restored: blob `fbd483eb2e95`, green.
- P2, the permission-set entry ignored: plugin 3 red, REST 4 red,
runtime 1 red. Restored and green.
- R, the service registration deleted: plugin 8 red (the
registered-service read and every case that reads through it). Restored:
blob `440aa81de1f8`, green.
- Registered-members pin, its `getMetadataReadableWithheldFields` entry
deleted: plugin-security `typecheck` exit 1 (a type error in the pin
file). Restored: exit 0.
</details>
**Harness note.** The previous WIP's pins were red at the restart. They
registered the permission sets only in `metadata.list`, but the plugin
binds its catalog to the engine's registry at start, and from then on it
resolves every set from that registry. The harnesses now register the
sets on the registry.
**CI reds on `01192b432f5`, fixed in `74073018f05`, `24d71a88271` and
`610ee495e41`**
- `check:engine-double-contract`: the runtime engine double's `findOne`,
`update` and `delete`, and the `ql` doubles of the three harnesses, now
open with the shared `assertEngine*` predicates. The pinned ledger
records the new coverage; the baseline is untouched. Local reading: exit
1 with 5 problems, then exit 0.
- `check:system-context-census` (the docs-anchors lane): row 4 on
`content/docs/permissions/system-context.mdx` names
`computeMetadataReadableWithheldFields`, and the register was
regenerated with `--write`. Local reading: exit 1, then exit 0. The
self-test passes, and `check:doc-anchors` exits 0.
- plugin-security `delegated-organization-membership.test.ts`: the new
reader resolves one delegator and asks the organization refusal once (1
= 1), so the census pin lists eight files. The full plugin-security
suite is green (below).
**Files this round adds to the claimed surface:**
`packages/plugins/plugin-security/src/security-plugin-withheld-field-readers.ts`
(new), `get-metadata-readable-withheld-fields.test.ts` (new),
`security-plugin.ts`, `security-plugin-security-service.ts`,
`registered-security-service-members.pin.test.ts`,
`delegated-organization-membership.test.ts`,
`packages/spec/src/contracts/security-service.ts` (+test),
`packages/metadata-core/src/object-schema-fls.ts` (+test),
`scripts/engine-double-contract.pinned.json`,
`content/docs/permissions/system-context.mdx`. The REST and runtime pin
files and the changeset were already claimed.
**Verification**
- Suites (the tree of `610ee495e41`; spec and metadata-core ran before
the last two test-only commits): spec 943 files, 28822 passed;
metadata-core 27 files, 1045 passed; plugin-security 277 files, 6936
passed, 45 skipped; rest 423 files, 8912 passed, 373 skipped; runtime
622 files, 12904 passed, 23 skipped. Typecheck exit 0 on all five.
Runtime's test-layer typecheck first failed on
`@objectstack/driver-turso`, which had no build in this worktree (TS2307
in two files this PR does not touch); after building it, the check exits
0.
- `pnpm --filter @objectstack/spec check:generated`: all 14 artifacts up
to date.
- `dispatch-gates --commands` (derived at `24d71a88271`): 136 families.
`--ran` exit 0: 132 run, 4 NOT MEASURED with exit 3 (prerequisite not
met in this worktree: `check:skill-examples`,
`check:dual-build-cjs-loads`, `check:i18n`, `check:type-check-debt`).
`pnpm --dir ui exec vitest run scripts/` exits 1 on module resolution
(packages outside this worktree's build have no dist). CI measures all
five.
- `check-governed-merges --branch`: 0 of 51 paths governed; 2445 changed
lines (under 3000). `overlap-check`: VERDICT clean against `origin/main`
and #34999, #34910, #34817, #34791.
- Changeset: `@objectstack/metadata-core` and
`@objectstack/plugin-security` join at `patch`. `Metadata-protocol:
none`: no authorable key, value or type moves. Full dogfood is not owed:
the title has no `!` and the Clause-② line has no `(narrowing)` arm.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01WGufzg2evNa1V3zxrQq3KX)_
<!-- signed: repo:objectstack#3 · os-support-ai ·
session_01WGufzg2evNa1V3zxrQq3KX -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: os-support-ai <support@objectstack.ai>1 parent cc5472e commit 2487242
51 files changed
Lines changed: 2375 additions & 70 deletions
File tree
- .changeset
- content/docs/permissions
- packages
- metadata-core/src
- metadata-protocol/src
- objectql/src
- plugins/plugin-security/src
- rest/src
- runtime/src/domains
- spec/src
- contracts
- integration
- kernel
- scripts
- ui/packages
- core/src
- utils
- __tests__
- i18n/src/locales
- plugin-grid/src
- __tests__
- plugin-list/src
- __tests__
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| |||
617 | 617 | | |
618 | 618 | | |
619 | 619 | | |
| 620 | + | |
620 | 621 | | |
621 | 622 | | |
622 | 623 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
721 | 721 | | |
722 | 722 | | |
723 | 723 | | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
0 commit comments