Skip to content

feat(compat): adopt quantcli/common/compat/formats as second consumer#48

Merged
DTTerastar merged 1 commit into
mainfrom
feat/compat-formats
May 19, 2026
Merged

feat(compat): adopt quantcli/common/compat/formats as second consumer#48
DTTerastar merged 1 commit into
mainfrom
feat/compat-formats

Conversation

@Terastar-Paperclip
Copy link
Copy Markdown
Contributor

Summary

Onboards liftoff-export-cli as the second machine-attested consumer of quantcli/common/compat, mirroring the crono pattern. Closes the liftoff side of QUA-16.

What

  • compat_contract_test.go (build tag compat) — runs compat/formats.RunContract against the built binary via LIFTOFF_EXPORT_BIN.
  • .github/workflows/ci.yml — adds two jobs:
    • go vet + test (parity with crono's default job).
    • compat (CONTRACT machine-attestation) — builds the binary, runs go mod tidy, then go test -tags=compat -run TestContractFormats ./....
  • go.mod — pins github.com/quantcli/common/compat v0.0.0-…-de9219e03369 (merged-main pseudo-version, post-QUA-15 + nested-subcommand + SkipDataPath).

Surface

Subcommands targeted (the four --format-bearing leaves without a required positional):

  • workouts list
  • workouts stats
  • bodyweights list
  • bodyweights stats

workouts show is intentionally excluded because its required <date> positional would surface "missing arg" rather than format-flag failure in UnknownFormatFails.

Runner config

  • SupportedFormats: [markdown, json] — CSV is not yet wired, so CSVHasHeader skips with a named reason.
  • SkipDataPath: true — liftoff's data path requires a stored OAuth token at ~/.config/liftoff-export/auth.json which CI does not provision; the parse-level subtests (HelpDocumentsFormatFlag, UnknownFormatFails, FlagValidationIsHermetic) still attest §4.

Local verification

$ go build -o /tmp/liftoff-export .
$ LIFTOFF_EXPORT_BIN=/tmp/liftoff-export go test -tags=compat -run TestContractFormats ./...
ok  github.com/quantcli/liftoff-export-cli  0.031s

All four subcommand groups: 3 parse-level subtests PASS, 3 data-path subtests SKIP (SkipDataPath).

Test plan

  • go vet + test CI job green.
  • compat (CONTRACT machine-attestation) CI job green.
  • Drift later (e.g. removing --format from a leaf) surfaces as a named subtest failure.

🤖 Generated with Claude Code

Wires liftoff-export-cli into the cross-CLI compat suite for §4
(--format) of CONTRACT.md, mirroring crono's machine-attestation
pattern.

- compat_contract_test.go (build tag: compat) runs
  compat/formats.RunContract against the built binary via
  LIFTOFF_EXPORT_BIN.
- New CI job builds the binary, runs `go mod tidy`, then
  `go test -tags=compat -run TestContractFormats ./...`.
- Existing `go vet + test` job kept untouched.
- Subcommands list targets the four data-producing leaves that take
  --format without a required positional: `workouts list`,
  `workouts stats`, `bodyweights list`, `bodyweights stats`. Excludes
  `workouts show` because its mandatory <date> positional would
  conflate "missing arg" with "bad format" in parse-level subtests.
- SkipDataPath: true — liftoff's data path needs a stored OAuth
  token at ~/.config/liftoff-export/auth.json which CI does not
  provision; parse-level subtests still attest the §4 surface.
- SupportedFormats: [markdown, json] — CSV is not yet wired, so
  CSVHasHeader skips with a named reason rather than failing.
- go.mod pinned to merged-main pseudo-version v0.0.0-…-de9219e03369
  (PR #12 nested-subcommand support + PR #14 SkipDataPath).

Closes liftoff side of [QUA-16](/QUA/issues/QUA-16). Follows the
crono pattern landed in [QUA-14](/QUA/issues/QUA-14).

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@DTTerastar DTTerastar merged commit bba718d into main May 19, 2026
3 checks passed
@DTTerastar DTTerastar deleted the feat/compat-formats branch May 19, 2026 11:39
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.

3 participants