These functions manage the ticket queue — claiming the next ticket, advancing it through the workflow, and handling failure or escalation cases. The queue is priority-ordered:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/onenot8/issueLoop/llms.txt
Use this file to discover all available pages before exploring further.
blocking tickets are always dispensed before high, then normal, then low. Within the same priority, older tickets come first.
Ticket status flow
Tickets move through a defined set of statuses. The diagram below shows the normal transitions:blocked is a valid status value in the data model but is not set by any public lifecycle function — it is available for custom workflows that set it directly through propose_fix or external tooling.
get_top_error
Claims the highest-priority pending ticket for the named repository, sets its status toin_progress, stamps dispensed_at with the current UTC time, and returns the ticket dict. Returns None when there are no pending tickets.
Name of the repository to pull from.
None.
get_all_errors
Returns all open (non-done, non-in_progress) tickets, optionally filtered to one repository. Does not change any ticket state.Optional repository filter. Pass
None or omit to return open tickets across all repos.resolve
Marks a ticket asdone. Call this after your code fix has been verified.
UUID of the ticket to resolve.
None. The update is committed to the database immediately.
fail
Marks a ticket asfailed without escalating or retrying. Use this when you want to record that an attempt was made but you do not intend to retry automatically.
UUID of the ticket to mark failed.
None.
escalate
Marks a ticket asneeds_human and stores the reason in escalation_summary. Also fires a notification via the configured webhook (if any) so your team is alerted.
UUID of the ticket to escalate.
Human-readable description of why escalation was triggered. Stored in
ticket["escalation_summary"].None if the ticket was not found.
reassign
Resets a ticket fromin_progress back to pending without incrementing the attempt counter. Useful when a worker crashes or is interrupted before completing its work.
UUID of the ticket to put back in the queue.
None if the ticket was not found.
retry_bug
Increments the ticket’sattempts counter and resets its status to pending. Use this when an automated fix attempt fails but more retries are warranted.
UUID of the ticket to retry.
attempts value), or None if the ticket was not found.
get_bug_attempts
Returns the current attempt count for a ticket without modifying any state.UUID of the ticket to inspect.
int — the number of attempts recorded — or None if the ticket does not exist.
bulk_resolve
Resolves a list of tickets in a single call. Each ticket is markeddone in sequence. Useful for closing out a batch of tickets after a sweeping fix.
List of ticket UUID strings to resolve.
int — the number of tickets that were resolved (equal to len(ticket_ids)).