Skip to content

Check the version before trusting a diagnosis

Print the version every other surface derives from, and see the argument it refuses.

described Getting started and adoptionbasicoperatorcontributorread-only

Situation

A diagnosis from one machine is compared with a repository on another, and nobody knows whether the two ran the same tool.

Scenario

setup: bare
given:
  - 'an empty repository; nothing installed'
steps:
  - id: print
    run: ['version']
    note: 'the one string the projections, the ledger and the site derive their version from'
    expect:
      exit: 0
      stdout_contains: ['^majordomus [0-9]+\.[0-9]+\.[0-9]+$']
  - id: refuse
    run: ['version', '--no-such-option']
    note: 'an argument the command does not know is a usage error, never ignored'
    expect:
      exit: 2
      stdout_contains: ['unknown option --no-such-option']
then:
  - 'the version needs no repository and no installation'
  - 'a usage error exits 2, as the exit-code contract says'

Outcome

version prints the version and nothing else, from anywhere, and refuses an argument it does not understand rather than pretending it did.

No scenario yet

This use case is described, not proved: it names its commands and rules, and nothing executes it. It cannot be more than described until a scenario is added.

Why the tool knows this

The chain from this page to the code: the use case names commands, rules and claims; each rule is dispatched from the registry and each claim names the test that proves it; the scenario above executed the commands. Nothing in this chain is prose about intent.

Guarantees exercised

Related use cases

Computed from what they share: claims, rules, commands, category, applications. Nobody maintains this list.

The moments this answers