fix: keep the operator's allocate rule after an agent close#1242
Closed
MoonBoi9001 wants to merge 1 commit into
Closed
fix: keep the operator's allocate rule after an agent close#1242MoonBoi9001 wants to merge 1 commit into
MoonBoi9001 wants to merge 1 commit into
Conversation
After the agent closes an allocation it always wrote a never rule, overwriting a rule the operator changed while the close sat in the queue and silently opting the deployment out of DIPs proposals. The stamp now checks the current rule and skips when it says allocate.
MoonBoi9001
marked this pull request as draft
July 8, 2026 13:25
MoonBoi9001
marked this pull request as ready for review
July 9, 2026 12:17
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.
This PR stops the indexer-agent from overwriting an operator's indexing rule after closing an allocation. When the agent closes one, it writes a do-not-allocate note so it will not recreate what it just closed. It wrote that note unconditionally. If the operator had changed the rule while the close waited in a queue, the note erased the change and also blocked DIPs payment offers for that deployment.
We hit this during local-network DIPs testing. The agent closed an allocation a test had just recreated, then wrote the note and blocklisted the deployment for payments. A companion PR, #1243, stops that wrongful close from being queued at all. This PR makes sure a close that still slips through cannot erase what the operator wants. Deliberate rule changes made through the CLI and management API are untouched. One behaviour change: after a close under a live always rule, the agent now recreates the allocation on its next pass. 6 new unit tests cover the guard.