Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(chat): commands that exit 0 no longer show as failed #23351

Mergedonly21mil(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/23351/headmerged by maria-rcks View on GitHub

Showing 4 changed files with 38 additions and 5 deletions (loading 1).

x
0 of 4 viewed, 4 left
15 additions and 0 deletionsapps/server/src/orchestration-v2/WireProjection.test.tsModified
View file
@@ -261,6 +261,21 @@
});
});
​
+ it.each([
+ "logs/app.log:12: Error: ENOENT: no such file or directory",
+ "fixtures/ci.txt:3: Process exited with exit code 2",
+ ])("trusts a zero exit code over failure text in the output: %s", (output) => {
+ const projected = projectTurnItemForWire({
+ ...base,
+ type: "command_execution" as const,
+ input: "rg -n error logs fixtures",
+ output,
+ exitCode: 0,
+ });
+ expect(projected).not.toHaveProperty("outputIndicatesFailure");
+ expect(projected).toMatchObject({ exitCode: 0, outputOmitted: true });
+ });
+​
it("omits inline file bodies but preserves file identity and change counts", () => {
const item = {
...base,
7 additions and 4 deletionsapps/server/src/orchestration-v2/WireProjection.tsModified
View file
@@ -157,11 +157,14 @@
case "command_execution": {
const { output, ...projected } = item;