Skip to content

fix(service-ai): built-in agent/skill registration upserts on content change (unblocks ADR-0040 rollout)#1747

Merged
os-zhuang merged 1 commit into
mainfrom
fix/builtin-agent-skill-upsert
Jun 12, 2026
Merged

fix(service-ai): built-in agent/skill registration upserts on content change (unblocks ADR-0040 rollout)#1747
os-zhuang merged 1 commit into
mainfrom
fix/builtin-agent-skill-upsert

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Found during ADR-0040 staging verification: the unified assistant (framework#1735) never appeared on jack-test — the chat still ran the old Data Assistant persona.

Root cause: built-in agent/skill registration was exists-gated, and since sys_metadata became durable across deploys (ADR-0007 report-back), the gate freezes the FIRST shipped definition forever. Every persona/skill improvement silently strands on existing environments.

Fix: upsertBuiltin(type, name, def) — fetch stored, deep-compare to shipped, register when different or absent (info log says refreshed), no-op when identical. Applied to data_chat + data_explorer + actions_executor.

Why overwrite is safe: built-ins are platform-owned per ADR-0040 — the supported customization path is a CUSTOM agent bound via app.defaultAgent, not editing built-ins in place.

service-ai 334/335 — the 1 failure is the known env-only embedder binding test (fails identically on unmodified main in a fresh worktree; CI's full build passes it).

Cloud-side sibling (AI Studio's registerMeta for metadata_assistant + authoring skills) follows in a cloud PR.

🤖 Generated with Claude Code

…an exists-gate

The exists-gate froze the FIRST shipped definition of data_chat /
data_explorer / actions_executor forever once sys_metadata became durable
(ADR-0007 report-back): every persona/skill improvement — including the
ADR-0040 unified assistant — silently never reached existing environments.

Built-in records are platform-owned (ADR-0040): tenants customize by
defining a CUSTOM agent and binding it via app.defaultAgent, not by editing
built-ins in place — so a content-compare refresh clobbers nothing legit.
Stored == shipped → no-op; differs (or absent) → register + info log.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 12, 2026 2:14am

Request Review

@os-zhuang
os-zhuang merged commit 8a7bc82 into main Jun 12, 2026
12 checks passed
@os-zhuang
os-zhuang deleted the fix/builtin-agent-skill-upsert branch June 12, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant