Skip to content

fix: keep indexing agreements available when allocations close#1245

Merged
MoonBoi9001 merged 2 commits into
main-dipsfrom
mb9/keep-indexing-agreements-when-closing-allocations
Jul 11, 2026
Merged

fix: keep indexing agreements available when allocations close#1245
MoonBoi9001 merged 2 commits into
main-dipsfrom
mb9/keep-indexing-agreements-when-closing-allocations

Conversation

@MoonBoi9001

@MoonBoi9001 MoonBoi9001 commented Jul 10, 2026

Copy link
Copy Markdown
Member

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 never and the direct closeAllocation path stamps offchain. 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 to never directly still cancels agreements and blocks proposals.

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.
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.
@MoonBoi9001 MoonBoi9001 changed the title fix: keep indexing agreements when an allocation closes fix: keep indexing agreements available when allocations close Jul 10, 2026
@github-project-automation github-project-automation Bot moved this from 🗃️ Inbox to ✅ Approved in Indexer Jul 10, 2026
@MoonBoi9001
MoonBoi9001 merged commit 856b8ae into main-dips Jul 11, 2026
12 of 13 checks passed
@MoonBoi9001
MoonBoi9001 deleted the mb9/keep-indexing-agreements-when-closing-allocations branch July 11, 2026 04:18
@github-project-automation github-project-automation Bot moved this from ✅ Approved to 🚗 Merged in Indexer Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: 🚗 Merged

Development

Successfully merging this pull request may close these issues.

2 participants