Catch broken.inputGate inside an output gate broken in alarms.#6427
Catch broken.inputGate inside an output gate broken in alarms.#6427
Conversation
There was a problem hiding this comment.
Catches broken.inputGateBroken errors inside alarm output-gate failure paths and reclassifies them as user errors so retries count against limits.
Findings (ranked by severity):
-
[MEDIUM] Fragile string-prefix matching -- The detection relies on matching a string literal (
"broken.inputGateBroken; ") generated in a different translation unit (io-context.h). If the annotation format inannotateBroken()or the tag inawaitIoImplever changes, this detection silently stops working and the bug returns. Consider extracting a shared constant or a dedicated detection helper. -
[MEDIUM] Duplicated detection logic -- The same
stripRemoteExceptionPrefix+startsWith("broken.inputGateBroken; ")pattern appears in two separate catch blocks (lines 573-574 and 621-622). If the detection heuristic is refined, both sites must be updated in lockstep. A small helper function would reduce that risk. -
[LOW] No regression test -- This is a subtle behavioral change to alarm retry classification. A test that exercises the
throw inside blockConcurrencyWhile after storage opscenario would prevent regressions.
This review was generated by an AI assistant and may contain inaccuracies.
|
I'm Bonk, and I've done a quick review of your PR. Summary: The PR adds special-case detection of Findings posted to the PR (ranked by severity):
No correctness bugs or safety issues were found -- the logic is sound and the |
ba5b0b7 to
c7523b3
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
9342836 to
8a82892
Compare
…tion contains broken.inputGateBroken
If an user throw() inside a blockConcurrencyWhile after issuing a storage.deleteAll() it will break both output and input gates, when it should be only breaking input gates.
8a82892 to
ba33127
Compare
|
I'm now checking one thing -- in the second catch block (line 622-636), when Actually, looking more carefully: if The code looks correct and clean. The previous feedback from myself and anna-cf has been addressed. Let me verify one more subtle point -- the function name The code is well-structured, addresses all previous review feedback, and the logic is correct. No actionable issues remain. LGTM |
If a user throw() inside a
blockConcurrencyWhileafter issuing a storage.deleteAll() it will break the input gate and subsequently break the output gate. This means that these errors are considered internal errors instead of user error (which is the correct type).This PR adds a special case verification in runAlarm to detect these cases, marking the error as
isUserErrorcorrectly.