[refactor] PR #4893 follow-up: rename platform-op bind to context_bindings#4906
Conversation
Addresses PR #4893 review feedback on naming clarity. The catalog-internal field that maps an endpoint body path to a `$ctx.<key>` run-context token is renamed `bind` -> `context_bindings`, so the name states what it holds. Scope is SDK-internal only: the wire field stays `context` and the agent config arm (`PlatformToolConfig`) is unchanged, so there is no contract or behavior change. Docstrings, the interface inventory, the tools doc, and the catalog tests are updated to match. Tests + ruff green. Claude-Session: https://claude.ai/code/session_01GYo3UEfvsZpncagqb28Mbc
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
📝 WalkthroughSummary by CodeRabbit
WalkthroughRenames the Changesbind → context_bindings rename
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
|
🤖 The AI agent says: Do not merge — needs your review. What I need reviewedThis is the small, contained slice of your #4893 naming feedback: I renamed the catalog field
Triage of your #4893 commentsSee the mapping comment on #4893 — each comment is Tests: 149 passed (platform + tools + skill-catalog); ruff clean. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
What this changes
A follow-up to the merged PR #4893 (platform-op catalog) that acts on Mahmoud's review.
It renames one catalog field for clarity:
PlatformOp.bind->PlatformOp.context_bindingsThe field maps an endpoint body path to a
$ctx.<key>run-context token (the self-targetingfields the runner fills server-side).
bindread as a bare verb;context_bindingssays whatthe dict holds.
Why it is safe
The rename is SDK-internal only:
to_call()still emitscontext, andToolCall.contextisuntouched. No wire/golden-contract change.
PlatformToolConfig={type, op, needs_approval, permission}) does notexpose this field, so the public config schema is unchanged.
context_bindings(inop_catalog.py); agents never see it.Files
sdks/python/agenta/sdk/agents/platform/op_catalog.py— the field, validator, schema-strip,to_call, and thecommit_revisionentry.platform/platform_tools.py,tools/models.py,tools/resolver.py— docstring references.docs/.../documentation/tools.md+docs/.../interfaces/in-service/tool-models-and-resolution.md(the interface inventory) — kept in sync.
oss/tests/.../platform/test_op_catalog.py— the test name + the construction kwargs.Tests
ruff format --check+ruff checkclean over the touched SDK paths.test_op_catalog.py+test_wire_contract.py: 44 passed.Scope note
This PR does the one contained naming fix. The other review items (the
opabbreviation, thecross-service
args_intowire field, and themethodGET/POST question) are interface-level ordesign changes and are tracked as separate issues — see the mapping comment on #4893.
https://claude.ai/code/session_01GYo3UEfvsZpncagqb28Mbc