gto show --plain truncates latest version values in global output table (breaks CLI parsing for multi-digit semver)
- Dominant language
- Python
- Stars
- 162
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
### Summary
`gto show --plain` appears to truncate `latest` version values in the global summary table when the value is wide (e.g. `v0.100.0` becomes `v0.100.`).
This causes downstream automation to pick an invalid version string if it parses the global `--plain` output.
### Environment
- GTO CLI installed via `pip install gto`
- Repo using GTO tags like `ml_agent@v0.100.0`
- Observed on Linux in CI (GitHub Actions) and locally
### What I observed
Given a real tag and registration:
- Git tag exists: `ml_agent@v0.100.0`
- Service-specific output is correct:
- `gto show ml_agent --plain` returns `v0.100.0`
- Global output is truncated:
- `gto show --plain` shows `ml_agent v0.100.` in `latest`
Example (global):
```text
name latest #production #staging
ml_agent v0.100. v0.98.1 v0.99.0
api v0.63.0 v0.62.0 v0.62.0
```
Example (service-specific):
```text
artifact version stage created_at ref
ml_agent v0.100.0 2026-03-18 22:33:04+00:00 ml_agent@v0.100.0
...
```
### Why this is a bug
`--plain` output is commonly used for machine parsing in CI scripts.
If the table truncates values, parsing `$2` yields an invalid version (`v0.100.`), which then fails deployment/image resolution.
### Expected behavior
One of the following:
1. `gto show --plain` should never truncate field values (machine-safe output), or
2. Provide a guaranteed machine-readable mode (e.g. JSON/CSV) for global and service-specific queries.
### Actual behavior
Global `gto show --plain` table truncates `latest` for wider values, while service-specific output does not.
### Minimal reproduction
1. Have artifact versions including at least one with a wider semver like `v0.100.0`.
2. Run:
- `gto show --plain`
- `gto show --plain`
3. Compare `latest` in global output vs version in service-specific output.
### Workaround
Use service-specific query only:
- `gto show --plain` and parse rows there,
- avoid parsing the global `gto show --plain` summary table.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.