Summary
metrics trends reads from/to through globally-colliding Viper keys, so provided flags may be dropped and sent as empty strings.
Repro
eightctl metrics trends --from 2026-02-20 --to 2026-02-21 -v
Actual
Request can be emitted with:
Additionally, current app-api now requires tz, so missing timezone can trigger:
{ "error": "\"tz\" is required" }
Expected
CLI should:
- Preserve provided
--from/--to values.
- Include
tz consistently (e.g., from configured timezone or local timezone).
Suggested Fix
- Read
from/to directly from cmd.Flags().GetString(...) for this command.
- Stop binding shared
from/to keys globally via Viper for unrelated commands.
- Add
tz query parameter when calling trends endpoint.
I have implemented and use this fix on a local fork, feel free to reference my implementation diff: https://gist.github.com/0xble/3c658a06df85667034038d1177559d8c
Environment
- macOS (Apple Silicon)
eightctl 0.1.0-dev
Summary
metrics trendsreadsfrom/tothrough globally-colliding Viper keys, so provided flags may be dropped and sent as empty strings.Repro
Actual
Request can be emitted with:
Additionally, current app-api now requires
tz, so missing timezone can trigger:{ "error": "\"tz\" is required" }Expected
CLI should:
--from/--tovalues.tzconsistently (e.g., from configured timezone or local timezone).Suggested Fix
from/todirectly fromcmd.Flags().GetString(...)for this command.from/tokeys globally via Viper for unrelated commands.tzquery parameter when calling trends endpoint.I have implemented and use this fix on a local fork, feel free to reference my implementation diff: https://gist.github.com/0xble/3c658a06df85667034038d1177559d8c
Environment
eightctl 0.1.0-dev