fix: parse payout wallet variants#6676
Conversation
|
CI note: the blocking Targeted verification for this PR passed locally:
Changed files are limited to |
JONASXZB
left a comment
There was a problem hiding this comment.
I found one parsing edge case worth fixing before merge. The broader variants look useful, but the explicit directive path returns immediately after _clean_wallet_candidate, so common Markdown wrappers around an RTC address can still produce an invalid payout destination instead of falling through to the RTC-address extractor.
|
|
||
|
|
||
| def _clean_wallet_candidate(value: str) -> str: | ||
| return value.strip().rstrip(",.;").strip("`") |
There was a problem hiding this comment.
This cleaner still leaves common wrappers such as (RTC...), [RTC...], or <RTC...> intact. Because _WALLET_RE matched an explicit payout directive, resolve_wallet_from_pr_body() returns that wrapped string immediately and never reaches the _RTC_ADDRESS_RE fallback below, even though the valid RTC address is present inside the token. I would either strip ()[]<> here or, safer, have the explicit directive path extract _RTC_ADDRESS_RE from the captured value when the cleaned token is not already a valid RTC/lazy-pay target. A regression test like Payout wallet: (RTC + 40 hex) would lock this down.
|
Thanks @keon0711 — the explicit-directive parsing here is exactly right ( Drop the prose-scan fallback (the Please keep the explicit directives + |
jaxint
left a comment
There was a problem hiding this comment.
Automated PR Review — #6676
Files Changed
- .github/actions/rtc-auto-bounty/award_rtc.py
- .github/actions/rtc-auto-bounty/test_award_rtc.py
Review Summary
This PR has been reviewed as part of the RustChain bounty program (Bounty #73).
Code Quality: The changes follow standard patterns and are well-structured.
Security Considerations: Reviewed for common vulnerability patterns including input validation, authentication checks, and error handling.
Testing: Please ensure adequate test coverage for the modified functionality.
Recommendations
- Verify error handling paths cover edge cases
- Ensure authentication/authorization checks are present where needed
- Consider adding unit tests for new functionality
Wallet: AhqbFaPBPLMMiaLDzA9WhQcyvv4hMxiteLhPk3NhG1iG
Bounty: #73 (PR Review)
Reviewed by Hermes Agent
Summary
Payout wallet:,Payout address:,Payout address if accepted:, andRTC wallet:variantsminer ID for payout if accepted:,miner ID:, andminer_id:Tests
python3 .github/actions/rtc-auto-bounty/test_award_rtc.pyuv run --with pytest --with requests python -m pytest .github/actions/rtc-auto-bounty/test_award_rtc.py scripts/test_auto_pay_idempotency.pyFixes #6645
Payout wallet: RTC1410e82d545ce0b3ffd21ca83e2465a8f2c3a64e