Repository navigation
Commit 10b8250
<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuDsgJg9TZyi9CRq2YkCkKxa)_
Fixes #25602
Clause-②: no
Metadata-protocol: none
`main`'s `Dogfood Regression Gate (1/3)` went red when #25591 landed
(`4a251927c`, `a57643d3d`) on one test,
`showcase-d3-d4-capabilities.dogfood.test.ts:135`. #25605 cleared it by
loosening the pin to the prefix "consulted only for an external member",
still on a record id naming no row. That prefix also matches the
incidental "that organization could not be resolved" reason, and it
stays green if the verdict admits staff. This PR pins the ruled reason
for a staff recipient on a real record, and keeps the contrast the pin
exists to draw. Test-only, in the private `@objectstack/dogfood` package
(`skip-changeset`). Branch `claude/project-thread-pluvu5` is
harness-assigned and does not follow `claude/issue-N-…`; the card is
#25602.
## Why the new reason is the intended one
#25591 (letter A of the ruling on #25549) made the D7 pre-flight in
`plugin-sharing` read the recipient on an effective-`public` object with
a real `owner_id`: an `external` member of the record's organization is
admitted, every other recipient is refused with "… consulted only for an
external member of the record's organization, and the recipient is not
one", and a grant whose organization cannot be resolved is refused with
"… and that organization could not be resolved". The old pin granted on
`showcase_project` (`public_read_write`) to a record id naming no row,
so on today's `main` it is refused for the third reason, an incidental
one. Nothing in `plugin-sharing` changes here.
## What changes
| Where | Before | After |
|:--|:--|:--|
| `beforeAll` | — | inserts one `showcase_project` (`D34 Project`, the
file's own account) and reads the signed-up member's `sys_user` id |
| third case, the contrast | `recordId: 'pj_absent'`, recipient
`u_d34_probe`, expects the prefix "... has a public sharing model, so a
share row on it is consulted only for an external member" (#25605) | the
real project and the member; asserts the project carries an organization
and the member's `sys_member.role` there is `member`; expects "… has a
public sharing model, so a share row on it is consulted only for an
external member of the record's organization, and the recipient is not
one" |
| comments | "refused for the OWD", "computed from the OBJECT before any
record is read", "caller- and record-independent", plus #25605's note
that `u_d34_probe` resolves to no organization | the D7 verdict on a
public object reads whether the recipient is an `external` member of the
record's organization; the retired rules' `position` recipients were
that organization's staff, which is the population the contrast now
uses. The header's `showcase_project` sentence says "nothing to widen
for the organization's staff" |
The `showcase_contact` half (a share on a private-OWD object is
accepted) is unchanged.
## Verification (local, worktree on `main` `a57643d3`, then merged with
`main` `9f390945`)
- The file, at `c29e83c4`: `os-verify-lock.sh -c 'pnpm --filter
@objectstack/dogfood exec vitest run
test/showcase-d3-d4-capabilities.dogfood.test.ts'` → `VERDICT
command-exit 0`, Tests 5 passed (5).
- Ablation 1, the pin tells the reasons apart
(`scripts/ablation-replace.mjs`, wrap mode): `recordId: pjId` →
`recordId: 'pj_absent'`, anchor 1 → 0, blob `3b0184f2` → `1593274b`.
Red, 1 failed / 4 passed, received "… and that organization could not be
resolved". Restored: blob equals HEAD, `git diff HEAD` empty.
- Ablation 2, the pin catches the verdict admitting staff: in
`plugin-sharing/src/sharing-service.ts`, `if (recipient === 'external')
return null;` → `if (recipient === 'external' || recipient ===
'internal') return null;` (hold mode, blob `c1f616f5` → `d0e5e5e9`),
rebuilt `plugin-sharing`; `ablation-dist-preflight.mjs` found the marker
in both `dist/` bundles. Red, 1 failed / 4 passed, "promise resolved …
instead of rejecting". Restored: blob equals HEAD, rebuilt (cache hit, 6
files), preflight `--absent` passes, tree clean; the file is green again
(5/5).
- `pnpm exec eslint --no-inline-config` on the file: exit 0. `tsc
--noEmit --listFiles` for `@objectstack/dogfood` under the lock: exit 0,
the file listed once.
- Final head `61e0a268` (this commit merged with `main` `9f390945`,
which touches only `core`'s import coercion), closure rebuilt under the
lock:
- Full dogfood battery, `os-verify-lock.sh -c 'pnpm --filter
@objectstack/dogfood test'` (no shard, no path): `VERDICT command-exit
0`, Test Files 292 passed / 3 skipped (295), Tests 2508 passed / 18
skipped (2526).
- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 58 commands; all 58 exit 0, each
exit captured before any pipe. Two first answered exit 3 (PREREQUISITE
NOT MET: the pinned control commit for `check-plugin-teardown-shape
--self-test` absent from the shallow clone, and seven dists outside the
dogfood closure for `check:dual-build-cjs-loads`); after fetching that
commit and building those seven packages both re-ran exit 0. `--ran`
reconciliation: 58 derived, 58 run, 0 NOT-MEASURED, 0 UNRUN.
- CI skips the `Dogfood Regression Gate` shards on `pull_request` and
`merge_group`, so the CI proof for shard 1/3 is `main`'s first push
battery after this lands.
- Round 2, head `acbef37e` (merged with `main` `8801f2bb`; one conflict,
in this file's contrast block, resolved to this branch's side): the file
5/5; ablation 1 red as before; ablation 2b, under one ablated
`plugin-sharing` dist that admits internal recipients, this file red
(promise resolved instead of rejecting) while `main`'s #25605 version of
it is green 5/5; eslint and dogfood tsc exit 0; `dispatch-gates` 58/58
exit 0; full dogfood battery green (counts in report round 2 on #25602).
## Acceptance notes
- **Prose that #25591 left stale, outside this card's surface, no
checker reads it:** the header of
`examples/app-showcase/src/security/sharing-rules.ts` says that on
`showcase_project` / `showcase_task` "no sharing rule can ever take
effect there", and `examples/app-showcase/test/inert-wirings.test.ts`
§6's docblock describes the refusal as the object-only one. Since #25591
a rule there is effective for external recipients. Noted, not filed.
- **Merge freeze:** opened as a draft during the 18.1.0 freeze; it is
landed only after the coordinator relays the unfreeze.
---
_Generated by [Claude
Code](https://claude.ai/code/session_014rFBGqoBLiroi35e82xEa7)_
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2351c8d commit 10b8250
1 file changed
Lines changed: 37 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| 57 | + | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| |||
77 | 80 | | |
78 | 81 | | |
79 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
80 | 88 | | |
81 | 89 | | |
82 | 90 | | |
| |||
108 | 116 | | |
109 | 117 | | |
110 | 118 | | |
111 | | - | |
112 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
113 | 122 | | |
114 | 123 | | |
115 | 124 | | |
| |||
122 | 131 | | |
123 | 132 | | |
124 | 133 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
134 | 150 | | |
135 | 151 | | |
136 | | - | |
| 152 | + | |
137 | 153 | | |
138 | 154 | | |
139 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
140 | 158 | | |
141 | 159 | | |
142 | 160 | | |
| |||
0 commit comments