Commit 54d36ac
fix(news): add duplicate-guard to classifyRetryableError, fix log level and dead code
- Add "already exists|duplicate" guard in classifyRetryableError so a 409
response indicating a duplicate signal short-circuits before the
NONCE_CONFLICT branch, preventing costly re-payment retries (mirrors the
same guard already present in inbox.tools.ts)
- Change console.error() to console.warn() for retry progress/info logs in
news_file_signal — these are informational, not errors
- Annotate the unreachable post-loop throw as dead code (the loop always
exits via return on success or throw on the final failed attempt)
- Add createFungiblePostCondition to test-news-file-signal.ts to enforce
the exact sBTC transfer amount as a post-condition
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 40fd948 commit 54d36ac
2 files changed
Lines changed: 22 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
160 | 169 | | |
161 | 170 | | |
162 | 171 | | |
| |||
719 | 728 | | |
720 | 729 | | |
721 | 730 | | |
722 | | - | |
| 731 | + | |
723 | 732 | | |
724 | 733 | | |
725 | 734 | | |
| |||
803 | 812 | | |
804 | 813 | | |
805 | 814 | | |
806 | | - | |
| 815 | + | |
807 | 816 | | |
808 | 817 | | |
809 | 818 | | |
| |||
824 | 833 | | |
825 | 834 | | |
826 | 835 | | |
| 836 | + | |
| 837 | + | |
827 | 838 | | |
828 | 839 | | |
829 | 840 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
180 | 181 | | |
181 | 182 | | |
182 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
183 | 191 | | |
184 | 192 | | |
185 | 193 | | |
| |||
192 | 200 | | |
193 | 201 | | |
194 | 202 | | |
| 203 | + | |
195 | 204 | | |
196 | 205 | | |
197 | 206 | | |
| |||
0 commit comments