Skip to content

ref(data-export): Extract helper methods from endpoint and assemble_download task#112617

Merged
manessaraj merged 1 commit into
masterfrom
sarajmanes/feat/refactor-data-export
Apr 10, 2026
Merged

ref(data-export): Extract helper methods from endpoint and assemble_download task#112617
manessaraj merged 1 commit into
masterfrom
sarajmanes/feat/refactor-data-export

Conversation

@manessaraj
Copy link
Copy Markdown
Contributor

@manessaraj manessaraj commented Apr 9, 2026

Break down the monolithic post() handler and assemble_download
task into focused private helpers to enable further refactoring
for new export functionality. Also introduce an AssembleChunkResult
NamedTuple and a Processor type alias to reduce repetition. No behavior change.

…ownload task

 Break down the monolithic post() handler and assemble_download
 task into focused private helpers to enable further refactoring
 for new export functionality. Also introduce an AssembleChunkResult
    NamedTuple and a Processor type alias to reduce repetition. No behavior change.
@manessaraj manessaraj requested a review from a team as a code owner April 9, 2026 20:28
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 9, 2026
@manessaraj manessaraj changed the title ref(data-export): Extract helper methods from endpoint and assemble_d… ref(data-export): Extract helper methods from endpoint and assemble_download task Apr 9, 2026
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7e0623f. Configure here.

*,
page_token: str | None = None,
last_emitted_item_id_hex: str | None = None,
run_sync: bool = False,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused run_sync parameter never read or propagated

Low Severity

The new run_sync parameter on assemble_download is never read within the function body and no caller passes it. Additionally, neither _schedule_retry nor _schedule_next_task propagates it when scheduling continuation tasks via apply_async, so even if a future caller sets run_sync=True, subsequent retries and continuations would silently revert to the default False. This is dead code that could mask a latent bug once the parameter is eventually wired up.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7e0623f. Configure here.

@manessaraj manessaraj merged commit 3634485 into master Apr 10, 2026
59 checks passed
@manessaraj manessaraj deleted the sarajmanes/feat/refactor-data-export branch April 10, 2026 19:09
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants