Skip to content

feat(miner-packaging): add version/compatibility check on gittensory-miner startup #2331

Description

@JSONbored

Add a startup compatibility check to the gittensory-miner CLI mirroring the existing gittensory-mcp package's upgrade-nudge pattern (checking the npm registry for a newer published version and printing an upgrade command if the installed version is stale), so a fleet of miner instances doesn't silently drift onto incompatible shared-engine versions once @jsonbored/gittensory-engine is published. Pure CLI/packaging concern; does not implement the shared engine package itself (that's tracked separately).

Deliverables

  • On any gittensory-miner invocation, a non-blocking async check against the npm registry (GITTENSORY_NPM_REGISTRY_URL override, same env var name convention as the mcp package) for a newer published @jsonbored/gittensory-miner version.
  • If stale, print a one-line upgrade nudge (npm install -g @jsonbored/gittensory-miner@latest) without blocking or failing the current command.
  • Respect a --no-update-check/GITTENSORY_MINER_NO_UPDATE_CHECK=1 opt-out for offline/air-gapped fleet operators.
  • Network failures during the check (offline machine) must be silently swallowed — never crash the CLI because the registry was unreachable.
  • Unit tests: stale version prints the nudge; current version prints nothing; a simulated network failure does not throw or block command execution; the opt-out env var/flag suppresses the check entirely.

References

  • packages/gittensory-mcp/bin/gittensory-mcp.js lines 13-17 — the existing packageVersion/npmRegistryUrl/upgradeCommand pattern to mirror exactly.
  • packages/gittensory-miner/ package (this extends its CLI, scaffolded in the packaging-skeleton issue).

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions