Skip to content

docs(skills): guard nullable validation operands, teach hook body, list mailbox / package-registry, drop os generate agent - #31127

Merged
os-zhuang merged 1 commit into
mainfrom
claude/project-thread-1cv046
Nov 7, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
claude/project-thread-1cv046

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Irene · project thread

Fixes #31113

Clause-②: no
Metadata-protocol: none

dispatch-gates --tier reads a MANDATORY model tier for skills/** (clause ① of the model-tiering ruling); it is waived by the standing order of the maintainer in this project (2026-11-03), and this card ran on the project's default model. The dispatching seat runs the contract review.

维护者速读

  • 改了什么:objectstack-data 的 rules/validation.md 六处比较/算术谓词全部加 != null 守卫,并写明未守卫的可空字段在发布时被拒;两个钩子示例(validation.md、examples-objects.md)改写为沙箱 body,SKILL.md 索引只把 handler 称为已弃用;objectstack-platform 的 requires: 表补 mailbox、package-registry;operations.md 的 os generate 行去掉已退役的 agent。
  • 为什么改:这四处把发布门会拒绝、或已退役/已弃用的写法教给 AI(skills: four teaching errors copied into refused or retired metadata — validation.md nullable comparisons, requires: table misses package-registry/mailbox, os generate agent still listed, deprecated handler taught first #31113):裸可空比较被 validate-null-guards 拒绝;handler 已弃用;两个 token 在 PLATFORM_CAPABILITY_TOKENS 里却不在表里;agent 在 RETIRED_GENERATORS 里。
  • 风险与回滚:只改技能文字与 eval;五个文件全部在 token 上限内,无上限上调(增长全部用同文件删除支付,见下文);发 @objectstack/skills patch;回滚即 revert。
  • 先看:skills/objectstack-data/rules/validation.md 的 External / Custom Validation 一节(席位裁定 A:body 无外呼 HTTP,外部 API 校验走 Connector recipe)。
  • 两分钟验证:node scripts/check-skills-token-ratchet.mjs,预期退出 0,57 authored bundle file(s) within their ceilings。
  • 需要你做的:skills/** 属 Tier H(人合),需要 os-zhuang 或 hotlong 的一次 approval,之后席位落地。

What changes

1. Nullable operands in rules/validation.md are guarded

Code site: packages/lint/src/validate-null-guards.ts (L29–L43: an ordering or arithmetic operator on a declared field with no required: true / defaultValue is rejected unless a != null / == null / isBlank() test dominates it), wired into validateStackExpressions for validations[].condition / .when / .then / .otherwise (packages/lint/src/validate-expressions.ts L44), which os build, os validate, os lint and the runtime publish gate run. skills/objectstack-formula/SKILL.md L112–L122 teaches the same rule.

The card named three sites; the file held six. The new sentence under § Expression Syntax states the rule, so the other three would have contradicted it on the same page; all six are guarded:

Line Before After
L60 script record.due_date < today() record.due_date != null && record.due_date < today()
L72 pattern record.amount < 0 record.amount != null && record.amount < 0
L78 pattern record.end_date < record.start_date record.start_date != null && record.end_date != null && record.end_date < record.start_date
L159 cross_field record.end_date <= record.start_date same guards, <=
L166 cross_field record.discount_amount > record.subtotal * 0.5 record.discount_amount != null && record.subtotal != null && …
L226 conditional when record.order_total > 10000 record.order_total != null && record.order_total > 10000

Measured, not assumed: findUnguardedNullableOperands (the gate's decision procedure, run through tsx with each field nullable) returns 1 or 2 findings for every "before" predicate and 0 for every "after" predicate.

§ Expression Syntax gains two lines (the line before them is byte-identical): "An ordering or arithmetic operator on a field with no required: true / defaultValue is refused at publish unless a != null test guards it."

<!-- os:check -->: that gate (packages/spec/scripts/check-skill-examples.ts) is a tsc type-check, not the null-guard lint. A trial run marked all four candidate blocks: the § Script Validation block (L52) and the rewritten hook block (L250) type-check and keep their markers; the § Common Script Patterns block (condition: … lines) and the § Cross-Field block (validations: [ with no import) fail with TS2304: Cannot find name 'P', because they are fragments, so they stay unmarked.

2. requires: table names mailbox and package-registry

Code sites: PLATFORM_CAPABILITY_TOKENS (packages/spec/src/kernel/platform-capabilities.ts L58 package-registry, L64 mailbox; provider rows L216, L218) and CAPABILITY_PROVIDERS (packages/core/src/capability-providers.ts L174 package-registry → @objectstack/service-package / PackageServicePlugin, L186 mailbox → @objectstack/service-mailbox / MailboxServicePlugin).

-| `marketplace` | `@objectstack/service-package` |
+| `mailbox` | `@objectstack/service-mailbox` — inbound mail |
+| `marketplace` `package-registry` | `@objectstack/service-package` |

package-registry shares the marketplace row because both keys resolve to the same package and plugin today (the comment at capability-providers.ts L164–L173). No count in prose (#27522).

3. os generate <kind> drops the retired agent

Code site: RETIRED_GENERATORS in packages/cli/src/commands/generate.ts (L974, agent at L980: "agents are platform-internal (ADR-0063 §2)"; its refusal points at os g skill).

-| `os generate <kind>` | Scaffold an object / view / flow / agent from a template |
+| `os generate <kind>` | Scaffold an object / view / flow / skill from a template |

4. Hooks are taught as body

Code sites: HookSchema.handler (packages/spec/src/data/hook.zod.ts L485: "DEPRECATED, prefer body") and HookSchema.body (L487–L498: preferred; when both are present the runtime uses body). The body's capabilities are HookBodyCapability (packages/spec/src/data/hook-body.zod.ts L48–L54); there is no http.fetch (L38: "outbound calls go through Connector recipes"). The ctx.api.object(name).findOne({ where }) shape is the one the body runner exposes (packages/runtime/src/sandbox/body-runner.ts L1119, gated as a READ by api.read in quickjs-runner.ts L705).

  • references/examples-objects.md § Lifecycle Hooks: the example is a body (language: 'js', source = the function body). The prose after it says body is the metadata-native form and names the inline handler only as deprecated.
  • rules/validation.md § External / Custom Validation: the seat ruled option A. The example is a body that reads blocked_tax_id through ctx.api with capabilities: ['api.read'] and throws. The lead now says "hitting another object or running arbitrary code", and adds that a body has no outbound HTTP, so an external-API check goes through a Connector recipe (home: references/data-hooks.md § Capabilities, L447).
  • SKILL.md L46 index: "the sandboxed body (ctx + capability contract; the inline handler is deprecated)".

Token readings (node scripts/check-skills-token-ratchet.mjs, exit 0)

File main This branch Ceiling
skills/objectstack-platform/SKILL.md 6011 6007 6011
skills/objectstack-data/SKILL.md 6071 6077 6078 (+6 inside existing headroom, no deletion owed)
skills/objectstack-data/references/examples-objects.md 1728 1710 1728
skills/objectstack-data/rules/validation.md 2746 2748 2756
skills/objectstack-platform/references/operations.md 3285 3285 3287

No ceiling is raised, so the ruling path was not used. No line was re-wrapped. Every deletion, with the facts it held and where each survives:

  • objectstack-platform/SKILL.md § The Template: "The memory driver and the Hono server are NOT in the file — the CLI auto-registers both at boot". Facts: no driver and no server in the scaffolded config; the CLI registers both. Homes, same file: § Wiring a driver — you usually do not ("Under os dev / os serve / os start the CLI resolves the driver itself … Do not put a driver in your config's plugins: array") and § Runtime Boot Sequence step 4 (DriverPlugin, HonoServerPlugin auto-registered). The line before it loses its trailing "The".
  • objectstack-data/references/examples-objects.md: the ctx.input.created_at = new Date().toISOString(); line. It wrote a column the platform stamps on insert itself (objectql's audit hook, packages/objectql/src/plugin.ts L1975), so it taught a redundant write. The old prose's facts (inline in-process handler; preferred body of language / source / capabilities; isolated VM; the shape AI/Studio hooks and build artifacts carry) all remain in the new prose or the example.
  • objectstack-data/rules/validation.md:
    • "Comprehensive guide for implementing validation rules in ObjectStack." Home: the H1 and the table of contents.
    • The No async / custom type bullet's tail ("external checks and arbitrary validation code belong in a beforeInsert / beforeUpdate lifecycle hook (see data-hooks.md)"). It now links § External / Custom Validation, which holds the hook rule and the data-hooks.md link. The "external checks" part also contradicted ruling A.
    • Common Script Patterns // Conditional required field (record.type == 'enterprise' && isBlank(record.account_manager)). Homes: the same block's "Require field when another field has value" pattern, and § Conditional Validation's enterprise_requires_manager, the same predicate.
    • "Lower numbers execute first." Home: the Priority block's comments "(run first)" / "(run last)".
    • Incorrect vs Correct "Script Logic Inverted" / "Correct — Script Logic". Homes: "⚠️ CRITICAL: … validation fails when it evaluates to true" (§ Expression Syntax) and // ❌ Fails when this is TRUE in § Script Validation; the correct amount check is the "Prevent negative values" pattern. The pair also held two unguarded amount comparisons. The "Validation Fires Too Often" pair stays, so § Incorrect vs Correct and its contents link remain.

Eval cases

  • objectstack-data/evals/objects-fields-relationships.json case 3 (corrected): must_contain gains != null; its expected_output already asked for explicit guards. (Site 1.)
  • objectstack-data/evals/hooks-security-seeds-datasources.json case 10 (new): block an account whose tax_id is in blocked_tax_id, and ask whether the hook can call a tax-authority API. Must contain beforeInsert, beforeUpdate, language: 'js', 'api.read', ctx.api.object(; must not contain handler:, HookContext, 'http.fetch'. (Site 4.)
  • objectstack-platform/evals/config-plugins-ops.json case 18 (new): inbound mail into mailboxes. Must contain requires, 'mailbox', @objectstack/service-mailbox; must not contain MailboxServicePlugin(. (Site 2.)
  • objectstack-platform/evals/config-plugins-ops.json case 19 (new): scaffold an object, a flow and an AI agent with the CLI. Must contain os generate object, os generate flow, os generate skill; must not contain defineAgent(. (Site 3.)

Deviations (all three accepted by the seat before writing)

  • Generator roster. The card's "live roster" (object fields view list action flow dashboard app skill picklist) is wrong: fields and list are keys inside templates. GENERATORS in generate.ts keys object view action flow dashboard app skill picklist permission dataset. The fix is unchanged (drop agent); skill takes its place, since that is what the refusal points at.
  • os:check. Only the two blocks the gate accepts are marked, as § 1 says. The card's acceptance asked for all three validation examples.
  • Site 4 in validation.md follows the seat's ruling A (a body cannot call an external API), not a literal port of the handler example.

Other sites found (not changed: outside this card's file surface)

  • skills/objectstack-data/references/data-hooks.md L219: hook condition: P`record.annual_revenue > 1000000` is an unguarded nullable operand. A hook condition is a covered surface (validate-null-guards.ts wiring table).
  • skills/objectstack-data/references/data-hooks.md: teaches the inline handler form first: 3 sites above § Sandboxed Hook Bodies (L309: L97, L161, L170) and 4 below (L739, L817, L845, L890), plus the comparison table at L319, so the reference itself still teaches the deprecated door first.
  • skills/objectstack-formula/SKILL.md L268: P`record.amount > 10000 && …` is an unguarded comparison in an os:check block. It has no object, so it is not refused by itself, but it is the shape that gets copied.

Verification

Local gates on 12dd0d0: 47 derived, 47 exit 0, 0 NOT MEASURED
  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 47 commands for the 9 changed paths; each was run with its exit code captured before any pipe.
  • pnpm check:dual-build-cjs-loads exited 3 (NOT MEASURED: no dist/) on the first run. After pnpm build (exit 0) it exited 0. The other 46 exited 0 on the first run, including check:skill-identifier-liveness, check:skill-top-level-keys, check:skill-compatibility, check:skill-frame-sync, check:skill-docs, check:skill-refs, check:doc-authoring, check:corpus-claim-drift and the token ratchet.
  • pnpm check:skill-identifier-liveness, pnpm check:skill-top-level-keys, pnpm check:skill-compatibility, pnpm --filter @objectstack/spec check:skill-refs, node scripts/check-skills-token-ratchet.mjs: exit 0 each.
  • pnpm --filter @objectstack/spec check:skill-examples (after building @objectstack/spec, @objectstack/client and @objectstack/client-react): exit 0, 285 prose examples type-check.
  • node scripts/check-commit-card-trailers.mjs --range origin/main..HEAD: exit 0 before the push.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (No schema touched.)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran.
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset ('@objectstack/skills': patch), and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec not touched; nothing to regenerate.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English. (The 维护者速读 section is Chinese, per the lane template.)
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

https://claude.ai/code/session_01J8VVAkfHzwVhtRa85nYA4e

…list `mailbox` / `package-registry`, drop `os generate agent`

- objectstack-data rules/validation.md: every ordering / arithmetic operand in
  the examples is guarded with `!= null` (refused at publish otherwise); the
  external-validation hook is a sandboxed `body` reading another object, and
  an external-API check goes through a Connector recipe.
- objectstack-data examples-objects.md and SKILL.md: hooks are taught as
  `body`; the inline `handler` is named only as deprecated.
- objectstack-platform SKILL.md: `mailbox` and `package-registry` rows in the
  `requires:` table.
- objectstack-platform references/operations.md: `os generate <kind>` no
  longer lists the retired `agent`.
- Eval cases for each site; '@objectstack/skills' patch changeset.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J8VVAkfHzwVhtRa85nYA4e
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 7, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#3 · huangyiirene · session_01J8VVAj7CvjkGXvgXzd6RZ7

Contract-review-claim: session_01J8VVAj7CvjkGXvgXzd6RZ7 · head 12dd0d0 · 2026-11-07T13:29Z

Full contract review of PR #31127 (#31113, claim 6707226386). The seat review runs at CONTRACT_REVIEW_TIER in an isolated subagent.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#3 · huangyiirene · session_01J8VVAj7CvjkGXvgXzd6RZ7

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 12dd0d0d109fc5d90c3c1ac0c2f4a45a519f8597
Local-runs: probe — node scripts/pm/check-governed-merges.mjs --pr 31127, run read-only from the main checkout, because the brief asks for the landing tier from that script (GOVERNED, Tier H, exit 3). Token counts were taken by hand (git show <rev>:<file> | wc -c, minus the release-stamp line on a SKILL.md). No worktree was made.
Scope: the 9 files of git diff origin/main...refs/seat3/pr-31127 (merge base 5f0037449 = origin/main): skills/objectstack-data/rules/validation.md, skills/objectstack-data/references/examples-objects.md, skills/objectstack-data/SKILL.md, skills/objectstack-data/evals/objects-fields-relationships.json, skills/objectstack-data/evals/hooks-security-seeds-datasources.json, skills/objectstack-platform/SKILL.md, skills/objectstack-platform/references/operations.md, skills/objectstack-platform/evals/config-plugins-ops.json, .changeset/skills-four-teaching-errors.md. Cited code read on main (none of these paths moved between aa3e21cca and 5f0037449): packages/lint/src/validate-null-guards.ts (rule, findUnguardedNullableOperands), packages/lint/src/validate-expressions.ts (wiring of .condition / .when / .then / .otherwise), packages/spec/src/data/hook-body.zod.ts, packages/spec/src/data/hook.zod.ts (handler DEPRECATED), packages/runtime/src/sandbox/body-runner.ts (hookBodyRunnerFactory, buildEngineRepoFacade), packages/runtime/src/sandbox/quickjs-runner.ts (READ methods gated by api.read), packages/types/src/data-error-classification.ts, packages/spec/src/kernel/platform-capabilities.ts, packages/core/src/capability-providers.ts, packages/core/src/capability-composition.ts, packages/cli/src/commands/generate.ts, packages/objectql/src/plugin.ts (sys_stamp_audit_insert), scripts/check-skills-token-ratchet.mjs, skills/objectstack-data/references/data-hooks.md, skills/objectstack-formula/SKILL.md, skills/objectstack-automation/SKILL.md and references/integration-recipes.md.

① Derived judgments

Inputs: card #31113 (body; triage 6706604677; claim 6707226386), the PR body, the commit, the net diff, and the seat's mid-flight rulings (site 4 option A; agent dropped by the GENERATORS roster; os:check only where the gate accepts). Each taught fact was checked against code on main:

  • Null-guard rule (validation.md § Expression Syntax). TRUE. validate-null-guards.ts rejects an ordering or arithmetic operator on a declared field with no required: true, no defaultValue (nor default option, nor autonumber) unless a != null / == null / isBlank() test dominates it in the same boolean branch. validate-expressions.ts wires it for validations[].condition / .when / .then / .otherwise, and os build / os validate / os lint / the publish gate run it. The new sentence names only != null, a correct subset. It matches the formula skill (L112-122), which spells the guard the same way.
  • The six guarded predicates. CORRECT. Each guard is a != null on every field operand, placed before the comparison in the same && chain, so it dominates. due_date < today(): today() is not a field. discount_amount > subtotal * 0.5: both operands guarded, including the arithmetic one. order_total in a conditional when is a covered key.
  • Widening from 3 to 6 sites. Inside the claim (the whole file is claimed) and justified: once the page states the rule, the three other unguarded sites (amount, discount_amount / subtotal, order_total) would contradict it on the same page.
  • os:check markers. Two blocks marked (§ Script Validation and the hook). The other two are fragments with no P import. That is the deviation the seat accepted.
  • Rewritten hook example (site 4, option A). TRUE on every point:
    • api.read is a member of HookBodyCapability and gates ctx.api.object(n).find / findOne / count / aggregate (quickjs-runner.ts READ list).
    • findOne({ where: { … } }) is the shape the body runner exposes (buildEngineRepoFacade) and data-hooks.md teaches. A predicate is given, so it does not hit the "findOne must say which record" throw.
    • source is wrapped as an async function body, so the top-level return and await are legal.
    • A throw propagates out of boundBodyHandler (throw answered), so a before* hook's throw aborts the write. data-hooks.md § Error Handling says the same.
    • "A body has no outbound HTTP" is TRUE: there is no http.fetch token ("outbound calls go through Connector recipes", hook-body.zod.ts L38), and fetch is absent from the VM (data-hooks.md § Sandbox restrictions).
    • The pointer data-hooks.md#capabilities--the-complete-list resolves to "### Capabilities — the complete list", which carries the Connector-recipe sentence (L447-448). The recipes themselves are real: objectstack-automation references/integration-recipes.md, and a record-before-* flow can reject a write. See S2.
  • requires: rows (platform SKILL.md). TRUE as mappings. package-registry and mailbox are in PLATFORM_CAPABILITY_TOKENS (L58, L64). CAPABILITY_PROVIDERS maps package-registry to @objectstack/service-package / PackageServicePlugin (L174) and mailbox to @objectstack/service-mailbox / MailboxServicePlugin (L186). Sharing the marketplace row is right: both keys resolve to the same package and plugin. No count was added to the prose. See S1 on always-on.
  • os generate row (operations.md). TRUE. GENERATORS keys object view action flow dashboard app skill picklist permission dataset. agent is in RETIRED_GENERATORS, and its refusal points at os g skill. "object / view / flow / skill" names live kinds only. The card's roster (with fields, list) was wrong, as the seat accepted.
  • body as the taught form.
    • examples-objects.md: body: { language: 'js', source } with no capabilities (default [], and nothing on ctx.api is used). ctx.input.industry = … is written back by applyMutationsToInput. The prose names handler only as deprecated, and HookSchema.handler reads "DEPRECATED, prefer body".
    • validation.md: body only.
    • data SKILL.md index: body first, handler "is deprecated".
  • The dropped ctx.input.created_at = … line. Redundant, so dropping it is right. sys_stamp_audit_insert (objectql plugin.ts L1971-1980, object: '*', beforeInsert, priority 10) stamps created_at on insert when the field exists.
  • Deletions paying the budget, each fact checked for a surviving home:
    • platform SKILL.md § The Template: "The memory driver and the Hono server are NOT in the file — the CLI auto-registers both at boot". The driver half lives in § Wiring a driver ("the CLI resolves the driver itself … registers DriverPlugin for you. Do not put a driver in your config's plugins:"). The Hono half lives in § HTTP Layer (HonoServerPlugin "is what os dev / os serve register") and § Runtime Boot Sequence step 4 (DriverPlugin "memory in dev", HonoServerPlugin auto-registered). Both facts survive.
    • examples-objects.md old prose: "inline (in-process)" survives in data-hooks.md's body-vs-handler table ("The host process"). "Preferred", { language, source, capabilities }, the isolated VM, and the AI/Studio/build-artifact shape all survive in the new prose.
    • validation.md "Comprehensive guide …": no fact (the H1 and the contents carry it).
    • validation.md "No async/custom" tail: the linked § External / Custom Validation holds the hook rule and the data-hooks.md link.
    • validation.md "Conditional required field": the same predicate is § Conditional's enterprise_requires_manager, and the "Require field when another field has value" pattern stays.
    • validation.md "Lower numbers execute first": the Priority block's "(run first)" / "(run last)" comments.
    • validation.md "Script Logic Inverted" pair: the ⚠️ CRITICAL line plus // ❌ Fails when this is TRUE. The correct amount check is the "Prevent negative values" pattern. The pair also held two unguarded comparisons.
    • No fact is lost.
  • Evals. All three JSONs parse, and the ids run 1-7, 1-10 and 1-19 with no gaps.
    • Data case 3: != null added to must_contain. Its expected_output already asked for explicit guards. Consistent.
    • Data hooks case 10: true to the new teaching (a body with api.read, ctx.api.object(…).findOne({ where }), a throw, the API check routed to a Connector). See N1.
    • Platform 18: requires: ['mailbox'] mounts @objectstack/service-mailbox. An unknown token is refused by defineStack. True.
    • Platform 19: os generate object|flow|skill are live, and agent is retired with ADR-0063 §2. True.

② Semver level

'@objectstack/skills': patch is right: skill prose and eval fixtures only, with the behaviour already shipped. Clause-②: no and Metadata-protocol: none are right (no schema, contract or metadata meaning moves). Both lines are line-initial in the changeset and in the PR body.

③ Boundary flags

  • Claim. All 9 paths are inside the claim (the five skill files, eval JSONs of the two skills, one changeset). The ratchet script is unchanged against main. The platform SKILL.md payment cut sits in § The Template, not in "the requires: table" the claim names. It is same-file payment, which the ratchet discipline requires, and the PR body names it. Not a breach.
  • Tier. check-governed-merges --pr 31127: GOVERNED, Tier H, skills/** ×8. Size +92 / −62 (154 lines), under 3000. Landing needs the maintainer's merge or an APPROVED review from GOVERNED_APPROVERS. The PR body says so. The PR is a draft, mergeable_state blocked. Labels: documentation, size/m, tooling.
  • PR body. It has Fixes #31113 and a model waiver that names no model ("the project's default model"). No model identifier appears in the body, title, diff or commit (the trailer is model-free).
  • Other sites outside the claim (confirmed for filing):
    • data-hooks.md L219: condition: P`record.annual_revenue > 1000000` is unguarded. A lifecycle hook condition is a covered surface (TOTAL binding, covered).
    • data-hooks.md teaches handler first. L311-313 says "Everything above this point showed the inline handler". The sites above L309 are L97 and L161 (inline) and L170 (string ref). Below it: L739, L817 (Pattern 3), L845 (Pattern 4) inline, and L890 (string ref). See N2.
    • formula SKILL.md L268: P`record.amount > 10000 && …` is unguarded, inside an os:check block with no object. It is not refused by itself, but it is the copied shape.

④ Design judgment

  • One home per rule. Yes. The null-guard rule is stated once in validation.md and points at the formula skill. The no-outbound-HTTP clause points at its home in data-hooks.md.
  • Token budget. No ceiling raised. Counted as ceil(bytes/4), release-stamp line excluded on a SKILL.md.
File main head ceiling
objectstack-platform/SKILL.md 6011 6007 6011
objectstack-data/SKILL.md 6071 6077 6078
references/examples-objects.md 1728 1710 1728
rules/validation.md 2746 2748 2756
references/operations.md 3285 3285 3287

The readings match the PR body.

  • should-fix S1, package-registry is always-on. It is in PLATFORM_ALWAYS_ON_CAPABILITIES, and resolveServedCapabilities appends it to every boot unless --preset minimal. The new row is a true mapping. But it sits under the lead "Every other service plugin is opt-in, and requires: … turns it on", so an author may think they must declare it. That lead was already untrue for ten tokens in the table (queue job cache settings email storage sms sharing messaging analytics). File a card to mark the always-on slate in the table. Not blocking, because the card asked for exactly this row.
  • should-fix S2, the Connector pointer stops one hop short. validation.md sends the reader to data-hooks.md § Capabilities. That section names "Connector recipes" but links nowhere. The recipes live in objectstack-automation references/integration-recipes.md, and the refusing path is a record-before-* flow running connector_action. Add that link in data-hooks.md, on the same follow-up card as the data-hooks.md sites in ③ (that file is outside this claim).
  • should-fix S3, data SKILL.md +6 is not paid by a same-file deletion. The index line grows 6071 → 6077 inside the 7 tokens of headroom earlier shrinks left. The script's own record accepts landing inside headroom (the validation.md table of contents did that). But the discipline says new text is paid by same-file deletion. The PR body lists the row without saying it uses headroom. Say so in the body, or trim "the inline " to pay part of it.
  • nit N1, eval case 10. must_not_contain: "'http.fetch'" fails a correct answer that writes "there is no 'http.fetch' capability". Drop the quotes from the assertion, or accept the risk.
  • nit N2, PR body. "Everything above § Sandboxed Hook Bodies (L309) … (8 handler: sites)" is off. There are 3 sites above L309 and 4 below, and the eighth is the comparison table at L319. Use the exact list from ③ when filing.
  • Check-runs on this head, read 2026-11-07T13:35Z: 40 runs, 26 success, 13 skipped, 1 in progress, 0 failed.

Must-fix: none. Should-fix: S1, S2, S3. Nit: N1, N2.

Implemented-by: claude/project-thread-1cv046
Reviewed-by: session_01J8VVAj7CvjkGXvgXzd6RZ7

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#3 · huangyiirene · session_01J8VVAj7CvjkGXvgXzd6RZ7

维护者速读

  • 改了什么: objectstack-data 的 rules/validation.md 六处可空字段比较全部加 != null 守卫;两个钩子示例(validation.md、examples-objects.md)改写为沙箱 body,SKILL.md 索引只把 handler 称为已弃用;objectstack-platform 的 requires: 表补 mailbox、package-registry;operations.md 的 os generate 行去掉已退役的 agent。另有四条 eval 与 '@objectstack/skills': patch changeset。9 个文件。
  • 为什么改: skills: four teaching errors copied into refused or retired metadata — validation.md nullable comparisons, requires: table misses package-registry/mailbox, os generate agent still listed, deprecated handler taught first #31113。这四处把发布门会拒绝、或已退役/已弃用的写法教给 AI。
  • 风险与回滚: 只改技能文字与 eval;五个技能文件都在 token 上限内,无上调。可整 PR revert。
  • 先看: skills/objectstack-data/rules/validation.md 的 External / Custom Validation 一节(body 无外呼 HTTP,外部 API 校验走 Connector recipe)。
  • 两分钟验证: node scripts/check-skills-token-ratchet.mjs,exit 0。
  • 需要你做的: skills/** 是受治理 Tier H 面,需 os-zhuang 或 hotlong 在 GitHub 上 Approve 一次。达档复核:全量 6707646253 PASS,Head-sha 12dd0d0d109fc5d90c3c1ac0c2f4a45a519f8597。批准后本席落地。
  • 席位意见: ACCEPT。

席位核对 — ACCEPT · domain:skills#3 · head 12dd0d0d109fc5d90c3c1ac0c2f4a45a519f8597

  1. 形态: draft → main,Fixes #31113;'@objectstack/skills': patch,Clause-②: no,Metadata-protocol: none;作者 objectstack-fleet[bot];9 个文件,在认领面之内。
  2. 前提实测: 复核逐项对照 main 代码:validate-null-guards.ts(六处守卫)、hook-body.zod.ts 与 body 运行器(api.read、ctx.api.object(…).findOne、抛错中止写入、无外呼 HTTP)、PLATFORM_CAPABILITY_TOKENS / CAPABILITY_PROVIDERS、GENERATORS / RETIRED_GENERATORS、sys_stamp_audit_insert(删去的 created_at 赋值)。
  3. 门禁(钉 head 12dd0d0d): dev 派生门禁 47 条全部 exit 0;卡片验收(liveness、top-level-keys、compatibility、skill-refs、ratchet、skill-examples)全部 0;check-runs 45 条:30 success、15 skip、0 失败;token 读数 platform SKILL 6007/6011、data SKILL 6077/6078、examples-objects 1710/1728、validation 2748/2756、operations 3285/3287,无上调。check-governed-merges --pr 31127:Tier H(skills/**)。
  4. 接受的偏差: 第 4 处按席位裁定 A 改写(外部 API 示例改为 ctx.api 读另一对象的 body,注明 body 无外呼 HTTP);卡片所列 os generate 名册有误,按 GENERATORS 实读;validation.md 守卫由 3 处扩到同文件全部 6 处;os:check 只标门禁接受的 2 块。S3(data SKILL +6 用余量)与 N2(handler 处数)由本席改正文;N1(eval 10 的 must_not_contain)可选,不改。
  5. 范围外去向: S1(requires: 表导语称全部 opt-in,常开 token 未标)→ skills: objectstack-platform's requires: table calls every listed service opt-in, but package-registry and other tokens are always-on #31130;S2(Connector recipe 无链接)与其余站点(data-hooks.md 先教 handler、L219 未守卫条件,formula SKILL L268 未守卫示例)→ skills: data-hooks.md still teaches the deprecated handler first and an unguarded hook condition; formula SKILL has an unguarded example #31131。
  6. 落地条款: Tier H。保持 draft,挂 pm:awaiting-merge,请 os-zhuang、hotlong 审批;获批后本席过落地前检、清标、ready、auto-merge;维护者直合亦可。

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 7, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 7, 2026 14:23
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 7, 2026
Merged via the queue into main with commit cbe20ab Nov 7, 2026
51 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-1cv046 branch November 7, 2026 14:58
@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants