Skip to content

feat: add fleet metadata to health endpoints - #246

Merged
rvegajr merged 1 commit into
developfrom
cursor/health-fleet-metadata-3702
Oct 7, 2026
Merged

rvegajr merged 1 commit into
developfrom
cursor/health-fleet-metadata-3702

Conversation

@rvegajr

@rvegajr rvegajr commented Oct 4, 2026

Copy link
Copy Markdown
Member

Adds cloud-agents fleet contract fields to health responses so operators can see which service, commit, and environment is running without changing existing health semantics.

API (GET /health on the Express app):

  • Keeps status, timestamp, checks, email, and 200/503 behavior
  • Adds ok, service: fieldview-api, commit, env, utc via apps/api/src/lib/health-fleet.ts

Web (GET /api/health):

  • New App Router route returning ok: true, service: fieldview-web, plus the same commit / env / utc resolution (fixes Docker HEALTHCHECK and production 404 HTML)

Tests:

  • Unit tests for resolveHealthCommit() (Railway SHA when set, unknown when unset) in API and web
  • API integration test asserts new fleet fields on /health

Commit resolution: RAILWAY_GIT_COMMIT_SHA → VERCEL_GIT_COMMIT_SHA → GIT_COMMIT → "unknown"
Env resolution: APP_ENV → RAILWAY_ENVIRONMENT_NAME → "dev"

Open in Web Open in Cursor 

Co-authored-by: Ricardo Vega <github@noctusoft.com>
@rvegajr
rvegajr marked this pull request as ready for review October 4, 2026 15:00
@rvegajr
rvegajr merged commit 720de26 into develop Oct 7, 2026
3 checks passed
rvegajr added a commit that referenced this pull request Oct 11, 2026
Promote develop to release (uat): public home page + operator line (#247, #249), health fleet metadata (#246)
rvegajr added a commit that referenced this pull request Oct 11, 2026
Promote develop to production: public home page + operator line (#247, #249), health fleet metadata (#246)
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.

2 participants