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>
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