Commit 0517275
authored
Keep retry dispatch fresh without leaking claims
#### Context
A retry performs a fresh by-id lookup, then dispatch revalidates before starting work. If that second read missed or went stale, the popped retry could stay claimed forever; bypassing it instead could dispatch stale work.
#### TL;DR
*Keep dispatch-time freshness and let retries release or reschedule from its outcome.*
#### Summary
- Preserve dispatch-time issue revalidation for retried work.
- Release the retry claim when the second refresh is missing or stale.
- Reschedule rather than drop the claim when dispatch-time refresh errors.
- Add a regression proving a missing second read cannot dispatch stale work or strand a claim.
#### Alternatives
- Reusing the first retry lookup was smaller but reopened a stale-dispatch window.
#### Test Plan
- [x] `HEX_HOME=/private/tmp/symphony-hex mise exec -- make -C elixir all`
- [x] `mise exec -- mix test test/symphony_elixir/core_test.exs:875`
- [x] `mise exec -- mix test test/symphony_elixir/core_test.exs`1 parent 7cf29df commit 0517275
2 files changed
Lines changed: 87 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
905 | 905 | | |
906 | 906 | | |
907 | 907 | | |
908 | | - | |
| 908 | + | |
909 | 909 | | |
910 | 910 | | |
911 | 911 | | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
912 | 925 | | |
913 | 926 | | |
914 | | - | |
| 927 | + | |
915 | 928 | | |
916 | 929 | | |
917 | 930 | | |
918 | 931 | | |
919 | | - | |
| 932 | + | |
920 | 933 | | |
921 | 934 | | |
922 | 935 | | |
923 | | - | |
| 936 | + | |
924 | 937 | | |
925 | 938 | | |
926 | 939 | | |
| |||
1169 | 1182 | | |
1170 | 1183 | | |
1171 | 1184 | | |
1172 | | - | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
1173 | 1207 | | |
1174 | 1208 | | |
1175 | 1209 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
953 | 953 | | |
954 | 954 | | |
955 | 955 | | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
956 | 1004 | | |
957 | 1005 | | |
958 | 1006 | | |
| |||
0 commit comments