Repository navigation
feat(tui): show a verification command's verdict instead of asserting it - #428
Merged
Merged
Conversation
Forge ended a turn saying "make test: 31 tests passed" and rendered nothing
to back it. The command ran, but its output went into ToolCard.detail behind
an expand, and then ActivityGroup collapsed it again into `bash make test,
git`. Codex runs the same command and puts the result on screen, and that
one behaviour is most of the distance between them on the benchmark's
verification-clarity and trust dimensions.
The cause was an asymmetry already in the transcript. DiffCard is a
first-class, always-visible card for write tools — the product already
believes some tool results are worth showing unasked. It just drew the line
at changes *made* and not changes *checked*.
VerificationCard is DiffCard's sibling. When a tool invocation looks like a
command run to check the work — make test, cargo test, cargo clippy, pytest,
unittest, go test, npm test, tsc, ruff, eslint and friends — the card renders
the verdict inline and always:
✓ make test 26 passed
│ Ran 26 tests in 0.000s
└ OK
The verdict is lifted from the runner's own summary line, never composed
here: Rust's `test result: ok. N passed`, unittest's `Ran N tests` + `OK`,
pytest's `N passed in Xs`, cargo's `Finished`. A failure shows the failing
assertion rather than the whole log.
The rule the feature rests on: a green tick requires a parsed verdict *and*
a zero exit code. Exit zero alone renders as `unparsed`, reporting the exit
code and line count, because a verification surface that guesses is worse
than none — it converts an unchecked claim into a checked-looking one. A
`test result: ok` line with a non-zero exit is a failure, not a pass; the
process is trusted over the text.
Matching is on the invocation, not the output, so an unrecognised command
keeps its ToolCard exactly as before. This can only add a card, never remove
one. Like DiffCard, the card is never folded into an ActivityGroup, so the
double collapse inside a plan step cannot happen.
Presentation only — nothing in forge-core or forge-tools. The command
already ran and its output already reached the transcript.
Verified in a PTY against a repo with a genuinely failing test: the failing
run renders `✗ make test · 26 run · FAILED (failures=1)` above the
AssertionError, and the passing run renders the card above the model's own
"26 tests passed."
Claude-Session: https://claude.ai/code/session_018ihDDc3ahfrxu5AYL9moXs
mohitranka
added a commit
that referenced
this pull request
Sep 11, 2026
… it (#428) Forge ended a turn saying "make test: 31 tests passed" and rendered nothing to back it. The command ran, but its output went into ToolCard.detail behind an expand, and then ActivityGroup collapsed it again into `bash make test, git`. Codex runs the same command and puts the result on screen, and that one behaviour is most of the distance between them on the benchmark's verification-clarity and trust dimensions. The cause was an asymmetry already in the transcript. DiffCard is a first-class, always-visible card for write tools — the product already believes some tool results are worth showing unasked. It just drew the line at changes *made* and not changes *checked*. VerificationCard is DiffCard's sibling. When a tool invocation looks like a command run to check the work — make test, cargo test, cargo clippy, pytest, unittest, go test, npm test, tsc, ruff, eslint and friends — the card renders the verdict inline and always: ✓ make test 26 passed │ Ran 26 tests in 0.000s └ OK The verdict is lifted from the runner's own summary line, never composed here: Rust's `test result: ok. N passed`, unittest's `Ran N tests` + `OK`, pytest's `N passed in Xs`, cargo's `Finished`. A failure shows the failing assertion rather than the whole log. The rule the feature rests on: a green tick requires a parsed verdict *and* a zero exit code. Exit zero alone renders as `unparsed`, reporting the exit code and line count, because a verification surface that guesses is worse than none — it converts an unchecked claim into a checked-looking one. A `test result: ok` line with a non-zero exit is a failure, not a pass; the process is trusted over the text. Matching is on the invocation, not the output, so an unrecognised command keeps its ToolCard exactly as before. This can only add a card, never remove one. Like DiffCard, the card is never folded into an ActivityGroup, so the double collapse inside a plan step cannot happen. Presentation only — nothing in forge-core or forge-tools. The command already ran and its output already reached the transcript. Verified in a PTY against a repo with a genuinely failing test: the failing run renders `✗ make test · 26 run · FAILED (failures=1)` above the AssertionError, and the passing run renders the card above the model's own "26 tests passed." Claude-Session: https://claude.ai/code/session_018ihDDc3ahfrxu5AYL9moXs
mohitranka
added a commit
that referenced
this pull request
Sep 11, 2026
… it (#428) Forge ended a turn saying "make test: 31 tests passed" and rendered nothing to back it. The command ran, but its output went into ToolCard.detail behind an expand, and then ActivityGroup collapsed it again into `bash make test, git`. Codex runs the same command and puts the result on screen, and that one behaviour is most of the distance between them on the benchmark's verification-clarity and trust dimensions. The cause was an asymmetry already in the transcript. DiffCard is a first-class, always-visible card for write tools — the product already believes some tool results are worth showing unasked. It just drew the line at changes *made* and not changes *checked*. VerificationCard is DiffCard's sibling. When a tool invocation looks like a command run to check the work — make test, cargo test, cargo clippy, pytest, unittest, go test, npm test, tsc, ruff, eslint and friends — the card renders the verdict inline and always: ✓ make test 26 passed │ Ran 26 tests in 0.000s └ OK The verdict is lifted from the runner's own summary line, never composed here: Rust's `test result: ok. N passed`, unittest's `Ran N tests` + `OK`, pytest's `N passed in Xs`, cargo's `Finished`. A failure shows the failing assertion rather than the whole log. The rule the feature rests on: a green tick requires a parsed verdict *and* a zero exit code. Exit zero alone renders as `unparsed`, reporting the exit code and line count, because a verification surface that guesses is worse than none — it converts an unchecked claim into a checked-looking one. A `test result: ok` line with a non-zero exit is a failure, not a pass; the process is trusted over the text. Matching is on the invocation, not the output, so an unrecognised command keeps its ToolCard exactly as before. This can only add a card, never remove one. Like DiffCard, the card is never folded into an ActivityGroup, so the double collapse inside a plan step cannot happen. Presentation only — nothing in forge-core or forge-tools. The command already ran and its output already reached the transcript. Verified in a PTY against a repo with a genuinely failing test: the failing run renders `✗ make test · 26 run · FAILED (failures=1)` above the AssertionError, and the passing run renders the card above the model's own "26 tests passed." Claude-Session: https://claude.ai/code/session_018ihDDc3ahfrxu5AYL9moXs
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.
Closes the largest remaining gap from the four-way benchmark: Forge scores 6 on verification clarity against Codex's 9, and the whole difference is that Codex shows its test output while Forge asserts a count.
The cause was an asymmetry already in the transcript
DiffCardis a first-class, always-visible card forwrite_file,apply_patch,search_replace,edit. Everything else becomes aToolCardwhose body sits indetailbehind an expand — and thenActivityGroupcollapses it again intobash make test, git.So the product already believes some tool results are worth showing unasked. It just drew the line at changes made and not changes checked.
VerificationCardA sibling of
DiffCard. When an invocation looks like a command run to check the work, the verdict renders inline and always:Failing:
Both captures above are real PTY output from this branch.
The rule it rests on
A green tick requires a parsed verdict and a zero exit code. Exit zero alone renders as
unparsed, reporting the exit code and line count:A verification surface that guesses is worse than none — it converts an unchecked claim into a checked-looking one. There's a test named for exactly this. Conversely a
test result: okline with a non-zero exit is a failure: the process is trusted over the text.Parsers
The verdict is lifted from the runner's own words, never composed here — Rust's
test result: ok. N passed, unittest'sRan N tests+OK, pytest'sN passed in Xs, cargo'sFinished. ANSI colour is stripped before matching, and only the last 40 lines are scanned, so a 5,000-line log doesn't become 5,000 rendered lines.Blast radius
Matching is on the invocation, not the output, so an unrecognised command keeps its
ToolCardexactly as before — this can only add a card, never remove one. LikeDiffCard, it's never folded into anActivityGroup, so the double collapse inside a plan step can't happen.Presentation only. Nothing in
forge-coreorforge-tools— the command already ran and its output already reached the transcript.Verification
cargo fmt --all -- --checkclean ·cargo clippy --all-targetsclean ·cargo test --workspace45/45 binaries, 0 failures · 17 new tests (12 parser, 5 renderer).Driven in a PTY against a repo with a genuinely failing test, capturing both states.
Design doc:
docs/verification-card.html(local-only, untracked).https://claude.ai/code/session_018ihDDc3ahfrxu5AYL9moXs