Summary
runTick wraps each maintainContract call in a try/catch so that one contract's failure is
logged and the loop continues. This is the property that keeps a keeper maintaining twenty contracts
when the first one is broken, and nothing tests it.
It is also the property most likely to be destroyed by a well-meaning refactor. Moving the try/catch
outward, or letting an await escape it, turns one bad contract into a daemon that stops working
and gives no clear sign why.
Acceptance Criteria
Tech Stack
TypeScript 5.7 on Node 22+ (CI runs 22 and 24), ESM with moduleResolution: "NodeNext" — relative
imports need the .js extension. @stellar/stellar-sdk is pinned to an exact version; verify RPC
API shape against the installed copy, not against documentation. Tests are Vitest under test/ and
run without a network. npm run format:check, npm run lint, npm run build and npm test must
all be clean.
Summary
runTickwraps eachmaintainContractcall in a try/catch so that one contract's failure islogged and the loop continues. This is the property that keeps a keeper maintaining twenty contracts
when the first one is broken, and nothing tests it.
It is also the property most likely to be destroyed by a well-meaning refactor. Moving the try/catch
outward, or letting an
awaitescape it, turns one bad contract into a daemon that stops workingand gives no clear sign why.
Acceptance Criteria
contract was still maintained.
handling differs at the ends.
and logs
contractsMaintainedandcontractsRemaining.Tech Stack
TypeScript 5.7 on Node 22+ (CI runs 22 and 24), ESM with
moduleResolution: "NodeNext"— relativeimports need the
.jsextension.@stellar/stellar-sdkis pinned to an exact version; verify RPCAPI shape against the installed copy, not against documentation. Tests are Vitest under
test/andrun without a network.
npm run format:check,npm run lint,npm run buildandnpm testmustall be clean.