Conversation
|
Claude finished @mbevc1's task in 2m 7s —— View job PR Review: Remove version checks on all commands
Static AnalysisAll green — SummaryClean, well-scoped change. The PR removes the background version-check goroutine from What's Good
Potential Issues
VerdictLGTM — the change is minimal, correct, and well-tested. The CI pollution fix is a clear improvement. |
* test: pin fingerprint capture cleanliness contract Adds three tests that defend the customer-facing contract for `kosli fingerprint`: stdout is exactly the fingerprint, stderr is empty on the success path, and stderr remains a functional channel for opt-in debug output. The version-notice-on-stderr bug has been re-introduced three times in two weeks (PR #781 → PR #799 → PR #840) because no test pinned the actual contract customers depend on — that the output of `kosli fingerprint` is shell-capturable. Each round added a test narrowly aimed at the symptom the author was thinking about; none asserted the contract. These tests assert the contract directly via: TestFingerprintFile_CaptureCleanliness stdout == "<sha256>\n", stderr == "", combined == stdout — matches the customer pattern FP=$(kosli fingerprint ... 2>&1). TestFingerprintDir_CaptureCleanliness Same contract for --artifact-type=dir, the slow path that triggered the cyber-dojo failure (the goroutine had time to complete and pollute stderr). TestFingerprintFile_DebugModeIsAllowedToWriteStderr Pins the inverse: --debug=true MUST produce stderr output containing "calculated fingerprint", catching anyone who over-corrects a CaptureCleanliness regression by silencing the logger inside the fingerprint code path. Closes #5564 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * test: align dir test, add docker variant for capture cleanliness Address review feedback on PR #846: - @mbevc1 (and the claude bot): align TestFingerprintDir_CaptureCleanliness with the file variant. The dir fingerprint of testdata/folder1 is already pinned in fingerprint_test.go, so use Equal with that exact value plus the combined-stream assertion. Both tests now have the same shape and the same three contracts. - @JonJagger: add TestFingerprintDocker_CaptureCleanliness covering --artifact-type=docker, which goes through internal/docker.GetImageFingerprint and is a separate code path from file/dir hashing. Mirrors the existing docker test pattern (alpine pinned by digest, pulled in SetupSuite). OCI variant and broader attest-command coverage tracked as follow-ups in #848 and #849 — both are real engineering work that warrants separate PRs (OCI needs registry scaffolding; attest needs auth/server + a contract surface audit). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Some CI systems (like GHA) were multiplexing stdErr/stdOut and polluting output when piping or using output from CLI. This removes checking for version on all commands and only does it when explicitly running
--version