Skip to content

core: hygiene — stderr warnings bypass logger, undefined! assertion, history metadata dropped, PATH precedence, sequential binding generation #159

Description

@Dione-b

Summary

Miscellaneous robustness/hygiene issues in @caatinga/core:

  1. Warnings bypass the loggercheck-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.
  2. Non-null assertionrun-post-deploy.ts:188 uses let result = undefined!, which a future refactor can turn into a TypeError instead of a compile error.
  3. History drops provenanceupdate-artifact.ts:26-36 records superseded entries without metadata, and restoreArtifactFromHistory (lines 111-129) restores without git/rustc provenance.
  4. PATH precedenceresolve-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.
  5. Sequential generatesgenerate-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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programenhancementNew feature or requestpriority: lowLow priority fix - tech debt or minor consistency

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions