Skip to content

feat(spec)!: retire an agent's model.provider — no runtime read it; the deployment's AI settings choose the provider - #37783

Merged
os-zhuang merged 4 commits into
mainfrom
claude/project-thread-t0ls0u
Nov 27, 2026
Merged

os-zhuang merged 4 commits into
mainfrom
claude/project-thread-t0ls0u

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Fixes #37712

Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: follow-up #37796

维护者速读

  • 是什么:agent 元数据里的 model.provider(openai / azure_openai / anthropic / local)从来没有运行时读取,按 ADR-0049「执行或移除」退役。供应商由部署的 AI 设置决定,agent 只写模型名。
  • 影响:以后 agent 里写 provider 会报错,并提示删掉这一行;os migrate meta --from 18 --write 会自动删。18.x 默认写进去的 provider: 'openai' 会被静默剥掉,已构建、已存储的 agent 照常加载。元数据预览不再显示供应商标签。运行时行为不变。
  • 要你做什么:无(座位已采纳退役路线,hold 记录 7206344767)。

What changes

  • Schema (packages/spec/src/ai/agent.zod.ts): AIModelConfigSchema.provider is a retiredKey() tombstone with the prescription, so writing it fails tsc (input type never) and the parse answers with the fix. The 18.x emitted default provider: 'openai' is accepted as inert residue and stripped (acceptRetiredDefaultResidue, the feat(spec): retired-defaulted-key tolerance — the retired default parses as inert residue and strips; non-default values keep the loud refusal (#12497 class rule) #12840 rule for a retired defaulted key; same shape as ViewSharingSchema). Every other value meets the tombstone.
  • ADR-0087 kit: D2 conversion agent-model-provider-removed (conversions/entries/19/, step 19, retiredFromLoadPath: true, retiredAfter: '18.6.0', lossless stripKeys); RETIRED_KEYS_BY_MAJOR[19] entry ai/AIModelConfig:provider; D3 semantic entry agent-model-provider-retired (relevance agents); one sentence in the step-19 rationale; JOIN row in retired-key-removal-version.pin.test.ts.
  • Ledger: liveness/agent.json model row note records the removal (a nested key has no row of its own). Evidence and verifiedAt unchanged: this session cannot read the cloud repository to re-verify it.
  • Generated: authorable-surface/ai.json ([RETIRED] row), content/docs/references/ai/agent.mdx.
  • DEFAULT_CHANGES_BY_MAJOR[19] (from feat(spec): an agent's model name becomes optional — absent means the environment's default model #37697): the reason no longer tells authors to write provider: 'openai'; it points at this retirement instead.
  • Form: the agent form's model help text no longer names a provider; the 11 locale bundles were regenerated (en) and hand-trimmed (the other ten drop the provider word only).
  • UI (AgentPreview.tsx): the preview shows the model name alone; a stale draft that still carries a provider never shows it.
  • Docs and fixtures: content/docs/ai/agents.mdx (table row + 4 examples), getting-started/common-patterns.mdx, packages/spec/docs/MCP_GUIDE.md, docs/notes/crm-development-standards.mdx, os explain agent text and example, benchmark.bench.ts, metadata-validation-sweep.test.ts, agent.test.ts.
  • Pins: src/ai/agent-model-provider-retirement.test.ts: refusal at every door (schema, defineStack), residue strip with a near-value control, tsc channel, D2 conversion on the stored-row seam and the boot door, idempotence, load-path retirement, registration, and a tree-scoped absence walk over the declared radius (added to vitest.repo-tests.json).
  • Changeset: .changeset/37712-agent-model-provider-retired.md, @objectstack/spec minor, BREAKING banner, FROM → TO table, ADR-0087 marker.

Why

ADR-0049 enforce-or-remove. Removal, not enforcement, because:

  1. The enum does not match the deployment's providers. The deployment's list is AI_PROVIDERS in packages/services/service-settings/src/manifests/ai-models.ts (gateway, openai, anthropic, google, deepseek, dashscope, cloudflare, siliconflow, openrouter). azure_openai and local are not providers a deployment has, and most real ones cannot be written. Enforcing it would mean redesigning the key, not adding a reader.
  2. objectstack-ai/cloud#5055 phase 1 resolves a model by its id among the providers the deployment turned on. The capability "pin an agent to a model" is model.model, which is live.
  3. No reader in this repository (only the preview pill). Cloud side: the ledger's cross-repo row (cloud @cb8ee7ff) and the card's 11-26 read of cloud main; not re-verified here.

Acceptance notes

Verification

  • ui fixtures: automationPreviews.i18n-10862 and three more (emptyCollection-8526, ResourceListPage.servedListColumns-36860, apps/console/src/preview-samples.ts) stop writing provider (commit 8655944); those 5 files 121 passed, console preview-samples 47 passed.
  • pnpm --filter @objectstack/spec build then check:generated: 14/14 up to date.
  • Source audits: check:empty-state, check:skill-examples, check:skill-served-sections, check:yaml-examples, check:template-manifests, check:variant-docs, check:error-code-provenance, check:duration-unit-keys, check:exported-any, check:dual-source-exports, check:entry-nameability, check:browser-reachable-entries, check:scripts-typecheck, check:llms-txt: all exit 0.
  • pnpm --filter @objectstack/spec typecheck (tsc + scripts + test-typecheck): 0.
  • @objectstack/spec full vitest: 998 files, 30139 passed; the one failure on the first run (retired-key-removal-version.pin JOIN row) is fixed and that file re-run green.
  • pnpm check:i18n: all bundles in sync. check:skill-identifier-liveness, check:doc-authoring, check:adr-0087-registration, check:empty-changeset, check:changeset-fixed, check:cross-package-test-inputs, check-changeset-no-major: 0.
  • packages/cli test/commands.test.ts + test/explain-rule-id.test.ts: 64 passed. packages/objectql metadata-validation-sweep.test.ts: passed. ui AgentPreview*: 24 passed.
  • eslint on the new and changed source files: clean.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic.
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes (changed files).
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English (the 维护者速读 block is the maintainer's standing exception).
  • The Before Submitting list in CONTRIBUTING.md is done.

Session: session_01L6bhgTnm6d4W7ugSacDJ3j

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgTnm6d4W7ugSacDJ3j

…he deployment's AI settings choose the provider

ADR-0049 enforce-or-remove. `AIModelConfigSchema.provider` (openai /
azure_openai / anthropic / local) was parsed and never read: the AI runtime
applies the model name, temperature and maxTokens only, and the providers a
deployment turns on are its own AI settings, a list the enum never matched.

- retiredKey() tombstone with the prescription; the 18.x emitted default
  `openai` is stripped as residue (acceptRetiredDefaultResidue)
- D2 conversion agent-model-provider-removed (step 19, lossless, retired from
  the load path), RETIRED_KEYS_BY_MAJOR[19] entry, D3 semantic entry
  agent-model-provider-retired, step-19 rationale
- liveness ledger note, authorable-surface + reference docs regenerated, agent
  form help text and its 11 locale bundles, removal-version JOIN row
- agent metadata preview shows the model name only
- docs, CLI explain, benchmark and test fixtures stop authoring the key
- pin suite with a tree-scoped absence walk (radius declared in
  vitest.repo-tests.json)

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgTnm6d4W7ugSacDJ3j
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation protocol:ai tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 3 package(s): @objectstack/cli, @objectstack/platform-objects, @objectstack/spec, touching 21 documentable anchor(s). ⚠️ 6 changed file(s) yielded no anchor (packages/spec/authorable-surface/ai.json, packages/spec/docs/MCP_GUIDE.md, packages/spec/liveness/agent.json, …), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

10 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/ai/agents.mdx (via AgentSchema (symbol, a top-level const))
  • content/docs/ai/index.mdx (via azure_openai (literal, a string literal in AIModelConfigSchema))
  • content/docs/api/data-api.mdx (via os explain (command, read off packages/cli/src/commands/explain.ts))
  • content/docs/getting-started/common-patterns.mdx (via support_agent (literal, a string literal in fixture))
  • content/docs/getting-started/quick-reference.mdx (via AgentSchema (symbol, a top-level const))
  • content/docs/permissions/field-level-security.mdx (via os explain (command, read off packages/cli/src/commands/explain.ts))
  • content/docs/protocol/objectql/security.mdx (via os explain (command, read off packages/cli/src/commands/explain.ts))
  • content/docs/ui/pages.mdx (via os explain (command, read off packages/cli/src/commands/explain.ts))
  • content/docs/ui/react-pages.mdx (via os explain (command, read off packages/cli/src/commands/explain.ts))
  • content/docs/upgrading.mdx (via AgentSchema (symbol, a top-level const))

⛔ 6 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v13.mdx (via AgentSchema (symbol, a top-level const))
  • content/docs/releases/v16.mdx (via os explain (command, read off packages/cli/src/commands/explain.ts))
  • content/docs/releases/v17/17-5.mdx (via retiredAfter (symbol, a field of const object agentModelProviderRemoved), retiredFromLoadPath (symbol, a field of const object agentModelProviderRemoved))
  • content/docs/releases/v18/18-2.mdx (via os explain (command, read off packages/cli/src/commands/explain.ts))
  • content/docs/releases/v18/18-3.mdx (via os explain (command, read off packages/cli/src/commands/explain.ts))
  • content/docs/releases/v18/18-6.mdx (via os explain (command, read off packages/cli/src/commands/explain.ts))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 6 changed file(s) yielded no anchor (packages/spec/authorable-surface/ai.json, packages/spec/docs/MCP_GUIDE.md, packages/spec/liveness/agent.json, …) — pages documenting those are invisible to this run
  • 9 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 188 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 44ccf94a409362dbb3c16fc2f03b321d4e91b797 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 0a464e68ec78fbf141cea399c1474829a99f2b28 — the merge of head a610db7a0b656eba611b617cc84209e2908374db into base 44ccf94a409362dbb3c16fc2f03b321d4e91b797, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 0a464e68ec78fbf141cea399c1474829a99f2b28 && git checkout 0a464e68ec78fbf141cea399c1474829a99f2b28
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 44ccf94a409362dbb3c16fc2f03b321d4e91b797 a610db7a0b656eba611b617cc84209e2908374db && git checkout -B drift-repro 44ccf94a409362dbb3c16fc2f03b321d4e91b797 && git merge --no-ff a610db7a0b656eba611b617cc84209e2908374db

node scripts/docs-audit/affected-docs.mjs --json 44ccf94a409362dbb3c16fc2f03b321d4e91b797

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 44ccf94a409362dbb3c16fc2f03b321d4e91b797 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

… preview pill reads the model name

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgTnm6d4W7ugSacDJ3j
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: ef13630dfde5760518c9ea63c303d866aa5681d9
Local-runs: none
Scope: packages/spec/src/ai/agent.form.ts, packages/spec/src/ai/agent.zod.ts, packages/spec/src/benchmark.bench.ts, packages/spec/src/conversions/entries/19/agent-model-provider-removed.ts, packages/spec/src/conversions/registry.ts, packages/spec/src/migrations/entries/retired-keys/19.ai__AIModelConfig__provider.ts, packages/spec/src/migrations/entries/semantic/19.agent-model-provider-retired.ts, packages/spec/src/migrations/registry.ts.template + packages/spec/src/ai/agent-model-provider-retirement.test.ts, packages/spec/src/shared/retired-key-removal-version.pin.test.ts, packages/spec/scripts/lib/default-changes.ts, packages/spec/liveness/agent.json, packages/cli/src/commands/explain.ts, ui/packages/app-shell/src/views/metadata-admin/previews/AgentPreview.tsx

Gates: check-runs on this head read at 2026-11-27T04:24Z. All 70 are complete: 61 success, 9 skipped, none failed or still running. The skipped nine are the opt-in and queue-only lanes (the 18.x upgrade harness, the packed-tarball smoke, the dogfood shards and CLI verify, Temporal conformance, UI published artifacts, the two queue verdicts and the schedule gate), so dogfood is judged in the merge queue, not here. The head has not moved.

Inputs: card #37712 with its three comments (triage 7205353375, hold 7206344767, claim 7207860184), the PR body, its 42-file list and net diff, the check-runs. The cited code was read in the live tree at main 6e8f663710; agent.zod.ts was also read at the head. Cloud was not read: every cloud statement below rests on the card's own reading of cloud main and on the ledger row dated 2026-09-15.

① Derived judgments

  • Accept-set, agent.model.provider: the four enum values were accepted; now every value except the exact string openai is refused at model.provider with the prescription. Narrowing. Right for the route: AI_PROVIDERS in packages/services/service-settings/src/manifests/ai-models.ts lists nine providers, two of the enum's four are not among them, and the capability an agent keeps (name a model) is model.model. The route is the lane's call by triage 7205353375 and was taken on hold comment 7206344767.
  • Accept-set, the residue: provider: 'openai' is accepted and stripped, so no parsed agent carries the key. Right: it is the feat(spec): retired-defaulted-key tolerance — the retired default parses as inert residue and strips; non-default values keep the loud refusal (#12497 class rule) #12840 class rule, and the shape is ViewSharingSchema's line for line.
  • Type surface: Agent['model']['provider'] takes the tombstone mark, so a typed source that writes any value, openai included, fails tsc. Right.
  • Export kind: AIModelConfigSchema is no longer a ZodObject. It is the residue stage's preprocess pipe with a read-through shape, so .extend(), .pick(), .omit() and .partial() are gone from it. Right, and the same trade ViewSharingSchema made; the one in-repo consumer is AgentSchema.model, which calls .optional() only. The changeset does not name this; that sentence is the lane seat's prose read.
  • Authorable surface: ai/AIModelConfig:provider becomes a [RETIRED] row and is the first entry of RETIRED_KEYS_BY_MAJOR[19], spelled as the surface file spells it. Right.
  • Chain: step 19 gains agent-model-provider-removed at order 2. Its collection (agents) is disjoint from the order-1 entry's (permissions), so the order carries no meaning and none is needed. Right.
  • Data at rest: stored agent rows and built artifacts lose the key on replay, one notice per agent; the authoring funnel does not replay it. Right.
  • Display: the preview pill reads the model name alone; the form help text and its 11 bundles stop naming a provider; os explain agent drops it. Right.
  • Refusal text for a provider written at the agent's TOP level: unchanged by this diff, and now wrong. See S1.

② Semver level

@objectstack/spec minor is right. Metadata-protocol: narrowed is right (a key tombstoned), and a narrowed kind takes at least minor on the package it moves; check-changeset-no-major refuses major on this line. The BREAKING banner, the FROM → TO table, the one-line fix and the ADR-0087 marker naming both ids are present. @objectstack/cli, @objectstack/platform-objects, @object-ui/app-shell and @object-ui/console at patch match what the diff publishes from each. Check Changeset is green on this head.

Clause-②: no (narrowing) is right: the accept set shrinks and nothing widens.

③ Boundary flags

  • Residue stage (the dev's small call): accepted. The discriminator the tree states (18.integration__Connector__connectionTimeoutMs.ts) is whether a released toolchain materialized the default into something later re-parsed. It did: every 18.x parse of a model block wrote provider: 'openai', and the metadata write door parses with the current schema and replays no conversion, so without the stage an agent exported from 18.x is refused over a value nobody typed. The silence is ruled, not chosen here (the helper's own docblock). It is bounded by === on one captured literal, and the pin holds OpenAI and a padded spelling to the refusal. A warning would need provenance JSON does not carry.
  • Overlap with feat(spec,service-knowledge)!: knowledge_source is a governed metadata type with its loader, its registry and two authoring guards #37676 (still open): accepted as stated. Both insert at the head of MAJOR_19_CONVERSIONS; the second lander keeps both lines in identifier order.
  • Absence walk excludes ui/: checked by reading. On main, six ui/ files author the shape and all six are in this diff. The one authoring left under ui/ is the stale-draft fixture in AgentPreview.test.tsx, which is there on purpose. Outside the walk's roots, docs/notes/crm-development-standards.mdx authored it and is cleaned here; .claude/, .github/ and examples/ hold none, and the archived 2026-06 audit under docs/audits/ is history. The preview pill was the only reader of model.provider in packages/, ui/ and the examples; the agent list column reads model.model.
  • Skills-docs: follow-up #37796: true. The card is open, domain:skills, Blocked-by: #37783, and names the table row and the eval. No marked skill example authors the key and the tombstone keeps the identifier in packages/, so the retirement lands first, as the playbook orders it. The row sits at SKILL.md:369 on main, not 370, and the same eval's must_contain list also names provider.
  • Fixes #37712: right. The card asks for enforce or remove, and this removes.
  • model.topP (dev flag, out of scope): escalated to the seat. The ledger row still reads topP DEAD, and a search of this repository's open issues finds no card for it. It needs a carrier card where its reader would live.
  • Cloud, two things this review could not read, escalated to the seat. First, the prescription says the deployment resolves a model name among the providers it has turned on; that is objectstack-ai/cloud#5055 phase 1 and must be true by the release that carries this tombstone. Second, no producer census was taken in cloud: a built-in agent there that writes model.provider fails tsc or the parse on the pin bump, which is audible, but it belongs in the bump's plan.
  • open_questions: none stated.
  • SQL push-down: the diff adds no query, id materialisation or in-app join.

④ Design judgment

No must-fix.

S1 (should-fix) — the agent's own wrong-layer guidance still prescribes the retired key. packages/spec/src/ai/agent.zod.ts, line 371 at this head (line 330 on main), inside AgentSchema's guidance:

provider: 'model settings live under `model` — write `model: { provider: … }`',

The diff does not touch it. An author who writes provider at the agent's top level is refused with an instruction to write the key this PR tombstones. Followed with anthropic, it earns a second refusal. Followed with openai in untyped JSON or YAML, it is accepted and stripped in silence, so the schema's own fix sentence leads to the declared-but-unenforced state the card was filed to remove. The playbook's route table names this row (a retired key's wrong-layer pointers move to guidance carrying the retirement's answer), and the memory.longTerm.store retirement in the same file did exactly that for backend / storage / provider. No gate reads it: alias-integrity.test.ts judges aliases, not free-text guidance, and the absence walk strips inline code before judging. Fix: make that entry say there is no provider key at either level, that the deployment's AI settings choose it, and that a model is named in model.model; pin the sentence in agent-model-provider-retirement.test.ts beside the tombstone's.

Per hits file:

  • ai/agent.zod.ts: the tombstone, the captured residue literal and the stage are right and match the precedent. The prescription follows the five conventions (qualified key first, version and ADR, why it was inert, the imperative fix, the pinned os migrate meta --from 18 sentence), and 19.0.0 agrees with the package label. Refusal shape is the house one: invalid_type at model.provider, and STACK_SCHEMA_INVALID / 422 at defineStack. S1 is in this file.
  • conversions/entries/19/agent-model-provider-removed.ts: correct on every stored shape. A set provider, the residue value and a non-enum value are deleted with one notice; an absent key and an absent or non-object model return the input by reference; a block left empty stays {}, which parses. Idempotent by stripKeys. retiredFromLoadPath: true with retiredAfter: '18.6.0' matches the sibling major-19 entry and the census rule for a prerelease label. Stripping the residue value with a notice on replay is what permission-allow-restore-purge-removed does.
  • conversions/registry.ts: import and list entry are in identifier order, as the list's header requires.
  • migrations/entries/retired-keys/19.ai__AIModelConfig__provider.ts: filename, id and comment are right.
  • migrations/entries/semantic/19.agent-model-provider-retired.ts: fields complete, relevance agents, one conversion id. See N2.
  • migrations/registry.ts.template: one true sentence in the step-19 rationale.
  • ai/agent.form.ts: help text only; no sub-input for the key existed, and the composite derives its rows from the served schema, which drops tombstones.
  • benchmark.bench.ts: the edit is right.

Implementing files: the retirement pin asserts the tombstone at both doors, the residue with a near-value control, the stored and boot seams, and the registration; liveness/agent.json carries the note on the container row, which is where memory.longTerm.store put its own, and leaves verifiedAt alone, as it must without a cloud re-read; AgentPreview.tsx and explain.ts agree with the schema.

Nits:

  • N1 (nit, prose face): .changeset/37686-agent-model-name-optional.md, on main and unreleased, will ship in the same CHANGELOG. It still says the key and its enum are unchanged, tells the reader to write provider: 'openai' to keep it, and describes a PROVIDER · MODEL pill. This PR corrected the twin sentence in default-changes.ts and left this one. Fix it on the prose face in this PR.
  • N2 (nit): the D3 reason closes on an agent whose author "wrote a provider, and no model name", and the changeset's second FROM row shows it. No released version accepted that shape: a model block without model.model was refused until feat(spec): an agent's model name becomes optional — absent means the environment's default model #37697, which is unreleased. The judgement the upgrader really owes is the one acceptanceCriteria already states (is the named model one the deployment offers). It can ride S1's commit.
  • N3 (nit): the kept sentence in DEFAULT_CHANGES_BY_MAJOR[19] still says the parsed provider "now yields the enum or undefined"; after this PR it yields nothing. It can ride S1's commit.

Outside this diff, not graded: benchmark.bench.ts still passes tools: [] in a fixture named validAgent; AgentSchema no longer declares that key, so the benchmark measures a refusal. It predates this PR.

S1 earns a delta review of its fix.

Implemented-by: claude/project-thread-t0ls0u
Reviewed-by: session_01L6bhgV6i8jfWwSXjpWJrjA

VERDICT: PASS

…etirement, never pointed at model.provider

- AgentSchema's wrong-layer guidance for `provider` now says there is no
  provider key at either level and names `agent.model.model`; pinned
- D3 reason names the judgement an upgrader really owes (is the named model
  one the deployment offers); the changeset drops the never-accepted
  provider-without-model row and says AIModelConfigSchema is a pipe now
- DEFAULT_CHANGES_BY_MAJOR[19] reason and the unreleased model-optional
  changeset agree with the retirement

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgTnm6d4W7ugSacDJ3j
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

DELIBERATE CORRECTION — Check Changeset is red by design on this head (a610db7a0b).

This PR rewrites one pending release note it did not add: .changeset/37686-agent-model-name-optional.md (from #37697, unreleased, on main). It is not a filename collision. The note became false when this PR retired agent.model.provider, and contract review 7209785394 (N1) asked for it to be corrected here. Three sentences changed:

  1. Before: "The key and its enum are unchanged, and a written provider is carried as written."
    After: "The key itself leaves the spec in the same major (agent-model-provider-removed, see that changeset): delete provider, the deployment's AI settings choose the provider."
  2. Before: "the agent preview's model pill appears when the block names a model or a provider, and reads PROVIDER · MODEL, MODEL or PROVIDER from what is written."
    After: "the agent preview's model pill appears when the block names a model, and reads the model name."
  3. Before: "…now reads undefined; to keep openai, write provider: 'openai' in the agent."
    After: "…now reads nothing there: the provider is the deployment's choice."

Restoring the base text would put those false sentences back. The seat confirms by its same-head contract-review record.

Session: session_01L6bhgTnm6d4W7ugSacDJ3j


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: a610db7a0b656eba611b617cc84209e2908374db
Local-runs: none
Scope: packages/spec/src/ai/agent.form.ts, packages/spec/src/ai/agent.zod.ts, packages/spec/src/benchmark.bench.ts, packages/spec/src/conversions/entries/19/agent-model-provider-removed.ts, packages/spec/src/conversions/registry.ts, packages/spec/src/migrations/entries/retired-keys/19.ai__AIModelConfig__provider.ts, packages/spec/src/migrations/entries/semantic/19.agent-model-provider-retired.ts, packages/spec/src/migrations/registry.ts.template + packages/spec/src/ai/agent-model-provider-retirement.test.ts, packages/spec/src/shared/retired-key-removal-version.pin.test.ts, packages/spec/scripts/lib/default-changes.ts, packages/spec/liveness/agent.json, packages/cli/src/commands/explain.ts, ui/packages/app-shell/src/views/metadata-admin/previews/AgentPreview.tsx

Gates: check-runs on this head read at 2026-11-27T05:03Z. All 70 are complete: 60 success, 9 skipped (the same opt-in and queue-only lanes as on the first head), 1 failure. The failure is Check Changeset, red by design on the DELIBERATE CORRECTION judged in ③; every type-check, lint, build and test lane is green, the retirement pin's shard among them. The head has not moved.

Delta round. This record follows 7209785394 on ef13630dfd and judges the one commit above it: six files, of which three are in scope (agent.zod.ts, the D3 entry, default-changes.ts), one is the retirement pin, and two are changesets. Everything the first record judged on the other files stands; none of them moved. Inputs: the compare of the two heads, the PR body (unchanged since the first round), PR comment 7209908752, the check-runs.

① Derived judgments

  • Refusal text for provider at the agent's top level: it no longer points at model.provider; it carries the retirement's answer. No accept-set change: the key was an unrecognized key before and is one now, with the same code and path. Right.
  • Nothing else the diff publishes changes shape. The D3 reason and the DEFAULT_CHANGES_BY_MAJOR[19] reason are prose the upgrade projections print; both edits are right (N2, N3 below).

② Semver level

Unchanged and still right: @objectstack/spec minor for a narrowed kind, with the BREAKING banner, the FROM → TO table (now one row, the only shape a released version accepted), the one-line fix and the ADR-0087 marker. The changeset now also states that AIModelConfigSchema is the residue stage's preprocess pipe, so .extend(), .pick(), .omit() and .partial() are gone from it; that is true, and it answers the note in the first record's ①.

Clause-②: no (narrowing) is still right.

③ Boundary flags

DELIBERATE CORRECTION — confirmed. The commit rewrites .changeset/37686-agent-model-name-optional.md, a pending note from #37697 that this PR did not add. It is the correction class, not a collision: the file keeps its name and its frontmatter, and only sentences this PR falsified changed. The dev declared it in PR comment 7209908752, naming the note and quoting the three sentences before and after; the quotes match the diff. This diff also changes code, so this same-head record is the confirmation. Each rewritten sentence, judged against the tree at this head:

  1. Before: "The key and its enum are unchanged, and a written provider is carried as written." False at this head: the key is a tombstone and no written value is carried. After: "The key itself leaves the spec in the same major (agent-model-provider-removed, see that changeset): delete provider, the deployment's AI settings choose the provider." Holds: that is the conversion's id, registered under major 19, and the fix is the tombstone's own.
  2. Before: "the agent preview's model pill appears when the block names a model or a provider, and reads PROVIDER · MODEL, MODEL or PROVIDER from what is written." False at this head. After: "the agent preview's model pill appears when the block names a model, and reads the model name." Holds: AgentPreview.tsx renders the pill on model.model alone and labels it with that value.
  3. Before: "…now reads undefined; to keep openai, write provider: 'openai' in the agent." False at this head, and the instruction is the harmful half: in TypeScript it fails tsc, in JSON it is stripped. After: "…now reads nothing there: the provider is the deployment's choice." Holds: no parsed agent carries the key.

No other sentence of that note is made false by this PR: the default it describes is gone with the key, the block is still strict, and temperature still defaults to 0.7. The note's own declaration lines are untouched and still describe #37697.

  • Check Changeset is red on this head for this reason alone: the one failed step is the foreign-changeset rule naming that file; the changeset count, the ADR-0087 disposition and the major guard steps are green. Red by design; the gate is not to be cleared by restoring the base text.
  • The first record's escalations to the seat are unchanged by this commit: a carrier card for model.topP, and the two cloud items (objectstack-ai/cloud#5055 phase 1 behind the prescription, and no producer census).
  • SQL push-down: the commit adds no query, id materialisation or in-app join.

④ Design judgment

No must-fix, no should-fix.

  • S1: closed. AgentSchema's guidance.provider is now AGENT_PROVIDER_SPELLING_RETIRED, and every clause of it is true at this head: an agent has no authorable provider key at the top level or under model (the only other provider in the file is the memory.longTerm spelling, itself a retired pointer); the deployment's AI settings choose the provider; agent.model.provider was removed in 19.0.0 under ADR-0049; the fix is to delete the key and name a model in agent.model.model. It is LONG_TERM_STORE_SPELLING_RETIRED's shape, clause for clause, and it rightly carries no os migrate meta sentence: a top-level provider has been an unrecognized key since the shape was closed and no conversion covers it, so there is no mechanical edit to list. The composer pushes an exact guidance entry into the message verbatim, so the new pin reads the real refusal. The pin fails without the fix on both of its assertions: the old sentence lacks the new text and matches the forbidden model: { provider pattern. Its control (the temperature pointer still points) shows the guidance channel itself still answers.
  • N1: closed, as the correction confirmed in ③.
  • N2: closed. The D3 reason now ends on the judgement acceptanceCriteria states (whether the named model is one the target deployment offers), and the changeset's second FROM row is gone.
  • N3: closed. The sentence reads "A parsed agent's model block no longer carries provider", which is true.

No regression found. The new constant spells no authoring shape the absence walk matches, and the commit touches no conversion, registry entry or generated output.

  • N4 (nit, PR body): the body's Verification list still reports check:empty-changeset at 0, and its What-changes list does not name the top-level guidance. Comment 7209908752 carries the declaration; the body is the lane seat's prose read.

Implemented-by: claude/project-thread-t0ls0u
Reviewed-by: session_01L6bhgV6i8jfWwSXjpWJrjA

VERDICT: PASS

@objectstack-fleet objectstack-fleet Bot mentioned this pull request Nov 27, 2026
2 tasks
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

席位核对 — ACCEPT · head a610db7 · card #37712 · area s2-ai · 2026-11-27T05:09Z

L1 checklist

  • Shape and checks. l1-face.mjs --pr 37783 flags three items, each read:

    • changeset: the one @objectstack/objectql file is packages/objectql/src/metadata-validation-sweep.test.ts (+1 −1), a test that does not ship. No entry is owed.
    • all-checks: 60 success, 9 expected skips, and one failure, Check Changeset. Its only failed step is the foreign-changeset rule naming .changeset/37686-agent-model-name-optional.md, the DELIBERATE CORRECTION below. The count, ADR-0087 disposition and major-guard steps are green. Every type-check, lint, build and test lane is green.
    • dogfood: owed by the ! title and the (narrowing) arm. The thread ran the full battery on this head under the verify lock (pnpm --filter @objectstack/dogfood test, no shard, no path filter), reported on the card in os-dev-report 7210393919: 490 files passed, 3 skipped; 4144 tests passed, 68 skipped; no failure.
  • Contract review at CONTRACT_REVIEW_TIER.

    • 7209785394 at ef13630: PASS, with S1 and N1–N3 open.
    • 7210318602 at this head: PASS, No must-fix, no should-fix., with S1 and N1–N3 closed.

    The seat adopts the final record. What it confirms:

    • AgentSchema's top-level guidance.provider is now the retired-spelling sentence, matching the LONG_TERM_STORE_SPELLING_RETIRED precedent, with a pin that fails without it.
    • The conversion agent-model-provider-removed is correct on every stored shape and idempotent.
  • DELIBERATE CORRECTION of spec: an agent's model name becomes optional — absent means the environment's default model #37686's unreleased changeset. It is declared in PR comment 7209908752. The final record confirms it in those words, judging each of the three rewritten sentences as true against this head, and finds no other sentence of that note made false. The file keeps its name and frontmatter. This PR lands red on Check Changeset for that one step.

  • Fixes #37712 is right. No runtime read model.provider; the key is retired at both doors with a conversion, and the provider is the deployment's choice.

  • Declarations. Clause-②: no (narrowing), Metadata-protocol: narrowed, Skills-docs: follow-up #37796 (the skills card waits for this merge).

  • Docs read sentence by sentence. Both changesets, content/docs/ai/agents.mdx, content/docs/getting-started/common-patterns.mdx and the regenerated content/docs/references/ai/agent.mdx match the diff.

  • Governance. check-governed-merges.mjs on the final 43-file list: not governed, 726 changed lines. Tier S.

  • Follow-ups. model.topP's carrier card, the two cloud points and N4 (two stale lines in this PR body) go to review follow-ups of PR #37783 #37823.

Tier: S. Landing: ready + auto-merge by this stroke.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 27, 2026 05:09
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 27, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 27, 2026
@objectstack-fleet
objectstack-fleet Bot marked this pull request as draft November 27, 2026 05:26
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Tier H hand-off · 2026-11-27T05:26Z · head a610db7 · approver os-zhuang

席位更正: 前一条 ACCEPT(7210402548)把落地级别写成 Tier S,错了。这个 PR 声明 Clause-②: no (narrowing),按 2026-11-19 在 #35321 的裁定,收窄作者可写内容的 spec 改动由维护者落地,所以是 Tier H。合并队列的守卫因此把它踢了出来。现已退回 draft,交给你批准。ACCEPT 其余各条不变。

维护者速读

  • 改了什么: 代理(agent)定义里的 model.provider 退役。运行时从来没读过这个键,真正决定用哪家模型的是部署方的 AI 设置。现在 spec 不再接受它,已有元数据由 os migrate meta 的转换 agent-model-provider-removed 自动删掉并给出提示;直接写这个键会在两处入口被拒,提示说明改由部署设置决定。
  • 影响: 写代理的人和 AI 不会再以为写了 provider 就能换模型提供方。这是一处收窄,跟着 spec 的大版本(19)发布。
  • 请你留意:
  • 审核: 契约审核两轮(最高档),7209785394 PASS 后修了 S1 和三处小问题,增量 7210318602 PASS,没有必须改或建议改的项。dogfood 全套在这个 head 上通过(卡上 os-dev-report 7210393919)。
  • 要你做什么: 批准后由座位落地;或者你直接合并。撤回这一次合并即可恢复原样(转换只删一个运行时从不读的键)。

@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 27, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 27, 2026 05:28
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 27, 2026
Merged via the queue into main with commit f07d63a Nov 27, 2026
75 of 77 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-t0ls0u branch November 27, 2026 05:59
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 pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue protocol:ai size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spec: an agent's model.provider is declared but read by no runtime (enforce-or-remove)

3 participants