Repository navigation
docs(skills): objectstack-automation teaches the notify audience selectors, org:members included - #32841
Conversation
…ctors, org:members included The notify section names the three selectors a recipient string may be, written or evaluated: team:ID, owner_of:OBJECT:ID and org:members. One eval case asks for an organization-wide announcement and expects recipients: 'org:members'. The new lines are paid for by same-file restatement cuts; the token ceiling does not move. Claude-Session: https://claude.ai/code/session_016WV4d1bFeesvx6w5fHF75j Co-authored-by: Claude <noreply@anthropic.com>
|
domain:skills#1 · os-elon-musk · session_016WV4cwTZvo7tAGwbbRW2b8 Contract reviewServed-tier: Read: card #32785 (body and all 4 comments: triage 6830899665, unblock 6834212147, claim 6836124752, dev report 6836802887), PR #32841 body, its 3-file list, the net diff against Check-runs on this head at the time of writing: 25 success, 16 skipped, 2 in progress ( ① Derived judgments
② Semver level
Clause-②: no ③ Boundary flags
④ Design judgment
The four added lines hold against the code they cite (①) and against the card's scenario: a flow an administrator starts by hand carries the caller's organization ( The eight deletions, each checked in the head tree:
No rule is lost. Findings:
Case 22 is well-formed: valid JSON, id 22 follows 21 with no gap or duplicate, the same five keys and the same two assertion keys as the other 21 cases. It is gradeable and discriminating: the skill on
Tried and not broken: a selector through an envelope hitting the computed-address screen (exempt); the hand-started run carrying no organization (it carries the caller's); a deleted clause being the only statement of a rule (each has a surviving one); the ratchet ceiling (held by arithmetic and by CI); Must-fix: 0. Should-fix: 2 (both follow-ups). Nit: 3. Implemented-by: VERDICT: PASS |
…-edm3hj # Conflicts: # skills/objectstack-automation/SKILL.md
…tify selector lines After the merge with main the automation skill read 32 tokens over its ceiling: three of this branch's deletions were already spent on main. Three further restatements go instead: the Flow Variables key list (its example spells the keys), the script example's return comment (item 3 says the function returns a value) and the Valid-but-silently-wrong lead-in (its heading says it). The file reads 6861 of 6861; the ceiling does not move. Claude-Session: https://claude.ai/code/session_016WV4d1bFeesvx6w5fHF75j Co-authored-by: Claude <noreply@anthropic.com>
|
domain:skills#1 · os-elon-musk · session_016WV4cwTZvo7tAGwbbRW2b8 Contract reviewServed-tier: This is a delta review over the PASS record in PR comment 6836991260 (head ① Derived judgments
② Semver level
Clause-②: no ③ Boundary flags
④ Design judgment
The three new deletions, each read in the head tree:
Pins: Next to #32839's lines: the
Case 22 is byte-identical to the reviewed head and still follows case 21, which is #32839's. No id gap or duplicate. Prior judgment and nit N3 carry. Tried and not broken: a #32839 line lost in the merge (none; the net diff holds only this card's hunks); a spent cut counted twice (not in the diff, not in the table); a new cut being the only statement of a fact (each has a surviving one in the head); a test or eval token pinning a deleted phrase (none); the ceiling (held by the probe, by arithmetic and by Check-runs on this head at the time of writing: 23 success, 18 skipped, 5 in progress ( Must-fix: 0. Should-fix: 0 new (S1 and S2 of the prior record stay owed as follow-ups). Nit: 1 new (N4); N1 to N3 carry. Implemented-by: VERDICT: PASS |
|
domain:skills#1 · os-elon-musk · session_016WV4cwTZvo7tAGwbbRW2b8 维护者速读(席位终稿)
席位核对 — ACCEPT · domain:skills#1 · head
|
…d show the computed owner_of: form (objectstack-ai#33577) <!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XMCv7LS8oNqc7y47FubgYPN)_ Fixes objectstack-ai#32961 domain:skills#1 · os-project-manager · session_01FEkQ5m6cFuoP5TBSv16TZ4 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:`objectstack-automation` 技能 § `notify` 的两条受众选择器各补一句:`org:members` 在 `single` 形态下既无运行组织、也无通知所指记录时谁也收不到(例:开始节点未声明 `organization`、无记录的 `schedule` 流程),只在服务器日志告警,节点照样成功;`owner_of:OBJECT:ID` 给出流程真正要写的形式,用表达式拼出 id(`source: "'owner_of:crm_case:' + record.case_id"`)。 - 为什么改:PR objectstack-ai#32841 的契约复审留下两条 should-fix(S1、S2);照旧技能写出的通知会静默送达零人,或要 AI 自己推导 `owner_of:` 的可用写法。`flows.mdx` 早已写明前一条。 - 风险与回滚:纯技能文字,不动 schema 与运行时;token 6857 到 6859(上限 6861,未抬上限),新增由同文件四处复述删减付账;回滚即还原本 PR。 - 先看:`skills/objectstack-automation/SKILL.md` 第 132–133 行(两条选择器);再看第 108 行与 Assignment rules、Who may START 两处删去的 ADR 旁注。 - 两分钟验证:`node scripts/check-skills-token-ratchet.mjs`,预期 exit 0、`objectstack-automation/SKILL.md is 6859 tokens (ceiling 6861; headroom 2)`。 - 需要你做的:受管面 Tier H(`skills/**`):请批准或合并。 ## What changes - **`skills/objectstack-automation/SKILL.md` § `notify`, the `org:members` line (card Part 1, review S1).** It now ends "else nobody (`single` posture: a `schedule` flow declaring no `organization`, no record)", says any other `org:` value reaches nobody too, and says where the warning goes and what the node does: "Each warns in the server log only; the node succeeds." This also answers review nit N1 ("with a warning" did not say where). - **The `owner_of:OBJECT:ID` line (card Part 2, review S2).** It now shows the computed form once: `source: "'owner_of:crm_case:' + record.case_id"`. - **Paid in the same file** (headroom was 4 tokens; the card carries no maintainer words ordering a raise, so no ceiling moved): - § `notify` lead: "`NotifyConfigSchema` is `strictObject` —" before "an undeclared key is a named parse error", which says the same thing in the words an author acts on. - Three ADR asides that teach nothing an author writes: "(ADR-0066 D4)" on Who may START a flow, "(ADR-0142 D5)" in Assignment rules, "(ADR-0150 D3)" on A packaged rule's queue. The section headings and anchors are unchanged ("(ADR-0041 Tier 1)" in the Inbound webhook heading stays, so no anchor moves). - Silently-wrong item 3: "Data-lifecycle **side effects** (read/write other records) are an L2 **hook** (objectstack-data)." Its homes: the same item's bold lead ("A flow `function` is a PURE compute step — it does NOT read/write the database") with "a later **declarative** node persists it", and the skill's own description ("Do not use for data lifecycle hooks at the object layer (see objectstack-data)"). Eval case 5 (the `script` case) expects pure compute and a following `update_record`, both still taught. - Two re-wraps (the § `notify` lead and the Who may START callout) only re-flow lines the cuts shortened; they are not counted as payment. - **`.changeset/32961-notify-org-members-nobody-owner-of-form.md`**: `'@objectstack/skills': patch`, both declaration lines. ## Why Part 1 re-measured on `origin/main` 03dc626, not taken from the card: - **A `schedule` run can carry no organization.** `packages/triggers/trigger-schedule/src/schedule-trigger.ts:803` reads the binding's organization; `:886` spreads `tenantId` only when it is not `null` (the ruling-G `single` posture, comment `:868-885`). - **The notify node passes the run's organization, else the record's.** `packages/services/service-automation/src/builtin/notify-node.ts:1213` (`context.tenantId`), `:1230-1239` (`organizationOfRecordAbout`: the click-through record, else the trigger record). No record and no `tenantId` leaves it undefined. - **The resolver reads the producer's organization.** `packages/services/service-messaging/src/messaging-service.ts:1419-1420` passes `input.organizationId`, not the organization the engine stamps on the event row (`:1400-1402`). - **No organization: a server-log warning and nobody.** `packages/services/service-messaging/src/recipient-resolver.ts:233-239` warns "this emit names no organization; 0 recipients" and returns `[]`; any other `org:` value warns at `:173-175`. - **The node still succeeds.** `notify-node.ts:1307` returns `success: true` with `delivered: 0`; `deliveryFailureWarning` (`:99-103`) adds a step warning only for a failed delivery, so the run history shows none. - **Docs agree.** `content/docs/automation/flows.mdx:346-349`: "where there is none, `org:members` reaches nobody … each with a warning in the server log". Part 2: the `owner_of:` string is a recipient "written or evaluated" (the line above the list), so an envelope that evaluates to `'owner_of:crm_case:ID'` reaches that record's owner; the review record 6836991260 read the same path. ## Acceptance notes - **Round 2 (head `7cc0ff03`, review record 6887230505 should-fix):** the case is named as the `single` posture. Under `group` the `sys_notification` write in `emit()` is refused (`ERR_SYSTEM_WRITE_ORGANIZATION_REQUIRED`) before the audience is resolved and the node returns `success: false` (`notify-node.ts:1385-1394`); under `isolated` an undeclared schedule flow never binds. The remedy is named by spelling the start-node key `organization` (`SCHEDULE_ORGANIZATION_KEY`, `packages/spec/src/automation/schedule-organization.zod.ts:159`), +20 bytes inside the headroom. Nit not taken (no budget): the `{ dialect: 'cel' }` wrapper on the `owner_of:` example; item 1 and the `notify` fence already show the envelope. - **Part 1 is taught, not changed** (order ruling). One reading for the owning lane, not filed here: in the `single` posture the engine stamps the sole organization on the `sys_notification` row (`messaging-service.ts:1400-1402`), yet the resolver is handed the producer's (`:1419-1420`, comment "The organization is the producer's, as role: has always read it"), so `org:members` reaches nobody where the deployment's one organization is known. The comment states this as intended, so it is reported to the seat as an observation, not as a defect. - **Review nit N2 not taken:** the fence comment "An envelope must yield USER ids" still sits above the selector list; the list's "written or evaluated" is the more specific line, and the fence is an `os:check` block (left untouched). - No eval changed: `skills/objectstack-automation/evals/*.json` hold no assertion on these two lines or on the cut phrases (`git grep` of each cut phrase over `skills`, `packages`, `scripts`, `content`, `.claude`: no test, script or eval pins one). ## Verification Round 1 head `d9a512bb`; round 2 head `7cc0ff03` reran the same 46 derived families plus `check:skill-refs` and `check:skill-examples` with the same result (45 exit 0, `check:dual-build-cjs-loads` exit 3 NOT MEASURED; record `32961-gates-ran-r2.txt`). Base `origin/main` 03dc626 (`origin/main` later moved to a9da547 with no commit touching `skills/objectstack-automation` or the ratchet script). <details><summary>Line and token budget (skills/**)</summary> - `skills/objectstack-automation/SKILL.md`: 467 to 463 lines, 27447 to 27455 bytes; token ratchet 6857 to 6859 (ceiling 6861, headroom 2). The first wording with only the `strictObject` clause and the ADR asides cut measured 14 tokens over; the item 3 pointer cut paid the rest. - Whole package, all `skills/*/SKILL.md`: 4597 to 4593 lines, about 59056 to 59053 tokens (ceil(bytes/4) per file). - `node scripts/pm/check-skill-line-ratchet.mjs`: exit 0. `node scripts/check-skills-token-ratchet.mjs`: exit 0. </details> <details><summary>Derived gates</summary> `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 46 families for the two paths. Each was run on head `d9a512bb` with its exit code captured before any pipe, after building `@objectstack/lint...`, `@objectstack/client-react...` and `@objectstack/formula` under the verify lock (VERDICT command-exit 0, 356s): - 45 exit 0, among them `check-skills-token-ratchet` (scan and `--self-test`), `check-empty-changeset` (scan and `--self-test`), `check-changeset-no-major`, `check-adr-0087-registration`, `@objectstack/lint check:doc-formula-expressions`, `@objectstack/spec check:skill-docs`, `check:doc-authoring`, `check:nul-bytes`, `check:pm-governed-merges`, `check:published-files`, `check:role-word`, `check:skill-compatibility`, `check:skill-frame-sync`, `check:skill-identifier-liveness`, `check:skill-links`, `check:dts-closure`, `check:lean-entry-closure`, `check:sourcemap-no-sources-content`. - NOT MEASURED, exit 3 PREREQUISITE NOT MET: `check:dual-build-cjs-loads` (reads every package's `dist/`; no package source is touched; CI builds and runs it). - Outside the derivation, run because the order names them or the file holds `os:check` blocks: `@objectstack/spec check:skill-refs` exit 0 ("9 generated files in sync"), `@objectstack/spec check:skill-examples` exit 0 ("345 prose examples type-check"). - `--ran` reconciliation: "46 derived famil(ies) accounted for — 45 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)". - CI families are read from this PR's check-runs, not re-run here. </details> <details><summary>Tier and governed readings</summary> - `dispatch-gates --tier`: MANDATORY contract-review tier, `skills/**` under clause ① (the published catalog); no one-line exit for this surface. This thread ran at the claim's default model; the seat's at-tier contract review is the owed record. - `node scripts/pm/check-governed-merges.mjs --branch claude/project-thread-j1oabg`: GOVERNED, a human merge is the review record (Tier H). 1 of 2 paths hits the register (`skills/**`); the changeset is not on it. Size +21 / -15, under the 3000 threshold. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01FEkQ5m6cFuoP5TBSv16TZ4 <!-- signed: domain:skills#1 · os-project-manager · session_01FEkQ5m6cFuoP5TBSv16TZ4 --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…o 1 s before merged_at as the merge's (objectstack-ai#38896) <!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwB1hPSUXVWWaX4kvGfBzBT7q)_ Fixes objectstack-ai#38863 Refs objectstack-ai#34178 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户无感:每周治理合并审计不再把维护者本人经合并队列落地的改动,误报成席位违规。 - 为治理审计这一车队工具消除误报:合并队列在合并前一秒记下“移出队列”,旧读法把它当成最新的队列事件,读不出是谁把改动放进队列;现在只对队列机器人在合并前一秒之内的那一次移出放行,一秒是十二条误报上全部实测到的间隔。 - 出错只会让审计报告漏报或继续误报,不影响任何合并;可直接撤回本次改动恢复旧读法。 - 要你做的:这是须由维护者批准的治理面改动,批准一次即可。 ## What changes `scripts/pm/check-governed-merges.mjs` only (Tier H: an always-H instrument). - New `timelineAsQueued(events, landed, { enqueueEvent, dequeueEvent })` feeds the enqueue leg of `readLandingClearance`. It keeps the events strictly before `merged_at`, as before. It also drops the merge's own terminal `removed_from_merge_queue`, but only when all three hold: it is the **last** queue event the cut keeps, its actor is `github-merge-queue[bot]` (`MERGE_QUEUE_BOT`), and it is at most `MERGE_QUEUE_REMOVAL_WINDOW_MS` before `merged_at`. The guard's `enqueuerFromTimeline` then reads the actor of the `added_to_merge_queue` before it. The guard is not edited. - `MERGE_QUEUE_REMOVAL_WINDOW_MS = 1000`. Its docblock cites the readings: 0 s on objectstack-ai#33555, objectstack-ai#33632 and objectstack-ai#33616, and 1 s on all twelve BREACH rows of objectstack-ai#34178 (table below). GitHub stamps whole seconds, so 1 s is the narrowest window the readings support. No gap over 1 s was measured. - Unchanged readings: a removal by any other actor, a removal further out (an ejection the queue made first), and an earlier removal followed by a re-add (the newest queue event is then the add). If the guard's event names stop being strings, nothing is dropped and the leg stays undetermined. It never clears on that path. - Both callers of the landing half pick this up: the low-risk arm leg and the `.claude/**` split leg. - The two docblocks (the `readArmLanding` header and the self-test fixture comment) now state the measured window instead of "shares the merge's instant". ## Tests Self-test pins, under `node scripts/pm/check-governed-merges.mjs --self-test` (1017 assertions, exit 0 on `062ea49f4`): - objectstack-ai#33603 battery, 71 → 77: - the one-second shape clears on the enqueue leg; - the equal-instant control still clears, and a fleet-bot enqueue on the one-second shape does not; - a removal 2 s or 60 s out stays undetermined; - a removal inside the window by another actor stays undetermined; - after an earlier ejection, the re-add's enqueuer decides (the objectstack-ai#33355 / objectstack-ai#33394 shape); - the pure reader, including a queue-bot removal that an add follows. - objectstack-ai#35612 split battery, 35 → 36: the one-second shape on the split leg, with another actor's removal and the fleet bot as controls. <details><summary>Ablation (fix committed first; every mutation via scripts/ablation-replace.mjs, restored to the HEAD blob)</summary> - Enqueue leg back to the plain cut: red on 3 pins (the one-second shape, the re-add after an ejection, the split leg's one-second shape). The controls stay green, as expected, because the old reading was already undetermined for them. - Actor binding removed: red on the another-actor pin and on the split pin. A first attempt was a no-op: the tool refused because the replacement text already existed elsewhere. It was re-run with a unique replacement. - Window widened to 60 s: red on the outside-the-window pin and the pure-reader pin. - Last-event binding removed: green at first, which exposed a gap. Added the pin for a queue-bot removal that an add follows (commit `062ea49f4`). Re-ablated: red. </details> ## Re-run on objectstack-ai#34178's rows Enqueue leg, read on each PR's **live** timeline and `merged_at` through the real guard, before (strict cut) and after (`timelineAsQueued`): | PR | queue events (UTC) | gap | before | after | |---|---|---|---|---| | objectstack-ai#37072 | add os-zhuang 19:16:14 · rem bot 19:34:41 | 1 s | undetermined | authorized (os-zhuang) | | objectstack-ai#36775 | add os-zhuang 22:00:38 · rem bot 22:21:05 | 1 s | undetermined | authorized (os-zhuang) | | objectstack-ai#36067 | add os-zhuang 17:33:58 · rem bot 18:06:13 | 1 s | undetermined | authorized (os-zhuang) | | objectstack-ai#35673 | add os-zhuang 22:28:18 · rem bot 23:03:52 | 1 s | undetermined | authorized (os-zhuang) | | objectstack-ai#35709 | add os-zhuang 04:52:39 · rem bot 05:21:36 | 1 s | undetermined | authorized (os-zhuang) | | objectstack-ai#33355 | add · rem 09:52:16 · re-add os-zhuang 11:13:10 · rem bot 11:50:11 | 1 s | undetermined | authorized (os-zhuang) | | objectstack-ai#33577 | add os-zhuang 02:51:26 · rem bot 04:44:21 | 1 s | undetermined | authorized (os-zhuang) | | objectstack-ai#33589 | add os-zhuang 02:50:20 · rem bot 04:44:21 | 1 s | undetermined | authorized (os-zhuang) | | objectstack-ai#33394 | add · rem 21:48:10 · re-add os-zhuang 22:52:01 · rem bot 00:44:32 | 1 s | undetermined | authorized (os-zhuang) | | objectstack-ai#32841 | add os-zhuang 01:28:50 · rem bot 02:13:54 | 1 s | undetermined | authorized (os-zhuang) | | objectstack-ai#32839 | add os-zhuang 23:39:46 · rem bot 00:33:14 | 1 s | undetermined | authorized (os-zhuang) | | objectstack-ai#32313 | add os-zhuang 23:44:14 · rem bot 00:13:08 | 1 s | undetermined | authorized (os-zhuang) | | control objectstack-ai#33555 | removal == merged_at | 0 s | authorized (os-zhuang) | authorized (os-zhuang) | | control objectstack-ai#33632 | removal == merged_at | 0 s | authorized (os-zhuang) | authorized (os-zhuang) | | control objectstack-ai#33616 | enqueued by objectstack-fleet[bot] | 0 s | unauthorized | unauthorized | End-to-end sweep, the real CLI on both trees with `--since 2026-11-24T19:30:00Z --repos objectstack --json`. Both runs complete, 228 entries each: - objectstack-ai#37072 goes from `breach` (stage) on `197e3ff3b` to `cleared` by enqueue (os-zhuang) on `062ea49f4`. - One more entry moved, outside the 12: **objectstack-ai#38233**, from `pass` to `cleared` by enqueue. Its timeline has the same shape: added by os-zhuang 09:48:54, removed by the bot 10:20:32, merged 10:20:33. It was listed as a seat landing on a record, but it was the maintainer's enqueue. - No other entry changed state. NOT MEASURED: the end-to-end sweep row for the other eleven PRs. A window back to 2026-11-10 timed out at 570 s, and a 7-day window already takes about 8 minutes per tree, so this container's 10-minute foreground limit cannot fit it. Their enqueue-leg reading is in the table above. The weekly audit job will read them on its next run. ## Smaller finding: recommendation for the seat to route Recommendation: **enforce the record template where the record is written. Do not widen the reader.** This PR changes no recogniser (`record-recognisers.mjs` is outside the claimed surface). - Evidence: the template the reviewer is handed already spells both forms the 8 rows missed (`scripts/pm/record-recognisers.mjs` lines 2555–2559 on `197e3ff3b`): a clean round is written `No must-fix, no should-fix.`, and the delta record names what it closes as `S1: closed`. The rows wrote `must-fix 0 · should-fix 0`, `S1 closed.` and `F1 (must-fix on SHA): fixed.`, which are off-template. - Reason: the audit reads records through the queue guard's own reader, so the audit and the queue agree on what a record says. Widening the reader alone would make them disagree. Widening it for both changes what the queue accepts, a contract we own on both ends (AGENTS.md Prime Directive objectstack-ai#12: reject off-spec input at authoring, never accept a dialect). A check when the record is written tells the reviewer at once, while the record can still be fixed. - After this PR, those 12 rows clear on the enqueue leg, so the phrasing gap no longer decides them. It matters only for seat landings, where the queue already refuses the same phrasing. ## Acceptance notes - `origin/main` moved one commit past the base (`3c617a28e`, `packages/spec` and `ui/` only, nothing under `scripts/pm/`). It was not merged in, because the diff does not overlap it. - For the live sweep, this container's shallow clone was deepened with `git fetch --shallow-since=2026-11-02 origin main` (additive). ## Verification Read first: 1. `timelineAsQueued` and `MERGE_QUEUE_REMOVAL_WINDOW_MS` (the risk hunk: the three conditions that drop an event). 2. The one-line change in `readLandingClearance`. 3. The `WINDOW` pins in the objectstack-ai#33603 battery. Two-minute check: run `node scripts/pm/check-governed-merges.mjs --self-test`. Expected: `✓ check-governed-merges --self-test: 1017 assertions`, exit 0. <details><summary>Local gates on 062ea49</summary> - The derived set is `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack`, 63 commands. Reconciled with `--ran`: `63 derived, 61 run, 2 NOT-MEASURED, 0 UNRUN`. - NOT MEASURED, both left to CI: - `pnpm check:i18n-coverage`: exit 3, PREREQUISITE NOT MET (no CLI or examples build in this worktree). - `pnpm check:pm-dispatch-gates`: killed by timeout at 200 s and again at 280 s on the shared box, so it never reached a verdict. - `node scripts/check-self-test-workflow-commands.mjs` first failed when its spawn timed out (`spawnSync node ETIMEDOUT`) while the box was loaded. Re-run alone: exit 0. - Every other command: exit 0. - No changeset: `scripts/pm/**` is not published (`skip-changeset`). </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01WGufzfWWgrLkABDvbRjhAk)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Elon · project thread
domain:skills#1 · os-elon-musk · session_016WV4d1bFeesvx6w5fHF75j
Fixes #32785
Clause-②: no
Metadata-protocol: none
维护者速读
objectstack-automation技能的notify小节新增三行,教三个收件人选择器:team:ID、owner_of:OBJECT:ID、org:members;另加一条 eval(第 22 条),要求全组织公告写recipients: 'org:members'。org:members落到main,但技能只教「id、列表、表达式」,AI 写公告流程时会手工罗列用户。skills/objectstack-automation/SKILL.md的notify小节新增的三行;同文件Failure routing & runAs里两处删减(readonly段、hook 段末句);evals/flows-triggers-approvals.json第 22 条。packages/services/service-messaging/src/recipient-resolver.ts的resolveOne(team:、org:、owner_of:三个分支),应与新增三行一致。skills/**需受管审批人批准),之后席位落地。What changes
skills/objectstack-automation/SKILL.md, section### notify: one lead-in line and three list lines after the example, naming the selectors a recipient string may be, written or evaluated.team:ID: that team's members.owner_of:OBJECT:ID: that record's owner.org:members: every member of the run's organization, else that of the record the notification is about; any otherorg:value reaches nobody, with a warning.Three of the eight deletions at
752d4d53were already spent onmainby PR #32839 (the fault-edge "type: 'fault'is what routes", Filter operands "a literal or a CEL envelope", item 4 "write thevaluein theconditionAND everyfields/filterentry"), so they pay nothing here. This PR's own deletions againstmain522882abare eight:### Flow Node Typeslead-innotifyrowmessagingrow of therequirestablescriptrowconfig.function"readonlynoterunAs: 'system'" (the three examples stay)runAsnotesudois not a hook key."### Flow Variables(new){ name, type, isInput, isOutput }entries"scriptexample in item 3 (new)config.outputVariableexposes that value"; thesource: 'ai.ai_category'line; thedefineStack({ functions })exampleAdded: 324 bytes (the lead-in and three selector lines). Deleted: 299 bytes. Net +25 bytes.
skills/objectstack-automation/evals/flows-triggers-approvals.json: case 22, an administrator-started announcement to the whole organization. It must containnotifyandrecipients: 'org:members', and must not containobjectName: 'sys_member'orobjectName: 'sys_user'..changeset/32785-notify-audience-selectors.md:'@objectstack/skills': patch.Why
PR #32782 added the
org:membersaudience (Metadata-protocol: added) and left this skill as an owed follow-up. The section taught a recipient as an id, a list, an envelope oremailFieldonly.Each selector was read on
origin/main2ca09de5:packages/services/service-messaging/src/recipient-resolver.ts,resolveOne:team:reads thesys_team_memberrows whoseteam_idis the value;owner_of:OBJECT:IDreads that record's owner field;org:membersreads everysys_memberof the emitting organization, and any other value underorg:warns and resolves to nobody.packages/services/service-automation/src/builtin/notify-node.ts: the organization is the run's (context.tenantId), elseorganizationOfRecordAbout. A string an envelope evaluates to takes the same path as a written one, which is why the lead-in says "written or evaluated".content/docs/automation/flows.mdx, the paragraph "Anotifynode's recipients: a list adds each recipient", says the same. The new lines follow its wording.Tests
Skill prose and one eval case; no package code changed, so no test or ablation applies. The
notifyexample fence is not touched.Acceptance notes
main522882abto heade41a68aa.skills/objectstack-automation/SKILL.md: 467 → 473 lines, 27436 → 27461 bytes, 6854 → 6861 tokens (ceiling 6861, headroom 7 → 0; no ceiling raised). Bundle, sum of everyskills/*/SKILL.md: 4604 → 4610 lines. Bundle token total (whole shipped tree): 243893.notifysection, 2 removed by the deletions).owner_of:stays one clause. The resolver reads the first set field ofowner_id,assigned_to,assignee_id,owner,assignee. The line says "that record's owner" and does not list the fields; the documentation does not list them either.role:selector is taught. The card names three selectors, and the documentation's word rule (check:role-word) coversskills/**.mainand re-runscheck-skills-token-ratchet; this PR leaves 4 tokens of headroom.Verification
Gates on head e41a68a (after the merge of origin/main 522882a and the paying commit)
The other derived families were run on
752d4d53and are not re-run: the merge brought in no path this diff shares except the skill file itself, and CI runs the farm on the new head.check:skill-exampleswas not run; the editedscriptfence is not anos:checkfence (those are at thenotifyand assignment-rule examples, untouched).dispatch-gates on head 752d4d5: 46 derived, 46 run, all exit 0
node scripts/pm/dispatch-gates.mjs --commandsderived 46 commands for the three changed paths (merge base2ca09de5). All 46 exited 0 on head752d4d53. Two of them (check:dual-build-cjs-loads,check:lean-entry-closure) first exited 3, prerequisite not met, with only spec, formula and lint built; they exited 0 after a whole-treepnpm build --concurrency=2underos-verify-lock(119 tasks, VERDICT command-exit 0), andcheck:dts-closure,check:published-filesandcheck:sourcemap-no-sources-contentwere run again on that build, exit 0.check-skills-token-ratchet:skills/objectstack-automation/SKILL.md6857 / 6861.node scripts/pm/dispatch-gates.mjs --ran FILE --repo objectstack-ai/objectstack: "46 derived famil(ies) accounted for — 46 run, 0 NOT-MEASURED", exit 0.check:skill-refswas run beyond the derivation, exit 0.pnpm lintand the repo-level suites are left to CI.mainmoved tof770d664while the gates ran (one commit underui/, no path in common with this diff), so the branch was not merged again.🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4d1bFeesvx6w5fHF75j
Generated by Claude Code