Repository navigation
fix(spec,metadata-protocol)!: the /meta door no longer authors sharing rules; Setup lists declared sharing rules - #24599
Conversation
Claude-Session: https://claude.ai/code/session_013BWJEDZYcJKmZYj6ApCCa7 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013BWJEDZYcJKmZYj6ApCCa7 Co-authored-by: Claude <noreply@anthropic.com>
…kind pins Claude-Session: https://claude.ai/code/session_013BWJEDZYcJKmZYj6ApCCa7 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013BWJEDZYcJKmZYj6ApCCa7 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013BWJEDZYcJKmZYj6ApCCa7 Co-authored-by: Claude <noreply@anthropic.com>
…oned paths whole, under the REST door's 500-character bound Claude-Session: https://claude.ai/code/session_013BWJEDZYcJKmZYj6ApCCa7 Co-authored-by: Claude <noreply@anthropic.com>
…ata forms, engine-double ledger, overlay table) Claude-Session: https://claude.ai/code/session_013BWJEDZYcJKmZYj6ApCCa7 Co-authored-by: Claude <noreply@anthropic.com>
…open-door pins Claude-Session: https://claude.ai/code/session_013BWJEDZYcJKmZYj6ApCCa7 Co-authored-by: Claude <noreply@anthropic.com>
…d the kind union beside the narrowing Claude-Session: https://claude.ai/code/session_013BWJEDZYcJKmZYj6ApCCa7 Co-authored-by: Claude <noreply@anthropic.com>
…chema gate Claude-Session: https://claude.ai/code/session_013BWJEDZYcJKmZYj6ApCCa7 Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 4 package(s): 12 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 7 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 144 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin dbd5ed99b94cf82671c2ee2278362df16ebd7455 && git checkout dbd5ed99b94cf82671c2ee2278362df16ebd7455
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 65a8eeb7d43d9248aa82ee698b78e87a2dce2ffc b8e0baa72a41607e5aa7bc27f1d3dfff96f44d68 && git checkout -B drift-repro 65a8eeb7d43d9248aa82ee698b78e87a2dce2ffc && git merge --no-ff b8e0baa72a41607e5aa7bc27f1d3dfff96f44d68
node scripts/docs-audit/affected-docs.mjs --json 65a8eeb7d43d9248aa82ee698b78e87a2dce2ffc
|
…aring-rule-meta-door
Contract reviewServed-tier: Reviewer: an isolated at-tier reviewer subagent of the adopting seat ( ① Derived judgmentsGate verdicts on this head (they ARE the verdicts). 41 check-runs. Four (a) The door — closed, on both kernel shapes, with ADR-0112 codes.
(b) 18.0 database — R2 holds; the harness proves nothing about this door. The fixture's runtime sharing rule is a (c) The Setup nav entry — present, i18n-labelled, right URL; gating is the sibling's, not (d) Item 3, answered (measure only, nothing built — correct).
(e) Complete feature — not on this head. The server half is whole as a design: the door is closed and pinned on the HTTP transport, the listing agrees, the nav entry is served and opens the console's EXISTING generic Setup list of a registry type in environment scope (the route ② Semver level
③ Boundary flags
Blocking items (FAIL):
Implemented-by: VERDICT: FAIL |
…ty-catalog package-door pin Claude-Session: https://claude.ai/code/session_013BWJEDZYcJKmZYj6ApCCa7 Co-authored-by: Claude <noreply@anthropic.com>
…RAGE covers the sharing_rule kind Claude-Session: https://claude.ai/code/session_013BWJEDZYcJKmZYj6ApCCa7 Co-authored-by: Claude <noreply@anthropic.com>
…or act, not an authoring route Claude-Session: https://claude.ai/code/session_013BWJEDZYcJKmZYj6ApCCa7 Co-authored-by: Claude <noreply@anthropic.com>
…included; unset it after the removal Claude-Session: https://claude.ai/code/session_013BWJEDZYcJKmZYj6ApCCa7 Co-authored-by: Claude <noreply@anthropic.com>
Contract reviewServed-tier: Reviewer: an isolated at-tier reviewer subagent of the adopting seat ( ① Derived judgmentsB1 — resolved. B2 — resolved. B3 — met on the code head; the changeset head's battery was still running when read. On The waiver drop ( The hatch sentence (
The merge of main — faithful, and nothing in it moves an earlier judgment. The 18.x line — R1 to R4 hold.
(e) Complete feature — yes, on this head. The server half is whole: the door is closed on both kernel shapes with ADR-0112 codes and pinned on the HTTP transport, Merge-tree — clean. ② Semver levelRestated: ③ Boundary flags
Implemented-by: VERDICT: PASS |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 39303087681 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Closes #24550
Clause-②: yes (narrowing)
The console half is objectstack-ai/objectui#13050 (Setup's declared-rules page). This PR is the server half: it closes the third authoring door and adds the Setup nav entry that page needs.
What changed
1. The
/metadoor no longer authors sharing rules (BREAKING narrowing, launch-windowminor).sharing_rulehad no metadata-type registry entry. Both/metadoors read that absence as "runtime-creatable":GET /meta/typesadvertisedallowRuntimeCreate: true, andPUT /meta/sharing_rule/:namestored an environment-wide item thatGET /sharing/rulesthen served and enforced. That item bypassed the same-name guard and the organization wall.refusePackagedBaseOverride,allowEnvironmentOverlay: false) refuses writes over a packaged name only, and both types keepallowRuntimeCreate: true. So it cannot refuse a new name. The security-catalog namespace rule judges package registration, not a/metasave. The mechanism that fits is the code-only paircapabilityuses (capability无 DEFAULT_METADATA_TYPE_REGISTRY / schema 条目 ——PUT /api/v1/meta/capability/:name接受任意 JSON 且/meta/types报 allowRuntimeCreate:true(与 #5271 的api同形) #5961):sharing_rulejoinsMetadataTypeSchemaandDEFAULT_METADATA_TYPE_REGISTRYwithallowRuntimeCreate: falseandallowEnvironmentOverlay: false. ItsSharingRuleSchemabinding moves into the kind map. The listing and the save door now read one declaration.?mode=draft:403 NOT_CREATABLE;403 NOT_OVERRIDABLE.sharing_rulegains an ADR-0126 Regime C row inPACKAGED_BASE_REGIME: the clone isPOST /api/v1/sharing/rules, and the switch isPOST /api/v1/security/_activation/sharing_rule/:name. Both refusals name the two sanctioned paths. Neither prescribes theOS_METADATA_WRITABLEhatch, because for a Regime C type the hatch would re-open the source the regime closes. Both stay under the REST door's 500-character bound (truncateClientMessage). The first cut did not: the showcase boot showed the switch route cut off, and it was fixed.sharing-rule-runtime-create-withdrawn. The changeset carries FROM → TO and the one-line fix: "author an organization rule, or clone the declared one".2. The Setup nav entry. plugin-sharing adds
nav_declared_sharing_rules, atype: 'url'entry likenav_permission_sets. It points at/apps/setup/metadata/sharing_rule?scope=environmentand sits besidenav_sharing_rules, with the samemanage_platform_settingsrequirement. Its labels are inplatform-objects' Setup translations (en,zh-CN,ja-JP,es-ES), with source hashes recorded, the same way the plugin's other entries are labelled.Derived artifacts:
meta-url-data.generated.ts, the reference docs, the metadata-form i18n bundles (translated by hand in the three locales), the engine-double ledger, and the overlay-table count inmetadata-lifecycle.mdx(with asharing_rulerow).Item 3: measured, not built
/meta/sharing_ruleitems. The metadata protocol readssys_metadata_activationfor no type./meta/position,/meta/permission,/meta/flowand/meta/actioncarry no ledger state either. Adding it for one type is a new cross-layer seam, so it does not meet "removes a client read without a new surface". Not built. Measured on the showcase: after the switch-off, the/metaitem still readsactive: true.GET /sharing/rules/:namefor a switched-off declared rule. It answers404 RULE_NOT_FOUND(measured on the showcase).getRulefalls through todeclaredRules(), which drops ledger-off rules. That filter is right for enforcement, becauselistRulesfeeds every enforcement path. Reported only, with a recommendation in the report.Verification (head
47f50805; the gate battery ran at03ec6356, and only the changeset text and one CLI test changed after it — their families were re-run at47f50805)packages/runtime/src/meta-sharing-rule-door.test.tsdrives the realHttpDispatcher, protocol and repository on both kernel shapes. It covers a new name (publish and draft): 403NOT_CREATABLE, no row, nothing registered, both routes named, under 500 characters. It covers a declared name: 403NOT_OVERRIDABLE, no row. It covers/meta/types:allowRuntimeCreate: false. The control is a new position, which still saves (200). Result: 10/10.ablation-replace.mjs, spec was rebuilt, andablation-dist-preflight --absentconfirmed the marker was gone from 232 built files. Then 6 red / 4 green: the create cases answered200 "Saved sharing_rule 'probe_meta_rule' (env-wide, state=active)", and the listing returnedallowRuntimeCreate: true. That is the reported defect, reproduced. The declared-name case stayed green under ablation, because the package door already sealed declared names before this change. The restore was confirmed by a blob hash match and a clean tree, then a rebuild with the marker present in 16 files: 10/10 green.pnpm dev -- --fresh):/meta/typeslistssharing_rulewithallowRuntimeCreate: false.GET /meta/app/setupservesnav_declared_sharing_rulesingroup_access_control, betweennav_sharing_rulesandnav_record_shares, and itszh-CNlabel is served.POST /sharing/rulesanswers 201, and its same-name guard answers 409.protocol-meta*, 100/100.meta-unknown-type-read-refusal, 21/21.meta-managed-content-seal.metadata-type-schema-gate(8/8, after classifyingsharing_ruleas gated atsharingRules:) andorganization-ownership-applywere run locally because they enumerate the registry.dispatch-gates.mjs --commands, plus the 34 artifact-roster rows, with exit codes captured before any pipe: 158 of 164 exit 0. The other six are NOT MEASURED, not findings: four PR-context guards that read the workflow event (check-closing-target-claim,check-partof-closing-keyword,check-single-claim-paths,check-governed-queue-guard), and two refusals on this shallow clone (check-engine-split-ratio,check-plugin-teardown-shape --self-test). On the first battery, three real reds were fixed:check:engine-double-contract(ledger--write),check:i18n(bundles regenerated, then translated), andcheck:overlay-whitelist-table(registry count 28 → 29, plus a row).Acceptance notes
OS_METADATA_WRITABLE=sharing_rulestill opens a create, as it does for every code-only type. It is not prescribed in any refusal. It is also the repair path for an item stored through the old door on an environment kernel, whereDELETE /meta/sharing_rule/:nameotherwise answers403 NOT_CREATABLE. A host-config kernel deletes such an item without it (measured).plugin-sharing/**and "the metadata door's seal". The seal lives inpackages/spec(the registry) andpackages/metadata-protocol(the refusal text and the regime row). The nav labels live inpackages/platform-objects. The derived ledgers and docs follow from those. Tests re-judged: spec, metadata-protocol, objectql and platform-objects pins that asserted the open door or a registry count. Nothing inplugin-webhookschanged, and feat(plugin-webhooks): 18.x step 1 (8b-0g′): declared webhooks are read from the registry, the seeder retires, expand-first #24529 touches none of these files.Generated by Claude Code