Repository navigation
Correct a wrong pull-request link on a held order in place - #3702
Merged
Merged
Conversation
P904 and P942 carry Core #3566, which belongs to P883: a claim recorded it and every resend carried it on. The only link editor was AssignTodo, which routes an administrative edit through assignment occupancy and is refused while queue-core-fix holds P904. CorrectLinkTodo joins the CorrectOrderTodo family: the order keeps its id, state, holder, review timer, strikes and other links; only the named link leaves, and a stale read is refused by the family's previous-part check. CheckedProblemOrder.unlinked owns removing a link, and MergedProblemOrder.merged_link/unmerged now use it instead of their own copy of the filter. A merged order refuses it (CorrectMergedLinkTodo owns taking a merge back). `order unlink PID OWNER/NAME N --why` sends it through the existing comms_todo tool. ListedProblems.carried already reads the problem's current order, so a resend after the correction carries only the links left; the test pins it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XbFMSoWgC3ZwKzjT4SwMDu
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
P904 and P942 carry #3566, which is P883's. The bus can't remove it today: the only link editor is
AssignTodo, andIncomingWork.require_freerefuses it because queue-core-fix holds P904. This PR adds the fix: 1 new correction member, 1 new verb, 0 new tools, and the duplicated link filter goes from 2 copies to 1.How the link got there (read-only query of the live
stored_order_story): P904 story seq 8259 and P942 seq 8864 arereviewingevents withclaim.pull_request.number = 3566.ClaimedProblemOrdercarries the claim's link (todos.pycarrying((claim.pull_request,))). Later sends (P904 seq 8897, 9008) kept it throughListedProblems.carried.Changes
CorrectLinkTodo(CorrectOrderTodo)(todos.py):part=order.pull_requests,replaced=order.unlinked(link). Like every member of the correction family, the order keeps its id, state, holder, review timer and strikes. A stalepreviousis refused by the family's existing check, and an order that doesn't hold the link is refused too. A merged order refuses it throughrequire_linkable, because taking back a merge belongs toCorrectMergedLinkTodo. There is no occupancy check, no release, no fold and no strike.CheckedProblemOrder.unlinkedis now the only place that removes a link.MergedProblemOrder.merged_linkandunmergedused to filter the tuple themselves; both now call it.order unlink PID OWNER/NAME N --why ...(UnlinkVerb, commander/order.py) sends the operation through the existingcomms_todotool (CommsChangeProblemTool). Thecomms_todoschema picks the new member up from the family:correct_link_todoappears 4 times inFieldCodec.record_schema(CommsChangeProblemTool).order.pycarry logic, on purpose.ListedProblems.carriedalready reads each listed problem's current order. It only "re-carried" the link because nothing could remove it from that order. Once the order is corrected, a resend carries only the links that are left; the test asserts this.Test (
tests/test_holder_standing_rules.py::test_unlink_takes_another_orders_pull_request_off_a_held_order): P1 is held by a running worker, which is exactly whereAssignTodowould be refused. It covers: CLI refusal for a link the order doesn't hold, with the store unchanged; CLI success removing #3566 while toad#1319 stays; the recorded correction; order, holder, review_at and strike count unchanged; andListedProblems.carriedcarrying only toad#1319 afterwards.After merge and install (not run here):
Note: the installed bus predates
CorrectMergedLinkTodotoo. Its livecomms_todoschema lists onlycorrect_check_todoandcorrect_run_todo.🤖 Generated with Claude Code
https://claude.ai/code/session_01XbFMSoWgC3ZwKzjT4SwMDu