recall_action_required: define an ordering contract #60
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally filed by @coilysiren on 2026-05-05T07:58:43Z - https://github.com/coilysiren/repo-recall/issues/52
Use case
A consumer (sibling project, external orchestrator) is wiring
recall_action_requiredas a priority queue: pop the top item, dispatch work against it, refresh, repeat. That contract relies on "top of the queue" being a defined thing.What's there today
ActionRequiredArgs {}is empty. The current handler iteratesdb::list_repos_with_counts(&conn)and emits oneActionRequiredEntryper(repo, signal)pair viaderive_signals. The order out is "whatever orderlist_repos_with_countsreturned, then the orderderive_signalschecks signals." Stable enough across scans (so item identity holds, per #3's acceptance), but not a documented priority.A consumer can sort client-side, but two consumers (a polling orchestrator and a human staring at the dashboard) won't agree on "what's at the top" unless the contract is in one place.
What's needed
Pick one:
repos[0]being meaningful.recall_action_requiredreturns an unordered set and consumers must sort. Cheaper, but pushes the question of "what does severity mean" onto every consumer.Server-side ordering is probably the right call - the dashboard already implies an ordering when it sorts action-required repos to the top. Lifting that ordering into the API + documenting it costs little and gives consumers a stable contract.
Acceptance
recall_action_requiredtool description names the ordering (or explicitly says "unordered").Cross-refs