Skip to content

feat(health): expose app version in health response (#624) - #764

Open
benedictworks-home wants to merge 1 commit into
Core-Foundry:mainfrom
benedictworks-home:fix/624-include-application-version-in-health-response
Open

feat(health): expose app version in health response (#624)#764
benedictworks-home wants to merge 1 commit into
Core-Foundry:mainfrom
benedictworks-home:fix/624-include-application-version-in-health-response

Conversation

@benedictworks-home

Copy link
Copy Markdown
Contributor
  • Add listener/src/utils/app-version.ts with getAppVersion() and APP_VERSION
  • Version is read from listener/package.json at module load time (zero I/O at runtime)
  • Walk up directory tree so it works from both src/ (ts-node) and dist/ (compiled)
  • Falls back to 'unknown' if package.json is missing or unreadable
  • Add 'version' field to HealthResponse interface in events-server.ts
  • buildHealthResponse() now includes version: APP_VERSION in every response
  • Add 8 unit tests in app-version.test.ts covering happy path and all failure modes
  • Update events-server.health.test.ts to assert version field is present
  • Update jest.config.js: warnOnly diagnostics to allow pre-existing TS errors to be suppressed as warnings rather than hard test failures

Closes #624

Overview

Related Issue

Closes #

Changes

Verification

# e.g.
cd dashboard && npm test
cd listener && npm run typecheck && npm test
cd contract/contracts/hello-world && cargo test

How to Test

Checklist

  • Branch is up to date with main
  • Tests added/updated and all pass locally
  • cargo fmt --all run (if Rust changes)
  • npm run lint passes (if TypeScript changes)
  • Documentation updated if behavior changed

- Add listener/src/utils/app-version.ts with getAppVersion() and APP_VERSION
- Version is read from listener/package.json at module load time (zero I/O at runtime)
- Walk up directory tree so it works from both src/ (ts-node) and dist/ (compiled)
- Falls back to 'unknown' if package.json is missing or unreadable
- Add 'version' field to HealthResponse interface in events-server.ts
- buildHealthResponse() now includes version: APP_VERSION in every response
- Add 8 unit tests in app-version.test.ts covering happy path and all failure modes
- Update events-server.health.test.ts to assert version field is present
- Update jest.config.js: warnOnly diagnostics to allow pre-existing TS errors
  to be suppressed as warnings rather than hard test failures

Closes Core-Foundry#624
@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@benedictworks-home Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include Application Version in Health Response

1 participant