Skip to content

fix(scripts): expire_stale_bounties reads escrows with an operator key - #61

Merged
widrss merged 1 commit into
mainfrom
fix/expire-stale-bounties-operator-key
Nov 18, 2026
Merged

widrss merged 1 commit into
mainfrom
fix/expire-stale-bounties-operator-key

Conversation

@widrss

@widrss widrss commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

What

scripts/expire_stale_bounties.py now reads its exchange key from EXCHANGE_OPERATOR_API_KEY (or A2A_OPERATOR_API_KEY). Without one it falls back to the JSON file named by EXCHANGE_CREDENTIALS_FILE, preferring an operator entry over requester.

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

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>
@widrss
widrss merged commit 306e959 into main Nov 18, 2026
1 check passed
@widrss
widrss deleted the fix/expire-stale-bounties-operator-key branch November 18, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant