fix(hook): show combined output for failed steps#772
Conversation
|
The alternative would be to switch the default for |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the visibility of diagnostic output for a significant number of built-in tools by configuring them to direct their standard output to the step summary. This resolves an issue where critical information from linters, formatters, and type checkers was not being displayed, improving the debugging and review experience for affected tools. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds output_summary = "stdout" to numerous Config.Step definitions across various pkl/builtins files. However, for specific tools such as markdownlint, shellcheck, sorbet, and yamllint, this configuration is incorrect. These tools output their diagnostic information to stderr, and setting output_summary to stdout would hide their output. The reviewer suggests removing these specific output_summary lines to maintain proper diagnostic visibility.
16e900e to
77c976c
Compare
|
Failing checks are pre-existing. |
jdx
left a comment
There was a problem hiding this comment.
output_summary is intended for displaying warnings (e.g., deprecation notices, version info) that tools emit on stderr even when they pass — it's not meant for showing diagnostic output from failures.
Setting it to stdout on these builtins would dump the tool's primary output into the summary on every run, including successes. For check_diff tools that's raw diff output; for linters it's the full error listing or "all clean" messages. None of that belongs in the summary.
The underlying issue (diagnostic output not being visible when a step fails) is real, but it needs a different solution — probably something at the framework level rather than changing output_summary on individual builtins.
This comment was generated by Claude Code.
|
Aha, I finally get what the setting is about: I will attempt another fix then. How about showing the combined output whenever a step fails? |
|
that's probably ok |
77c976c to
4486910
Compare
Greptile SummaryThe PR correctly fixes diagnostic output visibility on step failure by always showing combined stdout+stderr, while properly respecting Confidence Score: 5/5Safe to merge — the fix is minimal, logically correct, and the prior review concern is resolved. No P0 or P1 findings remain. The output_summary=hide concern from the prior review thread has been correctly addressed. No files require special attention. Important Files Changed
Greploops — Automatically fix all review issues by running Reviews (3): Last reviewed commit: "Merge branch 'main' into fix/builtins-ou..." | Re-trigger Greptile |
…_summary The output_summary setting controls which stream is captured for the end-of-run summary. It defaults to "stderr" which is useful for surfacing side-channel warnings (e.g., deprecation notices) from successful steps. However, many tools write their diagnostic errors to stdout, not stderr, so failing steps had invisible output. Instead of configuring output_summary per-builtin, always show combined stdout+stderr output when a step fails. The output_summary setting now only applies to successful steps, except for output_summary = "hide" which is respected even on failure. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
4486910 to
bb23b5b
Compare
|
Failing ci check is fixed in #782. |
PR #772 forced Combined output on failure to avoid losing diagnostics, but this changed the summary header label (e.g., "lint output:" instead of "lint stderr:"), breaking #784's tests. Use combined content on failure but keep the configured label. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
## Summary - PR #772 forced `Combined` output on failure to avoid losing diagnostics, but this changed the summary header label (e.g., `lint output:` instead of `lint stderr:`), breaking #784's tests. - Uses combined *content* on failure (preserving #772's intent) but keeps the configured *label* so the header matches `output_summary`. - Fixes CI failures on #806. ## Test plan - [x] `test/output_summary_no_duplicate.bats` passes locally (both tests) - [ ] CI passes on this PR 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk, small change limited to end-of-run output summarization; main risk is subtle behavior differences in how failure output is labeled (and stored) for downstream consumers/tests. > > **Overview** > On step failure, the summary now saves **combined output content** to avoid losing diagnostics, but preserves the step’s configured `output_summary` *mode/label* instead of forcing `Combined`. > > `output_summary = "hide"` is still respected even on failure, preventing any summary output from being recorded. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f0090e4. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
### 🐛 Bug Fixes - **(hook)** remove dup output and preserve check_first diagnostics by [@nkakouros](https://github.com/nkakouros) in [#784](#784) - **(hook)** show combined output for failed steps by [@nkakouros](https://github.com/nkakouros) in [#772](#772) - **(hook)** preserve configured output_summary label on failure by [@jdx](https://github.com/jdx) in [#808](#808) ### 📦️ Dependency Updates - update rust crate pklr to 0.4.1 by [@jhult](https://github.com/jhult) in [#805](#805) ### New Contributors - @jhult made their first contribution in [#805](#805) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Primarily a version bump and doc/metadata regeneration, plus routine dependency lockfile updates; minimal behavioral risk beyond potential upstream crate changes. > > **Overview** > Bumps `hk` to **v1.41.1** and adds the corresponding `CHANGELOG.md` release entry. > > Regenerates/version-aligns published artifacts and docs (CLI docs JSON/markdown, `hk.usage.kdl`, and all docs/examples that reference the release `package://.../v1.41.1` URLs). > > Updates `Cargo.lock` for dependency bumps (notably `pklr 0.4.1`, `indexmap 2.14.0`/`hashbrown 0.17.0`, and `tokio 1.51.1`). > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 0a2a092. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: mise-en-dev <[email protected]>
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [hk](https://github.com/jdx/hk) | patch | `1.41.0` → `1.41.1` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>jdx/hk (hk)</summary> ### [`v1.41.1`](https://github.com/jdx/hk/blob/HEAD/CHANGELOG.md#1411---2026-04-10) [Compare Source](jdx/hk@v1.41.0...v1.41.1) ##### 🐛 Bug Fixes - **(hook)** remove dup output and preserve check\_first diagnostics by [@​nkakouros](https://github.com/nkakouros) in [#​784](jdx/hk#784) - **(hook)** show combined output for failed steps by [@​nkakouros](https://github.com/nkakouros) in [#​772](jdx/hk#772) - **(hook)** preserve configured output\_summary label on failure by [@​jdx](https://github.com/jdx) in [#​808](jdx/hk#808) ##### 📦️ Dependency Updates - update rust crate pklr to 0.4.1 by [@​jhult](https://github.com/jhult) in [#​805](jdx/hk#805) ##### New Contributors - [@​jhult](https://github.com/jhult) made their first contribution in [#​805](jdx/hk#805) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMTAuOCIsInVwZGF0ZWRJblZlciI6IjQzLjExMC44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiLCJhdXRvbWF0aW9uOmJvdC1hdXRob3JlZCIsImRlcGVuZGVuY3ktdHlwZTo6cGF0Y2giXX0=-->
Summary
writes to
output_summary = "hide"even on failureoutput_summarysetting now only filters output for successful steps (e.g., to surface deprecation warnings on stderr)This is a framework-level fix rather than per-builtin configuration — tools that write diagnostics to stdout (eslint, flake8,
prettier, etc.) will now have their output visible when they fail, without changing any builtin definitions.
Original description - wrong approach
Details
Most linters and formatters write their error output to stdout, but output_summary defaults to stderr. This meant diagnostic output was invisible in the per-step summary for 75 builtins.Affected categories:
Tools that correctly write to stderr (cargo, go vet, deno, ghalint, taplo lint, etc.) were left with the default.