Skip to content

Send x-build-version header (arkd version compat, PR #960) #380

@arkanaai

Description

@arkanaai

Background

arkd #960 (merged 2026-03-25) adds a new version compatibility check via a build version header:

  • gRPC: x-build-version metadata key
  • REST: X-Build-Version HTTP header
  • Format: semver string, e.g. 1.0.0 or v1.0.0
  • Enforcement: only major version is compared; missing/malformed headers are silently allowed through (opt-in today)

When the server enforces a minimum major version, clients sending an older major will receive error BUILD_VERSION_TOO_OLD (error code 48).

Required Changes

This SDK needs to send x-build-version (gRPC) / X-Build-Version (REST) on every request, populated with its own build/package version.

Tasks

  • Determine the correct version source (package.json version, module version, build ldflags, etc.)
  • Inject x-build-version into gRPC client metadata on every call
  • Inject X-Build-Version into REST HTTP headers on every request
  • Handle BUILD_VERSION_TOO_OLD error code (48) with a clear user-facing error message
  • Add tests verifying the header is sent

Reference

  • arkd PR: version in header arkd#960
  • Version compat doc: added in arkd at docs/version-compat.md
  • Error code 48 = BUILD_VERSION_TOO_OLD, gRPC status FAILED_PRECONDITION (code 9)

Notes

No header = server allows through (backwards compatible for now). But this should be implemented before any major version bump on arkd enforces it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions