Repository navigation
refactor(deployments): remove unreachable try/catch in README parsing - #219
Merged
jackchuma merged 1 commit intoOct 30, 2026
Merged
Conversation
Co-authored-by: Toshi <toshi-noreply@coinbase.com> J-Engine-Session: toshi:48730781-0550-4f0a-b9b4-4e8202fae8a7
Collaborator
✅ Heimdall Review Status
|
jackchuma
marked this pull request as ready for review
October 30, 2026 00:51
xenoliss
approved these changes
Oct 30, 2026
jackchuma
deleted the
toshi/cleanup-deployments.ts-dead-try/catch-cf698742
branch
October 30, 2026 14:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed? Why?
Removes dead error handling in
src/lib/deployments.ts:extractDescriptionandparseExecutionStatuswrapped pure string operations (replace,match,split,trim,toUpperCase,includes) intry/catch. Their only input is the UTF-8 string fromfs.readFileSync(readmePath, 'utf-8'), so the catches (log +DEFAULT_DESCRIPTION/{}) could not run. Both blocks are removed.parseExecutionStatusreturned{ status?: TaskStatus }only to carry an optional value. It now returnsTaskStatus | undefined, and its single caller ingetUpgradeOptionreads it directly.try/catcharoundreadFileSyncingetUpgradeOptionstays, since filesystem reads can throw.Interfaces removed: none.
parseExecutionStatusandextractDescriptionare module-private;grep -rnw parseExecutionStatusfinds one caller. The returnedUpgradeobjects are identical for every input, includingstatus: undefinedwhen no status line exists.Notes to reviewers
Parsing rules, regexes, and output are unchanged; the diff is mostly re-indentation. The catches date to the initial commit and the later refactor (#89); neither marks them for future work.
How has it been tested?
DEFAULT_DESCRIPTIONfallback when a README has no descriptive text (previously unpinned). Existing tests already pin all four status outcomes; their assertions are unchanged.npx tsc --noEmit,npm test(155 passed),npm run lint, andprettier --checkon changed files pass.Why this cleanup
src/lib/deployments.ts): +34 / -44, net -10 (mostly re-indentation). Tests: +10 / -0.warnand the other witherror, or whyparseExecutionStatusreturns an object holding one optional field (left over from when it also parsed execution links, removed in chore: refactor deployments.ts #89).