Skip to content

UN-3569 [FEAT] Pass group_key through agentic_params in structure_tool_task#2173

Open
harini-venkataraman wants to merge 1 commit into
mainfrom
UN-3569-group-key-feature
Open

UN-3569 [FEAT] Pass group_key through agentic_params in structure_tool_task#2173
harini-venkataraman wants to merge 1 commit into
mainfrom
UN-3569-group-key-feature

Conversation

@harini-venkataraman

@harini-venkataraman harini-venkataraman commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

What

  • Pass the group_key setting from agentic table tool metadata through to the worker's agentic_params dict, enabling the opt-in section-level field extraction feature in the agentic table plugin

Why

The cloud repo's payload_modifier now exports group_key in the tool settings. The OSS structure_tool_task.py needs to read it from at_settings and include it in agentic_params so the agentic table worker receives the configuration.

How

  • workers/file_processing/structure_tool_task.py:
    • Added type annotation dict[str, Any] to agentic_params declaration
    • After building the base agentic_params dict, reads group_key from at_settings (default "")
    • Conditionally adds group_key to agentic_params only when non-empty (matching the cloud payload modifier pattern)
group_key = at_settings.get("group_key", "")
if group_key:
    agentic_params["group_key"] = group_key

Can this PR break any existing features? If yes, please list possible items. If no, please explain why.

No. The change is purely additive:

  • at_settings.get("group_key", "") returns "" when the key doesn't exist (all current deployments), so the if group_key: guard is False and agentic_params is unchanged
  • The type annotation change (dict[str, Any]) is cosmetic and has no runtime effect
  • The agentic table worker already handles the absence of group_key gracefully (defaults to "" via params.get(ParamKeys.GROUP_KEY, ""))

Relevant Docs

Related Issues or PRs

  • Cloud repo PR: UN-3569 [FEAT] Add opt-in group_key for unlabeled section-level field extraction

Dependencies Versions / Env Variables

  • No new dependencies or env variables
  • Requires the corresponding cloud repo PR to be deployed for group_key to appear in at_settings

Notes on Testing

  • No unit test changes needed — the structure_tool_task.py function is integration-tested via end-to-end pipeline runs
  • Verify by configuring group_key in agentic table settings and running an extraction — the worker should receive group_key in its params

Screenshots

N/A — backend-only change

Checklist

I have read and understood the Contribution Guidelines.

…l_task

Include group_key from agentic_table_settings in the executor params dict
so the agentic table executor can use it for section-level field extraction
during deployed pipeline runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: aaabcb3b-b36e-440e-a742-0e2100f9ebc3

📥 Commits

Reviewing files that changed from the base of the PR and between 8218164 and ec6595d.

📒 Files selected for processing (1)
  • workers/file_processing/structure_tool_task.py

Summary by CodeRabbit

  • Bug Fixes
    • Improved agentic table extraction by preserving optional grouping settings during processing.
    • Ensured configured group keys are consistently applied when organizing extracted table data.

Walkthrough

The agentic-table dispatch now explicitly types its executor parameter dictionary and conditionally passes a non-empty group_key from table settings.

Changes

Agentic table dispatch

Layer / File(s) Summary
Typed parameters and group key propagation
workers/file_processing/structure_tool_task.py
The agentic executor parameters use a dict[str, Any] annotation and optionally include group_key from agentic_table_settings.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: chandrasekharan-zipstack, muhammad-ali-e

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: passing group_key through agentic_params in structure_tool_task.
Description check ✅ Passed The description follows the template and covers what, why, how, breakage, migrations, env, testing, and related items.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch UN-3569-group-key-feature

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@greptile-apps

greptile-apps Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR forwards the optional agentic-table grouping setting to the worker. The main changes are:

  • Adds a dict[str, Any] annotation to agentic_params.
  • Copies a non-empty group_key from tool settings into the worker parameters.
  • Preserves the existing payload when group_key is absent or empty.

Confidence Score: 5/5

This looks safe to merge.

  • Non-empty configured values are forwarded to the worker.
  • Missing and empty values preserve the previous behavior.
  • No blocking issues were found in the changed code.

Important Files Changed

Filename Overview
workers/file_processing/structure_tool_task.py Adds optional group_key forwarding to the agentic-table worker without changing the default payload.

Reviews (1): Last reviewed commit: "UN-3569 [FEAT] Pass group_key through ag..." | Re-trigger Greptile

@github-actions

Copy link
Copy Markdown
Contributor

Unstract test results

Per-group results

Status Group Tier Passed Failed Errors Skipped Duration (s)
e2e-login e2e 2 0 0 0 1.4
e2e-smoke e2e 2 0 0 0 1.3
integration-backend integration 56 0 0 27 47.1
integration-connectors integration 1 0 0 7 7.9
unit-backend unit 126 0 0 0 22.6
unit-connectors unit 63 0 0 0 10.4
unit-core unit 27 0 0 0 1.4
unit-platform-service unit 15 0 0 0 2.7
unit-rig unit 69 0 0 0 3.7
unit-sdk1 unit 435 0 0 0 25.9
unit-workers unit 0 0 0 0 30.0
TOTAL 796 0 0 34 154.4

Critical paths

⚠️ Critical paths not yet covered

  • workflow-create-execute — Create a workflow, configure source+destination, execute, poll, fetch result. (entry: POST /api/v1/workflow/{id}/execute/; declared coverage: e2e-workflow)
  • api-deployment-run — Deploy a workflow as an API, POST a document, receive structured JSON. (entry: POST /deployment/api/{org}/{name}/; declared coverage: e2e-api-deployment)
  • prompt-studio-fetch-response — Prompt Studio: create project, add prompt, run single-pass, get response. (entry: POST /api/v1/prompt-studio/prompt-studio-tool/{id}/fetch_response/; declared coverage: e2e-prompt-studio)
  • pipeline-etl-execute — Run an ETL pipeline from source connector to destination. (entry: POST /api/v1/pipeline/{id}/execute/; declared coverage: no groups declared)
  • usage-token-tracking — Per-execution token usage is recorded and retrievable. (entry: GET /api/v1/usage/get_token_usage/; declared coverage: no groups declared)
  • workflow-execution-fan-out — Multi-file workflow execution fans out to file-processing workers and rejoins. (entry: internal: backend → rabbitmq → workers/file_processing; declared coverage: no groups declared)
  • callback-result-delivery — Async results are posted back via the callback worker. (entry: internal: workers/callback → backend /internal endpoints; declared coverage: no groups declared)
✅ Covered critical paths
  • auth-login — covered by e2e-login
  • adapter-register-llm — covered by integration-backend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant