Skip to content

Fix BatchQuery task mixin and add job/task actions documentation#337

Open
samuelvkwong wants to merge 10 commits intomainfrom
fix/batch-query-mixin-and-docs
Open

Fix BatchQuery task mixin and add job/task actions documentation#337
samuelvkwong wants to merge 10 commits intomainfrom
fix/batch-query-mixin-and-docs

Conversation

@samuelvkwong
Copy link
Copy Markdown
Collaborator

Summary

  • Fix BatchQuery task views to use BatchQueryLockedMixin instead of SelectiveTransferLockedMixin. The task action views (Delete, Reset, Kill) were incorrectly gated by the selective transfer section's lock setting instead of the batch query section's.
  • Add job/task actions documentation to the user guide, covering all statuses, available actions, permissions, and their effects on job and task state.
  • Add job/task actions reference to AGENTS.md for developer context.

Test plan

  • All existing tests pass (186 tests across batch_transfer, selective_transfer, batch_query, mass_transfer)
  • Verify BatchQuery task actions (Delete, Reset, Kill) respect BatchQuery lock settings, not SelectiveTransfer lock settings

🤖 Generated with Claude Code

samuelvkwong and others added 7 commits April 23, 2026 08:53
Adds DicomTaskForceRetryView (staff-only) that inherits from
DicomTaskResetView but skips the is_resettable check. This allows
admins to retry tasks erroneously marked as SUCCESS (e.g. when
dcm2niix silently produced 0-byte files during a disk-full event).

Added to all four apps: mass_transfer, batch_transfer, batch_query,
and selective_transfer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the PENDING/IN_PROGRESS guard — staff can force retry any task,
including stuck in-progress or already-pending tasks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ob/task actions

- Fix BatchQueryTaskDeleteView, BatchQueryTaskResetView, BatchQueryTaskForceRetryView,
  and BatchQueryTaskKillView to use BatchQueryLockedMixin instead of
  SelectiveTransferLockedMixin, so they are gated by the batch query section's
  lock setting instead of the selective transfer section's
- Remove unused SelectiveTransferLockedMixin import from batch_query/views.py
- Document job and task statuses, actions, preconditions, permissions, and
  effects in AGENTS.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Force Retry feature is redundant — the existing Reset (for terminal
tasks) and Kill + Reset (for stuck in-progress tasks) already cover
all use cases.

Removed from: core views/template, batch_transfer, batch_query,
mass_transfer, selective_transfer (views, urls, templatetags, tests).

Also fixes BatchQuery task views to use BatchQueryLockedMixin instead
of SelectiveTransferLockedMixin (pre-existing bug).

Added job/task action documentation to AGENTS.md covering all statuses,
actions, preconditions, permissions, and state effects.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces comprehensive documentation for job and task management, detailing statuses and available actions in both AGENTS.md and the user guide. Additionally, it refactors the BatchQueryTask views to use the appropriate BatchQueryLockedMixin. The review feedback points out necessary corrections to the documented job status evaluation logic, specifically regarding the CANCELING state, and suggests improving the user guide's clarity on terminal states.

Comment thread AGENTS.md Outdated
Comment thread docs/user-docs/user-guide.md Outdated
samuelvkwong and others added 3 commits April 23, 2026 17:48
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

Warning

Rate limit exceeded

@samuelvkwong has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 53 minutes and 12 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 53 minutes and 12 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5b96bb42-0ae2-4e07-818a-16d16f04bf14

📥 Commits

Reviewing files that changed from the base of the PR and between 0f67ddd and 3838b76.

📒 Files selected for processing (3)
  • AGENTS.md
  • adit/batch_query/views.py
  • docs/user-docs/user-guide.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/batch-query-mixin-and-docs

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 and usage tips.

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