Repository navigation
Setup → Sharing Rules lists only stored rules once declared rules leave sys_sharing_rule (objectstack C3 stage 9) #12982
Description
Filing gate ④: a coordination node, the objectui half of objectstack-ai/objectstack C3 stage 9 (objectstack-ai/objectstack#23952, PR objectstack-ai/objectstack#24376), filed by the objectstack epic seat (epic:#15194, session_01Y5583bs2RDd53MH6kM1ca3) as its cross-repo follow-up. ⛔ Not a claim. Reader who acts: the epic seat dispatches it once stage 9 has merged. Dedupe: semantic search on objectstack-ai/objectui, "Setup sharing rules list declared rules package rules not shown registry" → 0 hits.
Unblocked by the epic seat at 2026-10-19T12:11Z: objectstack-ai/objectstack#24421's guard and ledger switch landed in PR objectstack-ai/objectstack#24428 (merged 964a2370). #24421 stays open only for 9c (the 18.x ceremony), which this page does not need. Dispatched in parallel to the 18.x line (ruling record 6266750393 on objectstack-ai/objectstack#15194); ships in 18.1.
Re-pointed by the epic seat when objectstack-ai/objectstack#23952 closed (PR objectstack-ai/objectstack#24376 merged 5e979073): stage 9's half is done. Re-pointed again when C9's PR #12998 merged (78b07f4): that file-surface serialization is cleared, and #7611 stays open only for its objectstack-side remainder. This card now waits on objectstack-ai/objectstack#24421, the server's guard and ledger switch under ruling A (below). Setup's New and Edit on a sharing rule exercise both, and building the page before they land would mean building it twice.
Ruling A on objectstack-ai/objectstack#24378 (6258883445) sets this card's shape — it supersedes B′
The maintainer re-ruled the card 「24378 同意 A」: sharing_rule moves to regime C, read-only and clonable, and switched through the activation ledger. The B′ section this card carried before is withdrawn. The original Wanted and Acceptance below ("declared rules read-only") stand again, with these additions:
- Declared (vendor) rules are listed read-only with their provenance and carry two actions:
- Disable / Enable. The rule's
sys_metadata_activationactivebit is deployment-level and operator-gated under a wall. Show the server's refusal to a caller who is not allowed. - Clone. Pre-fill New from the declared rule under a new name. The page then offers to disable the base.
- Disable / Enable. The rule's
- Organization-authored rules stay editable as before.
- New never offers a declared rule's name. If the server refuses one (
409 RESOURCE_CONFLICT, naming the vendor rule; plugin-sharing: refuse a new or renamed sys_sharing_rule row that takes a declared rule's name, and reconcile the shadowed declaration's grants on a same-name write (ruling B′ on #24378) objectstack#24421), the page shows that refusal. - The one-list rule and 「There is no merged two-source list.」 still bind. Measure which server read answers "declared, and is it switched off" for each row. If none does, report the gap to the server; the client does not merge two sources to fill it.
Re-pointed by the epic seat at 2026-10-19T03:3xZ under ruling A. It still waits on objectstack-ai/objectstack#24421 (PR objectstack-ai/objectstack#24428, reworked to regime C).
What changes on the objectstack side
Stage 9 retires bootstrapDeclaredSharingRules. A sharing rule a package declares is read from the registry at enforcement, and the ownership ceremony deletes the sys_sharing_rule rows that mirrored it. A fresh boot writes zero sys_sharing_rule rows for declared rules. Organization-authored rules stay rows.
The objectstack dev and the contract reviewer both measured the consequence (os-dev-report on objectstack-ai/objectstack#23952, out_of_scope_findings; record 6253094552 on PR objectstack-ai/objectstack#24376):
- Setup's Sharing Rules page is the generic
sys_sharing_ruleobject view. Once the PR lands, it lists organization-authored rules only, and a package's declared rules disappear from Setup while they still grant access. GET /api/v1/sharing/rules(the sharing service) lists both declared and stored rules.- Reach: every deployment whose packages declare sharing rules (showcase 2; the maintainer's hotcrm 11).
Wanted
Setup shows the declared rules again, without a client-side merge of two sources. objectui#7611's rule binds here too: 「There is no merged two-source list.」. The two shapes that rule leaves:
- A. The Sharing Rules page reads one server list,
GET /api/v1/sharing/rules, which already answers both kinds. Declared rules render read-only with a provenance badge; stored rules stay editable. Search, sort and paging are the server's. - B. Declared rules get their own read-only catalog page from
/api/v1/meta/sharing_rule, as C9 built for positions and permission sets. The data page stays thesys_sharing_ruleview for organization rules.
Measure first which shape the existing console code supports with the least new surface, and say why in the PR. The pick has to keep native search, sort and paging.
Acceptance
- On a showcase boot that carries stage 9 and plugin-sharing: refuse a new or renamed sys_sharing_rule row that takes a declared rule's name, and reconcile the shadowed declaration's grants on a same-name write (ruling B′ on #24378) objectstack#24421, Setup lists the showcase's two declared sharing rules read-only, with their provenance and with Disable and Clone, and lists any organization-authored rule as editable. Disable switches the vendor rule off through the ledger, and Clone creates a new-named rule. New with a declared rule's name shows the server's refusal.
- No request fetches and merges two lists in the client.
- objectstack's
.objectui-shapin moves after this lands; the objectstack epic seat dispatches that.
Activity
objectstack-fleet commentedon Oct 19, 2026
Ruling-pointer · objectstack-ai/objectstack#24378 re-ruled A at 6258883445 (batch #368 item 1, the maintainer's 「24378 同意 A」; supersedes B′) · director seat (summon #43 continuation 5,
session_01QJC7i981TSs9L1CGJK59Ax) · 2026-10-19T03:20ZFor this card's scope: declared rules are read-only in Setup → Sharing Rules, with two actions — Disable (a
sys_metadata_activationrow of typesharing_rule, deployment-level, operator-gated under a wall) and Clone (a new stored rule under a new name). No in-place edit of a declared rule; a stored rule may not take a declared rule's name (the platform refuses it, 409). The platform side lands first (objectstack-ai/objectstack#24421's rework of PR #24428); this card stayspm:blockedon it.objectstack-fleet commentedon Oct 19, 2026
Claim: PM loop round 10 · 2026-10-19T12:09Z
Session:
session_01Y5583bs2RDd53MH6kM1ca3(the objectstack epic seat,epic:objectstack-ai/objectstack#15194)Account:
os-steve(the seat's linked user asGET /useranswers it; the card's assignee)Branch:
claude/issue-12982-setup-sharing-regime-cWorktree: the cloud session's own checkout (
mode:cloud)Domain:
domain:uiSeat:
epic:objectstack-ai/objectstack#15194(the epic lane)File surface, read on objectui
main. Stop on a breach and explain it in the report.apps/consoleandpackages/app-shell, as measured for shape A (one server list) or shape B (a declared-rule catalog page)..objectstack-sha, the lockfile orpackage.jsondependency versions.Container & model:
M,mode:cloud,model: TIER_DEFAULTClause-②: no — console UI over existing server doors (
GET /api/v1/sharing/rules,POST /api/v1/security/_activation/sharing_rule/:name, the 409RESOURCE_CONFLICTrefusal); no spec, API or rule faceResponsibility: n/a — a ruled scope (ruling A on [Decision] Declared sharing rules: what switching off a vendor's rule means once they are read from the registry objectstack#24378, 6258883445; line ruling 6266750393 on [epic] ADR-0131 — total organization ownership: no NULL organization_id (v18 line) objectstack#15194)
Thread-read: 6258922007
Serial constraints cleared:
main.objectstack-fleet commentedon Oct 19, 2026
os-dev-report
Posted by the objectstack epic seat (
session_01Y5583bs2RDd53MH6kM1ca3) at 2026-10-19T13:27Z, verbatim from dev sessionsession_01QceUKoangk5em2DNk1NGJG, whose harness refused the report-post stroke. The PR it handed over is open as #13050 (draft).fix(app-shell,core): Clone reads the authored object's create grant; …
fix(app-shell): Clone's grant reads sys_sharing_rule by name through …
objectstack-fleet commentedon Oct 19, 2026
Landed and closed · objectstack epic seat
session_01Y5583bs2RDd53MH6kM1ca3(os-steve) · 2026-10-19T20:27Z. Both halves of this card have merged.12dc7b47/metadoor no longer authors sharing rules; the Setup nav lists declared rules1e8b6284cDelivered against ruling A (6258883445):
/apps/setup/metadata/sharing_rule?scope=environment.sys_sharing_ruledata door, then offers to switch the base off. Clone is drawn only for a principal holding thesys_sharing_rulecreate grant (declarationCloneinAFFORDANCE_GRANTS).409 RESOURCE_CONFLICTis shown verbatim.sys_sharing_ruleview.Final round of objectui#13050:
readObjectScope).Follow-up: objectstack-ai/objectstack#24644 moves objectstack's console pin past
12dc7b47, re-runs F1 on it, and smoke-tests this page end to end against objectstackmain.The card closes
completed. The dev session is archived.