docs(sdk): op-catalog guidance — merge semantics, inputs_fields rules, test_run verdicts - #5105
Conversation
…, test_run verdicts Claude-Session: https://claude.ai/code/session_01N2djTMgXnpk84EqtugHDJB
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| "required": ["use_cases"], | ||
| } | ||
|
|
||
| _TRIGGER_INPUTS_FIELDS_SCHEMA: Dict[str, Any] = { |
There was a problem hiding this comment.
Every claim in these strings was verified against the implementing code before writing, since a wrong model-facing claim becomes agent behavior: list-wholesale replacement against _deep_merge in workflows/service.py (lists hit the replace branch), the template rules against resolvers.py resolve_json_selector + the dispatcher's "$" fallback, and the verdict enum against TestRunVerdict + _verdict in platform_handlers.py (including the two extra unconfirmed producers beyond stalled approval). The tests pin the load-bearing phrases so a future description edit that drops one fails loud.
|
@coderabbitai review |
✅ Action performedReview finished.
|
| let last = 0 | ||
| let m: RegExpExecArray | null | ||
| TOKEN_RE.lastIndex = 0 | ||
| while ((m = TOKEN_RE.exec(template)) !== null) { |
| "content-type": "application/json", | ||
| "content-length": Buffer.byteLength(payload), | ||
| }); | ||
| res.end(payload); |
| if (!isPlainObject(cursor[key])) cursor[key] = {}; | ||
| cursor = cursor[key] as Record<string, unknown>; | ||
| } | ||
| cursor[parts[parts.length - 1]] = value; |
…mmit_revision and test_run The tool schema itself now advertises the parameters.agent shape (over MCP to Claude and via the Pi extension): expanded agent-template with all required arrays stripped (a delta is a deep partial) and embed-tolerant list items so re-sent full lists keep @ag.embed entries intact. Claude-Session: https://claude.ai/code/session_01N2djTMgXnpk84EqtugHDJB
Context
The platform-op descriptions are the only thing a builder agent reads before calling a tool, and they were missing the facts behind three observed failure modes: agents wiping their own build kit by sending a one-entry
toolslist tocommit_revision(deep-merge replaces lists wholesale, which the description never said), agents guessing theinputs_fieldstemplate language, and agents misreadingtest_runresults because only two of the four verdicts were documented anywhere.Changes
Model-facing description upgrades in
op_catalog.py, each verified against the implementing code before writing:commit_revision: lists (tools,skills,mcps) replace wholesale, send the complete list; the response returns the new revision id; existing triggers keep pointing at the old revision until re-pointed. (Verified against_deep_mergeinworkflows/service.py: lists hit the replace branch.)inputs_fields(shared bycreate_schedule/create_subscription):$leaf = JSON Path over the fire context,/leaf = JSON Pointer, other leaves literal, no interpolation, unmatched selector = null, omitted template = whole context, plus the canonical imperative-messagespattern. (Verified againstresolvers.pyand the trigger dispatcher's"$"fallback.)test_run: all four verdicts spelled out (pass/incomplete/unconfirmed/failed), including that a tool name in the executed list is not proof it completed. (Verified againstTestRunVerdictand_verdictinplatform_handlers.py.)create_schedule/create_subscription: when no revision is specified the trigger binds to the variant's latest revision at creation time and does not follow later commits (matches fix(api): pin trigger references to the variant HEAD revision when none is given #5103).Scope / risk
Description and schema-description strings only; no behavior, no wire shape, no schema structure changes. The stacked PR above this one updates the build-an-agent skill to match.
Tests
test_op_catalog.pyextended to pin the new load-bearing phrases (verdict words, wholesale replacement, JSON Path/Pointer rules, identical inputs_fields text on both trigger ops): 34 passed.https://claude.ai/code/session_01N2djTMgXnpk84EqtugHDJB