Summary
Dead or misleading code in @caatinga/core:
- Unused facade —
stellar-cli/stellar-cli-output-parser.ts is only imported by its own test; all production callers import parse-contract-id/parse-wasm-hash/version directly, so the promised "single contract surface for output-format changes" is not actually used.
- Below-min probe underreports —
probe-stellar-cli-features.ts:26-28 returns only ["contract-invoke-sign"] for version < STELLAR_CLI_MIN_VERSION, ignoring contract-build and contract-deploy.
- Dead branch —
bindings/patch-generated-binding-package.ts:226-236: ensureRootBindingIndex returns without writing in both the "matches" and "differs" cases; only the catch (file absent) writes, making the two branches indistinguishable.
- Dead
__filename branch — src/version.ts:3-5: __filename is never defined in ESM, so the ternary always uses import.meta.url; the declare const is noise.
Why it matters
Dead branches and an unused facade give false confidence about behavior and output-parsing coverage.
Suggested fix
- Either migrate callers to the facade and export it from
index.ts, or delete it
- Return all
STELLAR_CLI_REQUIRED_FEATURES when below min
- Collapse
ensureRootBindingIndex to try { readFile; return } catch { writeFile }
- Drop the
__filename handling in version.ts
Priority: Low | Release impact: Patch | Breaking: No
Summary
Dead or misleading code in
@caatinga/core:stellar-cli/stellar-cli-output-parser.tsis only imported by its own test; all production callers importparse-contract-id/parse-wasm-hash/versiondirectly, so the promised "single contract surface for output-format changes" is not actually used.probe-stellar-cli-features.ts:26-28returns only["contract-invoke-sign"]forversion < STELLAR_CLI_MIN_VERSION, ignoringcontract-buildandcontract-deploy.bindings/patch-generated-binding-package.ts:226-236:ensureRootBindingIndexreturns without writing in both the "matches" and "differs" cases; only the catch (file absent) writes, making the two branches indistinguishable.__filenamebranch —src/version.ts:3-5:__filenameis never defined in ESM, so the ternary always usesimport.meta.url; thedeclare constis noise.Why it matters
Dead branches and an unused facade give false confidence about behavior and output-parsing coverage.
Suggested fix
index.ts, or delete itSTELLAR_CLI_REQUIRED_FEATURESwhen below minensureRootBindingIndextotry { readFile; return } catch { writeFile }__filenamehandling inversion.tsPriority: Low | Release impact: Patch | Breaking: No