Skip to content
Merged
Show file tree
Hide file tree
Changes from 126 commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
2da4907
Execution backend - revamp
harini-venkataraman Feb 19, 2026
41eeef8
async flow
harini-venkataraman Feb 19, 2026
f66dfb2
Streaming progress to FE
harini-venkataraman Feb 24, 2026
95c6592
Removing multi hop in Prompt studio ide and structure tool
harini-venkataraman Feb 25, 2026
d8cc6cc
Merge origin/main into feat/execution-backend
Deepak-Kesavan Feb 28, 2026
44a2b3f
Merge remote-tracking branch 'origin/main' into feat/execution-backend
Deepak-Kesavan Mar 2, 2026
2f4f2dc
UN-3234 [FIX] Add beta tag to agentic prompt studio navigation item
Deepak-Kesavan Mar 2, 2026
d041201
Added executors for agentic prompt studio
harini-venkataraman Mar 2, 2026
0a0cfb1
Merge branch 'main' of github.com:Zipstack/unstract into feat/executi…
harini-venkataraman Mar 2, 2026
a4e1fd7
Merge branch 'main' of github.com:Zipstack/unstract into feat/executi…
harini-venkataraman Mar 2, 2026
ae77d6a
Added executors for agentic prompt studio
harini-venkataraman Mar 2, 2026
5c22956
Added executors for agentic prompt studio
harini-venkataraman Mar 2, 2026
3cc3213
Removed redundant envs
harini-venkataraman Mar 2, 2026
d0532f8
Removed redundant envs
harini-venkataraman Mar 2, 2026
6173df5
Removed redundant envs
harini-venkataraman Mar 3, 2026
bbe6f58
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 3, 2026
a3dc912
Removed redundant envs
harini-venkataraman Mar 3, 2026
98c8071
Merge branch 'main' of github.com:Zipstack/unstract into feat/executi…
harini-venkataraman Mar 3, 2026
21157ac
Merge branch 'feat/execution-backend' of github.com:Zipstack/unstract…
harini-venkataraman Mar 3, 2026
0216b59
Removed redundant envs
harini-venkataraman Mar 3, 2026
db81b9d
Removed redundant envs
harini-venkataraman Mar 3, 2026
e1da202
Removed redundant envs
harini-venkataraman Mar 3, 2026
d119797
Removed redundant envs
harini-venkataraman Mar 3, 2026
fbadbf8
Removed redundant envs
harini-venkataraman Mar 3, 2026
882296e
Removed redundant envs
harini-venkataraman Mar 4, 2026
6d3bbbf
Removed redundant envs
harini-venkataraman Mar 4, 2026
292460b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 4, 2026
f35c0e6
Removed redundant envs
harini-venkataraman Mar 4, 2026
9bcb458
Merge branch 'feat/execution-backend' of github.com:Zipstack/unstract…
harini-venkataraman Mar 4, 2026
0cbd10a
adding worker for callbacks
harini-venkataraman Mar 4, 2026
2b1ab1e
adding worker for callbacks
harini-venkataraman Mar 5, 2026
4122f08
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 5, 2026
1ceb352
adding worker for callbacks
harini-venkataraman Mar 5, 2026
d69304d
Merge branch 'feat/execution-backend' of github.com:Zipstack/unstract…
harini-venkataraman Mar 5, 2026
7c1266b
adding worker for callbacks
harini-venkataraman Mar 5, 2026
0b84d9e
adding worker for callbacks
harini-venkataraman Mar 5, 2026
5b0629d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 5, 2026
98ee4b9
Pluggable apps and plugins to fit the new async prompt execution arch…
harini-venkataraman Mar 6, 2026
2dffcef
Merge branch 'feat/execution-backend' of github.com:Zipstack/unstract…
harini-venkataraman Mar 6, 2026
3b35fb2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 6, 2026
1ab6031
Pluggable apps and plugins to fit the new async prompt execution arch…
harini-venkataraman Mar 6, 2026
15c3daf
Merge branch 'feat/execution-backend' of github.com:Zipstack/unstract…
harini-venkataraman Mar 6, 2026
7ae1a74
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 6, 2026
fbf9c29
Pluggable apps and plugins to fit the new async prompt execution arch…
harini-venkataraman Mar 9, 2026
ec2f762
Merge branch 'feat/execution-backend' of github.com:Zipstack/unstract…
harini-venkataraman Mar 9, 2026
d6a3c5e
adding worker for callbacks
harini-venkataraman Mar 9, 2026
5c23ab0
adding worker for callbacks
harini-venkataraman Mar 9, 2026
525024f
adding worker for callbacks
harini-venkataraman Mar 9, 2026
a8cbce1
adding worker for callbacks
harini-venkataraman Mar 9, 2026
549f17a
adding worker for callbacks
harini-venkataraman Mar 9, 2026
f9b86a9
adding worker for callbacks
harini-venkataraman Mar 10, 2026
5369e5a
adding worker for callbacks
harini-venkataraman Mar 10, 2026
b5205ff
adding worker for callbacks
harini-venkataraman Mar 10, 2026
9659661
fix: write output files in agentic extraction pipeline
harini-venkataraman Mar 11, 2026
67eef62
UN-3266 fix: replace hardcoded /tmp paths with secure temp dirs in te…
harini-venkataraman Mar 11, 2026
3f4cc7d
Merge branch 'main' into feat/async-prompt-service-v2
harini-venkataraman Mar 11, 2026
a563a35
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 11, 2026
9b422da
Update docs
harini-venkataraman Mar 11, 2026
6a6e8e9
Merge branch 'feat/async-prompt-service-v2' of github.com:Zipstack/un…
harini-venkataraman Mar 11, 2026
817fc1c
UN-3266 fix: remove dead code with undefined names in fetch_response
harini-venkataraman Mar 11, 2026
d9bc50f
Un 3266 fix security hotspot tmp paths (#1851)
harini-venkataraman Mar 11, 2026
b715f64
UN-3266 fix: resolve SonarCloud bugs S2259 and S1244 in PR #1849
harini-venkataraman Mar 11, 2026
e9c23b2
UN-3266 fix: resolve SonarCloud code smells in PR #1849
harini-venkataraman Mar 11, 2026
f59755a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 11, 2026
4bf9736
UN-3266 fix: wrap long log message in dispatcher.py to fix E501
harini-venkataraman Mar 11, 2026
0531870
UN-3266 fix: resolve remaining SonarCloud S117 naming violations
harini-venkataraman Mar 11, 2026
a2edb23
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 11, 2026
3f86131
UN-3266 fix: resolve remaining SonarCloud code smells in PR #1849
harini-venkataraman Mar 11, 2026
45e61c4
UN-3266 fix: resolve SonarCloud cognitive complexity and code smell v…
harini-venkataraman Mar 11, 2026
6391c6c
UN-3266 fix: remove unused RetrievalStrategy import from _handle_answ…
harini-venkataraman Mar 11, 2026
0af0484
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 11, 2026
807e405
UN-3266 fix: rename UsageHelper params to lowercase (N803)
harini-venkataraman Mar 11, 2026
9bdb3f5
UN-3266 fix: resolve remaining SonarCloud issues from check run 66691…
harini-venkataraman Mar 11, 2026
18eafe9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 11, 2026
7a01a35
UN-3266 fix: remove unused locals in _handle_answer_prompt (F841)
harini-venkataraman Mar 11, 2026
3e5ce31
Merge branch 'main' into feat/async-prompt-service-v2
harini-venkataraman Mar 12, 2026
e3ca0c6
fix: resolve Biome linting errors in frontend source files
harini-venkataraman Mar 12, 2026
db3d8c2
fix: replace dynamic import of SharePermission with static import in …
harini-venkataraman Mar 12, 2026
a62a9fd
Merge branch 'main' into feat/async-prompt-service-v2
harini-venkataraman Mar 12, 2026
b3a90af
fix: resolve SonarCloud warnings in frontend components
harini-venkataraman Mar 12, 2026
4200ac1
Merge branch 'main' into feat/async-prompt-service-v2
ritwik-g Mar 12, 2026
1c58eb9
Merge branch 'main' into feat/async-prompt-service-v2
harini-venkataraman Mar 18, 2026
8fdb680
Merge branch 'main' into feat/async-prompt-service-v2
harini-venkataraman Mar 19, 2026
79adb41
Merge branch 'main' into feat/async-prompt-service-v2
harini-venkataraman Mar 19, 2026
9749083
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 19, 2026
e8515d5
Address PR #1849 review comments: fix null guards, dead code, and tes…
harini-venkataraman Mar 19, 2026
2be161b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 19, 2026
7a740a2
Merge branch 'main' into feat/async-prompt-service-v2
harini-venkataraman Mar 19, 2026
3d9f540
Fix missing llm_usage_reason for summarize LLM usage tracking
harini-venkataraman Mar 23, 2026
26d8c4a
UN-3266 [FIX] Fix single-pass extraction routing in LegacyExecutor
harini-venkataraman Mar 23, 2026
4879b10
Fixing API depployment response mismatches
harini-venkataraman Mar 23, 2026
8057527
Fix single-pass extraction showing only one prompt result in real-time
harini-venkataraman Mar 25, 2026
d96a521
Move summarize from sync Django plugin to executor worker for IDE index
harini-venkataraman Mar 25, 2026
a40b681
Address PR #1849 review comments: null guards, thread safety
harini-venkataraman Mar 25, 2026
4966919
Add documentation to ExecutionResponse DTO describing result structure
harini-venkataraman Mar 25, 2026
8e29665
Fix PR review issues: IDOR, null guards, rollback, spinner, summarize…
harini-venkataraman Mar 26, 2026
58825ef
Merge branch 'main' into feat/async-prompt-service-v2
harini-venkataraman Mar 26, 2026
e1cec00
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 26, 2026
53fe9fc
Fix CI, tests, and add async prompt studio improvements
harini-venkataraman Mar 26, 2026
1468a97
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 26, 2026
9964c43
Fix pre-existing biome CI errors: import ordering and formatting
harini-venkataraman Mar 26, 2026
44f72f8
Fix ruff F821: add missing transaction import in prompt_studio_helper
harini-venkataraman Mar 26, 2026
bdf2916
Add input validation guards to bulk_fetch_response endpoint
harini-venkataraman Mar 26, 2026
3989ad4
Merge branch 'main' into feat/async-prompt-service-v2
kirtimanmishrazipstack Mar 31, 2026
0424443
Merge branch 'main' into feat/async-prompt-service-v2
harini-venkataraman Mar 31, 2026
28f2224
IDE Call backs
harini-venkataraman Mar 31, 2026
834df68
Sonar issues fix
harini-venkataraman Mar 31, 2026
8ed6b47
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 31, 2026
2b333a3
Fix ruff errors: restore summary_profile variable, suppress TC001 in …
harini-venkataraman Mar 31, 2026
0628ed1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 31, 2026
666563a
Update bun.lock to match package.json dependency ranges
harini-venkataraman Mar 31, 2026
e489e45
Fix all biome lint warnings: empty blocks, missing braces, forEach re…
harini-venkataraman Mar 31, 2026
0aae584
Move ExecutionContext import into TYPE_CHECKING block
harini-venkataraman Mar 31, 2026
2ba2c21
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 31, 2026
3e7f808
Fix SonarQube issues: duplication, naming, nesting, unused var
harini-venkataraman Mar 31, 2026
42eaed8
Replace worker-ide-callback Dockerfile with worker-unified
harini-venkataraman Mar 31, 2026
ac58c0e
Add celery_executor_agentic queue to executor worker
harini-venkataraman Apr 2, 2026
8114849
FIxing email enforce type
harini-venkataraman Apr 3, 2026
2b35695
Removing line-item from select choices
harini-venkataraman Apr 3, 2026
0deb08d
Merge main
harini-venkataraman Apr 3, 2026
b5afee1
Update workers/shared/enums/worker_enums_base.py
harini-venkataraman Apr 3, 2026
19ea4fc
Update backend/workflow_manager/workflow_v2/workflow_helper.py
harini-venkataraman Apr 3, 2026
c6cdffb
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 3, 2026
0879e82
Fix false success logs and silent failures in ETL destination pipelines
harini-venkataraman Apr 3, 2026
822e040
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 3, 2026
1eae4e2
Merge branch 'main' into fix/agentic-executor-queue
kirtimanmishrazipstack Apr 3, 2026
802eddb
Revert ETL destination pipeline changes — deferring to next cut
harini-venkataraman Apr 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"date":"date",
"boolean":"boolean",
"json":"json",
"line_item":"line-item",
"table":"table"
},
"output_processing":{
Expand Down
4 changes: 0 additions & 4 deletions backend/workflow_manager/workflow_v2/workflow_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,11 +598,7 @@ def execute_workflow_async(
@staticmethod
@celery_app.task(
name="async_execute_bin",
autoretry_for=(Exception,),
max_retries=0,
retry_backoff=True,
retry_backoff_max=500,
retry_jitter=True,
)
def execute_bin(
schema_name: str,
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ services:
- EXECUTOR_METRICS_PORT=8088
- HEALTH_PORT=8088
# Configurable Celery options
- CELERY_QUEUES_EXECUTOR=${CELERY_QUEUES_EXECUTOR:-celery_executor_legacy}
- CELERY_QUEUES_EXECUTOR=${CELERY_QUEUES_EXECUTOR:-celery_executor_legacy,celery_executor_agentic}
- CELERY_POOL=${WORKER_EXECUTOR_POOL:-prefork}
- CELERY_PREFETCH_MULTIPLIER=${WORKER_EXECUTOR_PREFETCH_MULTIPLIER:-1}
- CELERY_CONCURRENCY=${WORKER_EXECUTOR_CONCURRENCY:-2}
Expand Down
27 changes: 14 additions & 13 deletions workers/executor/executors/legacy_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1059,9 +1059,7 @@ def _sanitize_null_values(
) -> dict[str, Any]:
"""Replace 'NA' strings with None in structured output."""
for k, v in structured_output.items():
if isinstance(v, str) and v.lower() == "na":
structured_output[k] = None
elif isinstance(v, list):
if isinstance(v, list):
for i, item in enumerate(v):
if isinstance(item, str) and item.lower() == "na":
v[i] = None
Expand Down Expand Up @@ -1698,16 +1696,19 @@ def _apply_type_conversion(
)

elif output_type == PSKeys.EMAIL:
email_prompt = (
f"Extract the email from the following text:\n{answer}"
f"\n\nOutput just the email. "
f"The email should be directly assignable to a string "
f"variable. No explanation is required. If you cannot "
f'extract the email, output "NA".'
)
structured_output[prompt_name] = LegacyExecutor._convert_scalar_answer(
answer, llm, answer_prompt_svc, email_prompt
)
if answer.lower() == "na":
structured_output[prompt_name] = answer
else:
email_prompt = (
f"Extract the email from the following text:\n{answer}"
f"\n\nOutput just the email. "
f"The email should be directly assignable to a string "
f"variable. No explanation is required. If you cannot "
f'extract the email, output "NA".'
)
structured_output[prompt_name] = answer_prompt_svc.run_completion(
llm=llm, prompt=email_prompt
)

elif output_type == PSKeys.DATE:
date_prompt = (
Expand Down
5 changes: 4 additions & 1 deletion workers/executor/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import logging
import os

from shared.enums.worker_enums import WorkerType
from shared.infrastructure.config.builder import WorkerBuilder
Expand Down Expand Up @@ -43,7 +44,9 @@ def check_executor_health():
"worker_type": "executor",
"registered_executors": executors,
"executor_count": len(executors),
"queues": ["celery_executor_legacy"],
"queues": os.environ.get(
"CELERY_QUEUES_EXECUTOR", "celery_executor_legacy"
).split(","),
},
)

Expand Down
9 changes: 7 additions & 2 deletions workers/file_processing/structure_tool_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,13 @@ def _execute_structure_tool_impl(params: dict) -> dict:
logger.info("Overwriting INFILE with structured output: %s", input_file_path)
fs.json_dump(path=input_file_path, data=structured_output)

logger.info("Output written successfully to workflow storage")
except (OSError, json.JSONDecodeError) as e:
logger.info(
"Output files written — INFILE=%s, METADATA_DIR=%s",
input_file_path,
execution_data_dir,
)
except Exception as e:
logger.error("Failed to write output files: %s", e, exc_info=True)
return ExecutionResult.failure(error=f"Error writing output file: {e}").to_dict()

# Write tool result + tool_metadata to METADATA.json
Expand Down
1 change: 1 addition & 0 deletions workers/shared/enums/worker_enums_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ class QueueName(str, Enum):
# The dispatcher derives queue names as ``celery_executor_{executor_name}``.
# The "legacy" executor is the default OSS executor.
EXECUTOR = "celery_executor_legacy"
EXECUTOR_AGENTIC = "celery_executor_agentic"

# IDE callback queue (prompt studio post-execution callbacks)
IDE_CALLBACK = "ide_callback"
Expand Down
1 change: 1 addition & 0 deletions workers/shared/infrastructure/config/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class WorkerRegistry:
),
WorkerType.EXECUTOR: WorkerQueueConfig(
primary_queue=QueueName.EXECUTOR,
additional_queues=[QueueName.EXECUTOR_AGENTIC],
),
WorkerType.IDE_CALLBACK: WorkerQueueConfig(
primary_queue=QueueName.IDE_CALLBACK,
Expand Down
41 changes: 39 additions & 2 deletions workers/shared/workflow/destination_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,18 @@ def _handle_filesystem_destination(
):
"""Handle filesystem destination processing."""
if not result.has_hitl:
if not result.tool_execution_result and not file_ctx.execution_error:
error_msg = (
f"No tool execution result for file '{file_ctx.file_name}' "
f"- filesystem copy skipped"
)
logger.error(error_msg)
log_file_error(
exec_ctx.workflow_log,
exec_ctx.file_execution_id,
f"❌ {error_msg}",
)
raise RuntimeError(error_msg)
log_file_info(
exec_ctx.workflow_log,
exec_ctx.file_execution_id,
Expand Down Expand Up @@ -696,9 +708,17 @@ def _handle_database_destination(
api_client=exec_ctx.api_client,
)
else:
logger.warning(
f"No tool execution result or execution error found for file {file_ctx.file_name}, skipping database insertion"
error_msg = (
f"No tool execution result for file '{file_ctx.file_name}' "
f"- database insertion skipped"
)
logger.error(error_msg)
log_file_error(
exec_ctx.workflow_log,
exec_ctx.file_execution_id,
f"❌ {error_msg}",
)
raise RuntimeError(error_msg)
else:
logger.info(
f"File '{file_ctx.file_name}' sent to HITL queue - DATABASE processing will be handled after review"
Expand Down Expand Up @@ -1403,9 +1423,18 @@ def get_tool_execution_result_from_execution_context(
file_storage = file_system.get_file_storage()

if not metadata_file_path:
logger.warning(
"No metadata_file_path (file_execution_id=%s, execution_dir=%s)",
file_execution_id,
file_handler.execution_dir,
)
return None

if not file_storage.exists(metadata_file_path):
logger.warning(
"METADATA.json not found at '%s'",
metadata_file_path,
)
return None

metadata_content = file_storage.read(path=metadata_file_path, mode="r")
Expand All @@ -1418,9 +1447,17 @@ def get_tool_execution_result_from_execution_context(
output_file_path = file_handler.infile

if not output_file_path:
logger.warning(
"No infile path (file_execution_id=%s)",
file_execution_id,
)
return None

if not file_storage.exists(output_file_path):
logger.warning(
"INFILE not found at '%s'",
output_file_path,
)
return None

file_type = file_storage.mime_type(path=output_file_path)
Expand Down
16 changes: 8 additions & 8 deletions workers/tests/test_answer_prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,8 @@ def test_invalid_strategy_skips_retrieval(
)
result = executor._handle_answer_prompt(ctx)

# Answer stays "NA" which gets sanitized to None
assert result.data[PSKeys.OUTPUT]["field_a"] is None
# Answer stays "NA" (top-level NA is preserved, not sanitized)
assert result.data[PSKeys.OUTPUT]["field_a"] == "NA"


class TestHandleAnswerPromptMultiPrompt:
Expand Down Expand Up @@ -687,21 +687,21 @@ def test_vectordb_closed(self, mock_shim_cls, mock_deps):
class TestNullSanitization:
"""Tests for _sanitize_null_values."""

def test_na_string_becomes_none(self):
"""Top-level 'NA' string None."""
def test_na_string_preserved(self):
"""Top-level 'NA' string is preserved (not sanitized to None)."""
from executor.executors.legacy_executor import LegacyExecutor

output = {"field": "NA"}
result = LegacyExecutor._sanitize_null_values(output)
assert result["field"] is None
assert result["field"] == "NA"

def test_na_case_insensitive(self):
"""'na' (lowercase) None."""
def test_na_case_insensitive_preserved(self):
"""Top-level 'na' (lowercase) is preserved (not sanitized to None)."""
from executor.executors.legacy_executor import LegacyExecutor

output = {"field": "na"}
result = LegacyExecutor._sanitize_null_values(output)
assert result["field"] is None
assert result["field"] == "na"

def test_nested_list_na(self):
"""NA in nested list items → None."""
Expand Down