Summary
Miscellaneous robustness/hygiene issues in @caatinga/core:
- Warnings bypass the logger —
check-stellar-cli-version.ts:64-70 and check-stellar-sdk-version.ts:74-80 write directly to process.stderr via defaultEmitWarning with no injection point; library consumers and browser builds get unrequested stderr output.
- Non-null assertion —
run-post-deploy.ts:188 uses let result = undefined!, which a future refactor can turn into a TypeError instead of a compile error.
- History drops provenance —
update-artifact.ts:26-36 records superseded entries without metadata, and restoreArtifactFromHistory (lines 111-129) restores without git/rustc provenance.
- PATH precedence —
resolve-subprocess-env.ts:40-50 prepends an external stellar dir before the toolchain dir, so the effective stellar used can silently differ from the one the version check validated.
- Sequential generates —
generate-bindings-graph.ts:41-50 awaits generateBindings in a for loop, each spawning npx + SDK work, when the outputs are independent.
Why it matters
These are small but real: unverifiable PATH resolution, N× wall time for multi-contract generates, lost provenance on rollback, and untyped errors.
Suggested fix
- Accept an optional
onWarning logger (default no-op when absent)
- Restructure the post-deploy loop so
result is assigned via return/throw
- Carry
existing.metadata into history entries and restored artifacts
- Document/pin PATH precedence with a test
Promise.all the independent generates
Priority: Low | Release impact: Patch | Breaking: No
Summary
Miscellaneous robustness/hygiene issues in
@caatinga/core:check-stellar-cli-version.ts:64-70andcheck-stellar-sdk-version.ts:74-80write directly toprocess.stderrviadefaultEmitWarningwith no injection point; library consumers and browser builds get unrequested stderr output.run-post-deploy.ts:188useslet result = undefined!, which a future refactor can turn into aTypeErrorinstead of a compile error.update-artifact.ts:26-36records superseded entries withoutmetadata, andrestoreArtifactFromHistory(lines 111-129) restores without git/rustc provenance.resolve-subprocess-env.ts:40-50prepends an externalstellardir before the toolchain dir, so the effectivestellarused can silently differ from the one the version check validated.generate-bindings-graph.ts:41-50awaitsgenerateBindingsin aforloop, each spawningnpx+ SDK work, when the outputs are independent.Why it matters
These are small but real: unverifiable PATH resolution, N× wall time for multi-contract generates, lost provenance on rollback, and untyped errors.
Suggested fix
onWarninglogger (default no-op when absent)resultis assigned via return/throwexisting.metadatainto history entries and restored artifactsPromise.allthe independent generatesPriority: Low | Release impact: Patch | Breaking: No