Skip to content

Commit 2f93d0f

Browse files
os-zhuangclaude
andauthored
docs(skills): clear the GraphQL residue from the published catalog and declare sharingModel on its four object examples (#11141)
* docs(skills): drop the five GraphQL residue sites and the stale /storage mount `/graphql` is not mounted: `packages/runtime/src/http-dispatcher.ts:2069` is `// /graphql removed — GraphQL is not in the product plan (#2462 follow-on)`, there is no `createGraphQLDomain` among the registered domains (0 hits under `packages/*/src`), and `handleGraphQL` survives only in CHANGELOGs. Five sites in the published catalog still described it as a live ObjectStack surface — the input that generates client code against a route which 404s. - `objectstack-api` tags: drop `graphql` (the description one line above already lists no GraphQL surface). - `objectstack-data` `apiEnabled`: REST + MCP, the two surfaces the flag actually gates (`packages/mcp/src/stdio-data-bridge.ts:260` reads `enable.apiEnabled === false`). - `objectstack-platform` mount line: `createHonoApp` mounts auth and discovery only. `/storage` was stale on the same line and is corrected in the same edit — `packages/adapters/hono/src/index.ts:423` is `// --- Storage: deliberately NOT mounted (#4087) ---`, and the dispatcher carries the matching "No `/storage` domain (#4087)" note. - `objectstack-formula`: the `GraphQL.ComputedField` CEL-host row and the `api/graphql` cache-key row are deleted rather than replaced — no real surface fills either slot (the computed-field CEL host is already the `Field` / `type: 'formula'` row above it, and no cache-key template surface exists: `system/cache` takes plain key patterns, `api/http-cache` has none). The mirror row in `content/docs/ai/skills-reference.mdx` moves in this same commit, per the card's anti-drift requirement — never before or after the skill it catalogs. Bundle effect: -27 tokens on the published skills ratchet. Fixes #10846 * fix(skills): declare sharingModel on the 4 catalog examples, then scan skills/ for it The 4 `ObjectSchema.create()` examples inside os:check-marked blocks in the published catalog omitted `sharingModel`. The omission type-checks clean (`z.enum([...]).optional()`, no `.default()`) while `os validate` rejects it as severity: 'error' (`SECURITY_OWD_UNSET`) — so a reader copying a canonical example got a failing build with no hint from the page, multiplied by every AI that copies the catalog verbatim. Values, per the #10714 sweep's shape: - `account`, `invoice`, `support_case` (objectstack-data) -> `'private'`, the rule's own recommended default. DEFAULTED, not mirrored: `examples/` carries no object of these names. The showcase app's `showcase_account` / `showcase_invoice` are differently-named objects whose `public_read_write` is an explicit ADR-0090 D1 grandfather stamp ("record isolation for this demo object is RLS-owned / intentionally public") — a demo's stamp, not a value to teach. - `crm_lead` (objectstack-upgrade) -> `'public_read_write'`, MIRRORED: `examples/app-crm/src/objects/lead.object.ts` is the same object name, and the skill and the app disagreeing about one object's OWD is the drift this mirrors away. Flagged for review in the PR body — the real object's value is itself a demo grandfather stamp. Only then the gate half. `check-doc-security-posture` grows the `skills/` root its own header recorded as deferred, following `check-skill-examples`' SOURCE_ROOTS two-root/two-marker shape: `.md` + `<!-- os:check -->` for skills, `.mdx` + the MDX comment spelling for docs, since MDX has no HTML comments. Sequencing is the point — extending the roots before the 4 fixes would have made the gate born red. Two holes the generalization could have opened, closed here: - The anti-idle floor is now PER ROOT. A root scanned with the wrong marker reads zero marked blocks, and a single whole-corpus counter would have stayed green on the other root's census while a governed corpus went unjudged. - An exemption entry belonging to no root would be dropped by the per-root routing and never judged stale, silently ending the ledger's self-invalidating discipline. It is now a loud refusal. Self-test grows a skills leg proving the .md root judges its own marker, and that neither spelling crosses into the other root. No changeset: `packages/lint`'s published `files` is ["dist","README.md", "CHANGELOG.md"] with no `bin` and dist-only `exports`, so `scripts/**` ships to no consumer, and this commit touches no package `src/`. The PR declares that with `skip-changeset`. Fixes #10925 * chore(skills): raise the data/upgrade token ceilings per the 2026-08-23 maintainer ruling The four sharingModel keys commit 2 adds are required by the gating-tier SECURITY_OWD_UNSET rule and cost 30 tokens in two files whose ceilings sat at exactly zero headroom. Maintainer ruling, 2026-08-23, on PR #11141 (option A of the three put to them, verbatim): 「A:提天花板(推荐)」 — data 13797→13817, upgrade 8325→8335, quoted in the PR body as this gate's own header requires. The same ruling confirmed crm_lead keeps the mirrored 'public_read_write' (「镜像 public_read_write(推荐)」), so no diff change accompanies the raise. Bundle-level the PR still nets +3 tokens (commit 1 pays back 27 elsewhere); gate and its 33-case self-test green at this commit. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MsbKEG4LtERSLaDrbehM3e --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 584fe2e commit 2f93d0f

8 files changed

Lines changed: 214 additions & 73 deletions

File tree

content/docs/ai/skills-reference.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ Use when the user is adding `*.endpoint.ts`, configuring auth providers, definin
153153

154154
Do not use for: consuming an ObjectStack API from a client (that is just standard HTTP — no skill needed); the auto-generated CRUD endpoints (those follow from objectstack-data); request-side query syntax (see objectstack-query). CEL expressions in route guards or auth predicates: load objectstack-formula alongside.
155155

156-
**Tags:** `rest`, `graphql`, `endpoint`, `auth`, `realtime`, `server`
156+
**Tags:** `rest`, `endpoint`, `auth`, `realtime`, `server`
157157

158158
---
159159

packages/lint/scripts/check-doc-security-posture.mjs

Lines changed: 200 additions & 65 deletions
Large diffs are not rendered by default.

scripts/check-skills-token-ratchet.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,19 @@ export const CEILINGS = new Map([
145145
['skills/objectstack-api/SKILL.md', 6348],
146146
['skills/objectstack-automation/SKILL.md', 12543],
147147
// basis 7228d6c25 (PR #10402 head), not main — see CEILING_BASIS.
148-
['skills/objectstack-data/SKILL.md', 13797],
148+
// +20 (13797→13817): maintainer ruling 2026-08-23 on PR #11141 — the three
149+
// SECURITY_OWD_UNSET-required sharingModel keys. Ruling quoted in that PR's body.
150+
['skills/objectstack-data/SKILL.md', 13817],
149151
['skills/objectstack-formula/SKILL.md', 6055],
150152
['skills/objectstack-i18n/SKILL.md', 6349],
151153
// basis 7228d6c25 (PR #10402 head), not main — see CEILING_BASIS.
152154
['skills/objectstack-platform/SKILL.md', 12716],
153155
['skills/objectstack-pm-dispatch/SKILL.md', 14239],
154156
['skills/objectstack-query/SKILL.md', 5569],
155157
['skills/objectstack-ui/SKILL.md', 25154],
156-
['skills/objectstack-upgrade/SKILL.md', 8325],
158+
// +10 (8325→8335): same 2026-08-23 ruling — crm_lead's SECURITY_OWD_UNSET-required
159+
// sharingModel key (value mirrored from examples/app-crm per the same ruling).
160+
['skills/objectstack-upgrade/SKILL.md', 8335],
157161
]);
158162

159163
/**

skills/objectstack-api/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ metadata:
1616
author: objectstack-ai
1717
version: "1.4"
1818
domain: api
19-
tags: rest, graphql, endpoint, auth, realtime, server
19+
tags: rest, endpoint, auth, realtime, server
2020
---
2121

2222
# API Design — ObjectStack API Protocol

skills/objectstack-data/SKILL.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Toggle system behaviours per object:
9191
|:-----|:--------|:--------|
9292
| `trackHistory` | `false` | Field-level audit trail |
9393
| `searchable` | `true` | Index records for global search |
94-
| `apiEnabled` | `true` | Expose via automatic REST / GraphQL APIs |
94+
| `apiEnabled` | `true` | Expose via automatic REST + MCP APIs |
9595
| `apiMethods` | all | Whitelist over the six primitives (`get`, `list`, `create`, `update`, `delete`, `bulk`); derived verbs (search/export/upsert/…) follow automatically |
9696
| `files` | `false` | Attachments & document management |
9797
| `feeds` | `true` | Social feed, comments, mentions — **opt-out**: explicit `false` hides the feed UI and rejects new comments |
@@ -214,6 +214,7 @@ import { ObjectSchema } from '@objectstack/spec/data';
214214
export default ObjectSchema.create({
215215
name: 'account',
216216
label: 'Account',
217+
sharingModel: 'private',
217218

218219
fieldGroups: [
219220
{ key: 'contact_info', label: 'Contact Information', icon: 'user' },
@@ -253,6 +254,7 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
253254

254255
export const Invoice = ObjectSchema.create({
255256
name: 'invoice',
257+
sharingModel: 'private',
256258
fields: {
257259
status: Field.select({
258260
options: [
@@ -321,6 +323,7 @@ import { ObjectSchema } from '@objectstack/spec/data';
321323
export default ObjectSchema.create({
322324
name: 'support_case',
323325
label: 'Support Case',
326+
sharingModel: 'private',
324327
enable: {
325328
trackHistory: true,
326329
feeds: true,

skills/objectstack-formula/SKILL.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,6 @@ to the envelope.
425425
| `Hook` | `condition` | cel |
426426
| `SharingRule` | `condition` | cel |
427427
| `Flow.decision` | `expression` / edge `condition` | cel (use `vars.<step>.<key>`) |
428-
| `GraphQL.ComputedField` | `expression` | cel |
429428
| `Dataset.records[*]` | any value | cel (via `cel\`\``) |
430429
| `audit` / `metrics` / `tracing` | `condition` / `successCriteria` | structured \| cel |
431430

@@ -476,7 +475,6 @@ tmpl`Deal {{ record.name }} — {{ record.amount | currency }} closes {{ record.
476475
| `system/notification` | email subject + body, SMS message, push body + message (5 fields) |
477476
| `ai/model-registry` | `promptTemplate.system`, `promptTemplate.user` |
478477
| `integration/connector/github` | titleTemplate, bodyTemplate (PR + release) |
479-
| `api/graphql` | cache key |
480478

481479
There is no JS expression surface: procedural JS is the L2
482480
`ScriptBody { language: 'js' }` surface (hook bodies), not an expression

skills/objectstack-platform/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ export default app; // Deploy to Cloudflare Workers, Deno, Bun, Node
392392

393393
1. Accept a `kernel` (ObjectKernel) instance
394394
2. Create an `HttpDispatcher` internally
395-
3. Mount explicit routes for auth, GraphQL, storage, discovery
395+
3. Mount explicit routes for auth and discovery
396396
4. Delegate everything else to the dispatcher
397397

398398
This means **new routes added to HttpDispatcher work automatically**

skills/objectstack-upgrade/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,7 @@ import { defineAgent } from '@objectstack/spec/ai';
634634
// physical constraint explicitly via `storage.notNull`.
635635
export const Lead = ObjectSchema.create({
636636
name: 'crm_lead',
637+
sharingModel: 'public_read_write',
637638
label: 'Lead',
638639
fields: {
639640
name: { type: 'text', required: true, storage: { notNull: true } },

0 commit comments

Comments
 (0)