revert(API): remove commit/patch router changes from #4936 - #4975
revert(API): remove commit/patch router changes from #4936#4975mmabrouk wants to merge 1 commit into
Conversation
#4936 added patch/merge/validation logic to the core /workflows/revisions/commit router and forked a /commit/patch endpoint. A follow-up ([fix] patch > delta) then replaced that with a data-vs-delta validation block in the same core handler. Both put patch/merge/validation semantics into the core workflows router. Restore api/oss/src/apis/fastapi/workflows/router.py and sdks/python/agenta/sdk/agents/platform/op_catalog.py to their pre-#4936 state: commit_revision returns to plain replace behavior with the looser data schema, until the tool-based redesign lands. Claude-Session: https://claude.ai/code/session_014emxsaD8EFiNP3m3f56nhD
|
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 |
|
🤖 The AI agent says: Please review two things specifically:
Do not merge until confirmed. |
|
🤖 The AI agent says: Closing this revert without merging. JP reworked |
What
#4936 put patch/merge/validation semantics into the core workflows router. It added a
WorkflowRevisionDataimport, registered a forkedPOST /workflows/revisions/commit/patchendpoint, added acommit_workflow_revision_patchhandler plus a_deep_merge_revision_datahelper, and added two400checks (missingdata/ missing variant id) inside the existingcommit_workflow_revision. On the SDK side it tightened thecommit_revisionop schema (typeddatasub-properties,additionalProperties: false,datarequired) and pointed the op at/commit/patch.A follow-up commit on
big-agents(4ae6289d68"[fix] patch > delta ?") then reworked that into adata-vs-deltamodel: it removed the forked/patchroute/handler/helper but left adata-vs-deltavalidation block in the same core handler, and switched the SDK op to adelta.set/delta.removeschema.This PR reverts both of those layers in the two affected files and restores them to their pre-#4936 state:
api/oss/src/apis/fastapi/workflows/router.py— thecommit_workflow_revisionhandler no longer validates/merges; it commits the supplied revision directly.sdks/python/agenta/sdk/agents/platform/op_catalog.py—commit_revisiongoes back to the looserworkflow_revision.dataobject schema (noadditionalProperties: false, no typed sub-properties,datanot required) and the plain/api/workflows/revisions/commitpath.Why
That validation/merge/patch logic does not belong in the core workflows router.
commit_revisionwill be redesigned as a proper agenta tool. Until that lands,commit_revisionreturns to its pre-#4936 replace behavior.Scope
Exactly two files are touched, and both are byte-identical to their pre-#4936 content (
74755ebc^1). The$ctx.workflow.variant.idcontext binding on thecommit_revisionop is unchanged.Out of scope by design:
4ae6289d68's sibling changes tocore/workflows/dtos.py,core/workflows/service.py, the generated clients, andsdks/.../test_op_catalog.pyare left in place. The reviewer should confirm that leaving thedeltaplumbing in the DTOs/service while the router no longer uses it (and the op no longer emits it) is acceptable for this interim revert, and note thattest_op_catalog.pystill asserts thedeltaschema.https://claude.ai/code/session_014emxsaD8EFiNP3m3f56nhD