fix(service-ai): built-in agent/skill registration upserts on content change (unblocks ADR-0040 rollout)#1747
Merged
Merged
Conversation
…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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 todata_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 bindingtest (fails identically on unmodified main in a fresh worktree; CI's full build passes it).Cloud-side sibling (AI Studio's
registerMetaformetadata_assistant+ authoring skills) follows in a cloud PR.🤖 Generated with Claude Code