Skip to content

Report which patch failed to apply - #8

Merged
ru-sh merged 1 commit into
mainfrom
report-failing-patch
Sep 22, 2026
Merged

ru-sh merged 1 commit into
mainfrom
report-failing-patch

Conversation

@ru-sh

@ru-sh ru-sh commented Sep 22, 2026

Copy link
Copy Markdown

When refresh_patches hits a patch that will not apply, it reports only an exit code. The name of the patch is lost, which is the one thing you need.

quiet() is "$@" >/dev/null, and quilt writes its diagnostics to stdout:

Applying patch conflicting.diff
Hunk #1 FAILED at 1.
Patch conflicting.diff does not apply (enforce with -f)

All of that goes to /dev/null; only the exit code survives. This is visible in the last run of the Code update workflow before #6 removed it (35404425408):

Refresh Code patches...
  | Refreshed patch patches/proposed-api.diff
  | Failed
Update Node version...      | Skipped
Regenerate CSP hashes...    | Skipped
Add changelog note...       | Skipped

Failed with no indication of what failed. Identifying the patch that broke against 1.138.0 meant reading the run log and still coming up short.

The output is now captured and printed when the push fails. The exit code and the exit-2 "no more patches to apply" path are unchanged, so the only difference is what gets printed on the failure path. Verified against a synthetic two-patch stack with a deliberately conflicting base: the failing patch is named, and a clean stack still exits 2 and prints nothing.

This matters more now than it did. With the workflow gone, update-vscode.sh runs by hand — which is exactly when you are untangling a conflicted stack after an upstream merge, and least able to consult a CI log.

Deliberately not changed: apply_patches and unapply_patches use the same quiet wrapper and have the same blind spot. They are left alone here to keep this to the path that actually bit us; worth the same treatment if you want it.

🤖 Generated with Claude Code

@ru-sh
ru-sh merged commit 2fe0e20 into main Sep 22, 2026
11 checks passed
@ru-sh
ru-sh deleted the report-failing-patch branch September 22, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant