Skip to content

Commit b562ba1

Browse files
feat(launcher-standard): require --version mode with machine-greppable format (#173)
## Summary The launcher-standard requires `--help` but not `--version`, so launchers had no obligation to emit a version string. Result: field bug reports consistently lack a build identity ("it's broken on my machine" with no SHA, no way to bisect, no way to tell two builds apart). This adds `--version` (and the alias `-V`) to the required meta-modes. The first line of output MUST follow a machine-greppable format: \`\`\` {app-name} {version} ({build-sha-short}) [{platform}] \`\`\` Example: `aerie-launcher 0.4.2 (a1b2c3d) [linux-x86_64]` Additional lines (build date, runtime versions, dep summary) MAY follow. Exit code MUST be 0 on success. ## Changes - **`launcher/launcher-standard.a2ml`**: added `--version` to `[required-modes].meta`; added new `[version-output]` table specifying the first-line format, an example, exit code, and machine-greppable flag. - **`docs/UX-standards/launcher-standard.adoc`**: added a row to the §Required Modes table describing `--version` / `-V`, the format, and the rationale. Both files updated in the same commit per the §Sync requirement and the lock-step CI gate (PR #172) — this PR is a good first live test of that gate. ## Test plan - [x] a2ml parses (python tomllib): `meta = ['--help', '--version']`, `[version-output]` round-trips with all four fields intact. - [x] AsciiDoc table renders (visual — added one row, no structural changes). - [ ] Lock-step gate (#172) goes green on this PR's first push (both files in diff). ## Coordination - Independent of #170, #171, #172. The lock-step gate runs on every PR touching either of the two group files, so this PR will be one of the first live exercises of that gate once #172 lands. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f67d6d5 commit b562ba1

2 files changed

Lines changed: 22 additions & 1 deletion

File tree

docs/UX-standards/launcher-standard.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@ fi
170170
| `--help` / `-h`
171171
| Print usage text, including a description of every mode, the files the
172172
launcher reads/writes, and the detected platform.
173+
174+
| `--version` / `-V`
175+
| Print the launcher's version on a single machine-greppable first line,
176+
then exit 0. Format: `<app-name> <version> (<build-sha-short>) [<platform>]`
177+
(e.g. `aerie-launcher 0.4.2 (a1b2c3d) [linux-x86_64]`). Additional lines
178+
(build date, runtime versions) MAY follow. Required so field bug reports
179+
can quote a specific build — a launcher without `--version` produces
180+
unactionable issues.
173181
|===
174182

175183
NOTE: `--integ` and `--disinteg` replace the earlier pattern of separate

launcher/launcher-standard.a2ml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,20 @@ final-shell = "bash -l at REPO_DIR (never 'press enter to close')"
4646
# These are the modes every compliant launcher MUST implement.
4747
runtime = ["--start", "--stop", "--status", "--auto", "--browser"]
4848
integration = ["--integ", "--disinteg"]
49-
meta = ["--help"]
49+
meta = ["--help", "--version"]
50+
51+
[version-output]
52+
# Required format for the `--version` mode. The first line MUST be
53+
# machine-greppable so field bug reports can quote it verbatim. Optional
54+
# additional lines (build SHA, build date, libc / runtime versions) MAY
55+
# follow on subsequent lines.
56+
#
57+
# Rationale: a launcher with no --version produces unactionable bug
58+
# reports — "it's broken on my machine" with no way to tell which build.
59+
first-line-format = "{app-name} {version} ({build-sha-short}) [{platform}]"
60+
example = "aerie-launcher 0.4.2 (a1b2c3d) [linux-x86_64]"
61+
exit-code = 0
62+
machine-greppable = true
5063

5164
[optional-modes]
5265
# Modes launchers MAY implement for extra functionality.

0 commit comments

Comments
 (0)