feat(compat): adopt quantcli/common/compat/formats as second consumer#48
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 tagcompat) — runscompat/formats.RunContractagainst the built binary viaLIFTOFF_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, runsgo mod tidy, thengo test -tags=compat -run TestContractFormats ./....go.mod— pinsgithub.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 listworkouts statsbodyweights listbodyweights statsworkouts showis intentionally excluded because its required<date>positional would surface "missing arg" rather than format-flag failure inUnknownFormatFails.Runner config
SupportedFormats: [markdown, json]— CSV is not yet wired, soCSVHasHeaderskips with a named reason.SkipDataPath: true— liftoff's data path requires a stored OAuth token at~/.config/liftoff-export/auth.jsonwhich CI does not provision; the parse-level subtests (HelpDocumentsFormatFlag,UnknownFormatFails,FlagValidationIsHermetic) still attest §4.Local verification
All four subcommand groups: 3 parse-level subtests PASS, 3 data-path subtests SKIP (
SkipDataPath).Test plan
go vet + testCI job green.compat (CONTRACT machine-attestation)CI job green.--formatfrom a leaf) surfaces as a named subtest failure.🤖 Generated with Claude Code