fix: keep indexing agreements available when allocations close#1245
Merged
MoonBoi9001 merged 2 commits intoJul 11, 2026
Merged
Conversation
After closing an allocation the agent writes a never rule so it does not immediately reallocate. The DIPS module treats never as a blocklist and cancels the deployment's active indexing agreement on-chain, so a routine close could silently end a paid agreement.
This was referenced Jul 10, 2026
The closeAllocation mutation writes an offchain rule after closing, and the DIPS module reads offchain, like never, as a blocklist that rejects future agreement proposals. The post-close stamp decision is now shared by both close paths and skips DIPS-managed rules.
Maikol
approved these changes
Jul 10, 2026
MoonBoi9001
deleted the
mb9/keep-indexing-agreements-when-closing-allocations
branch
July 11, 2026 04:18
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 an allocation close from silently blocklisting a deployment for indexing agreements. After a close, a rule is written so the agent does not immediately reallocate to the same deployment: the agent's queued path stamps
neverand the direct closeAllocation path stampsoffchain. The DIPS module, which manages paid indexing agreements, treats both values as a blocklist: it rejects the deployment's pending and future agreement proposals and cancels any agreement still active on it.Closes reach these stamps without the operator opting out. The agent closes a deployment's allocations when it fails its health check, and a missing indexing status counts as failing; a close queued under an earlier rule can execute after an agreement has since arrived; and a close can be requested by hand. The network itself settles the agreement bound to the closed allocation (SubgraphService cancels it as part of the close, or reverts the close when its guard is enabled), but the stamped rule went further: it permanently blocked the deployment from all future agreements.
Both stamps now go through 1 shared decision,
ruleAfterClose, which returns nothing when the deployment's current rule is DIPS-managed, so the rule and the deployment's future proposals survive the close. Opting out stays explicit: setting the rule toneverdirectly still cancels agreements and blocks proposals.