Skip to content

refactor(spec)!: v17 close-out of the #3896 line — release notes, tool inert-key removal, ADR-0113 (Proposed) - #3998

Merged
os-zhuang merged 7 commits into
mainfrom
claude/sharing-rules-schema-bypass-h4c7xr
Jul 30, 2026
Merged

refactor(spec)!: v17 close-out of the #3896 line — release notes, tool inert-key removal, ADR-0113 (Proposed)#3998
os-zhuang merged 7 commits into
mainfrom
claude/sharing-rules-schema-bypass-h4c7xr

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

The three follow-ups approved after #3990, one commit each: the v17 release documentation for the whole security-hardening arc, the tool-surface false-capability removal while the breaking window is open, and the ADR that generalizes the structural lesson — left as Proposed for adjudication.

1. v17 release notes carry the security-hardening line (docs only)

releases/v17.mdx had zero mention of the arc. Added, in the page's own voice:

2. The four inert tool authoring keys are removed (breaking, changeset: major)

tool.category / permissions / active / builtIn were authorable and inert — none is part of AIToolDefinition, no execution path read them (the ledger corrected all four to dead+authorWarn in #3686). Two were misleading in the dangerous direction, which is what makes this the v17 move rather than backlog:

  • permissions promised a capability gate on invocation. Nothing enforced it — a tool "requiring" capabilities ran for everyone. Real gates: action.requiredPermissions (ADR-0066), permission sets on the touched objects.
  • active: false read as "withdrawn" and withdrew nothing: ToolRegistry.getAll() returns everything, the tool kept reaching the LLM tool set, and POST /ai/tools/:name/execute kept running it — unlike agent.active / skill.active, which are enforced. The same false-compliance shape as rls.enabled, resolved the same week.

Retirement kit, per the requiresConfirmation precedent (#3715): the .strict() ToolSchema rejects each key with its own prescription (6 new tests pin the rejections and that the two dangerous ones name the real mechanism); D2 conversion + D3 chain step (tool-inert-authoring-keys-removed) so os migrate meta strips them mechanically; ToolCategorySchema/ToolCategory removed with the key they typed (zero consumers — action.zod.ts keeps its own inline vocabulary on purpose); the Studio tool form drops the retired inputs (a form input for an unenforced gate is the UI half of false compliance — the objectui#2962 shape); ledger entries deleted, README tool row updated, both baselines edited deliberately.

3. ADR-0113 (Proposed) — required as a write contract, the column constraint as its own axis

The structural lesson behind #3929's three imperative guards, written up for decision — not implemented. The tri-binding is cited at its exact sites: required today means the write check (record-validator.ts), the NOT NULL DDL (sql-driver.ts:4901), and the drift expectation (schema-drift.ts:249) through one knob, so tightening any invariant on a deployed object is a destructive migration blocked by the very legacy nulls that motivated it.

Proposed rulings: required keeps the write-time + UI meanings (insert must provide, update may not null out, legacy rows rest — the semantics #3929 hand-built, promoted to one word); an explicit storage.notNull owns the DDL and keeps the destructive-migration ceremony; drift reads the storage property; criteria_json is the first consumer and gets its required marker back. Three open questions are flagged for the deciders (spelling; the new-field default; requiredWhen interplay). Merging this PR accepts the document, not the design — the Status line says Proposed.

Verification


Generated by Claude Code

claude added 3 commits July 30, 2026 02:15
The release page had zero mention of the arc: sharing criteria fail-closed
(#3929), RLS enabled enforced + priority removed (#3980/#3990), the
DynamicLoadingConfig false-compliance removal (#3950), the empty-state gate,
and the security-subset ledger re-verification with its two new proof
bindings. Added: a Highlights bullet, two breaking-change sections with
migration guidance, two dead-cluster table rows, two Spec/kernel bullets,
and two upgrade-checklist items. implementation-status gains one sentence
each on the sharing-criteria invariant and the RLS corrections.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QuViRSR1j6GJjf9qGbnqFX
…se-out)

category, permissions, active and builtIn were authorable and inert — none is
part of AIToolDefinition and no execution path read them (#3686 had already
corrected all four to dead+authorWarn). Two were misleading in the dangerous
direction: permissions promised a capability gate on invocation that nothing
enforced (a tool "requiring" capabilities ran for everyone), and active:false
read as "withdrawn" while the tool kept reaching the LLM tool set and
POST /ai/tools/:name/execute kept running it — the same false-compliance shape
as rls.enabled, resolved the same week.

The retirement kit, per the requiresConfirmation precedent (#3715):
- .strict() ToolSchema rejects each retired key with its own prescription
  (TOOL_RETIRED_KEY_GUIDANCE); 6 new tests pin the rejections and that the two
  dangerous ones name the REAL mechanism (action.requiredPermissions / drop
  from skills-agents).
- D2 conversion + D3 chain step (tool-inert-authoring-keys-removed): os migrate
  meta strips the keys mechanically; lossless by construction.
- ToolCategorySchema/ToolCategory removed with the key they typed (zero
  consumers; action.zod.ts keeps its own inline vocabulary on purpose).
- The Studio tool form drops the retired inputs — a form input for an
  unenforced gate is the UI half of false compliance (objectui#2962 shape).
- Ledger entries deleted (#3715 precedent), README tool row updated,
  authorable-surface + json-schema.manifest baselines edited deliberately,
  reference docs + v17 release notes regenerated/extended.

spec: 6883 tests green, tsc clean, all gates green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QuViRSR1j6GJjf9qGbnqFX
…lumn constraint as its own axis

The #3896 pattern generalized: field.required binds three meanings through one
knob (record-validator write check, sql-driver.ts:4901 NOT NULL DDL,
schema-drift.ts:249 drift expectation), so tightening any invariant on a
deployed object is a destructive migration blocked by the very legacy nulls
that motivated it. criteria_json's three imperative guards and its missing
required marker are the observed cost.

Proposed: required keeps the write-time + UI meanings (insert must provide,
update may not null out, legacy rows rest); an explicit storage property owns
the DDL and the destructive-migration ceremony; drift reads the storage
property. criteria_json is the first consumer. Three open questions marked
for adjudication — this lands as Proposed, not Accepted.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QuViRSR1j6GJjf9qGbnqFX
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectstack Ignored Ignored Jul 30, 2026 3:11am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests protocol:ai tooling size/l labels Jul 30, 2026
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 3 package(s): @objectstack/cli, @objectstack/platform-objects, @objectstack/spec.

111 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/ai/agents.mdx (via @objectstack/spec)
  • content/docs/ai/skills-reference.mdx (via packages/cli, @objectstack/spec)
  • content/docs/ai/skills.mdx (via @objectstack/spec)
  • content/docs/api/client-sdk.mdx (via @objectstack/cli, @objectstack/spec)
  • content/docs/api/data-flow.mdx (via @objectstack/cli)
  • content/docs/api/environment-routing.mdx (via @objectstack/cli, @objectstack/spec)
  • content/docs/api/error-catalog.mdx (via @objectstack/cli, @objectstack/spec)
  • content/docs/api/error-handling-client.mdx (via @objectstack/spec)
  • content/docs/api/error-handling-server.mdx (via @objectstack/spec)
  • content/docs/api/index.mdx (via @objectstack/spec)
  • content/docs/automation/approvals.mdx (via packages/spec)
  • content/docs/automation/flows.mdx (via @objectstack/spec)
  • content/docs/automation/hook-bodies.mdx (via packages/cli, packages/spec)
  • content/docs/automation/hooks.mdx (via @objectstack/spec)
  • content/docs/automation/index.mdx (via @objectstack/spec)
  • content/docs/automation/webhooks.mdx (via @objectstack/spec)
  • content/docs/automation/workflows.mdx (via @objectstack/spec)
  • content/docs/concepts/architecture.mdx (via @objectstack/spec)
  • content/docs/concepts/design-principles.mdx (via packages/spec)
  • content/docs/concepts/index.mdx (via @objectstack/spec)
  • content/docs/concepts/metadata-driven.mdx (via @objectstack/spec)
  • content/docs/concepts/metadata-lifecycle.mdx (via packages/spec)
  • content/docs/concepts/north-star.mdx (via packages/spec)
  • content/docs/data-modeling/analytics.mdx (via @objectstack/spec)
  • content/docs/data-modeling/drivers.mdx (via @objectstack/spec)
  • content/docs/data-modeling/external-datasources.mdx (via @objectstack/spec)
  • content/docs/data-modeling/field-types.mdx (via @objectstack/spec)
  • content/docs/data-modeling/fields.mdx (via @objectstack/spec)
  • content/docs/data-modeling/formulas.mdx (via @objectstack/spec)
  • content/docs/data-modeling/index.mdx (via @objectstack/spec)
  • content/docs/data-modeling/objects.mdx (via @objectstack/spec)
  • content/docs/data-modeling/queries.mdx (via @objectstack/spec)
  • content/docs/data-modeling/schema-design.mdx (via @objectstack/spec)
  • content/docs/data-modeling/seed-data.mdx (via @objectstack/spec)
  • content/docs/data-modeling/validation-rules.mdx (via @objectstack/spec)
  • content/docs/data-modeling/validation.mdx (via @objectstack/spec)
  • content/docs/deployment/backup-restore.mdx (via @objectstack/cli)
  • content/docs/deployment/cli.mdx (via @objectstack/cli, @objectstack/spec)
  • content/docs/deployment/self-hosting.mdx (via @objectstack/cli)
  • content/docs/deployment/troubleshooting.mdx (via @objectstack/spec)
  • content/docs/deployment/validating-metadata.mdx (via @objectstack/spec)
  • content/docs/getting-started/build-with-claude-code.mdx (via @objectstack/spec)
  • content/docs/getting-started/common-patterns.mdx (via @objectstack/spec)
  • content/docs/getting-started/examples.mdx (via @objectstack/spec)
  • content/docs/getting-started/quick-reference.mdx (via @objectstack/spec)
  • content/docs/getting-started/quick-start.mdx (via @objectstack/spec)
  • content/docs/getting-started/your-first-project.mdx (via @objectstack/cli, @objectstack/spec)
  • content/docs/kernel/cluster.mdx (via @objectstack/spec)
  • content/docs/kernel/contracts/auth-service.mdx (via packages/spec)
  • content/docs/kernel/contracts/cache-service.mdx (via packages/spec)
  • content/docs/kernel/contracts/data-engine.mdx (via @objectstack/spec)
  • content/docs/kernel/contracts/index.mdx (via @objectstack/spec)
  • content/docs/kernel/contracts/metadata-service.mdx (via packages/spec)
  • content/docs/kernel/contracts/storage-service.mdx (via packages/spec)
  • content/docs/kernel/index.mdx (via packages/spec)
  • content/docs/kernel/runtime-services/data-service.mdx (via packages/cli)
  • content/docs/kernel/runtime-services/email-service.mdx (via packages/spec)
  • content/docs/kernel/runtime-services/index.mdx (via packages/cli, packages/spec)
  • content/docs/kernel/runtime-services/queue-service.mdx (via packages/spec)
  • content/docs/kernel/runtime-services/sharing-service.mdx (via packages/spec)
  • content/docs/kernel/runtime-services/sms-service.mdx (via packages/spec)
  • content/docs/kernel/runtime-services/storage-service.mdx (via packages/spec)
  • content/docs/kernel/services-checklist.mdx (via @objectstack/spec)
  • content/docs/permissions/authentication.mdx (via @objectstack/cli)
  • content/docs/permissions/authorization.mdx (via @objectstack/spec)
  • content/docs/permissions/permission-sets.mdx (via @objectstack/spec)
  • content/docs/permissions/permissions-matrix.mdx (via @objectstack/spec)
  • content/docs/permissions/positions.mdx (via @objectstack/spec)
  • content/docs/permissions/rls.mdx (via @objectstack/spec)
  • content/docs/permissions/sharing-rules.mdx (via @objectstack/spec)
  • content/docs/plugins/adding-a-metadata-type.mdx (via @objectstack/spec)
  • content/docs/plugins/development.mdx (via @objectstack/spec)
  • content/docs/plugins/index.mdx (via @objectstack/spec)
  • content/docs/plugins/packages.mdx (via @objectstack/cli, @objectstack/platform-objects, @objectstack/spec)
  • content/docs/protocol/backward-compatibility.mdx (via @objectstack/spec)
  • content/docs/protocol/diagram.mdx (via packages/spec)
  • content/docs/protocol/kernel/config-resolution.mdx (via @objectstack/spec)
  • content/docs/protocol/kernel/i18n-standard.mdx (via @objectstack/spec)
  • content/docs/protocol/kernel/index.mdx (via @objectstack/spec)
  • content/docs/protocol/kernel/lifecycle.mdx (via @objectstack/spec)
  • content/docs/protocol/kernel/plugin-spec.mdx (via @objectstack/cli, @objectstack/spec)
  • content/docs/protocol/kernel/realtime-protocol.mdx (via @objectstack/cli)
  • content/docs/protocol/kernel/runtime-capabilities.mdx (via @objectstack/spec)
  • content/docs/protocol/knowledge.mdx (via @objectstack/spec)
  • content/docs/protocol/objectql/index.mdx (via @objectstack/spec)
  • content/docs/protocol/objectql/query-syntax.mdx (via @objectstack/spec)
  • content/docs/protocol/objectql/schema.mdx (via @objectstack/spec)
  • content/docs/protocol/objectql/security.mdx (via packages/spec)
  • content/docs/protocol/objectql/state-machine.mdx (via @objectstack/spec)
  • content/docs/protocol/objectui/actions.mdx (via @objectstack/spec)
  • content/docs/protocol/objectui/concept.mdx (via @objectstack/spec)
  • content/docs/protocol/objectui/index.mdx (via @objectstack/spec)
  • content/docs/protocol/objectui/layout-dsl.mdx (via @objectstack/spec)
  • content/docs/protocol/objectui/record-alert.mdx (via @objectstack/spec)
  • content/docs/protocol/objectui/widget-contract.mdx (via @objectstack/spec)
  • content/docs/releases/implementation-status.mdx (via @objectstack/cli, @objectstack/spec)
  • content/docs/releases/index.mdx (via @objectstack/spec)
  • content/docs/releases/v12.mdx (via @objectstack/spec)
  • content/docs/releases/v13.mdx (via @objectstack/spec)
  • content/docs/releases/v16.mdx (via @objectstack/cli, @objectstack/spec)
  • content/docs/releases/v17.mdx (via @objectstack/spec)
  • content/docs/releases/v9.mdx (via @objectstack/spec)
  • content/docs/ui/actions.mdx (via @objectstack/spec)
  • content/docs/ui/create-vs-edit-form.mdx (via @objectstack/spec)
  • content/docs/ui/dashboards.mdx (via @objectstack/spec)
  • content/docs/ui/forms.mdx (via @objectstack/spec)
  • content/docs/ui/index.mdx (via @objectstack/spec)
  • content/docs/ui/public-data-collection.mdx (via @objectstack/spec)
  • content/docs/ui/setup-app.mdx (via @objectstack/platform-objects, @objectstack/spec)
  • content/docs/ui/translations.mdx (via @objectstack/spec)
  • content/docs/ui/views.mdx (via @objectstack/spec)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

claude added 3 commits July 30, 2026 02:24
…l refs regenerated

CI caught the two things the tool-key removal missed: the generated
skills/objectstack-ai/references/_index.md (gen:skill-refs was the one
generator not run), and — found by sweeping hand-written docs the corrected
way — the SKILL.md Tool Configuration section, whose prose listed
category/permissions/active as optional keys and whose os:check'd defineTool
example authored category. That file is published FOR models to read as the
authoring contract; with the tombstone it was teaching a parse error. Prose
now names the retirement and where each concern actually lives
(action.requiredPermissions / drop-from-skills / action.ai.category); the
category table is gone with the key. Other sweep hits were false alarms:
action.ai.category and skill.active are live, different surfaces.

check:skill-refs / skill-docs / skill-examples all green (198 prose examples
type-check against the rebuilt spec).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QuViRSR1j6GJjf9qGbnqFX
…h the tool key removal

The Type Check job is a serial gauntlet — each fix revealed the next stale
projection. This closes the remaining two, verified by running EVERY
sub-check of the job locally this time: api-surface.json drops the removed
ToolCategory/ToolCategorySchema exports (breaking is intentional, the major
changeset is in this PR), and the four metadata-forms translation bundles
drop the retired tool-form fields' strings (merge mode — pure deletions, no
existing translation touched). check:api-surface, check:react-blocks,
check:skill-examples, check:i18n, check:i18n-coverage all green locally.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QuViRSR1j6GJjf9qGbnqFX
…ts ledger entry

Test Core caught the one consumer of the deleted ledger entry: the CLI
authorWarn lint is ledger-driven, and a test pinned the warning for authored
tool.permissions. Enforcement moved a layer down in this PR — the strict
parse rejects the key with its prescription before any lint could run — so
the test now pins the absence (same shape as tenancy #2763 and
contextVariables ADR-0105 D11, which sit in the same test).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QuViRSR1j6GJjf9qGbnqFX
@os-zhuang
os-zhuang marked this pull request as ready for review July 30, 2026 03:08
@os-zhuang
os-zhuang merged commit eb95d97 into main Jul 30, 2026
18 checks passed
@os-zhuang
os-zhuang deleted the claude/sharing-rules-schema-bypass-h4c7xr branch July 30, 2026 03:33
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 protocol:ai size/l tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants