Repository navigation
fix(scripts): expire_stale_bounties reads escrows with an operator key - #61
Merged
Merged
Conversation
The exchange now shows an escrow only to its parties and operators, so a requester key was refused for other accounts' bounties and they were skipped as errors. The script takes an operator key from the environment, and a refusal is reported as not checked. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
What
scripts/expire_stale_bounties.pynow reads its exchange key fromEXCHANGE_OPERATOR_API_KEY(orA2A_OPERATOR_API_KEY). Without one it falls back to the JSON file named byEXCHANGE_CREDENTIALS_FILE, preferring anoperatorentry overrequester.A 403 from the exchange is reported as "not checked" with a hint, instead of being listed as a skipped error. A refused escrow is never treated as terminal.
Why
The exchange shows an escrow only to its requester, its provider and operator accounts. With a requester key the script was refused for every other account's bounty and silently skipped it.
The hard-coded credential file locations are gone; the path comes from the environment.
Tests
backend/tests/test_expire_stale_bounties_script.py: key selection order, missing configuration, and how 403, 404 and 500 are named.🤖 Generated with Claude Code