Rules Hub
Code Ruleset
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
Do not await recovery when the response must use fallback
If cooldown or bounded recovery already guarantees an uncached response, start bounded coalesced recovery with handled errors and serve the fallback without waiting for unrelated work.
Bad example
| 1 | await rebuildLimitedSubset(); return fallback(); |
Explanation (EN)
If cooldown or bounded recovery already guarantees an uncached response, start bounded coalesced recovery with handled errors and serve the fallback without waiting for unrelated work.
Objašnjenje (HR)
If cooldown or bounded recovery already guarantees an uncached response, start bounded coalesced recovery with handled errors and serve the fallback without waiting for unrelated work.
Good example
| 1 | void rebuildLimitedSubset().catch(log); return fallback(); |
Explanation (EN)
Do not await recovery when the response must use fallback
Objašnjenje (HR)
Do not await recovery when the response must use fallback
Notes (EN)
If cooldown or bounded recovery already guarantees an uncached response, start bounded coalesced recovery with handled errors and serve the fallback without waiting for unrelated work.
Bilješke (HR)
Primijeniti pri promjenama cachea, fallbacka i obrade skupova podataka.
Exceptions / Tradeoffs (EN)
Background work needs lifecycle support, error handling and concurrency bounds; use a durable queue when in-process work cannot survive the required lifetime.
Iznimke / Tradeoffi (HR)
Background work needs lifecycle support, error handling and concurrency bounds; use a durable queue when in-process work cannot survive the required lifetime.