feat(batch-transform): default to single-shot from-attachment (kill switch: DisableBatchTransformFromAttachment) - #1120
Merged
Conversation
cfauchere
force-pushed
the
feat/batch-transform-from-attachment
branch
from
September 29, 2026 22:14
09acf23 to
acaf702
Compare
cfauchere
marked this pull request as ready for review
September 29, 2026 22:30
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The selected path can change during interrupt replay, and the default request omits a configured folder prefix.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
This PR makes the single-call, attachment-based Batch Transform the default while retaining the previous flow behind a kill switch.
Changes:
- Use one interrupt to start a Batch Transform from an attachment.
- Keep the two-step path as a fallback and update its tests.
- Bump the package version and platform dependency.
| File | Description |
|---|---|
uv.lock |
Updates locked versions and package metadata. |
tests/agent/tools/internal_tools/test_batch_transform_tool.py |
Tests the default path and kill-switch fallback. |
src/uipath_langchain/agent/tools/internal_tools/batch_transform_tool.py |
Adds the single-call path and fallback selection. |
pyproject.toml |
Bumps the package version and platform requirement. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+138
to
+140
| if not FeatureFlags.is_flag_enabled( | ||
| BATCH_TRANSFORM_FROM_ATTACHMENT_KILL_SWITCH, default=False | ||
| ): |
| attachment=attachment_id, | ||
| enable_web_search_grounding=static_web_search, | ||
| destination_path=destination_path, | ||
| index_folder_key=UiPathConfig.folder_key, |
JeremyReist2
approved these changes
Sep 30, 2026
JeremyReist2
left a comment
There was a problem hiding this comment.
lgtm - plz wait for @CalebMartinUiPath who has more experience on this
CalebMartinUiPath
approved these changes
Sep 30, 2026
Kill switch: DisableBatchTransformFromAttachment.
Makes the Batch Transform internal tool default to the single-call
start_batch_transform_from_attachment primitive - one durable interrupt
returning CreateBatchTransform(attachment=<id>, ...); the server creates the
ephemeral index and starts the Batch Transform task in one operation. The
previous two-step ephemeral-index flow is retained behind a kill switch so we
can flip back in production if something goes wrong.
Changes
- batch_transform_tool.py:
- Default path: single interrupt emitting CreateBatchTransform(
attachment=attachment_id, index_folder_key=UiPathConfig.folder_key, ...).
- Fallback path (kill switch on): the previous create_ephemeral_index +
WaitEphemeralIndex / ReadyEphemeralIndex + create_batch_transform two-step
flow, unchanged.
- Kill switch: DisableBatchTransformFromAttachment - declared locally as
BATCH_TRANSFORM_FROM_ATTACHMENT_KILL_SWITCH.
FeatureFlags.is_flag_enabled(..., default=False) resolves it against
UIPATH_FEATURE_DisableBatchTransformFromAttachment.
- test_batch_transform_tool.py:
- New default-path test covers the single-shot flow.
- Existing two-step tests set
UIPATH_FEATURE_DisableBatchTransformFromAttachment=1 to force the fallback.
- pyproject.toml / uv.lock: bump uipath-platform>=0.2.31 to >=0.2.33 for the
new primitive; bump package 0.18.17 to 0.18.18.
Rollback
Set UIPATH_FEATURE_DisableBatchTransformFromAttachment=1 on the runtime. The
tool reverts to the previous two-step behaviour immediately - no redeploy
needed.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
cfauchere
force-pushed
the
feat/batch-transform-from-attachment
branch
from
September 30, 2026 20:20
acaf702 to
dd90f4a
Compare
|
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.





What
Makes Batch Transform's internal tool default to the single-call
start_batch_transform_from_attachmentprimitive — one durable interrupt returningCreateBatchTransform(attachment=<id>, ...); the server creates the ephemeral index and starts the Batch Transform task in one operation. The previous two-step ephemeral-index flow is retained behind a kill switch so we can flip back in production if something goes wrong.Changes
batch_transform_tool.py:interrupt(...)emittingCreateBatchTransform(attachment=attachment_id, index_folder_key=UiPathConfig.folder_key, ...).create_ephemeral_index+WaitEphemeralIndex/ReadyEphemeralIndex+create_batch_transform(index_id, index_name, is_ephemeral_index=True)two-step flow, unchanged.DisableBatchTransformFromAttachment— declared locally asBATCH_TRANSFORM_FROM_ATTACHMENT_KILL_SWITCH.FeatureFlags.is_flag_enabled(..., default=False)resolves it againstUIPATH_FEATURE_DisableBatchTransformFromAttachment.test_batch_transform_tool.py:CreateBatchTransform.attachment,.prompt,.destination_path,.index_folder_keyfromUIPATH_FOLDER_KEY.UIPATH_FEATURE_DisableBatchTransformFromAttachment=1and exercise the two-step path (instant-ready index, wait-for-ingestion, folder-key passthrough, destination-path variants).pyproject.toml/uv.lock: bumpuipath-platform>=0.2.31→>=0.2.33for the new primitive; bump package0.18.17→0.18.18.Depends on
start_batch_transform_from_attachmentprimitive,CreateBatchTransform.attachmentfield, and dispatcher branch this PR relies on.Why
Old path: two durable interrupts, one with a
WaitEphemeralIndexsuspend in between while the server ingested the attachment. New path: one interrupt — the server does index creation + ingestion + task start in one call. The trailing job-attachment upload of the CSV result is unchanged.Making the new path the default (rather than opt-in) commits us to the simpler flow; the kill switch is the safety net for a fast rollback without a code change if the server-side path regresses in production.
Rollback
Set
UIPATH_FEATURE_DisableBatchTransformFromAttachment=1on the runtime. The tool reverts to the previous two-step behaviour immediately — no redeploy needed.