Skip to content

Commit ce888ef

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-y1i0d2
Claude-Session: https://claude.ai/code/session_01L9qibyuQ5bYYSR8WDVsZCY Co-Authored-By: Claude <noreply@anthropic.com>
2 parents 89a474e + d4e3dcc commit ce888ef

38 files changed

Lines changed: 2386 additions & 108 deletions
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): an owner, assignee or 负责人 in a request is the injected `owner_id`, never a second same-label field
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
objectstack-data teaches that a request's owner, assignee, 负责人 or 处理人 is the platform's injected `owner_id`, not a second person field beside it. A handler the request names apart from the owner is a `user` field that grants no access, with a label no other visible field carries, the injected `owner_id` (Owner, 负责人), `created_by`, `updated_by`, `created_at` and `updated_at` included. To pay for the text inside the file's token ceiling, SKILL.md drops a ruling date, four ADR asides, two zod pointers that `references/_index.md` already carries, an internal constant name, a sentence restating its heading and a link the Quick Reference list already gives. The Quick-Start Template's support case no longer declares an `assigned_to` user field, and a new eval asks for a ticket app with a 负责人.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
'@objectstack/lint': minor
3+
'@objectstack/spec': minor
4+
---
5+
6+
feat(lint)!: refuse an object that shows two visible fields under one label (`field-label-duplicate`)
7+
8+
Clause-②: no (narrowing) — `os build`, `os validate`, `os lint` and the metadata publish door (an `object` write) now refuse an object whose visible fields, the platform's injected columns included, share one label in the authored text or in any locale a reader is served. Shipped first-party metadata hit: two example apps, relabelled here (`example-showcase`: `showcase_task.assignee` and `showcase_team.lead`, both served 负责人 to a `zh-CN` reader beside `owner_id`; `example-todo`: `todo_task.owner`, likewise); every other example, every first-party app under `packages/apps` and HotCRM build clean.
9+
Metadata-protocol: narrowed
10+
Skills-docs: none — the authoring half (an AI builder reusing `owner_id` instead of adding a second "Owner" field) is the skills lane's on the parent card; `os explain field-label-duplicate` carries the rule's full text, and four CLI transcripts in `content/docs` show the author-time rule count moving from 67 to 68.
11+
12+
<!-- adr-0087: registered object-field-label-duplicate-refused -->
13+
14+
**BREAKING** for metadata that builds today: an object that shows two or more visible fields under one label is now an error. Every surface draws a field under its label (list grid headers, kanban card lines, form captions, export and import columns), so two fields of one label are two columns a person cannot tell apart, and editing one reads as editing the other. The common case is a field added beside the platform's own: a `user` field labelled like `owner_id`, which a `zh-CN` reader is served as "负责人".
15+
16+
What is compared: the fields the object serves (its own plus every `objectExtensions` field of the stack) and the columns the platform injects on it (`owner_id`, `created_at`, `created_by`, `updated_at`, `updated_by`; the organization, business-unit and queue columns are hidden). A field declared under an injected column's name replaces it. `hidden: true` fields are not compared. Labels are compared trimmed, once as authored and once per locale (every locale a `translations` bundle carries, plus `en`, `zh-CN`, `ja-JP` and `es-ES`, the locales the platform translates the injected columns into), through the same `translateObject` the `/meta` read serves them with.
17+
18+
FROM → TO, and the fix:
19+
20+
- FROM an object with `assignee: { type: 'user', label: '负责人' }` beside the injected `owner_id` building clean TO `field-label-duplicate` naming `'assignee' and 'owner_id'`, the label and `locale zh-CN`. Fix: use `owner_id` instead of a second owner field, or label the field apart (for example "处理人"), or set `hidden: true` on it.
21+
- FROM two authored fields labelled "Status" building clean TO the same error, naming both fields and no locale. Fix: give each its own label.
22+
- FROM a translation bundle that gives two fields one label in one locale building clean TO the error naming that locale. Fix: translate them apart in that bundle.
23+
24+
At the publish door a write of another object is never refused for a clash a stored object carries; saving the clashing object itself is refused until the clash is fixed, as for every gating rule at that door. No boot or registration path runs the author-time rules, so an installed app keeps loading and serving its objects as before.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
'@objectstack/plugin-auth': patch
3+
---
4+
5+
fix(plugin-auth)!: with SSO domain verification on, an SSO sign-in links to an existing account, or changes its email address, only at a domain the provider has proven
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: none
9+
Skills-docs: none — no file under `skills/**` teaches SSO domain verification, account linking or an address change through an SSO provider; `content/docs/permissions/sso.mdx` ("Domain verification (opt-in)") states the rule.
10+
11+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped: sys_sso_provider and sys_user keep their columns, and no stored row changes shape. The rule is judged when an SSO sign-in reaches an account, so there is nothing at rest for a metadata migration to rewrite and no tombstone. -->
12+
13+
**BREAKING** — with SSO domain verification on (`OS_SSO_DOMAIN_VERIFICATION=true` or `plugins.ssoDomainVerification`), the rule that already decides account creation (an account reached through a provider holds an email address only at a domain that provider has proven) now also decides the two other ways an SSO sign-in (SAML or OIDC) reaches an account:
14+
15+
- **An implicit link.** A sign-in that links to an account that already exists is admitted only when the asserted email address is at one of the provider's listed, verified domains, matched exactly. Two cases, kept apart: an address at a domain the provider does not list at all was already not linked and is still refused as before, with the same answer; an address at a subdomain of a listed domain that is not itself listed and verified was linked before and is now refused with `EMAIL_DOMAIN_NOT_ALLOWED`.
16+
- **An address change.** A later sign-in that would change the stored email address of an account the provider is already linked to (the provider is set to update the account from what the identity provider asserts) is admitted only when the new address is at one of those domains. A sign-in that would not change the stored address is not judged: one asserting the account's own address, and one through a provider that does not update the account (every SAML provider, and an OIDC provider without that update setting, which the platform's own provider registration never turns on).
17+
- A refusal under this rule is `EMAIL_DOMAIN_NOT_ALLOWED`, the code creation already answers: the sign-in redirects to the error page with `error=EMAIL_DOMAIN_NOT_ALLOWED`, no link is written, no session is issued, and the stored address is unchanged. A provider that cannot be read refuses.
18+
- Unchanged: environments with verification off; sign-ins that would not change the stored address; explicit links from account settings; sign-ins through the cloud identity provider and enterprise OAuth providers.
19+
20+
**Who moves.**
21+
22+
- A deployment with verification on, whose people already hold local accounts at a subdomain of a domain its provider lists (for example `eng.acme.com` under a provider listing `acme.com`), lists that subdomain on the provider and verifies it before those people first sign in through the provider. Accounts at a domain the provider does not list at all were not linked before either; nothing moves for them.
23+
- A deployment with verification on, whose provider updates accounts from what its identity provider asserts and whose people move to a new email domain, lists the new domain on the provider and verifies it before the move.

‎.claude/skills/pm-dispatch/SKILL.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ PM 的工作是循环:选卡 → 认领 → 派发 → 收集 → 复核 → 报
183183
- governed 面(定 Tier,非车道):`docs/adr/**`+`.claude/**`+`skills/**`+`docs/NORTH-STAR.md`+`.github/workflows/**`。
184184
- governed 面同含 `AGENTS.md`+`CLAUDE.md`;`GOVERNED_REPOS` 同治理、行可限仓,执行席恒随落地仓车道。
185185
- 另含 `ui/docs/adr/**`+`ui/.claude/**`+`ui/skills/**`+`ui/AGENTS.md`+`ui/CLAUDE.md`+`ui/.github/workflows/**`。
186-
- 路径面命中 Tier H ⇒ ACCEPT 换终局四件套,混合 diff ⛔ 不按比例判;要拆让 dev 单独开 PR。
186+
- 定档 Tier H ⇒ ACCEPT 换终局四件套,混合 diff ⛔ 不按比例判;要拆让 dev 单独开 PR。
187187
- 改动 >3000 行(含生成物)同换终局四件套含③请审,⛔ 无 Tier S 例外;读数=PR additions+deletions。
188188
- ① 席位记录落 PR 先于 `pr_ready`/入队且钉 head:速读六行+席位意见,其下 `## 席位核对`。
189189
- ② PR 悬着等人批,同笔挂 `pm:awaiting-merge`;人工直合即审核记录,授权批准 ⇒ 席位落地。
@@ -199,8 +199,8 @@ PM 的工作是循环:选卡 → 认领 → 派发 → 收集 → 复核 → 报
199199
- 速读「需要你做的」求批点名 PASS 评论 id+`Head-sha`;无 PASS ⇒ 写 contract review owed 不求批。
200200
- ④ 轮报单列 awaiting a human merge 并现读请审人;⛔ 未请审不在 chat 报「等你批」,先补请。
201201
- skills 车道自有 PR:纯代码面如 `scripts/pm/` 由本席自读(清单不减)后落地。
202-
- 受管面两层:Tier S = `.claude/**`+下行 S 面,余皆 Tier H 等人批;S 经达档 PASS 后 ready → 入队。
203-
- 本仓 `.github/workflows/**` 由 `readWorkflowDiff` 定档:发布路径、C2 触发、拒读或未读 ⇒ H,余 S。
202+
- 受管面两层:Tier S = `.claude/**`+下行 S 面(技能独占),余皆 Tier H;S 经达档 PASS 后 ready→入队。
203+
- 本仓 `.github/workflows/**` 读 `readWorkflowDiff`(发布面/C2/拒读⇒H),技能 `lowRiskArmVerdict`,未读⇒H。
204204
- 入队资格:每 check 绿或预期 skip,⛔ 非必查子集;名单 check-expected-skips.mjs 只判 objectstack。
205205
- 非必查红是真缺陷或坏门,归 PM 入队前处置;第三种按设计而红,三条全立才可带红入队:
206206
- 源码自述 pushed 分支上按设计而红、不跑 `merge_group`、PR 评论记明门与因,缺一即否。

‎.claude/skills/pm-dispatch/references/lanes/skills.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
## 常设承诺
2222

2323
- 四维分析先于派发与复核。
24-
- Tier H 受管 PR 恒 draft 等维护者的字;flip 或 arm 前跑 `check-governed-merges --test` 带路径。
24+
- Tier H 受管 PR 恒 draft 等维护者的字;flip 或 arm 前跑 `check-governed-merges --pr N` 定档。
2525
- 档位从 `--tier` 推导引用;pm-dispatch 根恒契约复审档;条款②闸门照现行。
2626
- 棘轮逐行付账,⛔ re-wrap 筹行;砍点逐条核幸存,被砍内容若在别处无家,砍掉就是丢规则。
2727
- 「Instruments serve the fleet」答不出的 finding ⇒ 建议 p3 或不做,⛔ 不自入队;定级归分诊。

‎AGENTS.md‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ See `ui/AGENTS.md` for the app-id / localStorage / auth gotchas.
273273
seat merges, queues, or arms auto-merge on a PR whose diff touches one.** The governed surfaces are `docs/adr/**`,
274274
`docs/NORTH-STAR.md`, `.claude/**` (agents, hooks and settings — not only skills), `skills/**`, `AGENTS.md`,
275275
`CLAUDE.md` and `.github/workflows/**`, and under `ui/` `ui/docs/adr/**`, `ui/.claude/**`, `ui/skills/**`,
276-
`ui/AGENTS.md`, `ui/CLAUDE.md` and `ui/.github/workflows/**`, all Tier H. The register is `GOVERNED_SURFACES` in
276+
`ui/AGENTS.md`, `ui/CLAUDE.md` and `ui/.github/workflows/**`. The register is `GOVERNED_SURFACES` in
277277
`scripts/pm/check-governed-merges.mjs`, each row carrying its tier; adding a surface is an edit *there*, never here,
278278
and `pnpm check:pm-governed-prose` reds per-PR when this paragraph names fewer surfaces than the register — or
279279
more. A fork PR (head repo ≠ base repo) is a proposal, never a delivery, whatever its paths: no AI seat readies,
@@ -284,17 +284,17 @@ See `ui/AGENTS.md` for the app-id / localStorage / auth gotchas.
284284
auto-merge, ⛔ never flip it out of draft to make any of those possible — judged on the PR's **file list**, not
285285
its description; a **mixed diff is not a proportion question**, one path hit is enough; to land the rest, split off
286286
the governed files. **The landing is tiered by the register; one Tier H path makes the whole PR Tier H.** **Tier H**
287-
(人合: every register row except `.claude/**` and Tier S workflow edits): those four lift only for an
288-
authorized APPROVED review by an account in `GOVERNED_APPROVERS`, on ANY commit and not dismissed; that word is
289-
spent once per PR — the OWNING seat then lands it, later pushes included; the click stays the maintainer's.
290-
**Tier S** (席内达档复核落地: objectstack workflow edits `readWorkflowDiff` reads as Tier S, and all of
291-
`.claude/**`): those four lift once the PR thread or its card carries a `## Contract review` record for the PR's
292-
current head with `Served-tier: CONTRACT_REVIEW_TIER` and a PASS verdict and every check is green — the owning
293-
seat then lands it through the queue; the post-merge audit is the compensating control. A PR whose only governed
294-
paths are register rows the queue leg regenerates byte-exact clears with zero approvals — an uncertified
295-
recompute, drift or a hand-authored sibling keeps it governed. ⛔ **No agent seat submits an approving review on a
296-
governed-surface PR, under any account** — an authorized account is agent-operated too; "CI is green" carries no
297-
information about a governance change. An authorized account's enqueue is a review record too: ⛔ never a seat's.
287+
(人合: every row outside Tier S): those four lift only for an authorized APPROVED review by an account in
288+
`GOVERNED_APPROVERS`, on ANY commit and not dismissed; that word is spent once per PR — the OWNING seat then lands
289+
it, later pushes included; the click stays the maintainer's. **Tier S** (席内达档复核落地: `.claude/**`,
290+
objectstack workflow edits (`readWorkflowDiff`) and skills-only wording (`lowRiskArmVerdict`; the seat labels
291+
unnamed security teaching) read as S): those four lift once the PR thread or its card carries a `## Contract review`
292+
record for the PR's current head with `Served-tier: CONTRACT_REVIEW_TIER` and a PASS verdict and every check is
293+
green — the owning seat lands it through the queue; the post-merge audit is the compensating control. A PR whose
294+
only governed paths are register rows the queue leg regenerates byte-exact clears with zero approvals — an
295+
uncertified recompute, drift or a hand-authored sibling keeps it governed. ⛔ **No agent seat submits an approving
296+
review on a governed-surface PR, under any account** — an authorized account is agent-operated too; "CI is green"
297+
says nothing about a governance change. An authorized account's enqueue is a review record too: ⛔ never a seat's.
298298

299299
**Already armed or queued when you read this?** Disable auto-merge AND convert it back to **draft**, which disarms
300300
an unqueued PR; no seat act, those two included, is measured to dequeue one (`platform-readings.md`, queue

‎content/docs/deployment/cli.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ os compile --json # JSON output for CI pipelines
880880
→ Normalizing stack definition...
881881
→ Lowering inline handlers...
882882
→ Validating protocol compliance...
883-
→ Running author-time rules (67)...
883+
→ Running author-time rules (68)...
884884
→ Checking that every required capability has a provider installable in this edition...
885885
→ Collecting package docs (ADR-0046)... 0 collected
886886
→ Writing artifact...

‎content/docs/deployment/validating-metadata.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ A clean run walks the registry and reports timing:
846846
Config: /path/to/support-desk/objectstack.config.ts
847847
Load time: 21ms
848848
→ Validating against ObjectStack Protocol...
849-
→ Running author-time rules (67)...
849+
→ Running author-time rules (68)...
850850
→ Checking that every required capability has a provider installable in this edition...
851851
→ Checking package docs (ADR-0046)...
852852

‎content/docs/getting-started/build-with-claude-code.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ visible: 'status != "resolved"'
311311
◆ Validate
312312
────────────────────────────────────────
313313
→ Validating against ObjectStack Protocol...
314-
→ Running author-time rules (67)...
314+
→ Running author-time rules (68)...
315315
316316
✗ Author-time rules failed (1 issue)
317317
• stack · action 'resolve_ticket' visible: bare reference `status` — a

‎content/docs/permissions/sso.mdx‎

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,27 @@ What verification decides, with it on:
380380
letters) is refused. Any other new account is refused with
381381
`error=EMAIL_DOMAIN_NOT_ALLOWED`, and nothing is created. No audience
382382
posture, invitation, first-user carve-out or `allowJit` setting relaxes this.
383-
- **Accounts that already exist are not re-checked.** A person who already has
384-
an account signs in as before.
383+
- **An SSO sign-in links to an existing account only at a proven domain.** When
384+
a sign-in links to an account that already exists (an implicit link), the
385+
asserted address must be at one of the provider's listed, verified domains,
386+
matched the same way. Two cases, kept apart:
387+
- an address at a domain the provider does not list at all was already not
388+
linked, and is still refused as before, with the same answer;
389+
- an address at a subdomain of a listed domain that is not itself listed and
390+
verified is no longer linked: it is refused with
391+
`error=EMAIL_DOMAIN_NOT_ALLOWED`.
392+
393+
Either way no link is written and no session is issued.
394+
- **A sign-in changes a linked account's address only to a proven domain.** A
395+
provider set to update the account from what the identity provider asserts
396+
writes a new address at a later sign-in. That sign-in is refused with
397+
`error=EMAIL_DOMAIN_NOT_ALLOWED`, and the stored address stays, unless the
398+
new address is at one of the provider's listed, verified domains. A sign-in
399+
that would not change the stored address is not re-checked: one that asserts
400+
the account's own address, and one through a provider that does not update
401+
the account (every SAML provider, and an OIDC provider without that update
402+
setting, which the platform's own provider registration never turns on),
403+
signs in as before. An explicit link from account settings is unchanged.
385404

386405
So if your people first sign in with addresses at a subdomain or at another
387406
domain, list each such domain on the provider as a bare host name and verify it.

0 commit comments

Comments
 (0)