fix(diff): report the error before the diff on a failed run#31
Merged
Conversation
Previously loom diff printed the collected diff (and a bogus "complete" success line) before the run's error surfaced, burying the failure. Now on failure the command exits non-zero and, by default, prints no diff — only the error — so the failure stands alone. Add --partial to still inspect the changes made before the error: the diff is printed beneath a warning marking it incomplete, with the error shown above it. Adds a Warningf pretty-printer, spec rule DF5, and a referencing test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
rickliujh
force-pushed
the
fix/diff-failure-ordering
branch
from
July 22, 2026 23:18
4af19bd to
7c59ef1
Compare
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.
Follow-up to
loom diff(#28, #29).Problem
When a run failed,
loom diffprinted the collected diff — and a bogus✔ completesuccess line — before the run's error surfaced, burying the failure beneath the diff.Fix
On failure, report the error first (right after the failing module's logs) and exit non-zero, with no success line. By default the diff is suppressed so the error stands alone.
Add
--partialto still inspect the changes made before the error: the partial diff is printed after the error, beneath a warning marking it incomplete.Details
prettylog.Warningf(⚠, amber) for the standalone warning.errReportedsentinel incmdso a command can print its own error whileExecutestill exits non-zero without repeating it.--quickmodes.TestDiff_DF5_FailureOrdering); docs/README/cli-diff.mdupdated with the--partialflag.go test ./...,go vet, gofmt, and spectrace all clean.🤖 Generated with Claude Code