You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mcli checksum verify successfully verifies objects in a terminal, but the same command under a pipe or stdout redirect exits 0 with no stdout. Even an explicit --json produces a zero-byte file. --report still works, so CI can only recover results through a secondary file.
Reproducer observed against a real local S3 server:
mcli --json checksum verify --fail-on none ALIAS/BUCKET/OBJECT > results.jsonlecho $? # 0wc -c results.jsonl # 0 before the fix
Root cause
cmd/main.go automatically sets globalQuiet=true when stdout has no terminal size. That behavior was introduced to disable progress UI outside a terminal. checksum verify reused globalQuiet to gate semantic object records and the final summary, conflating non-interactive progress suppression with an explicit user request for silence.
The nested CLI flag sets add two compatibility constraints:
GlobalBool stops at the nearest ancestor flag set, so a leaf-only lookup misses app-level flags;
repeated Before: setGlobalsFromContext hooks can reset globalJSONLine after an app-level --json.
Required contract
Unless --quiet, -q, or MC_QUIET=true is explicitly requested, every object result and the final summary are written to stdout in both TTY and non-TTY execution.
Non-TTY --json is compact JSON Lines at app, parent, and leaf flag positions.
TTY human and JSON presentation remain unchanged.
--report remains an independent JSON Lines output and still works under explicit quiet.
--fail-on exit semantics and report-write failure handling remain unchanged.
Non-TTY pipe, regular-file redirect, JSON, quiet, report, MISMATCH, and UNKNOWN paths have subprocess-level coverage.
Local implementation
Base command: dac3f07b feat: add read-only object checksum verification
Output fix: 26af1a96 fix: preserve checksum output in pipelines
The fix walks the full cli.Context parent chain for explicit quiet/json flags and restores compact JSONL only inside the checksum action. It does not change global quiet semantics or re-enable progress bars for other commands.
Local evidence includes real-S3 TTY/non-TTY before/after probes, report-write failure, MISMATCH/UNKNOWN exit status, focused and full unit/race, vet, lint, branding, credits, module checks, nine-target crosscompile, and clean VCS provenance. The commits are not yet pushed, so these hashes will not resolve on GitHub until the follow-up PR is published.
Documentation and close criteria
Record the stdout/quiet/JSONL/report decision in docs/checksum-verify.md.
Add bilingual public checksum-audit documentation or release-note coverage in pgsty/silo.pgsty.com.
Push a focused branch/PR referencing this issue.
Require DCO, Go, Crosscompile, VulnCheck, and Test Release Pipeline to pass.
Merge and verify the same checks on remote main.
Close this issue after code and design documentation are merged and remote main CI is green. Tagging, package publication, Server image pinning, and public deployment remain separate release gates.
Problem
mcli checksum verifysuccessfully verifies objects in a terminal, but the same command under a pipe or stdout redirect exits 0 with no stdout. Even an explicit--jsonproduces a zero-byte file.--reportstill works, so CI can only recover results through a secondary file.Reproducer observed against a real local S3 server:
Root cause
cmd/main.goautomatically setsglobalQuiet=truewhen stdout has no terminal size. That behavior was introduced to disable progress UI outside a terminal.checksum verifyreusedglobalQuietto gate semantic object records and the final summary, conflating non-interactive progress suppression with an explicit user request for silence.The nested CLI flag sets add two compatibility constraints:
GlobalBoolstops at the nearest ancestor flag set, so a leaf-only lookup misses app-level flags;Before: setGlobalsFromContexthooks can resetglobalJSONLineafter an app-level--json.Required contract
--quiet,-q, orMC_QUIET=trueis explicitly requested, every object result and the final summary are written to stdout in both TTY and non-TTY execution.--jsonis compact JSON Lines at app, parent, and leaf flag positions.--reportremains an independent JSON Lines output and still works under explicit quiet.--fail-onexit semantics and report-write failure handling remain unchanged.Local implementation
dac3f07b feat: add read-only object checksum verification26af1a96 fix: preserve checksum output in pipelinesThe fix walks the full
cli.Contextparent chain for explicit quiet/json flags and restores compact JSONL only inside the checksum action. It does not change global quiet semantics or re-enable progress bars for other commands.Local evidence includes real-S3 TTY/non-TTY before/after probes, report-write failure, MISMATCH/UNKNOWN exit status, focused and full unit/race, vet, lint, branding, credits, module checks, nine-target crosscompile, and clean VCS provenance. The commits are not yet pushed, so these hashes will not resolve on GitHub until the follow-up PR is published.
Documentation and close criteria
docs/checksum-verify.md.pgsty/silo.pgsty.com.main.Close this issue after code and design documentation are merged and remote
mainCI is green. Tagging, package publication, Server image pinning, and public deployment remain separate release gates.