Repository navigation
feat(spec): an agent's model name becomes optional — absent means the environment's default model - #37697
Conversation
… environment default Claude-Session: https://claude.ai/code/session_01Q4EjjQgJ62YaG4EAxNLuqP Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q4EjjQgJ62YaG4EAxNLuqP Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q4EjjQgJ62YaG4EAxNLuqP Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 2 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 177 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 8e35a80aa656d584f7a0fe00e097d769a3b363b4 && git checkout 8e35a80aa656d584f7a0fe00e097d769a3b363b4
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 579b85776d1abb6722df870eb2a652231ee4047e 2241d53bae9e432bf558f61d241a77255e154618 && git checkout -B drift-repro 579b85776d1abb6722df870eb2a652231ee4047e && git merge --no-ff 2241d53bae9e432bf558f61d241a77255e154618
node scripts/docs-audit/affected-docs.mjs --json 579b85776d1abb6722df870eb2a652231ee4047e
|
Claude-Session: https://claude.ai/code/session_01Q4EjjQgJ62YaG4EAxNLuqP Co-authored-by: Claude <noreply@anthropic.com>
|
epic:#5055#1 · hotlong · session_01Q4EjjMmczBEaeiAQ48oDtz Contract reviewServed-tier: Read: card #37686 (body, 3 comments), PR #37697 (body, 4 files, net diff against Gates, read off the head's check-runs (latest completed run per name): 0 failure. ① Derived judgments
② Semver level
Clause-②: yes (widening) — present line-initial in both the PR body and the changeset body, and it is the correct arm: nothing accepted before is refused now. The claim comment on the card still reads ③ Boundary flags
④ Design judgment
Attempts to break it:
Findings: S1 (should-fix) — not blocking, follow-up: N1 (nit) — No must-fix. Implemented-by: VERDICT: PASS |
Claude-Session: https://claude.ai/code/session_01Q4EjjQgJ62YaG4EAxNLuqP Co-authored-by: Claude <noreply@anthropic.com>
…artefacts Claude-Session: https://claude.ai/code/session_01Q4EjjQgJ62YaG4EAxNLuqP Co-authored-by: Claude <noreply@anthropic.com>
|
epic:#5055#1 · hotlong · session_01Q4EjjMmczBEaeiAQ48oDtz Contract reviewServed-tier: Delta review: this record supersedes the one on Gates, read off this head's check-runs (latest completed run per name): 62 success, 12 skipped, 0 failure. ① Derived judgmentsCarried from the first record and re-read on this head, unchanged and still right: a block with no New in the delta:
② Semver level
Clause-②: yes (widening) — line-initial in both the PR body and the changeset body, and still the correct arm: no value accepted before is refused now, for either key. The default move is a semantic change to the parsed value, declared in ③ Boundary flags
④ Design judgment
Attempts to break the delta:
Findings: S2 (should-fix) — not blocking, follow-up outside this card's fence: N1 (nit) — carried, unchanged: N2 (nit) — the PR body's two-minute check still says No must-fix. Implemented-by: VERDICT: PASS |
… names no provider Claude-Session: https://claude.ai/code/session_01Q4EjjQgJ62YaG4EAxNLuqP Co-authored-by: Claude <noreply@anthropic.com>
|
epic:#5055#1 · hotlong · session_01Q4EjjMmczBEaeiAQ48oDtz Contract reviewServed-tier: Second delta review: this record supersedes the ones on Gates, read off this head's check-runs (latest completed run per name): 63 success, 11 skipped, 0 failure. ① Derived judgmentsCarried from the two earlier records, re-read on this head, unchanged and still right:
New in this delta:
② Semver level
Clause-②: yes (widening) — line-initial in both the PR body and the changeset body; still the correct arm, since no value accepted before is refused now. ③ Boundary flags
④ Design judgment
Attempts to break the delta:
Findings: N1 (nit) — carried, unchanged: N3 (nit) — the PR body's acceptance note still describes No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
epic:#5055#1 · hotlong · session_01Q4EjjMmczBEaeiAQ48oDtz 维护者速读
Seat opinion: land. 席位核对Seat L1 verdict: ACCEPT · head
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 45912640840 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
epic:#5055#1 · hotlong · session_01Q4EjjQgJ62YaG4EAxNLuqP Merge-queue red on this PR (run 45912640840) does not reproduce and does not touch this diff. Read at 2026-11-27T00:14Z.
Reading: a one-off failure in the boot-parity test, not a defect in this change. Re-arming is the seat's call. Nothing here needs a code change. Generated by Claude Code |
|
epic:#5055#1 · hotlong · session_01Q4EjjMmczBEaeiAQ48oDtz Queue kick of PR #37697 — signature, reading and disposition. 2026-11-27T00:16Z
|
|
epic:#5055#1 · hotlong · session_01Q4EjjMmczBEaeiAQ48oDtz 维护者速读
Seat opinion: land. 席位核对Seat L1 verdict: ACCEPT (delta) · head
|
Requested by Jack · project thread
Fixes #37686
Clause-②: yes (widening)
Metadata-protocol: semantic
Skills-docs: follow-up #37711
维护者速读
What changes
packages/spec/src/ai/agent.zod.ts:AIModelConfigSchema.modelgoes from a requiredz.string()toz.string().optional(). Its description now says that an absent model name means the host's default model for the environment. The block stays strict (unknown keys refused);temperaturestill defaults to0.7. No sentinel value, no tier key (phase 2 of objectstack-ai/cloud#5055).providerloses.default('openai')and becomes.optional(); key and enum unchanged. A block that names no model no longer parses toprovider: 'openai', which asserted a provider for a model the host picks. The default move is declared inDEFAULT_CHANGES_BY_MAJORunder19(packages/spec/scripts/lib/default-changes.ts) with its consumer-facing reason, andauthorable-defaults/ai.jsondrops the line. No runtime reads an agent'smodel.provider, so no deployed agent changes behaviour. Not retired: enforce-or-remove forprovideris spec: an agent's model.provider is declared but read by no runtime (enforce-or-remove) #37712.packages/spec/src/ai/agent.test.ts: six new cases (temperature-only block parses withmodelundefined; an explicit name is carried as written; an unknown key is still refused asunrecognized_keys; a non-string name is still refused; a whole agent withmodel: { temperature: 0.2 }parses; a block with noproviderparses without one, a written one is carried, an off-enum one is refused), and the minimal-config case now expects noprovider.ui/packages/app-shell/src/views/metadata-admin/previews/AgentPreview.tsx(contract review S2, file surface widened by the seat): the model pill showed only whenmodel.providerwas set, so a block naming a model and no provider lost the model name once the default was gone. It now shows when a model or a provider is written and readsPROVIDER · MODEL,MODELorPROVIDER; a block that names neither shows no pill, so the environment default is not given a name. Two new cases inAgentPreview.test.tsx.content/docs/references/ai/agent.mdx(gen:docs) andpackages/spec/authorable-defaults/ai.json(written by the build). authorable-surface, api-surface, the JSON-schema manifest and the metadata-form translations needed no change: the key set is unchanged, and the translations carry only themodel.modellabel..changeset/37686-agent-model-name-optional.md:@objectstack/specminor and@object-ui/app-shellpatch, with the three declaration lines;semanticbecause a default moved (it outranksadded).Read first (by risk):
packages/spec/src/ai/agent.zod.ts(the two contract hunks),packages/spec/scripts/lib/default-changes.ts(the declared default move), then the changeset.Tests
All at head
b3238ea8, run throughscripts/pm/os-verify-lock.shon a shared container. The spec readings were taken atdb5f0e7d; the only later commit touchesui/and the changeset prose.pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/ai/agent.test.ts→ Test Files 1 passed, Tests 70 passed.pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/previews/AgentPreview.test.tsx packages/app-shell/src/views/metadata-admin/previews/AgentPreview.emptyCollection-8520.test.tsx→ Test Files 2 passed, Tests 24 passed.model's.optional(), Tests 2 failed / 67 passed; withprovider's.default('openai')restored, Tests 3 failed / 67 passed; with the preview pill keyed onprovideragain, Tests 1 failed / 17 passed (the name-only case). The other new cases pin behaviour that holds either way.pnpm --filter @objectstack/spec test→ Test Files 903 passed (903), Tests 28557 passed, 1 todo.pnpm --filter @objectstack/spec typecheck→ exit 0 (includescheck:test-typecheck, 52 files held in the ledger, unchanged).pnpm --filter @objectstack/spec build && pnpm --filter @objectstack/spec check:generated→ exit 0 aftergen:docs; the build's default ratchet accepts the declaredai/AIModelConfig:providermove.@object-ui/app-shellhas notypecheckscript; its types areType Check UI's, read from this PR's check-runs.Local gate families: 117 derived, 117 run, all exit 0
node scripts/pm/dispatch-gates.mjs --commandsderived 117 families for this change set atb3238ea8(the three new ones readui/:check-sdui-manifestand its self-test, andvitest run scripts/underui/); each was run and its exit code captured before any pipe, all 0.--ranreconciliation: "117 derived famil(ies) accounted for — 117 run, 0 NOT-MEASURED (a DERIVED zero — all 117 recorded an exit code and none of them is 3)". Families outside the derivation (repo-wide lint, UI lanes, Test Core's repo project) are CI's.Acceptance notes
origin/main6d106a1: the card'sRe-check:grep answers 1 hit atagent.zod.ts:38.model.modelin this repo:packages/spec/src/system/metadata-list-registry.ts(list column;valueAtPathanswersundefined, so the cell is empty for an agent with no model, which is the card's "empty/default" outcome);AgentPreview.tsx(its model pill, reworked here for S2, renders only what is written); tests only otherwise. None breaks onundefined. In cloud (read-only,origin/main63427ae),packages/service-ai/src/agent-runtime.ts:1028assignsoptions.model = agent.model.model, so an absent name leavesoptions.modelundefined there; how cloud resolves that to its default is the cloud card's (objectstack-ai/cloud#5055) after a pin move.provider: declared, not enforced. No runtime in this repo reads an agent'smodel.provider, and in cloudorigin/main63427aeagent-runtime.tsreads onlymodel,temperatureandmaxTokensfrom the agent's block (themodel.providerread invercel-adapter.ts:391is the AI SDK model object, not the agent config). Its default is dropped here (S1); keep-or-retire is spec: an agent's model.provider is declared but read by no runtime (enforce-or-remove) #37712.openai.skills/objectstack-ai/SKILL.md"Model Configuration" still teachesmodelas a required free string withproviderdefaultopenai, and citesagent.zod.ts:36-40; theskills-tools-knowledgeeval expects "a free-stringmodel". Follow-up skills: teach that an agent's model name is optional (follow-up of #37697) #37711.19bucket indefault-changes.ts(and touchesauthorable-defaults/ai.json);mainmerges cleanly here, the two PRs conflict textually there, and whichever lands second keeps both entries.Verification
Two-minute check:
pnpm --filter @objectstack/spec exec vitest run src/ai/agent.test.ts→ 70 passed; revert themodel.optional()and two of the new cases go red; restore theproviderdefault and three go red.Generated by Claude Code