Skip to content

fix(hkrc): config format and load order#710

Merged
jdx merged 12 commits intojdx:mainfrom
ivy:fix/hkrc-config-format
Mar 3, 2026
Merged

fix(hkrc): config format and load order#710
jdx merged 12 commits intojdx:mainfrom
ivy:fix/hkrc-config-format

Conversation

@ivy
Copy link
Copy Markdown
Contributor

@ivy ivy commented Mar 1, 2026

I ran into two bugs (or… features? 😉). Gory details here with a script to reproduce. Human summary:

I tried following the docs to add a global hk config and found that the documented example didn't actually work:

  1. hk panics when .hkrc.pkl amends from Config.pkl (as shown in the docs). hk deserializes them as UserConfig, where check is Option<bool>, not a string command.
  2. Default path is CWD-relative: The default hkrc path is PathBuf::from(".hkrc.pkl") (relative to CWD), not ~/.hkrc.pkl as the docs state.

I went down a rabbit hole and added some tests to cover the bug as well as some tests to cover a clarified hierarchy:

Precedence Source Scope
1 (lowest) Built-in defaults All projects
2 hkrc (~/.config/hk/config.pkl, ~/.hkrc.pkl, or --hkrc) All projects (user-level)
3 Project config (hk.pkl or hk.local.pkl) Single project
4 Git config (global, then local) Per-repo
5 Environment variables (HK_*) Per-invocation
6 (highest) CLI flags Per-invocation

Higher layers override lower. For hooks and steps, layers are additive — hkrc can define hooks the project doesn't have, but the project's definition wins on collision. See hkrc merge semantics for details.

Let me know if you hate it! 😅

Why I wasted invested 3 hours hacking on this

I'm trying out solutions to auto-commit and bake my LLM prompts into Git commit messages for better transparency. Whoops! I committed everything:

So I wanted to add a global pre-commit hook (with hk) that runs gitleaks from now on.

ivy added 7 commits February 28, 2026 23:23
hkrc files that amend Config.pkl (as shown in the docs) panic because
hk deserializes them as UserConfig where check is Option<bool>, not a
string command. Also covers missing home directory default path, hook
merging, and step precedence.

Current error:

  thread 'main' panicked at src/settings.rs:90:30:
  Failed to load configuration: failed to run pkl

  Caused by:
     0: failed to parse pkl output
     1: invalid type: string "echo 'eslint check'",
        expected a boolean at line 21 column 40

  Location:
      src/config.rs:335:37
hkrc files that amend Config.pkl panicked because they were always
deserialized as UserConfig (where check is Option<bool>). Now hkrc
loading detects the format via JSON keys and dispatches accordingly.

Also fixes the default hkrc path: discovers ~/.hkrc.pkl instead of
only looking at CWD-relative .hkrc.pkl.
Add ~/.config/hk/config.pkl as a third discovery path (after CWD and
~/.hkrc.pkl) following XDG conventions already used for state and cache
dirs. Fix docs: correct precedence semantics to "project wins", replace
UserConfig.pkl example with Config.pkl, document the full discovery
order, and note legacy UserConfig.pkl support.
Replace if-is_none blocks with idiomatic Option::or in merge_from_hkrc,
annotate backward-compat format detection and the unsafe set_var, use
latest pkg URL in docs example, and mention hk.local.pkl in merge
semantics.
No tests covered hk.local.pkl winning over hk.pkl, or hkrc discovery
order when multiple candidates exist. These three tests pin the full
hierarchy: local > project, CWD hkrc > home hkrc > XDG config.
The settings table had hkrc (5) beating project config (6) but the
actual merge does project-wins. Swap rows 5-6 to match the code, and
add a top-level summary table so readers see the full layering without
hunting across three sections.
Users who want to enforce their own hooks, skip project steps, or fully
replace a project's config locally had no doc guidance — just mechanics.
Add three concrete patterns for the "grumpy staff eng" use case.
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 addresses critical bugs and ambiguities in hkrc configuration handling. It refactors the configuration loading mechanism to correctly interpret hkrc files, establishes a clear and logical precedence for configuration sources, and provides detailed documentation and examples to guide users. The changes significantly improve the robustness and predictability of hk's configuration system.

Highlights

  • Configuration Format Fix: Resolved an issue where hkrc would panic when amending Config.pkl due to incorrect deserialization as UserConfig, which expected Option<bool> instead of a string command for 'check'.
  • Improved hkrc Load Order: Corrected the default hkrc path discovery logic to prioritize .hkrc.pkl in the current working directory, then ~/.hkrc.pkl, and finally ~/.config/hk/config.pkl (XDG config directory), aligning with user expectations and documentation.
  • Clarified Configuration Precedence: Updated documentation to clearly define the layering and merge semantics for all configuration sources, including built-in defaults, hkrc, project config, Git config, environment variables, and CLI flags.
  • Enhanced hkrc Merge Semantics: Implemented detailed merging rules for hkrc and project configurations, specifying how settings, environment variables, and hooks/steps are combined, with 'project wins' semantics for collisions.
  • Comprehensive Test Coverage: Added extensive new test cases to validate the hkrc configuration format, hook merging behavior, and the new load order precedence, ensuring reliability and preventing regressions.
Changelog
  • docs/configuration.md
    • Updated the overall configuration precedence table.
    • Clarified the discovery order for hkrc files (CWD, Home, XDG).
    • Detailed the merge semantics for hkrc and project configurations.
    • Added practical examples for managing global hook preferences.
    • Corrected the amends path in the hkrc example from UserConfig.pkl to Config.pkl.
    • Added a note about supporting legacy UserConfig.pkl files.
  • src/cli/mod.rs
    • Removed the default .hkrc.pkl path assignment, allowing the hkrc field in CliSnapshot to be None if not explicitly provided via CLI.
  • src/config.rs
    • Refactored Config::get to call apply_hkrc instead of directly loading UserConfig.
    • Introduced Config::apply_hkrc to handle the hkrc discovery logic (explicit path, CWD, Home, XDG).
    • Implemented logic within apply_hkrc to detect and parse hkrc files as either UserConfig (for backward compatibility) or Config.
    • Added Config::merge_from_hkrc to define the merging rules for environment variables, scalar settings, and hooks/steps from hkrc into the main Config.
    • Removed the standalone UserConfig::load function.
  • src/env.rs
    • Added HK_CONFIG_DIR as a LazyLock<PathBuf> to determine the XDG config directory for hk, falling back to ~/.config/hk.
  • src/settings.rs
    • Modified test cases (test_settings_builder_fluent_api, test_settings_snapshot_caching, test_settings_from_config) to set hkrc to None in CliSnapshot, aligning with the change in src/cli/mod.rs.
  • test/hkrc.bats
    • Added a test to ensure Config-format hkrc files with steps run without panicking.
    • Added tests to verify hkrc can add hooks not present in the project config.
    • Added tests to confirm project steps override same-named hkrc steps.
    • Added tests to confirm different steps from the same hook are merged.
    • Added tests for hkrc default path loading order: CWD wins over Home, Home wins over XDG.
  • test/localconfig.bats
    • Added a new test case to explicitly verify that hk.local.pkl takes precedence over hk.pkl.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request is a great improvement, addressing bugs in the hkrc configuration handling and significantly clarifying the documentation around configuration loading and precedence. The introduction of a unified hkrc format that supports full Config.pkl features is a major step forward, and the backward compatibility for legacy UserConfig.pkl files is well-handled. The new test cases are comprehensive and provide good coverage for the new logic.

I've found one high-severity issue where the environment variable merging logic contradicts the new "project wins" precedence documented in this PR. I've also left a couple of medium-severity suggestions in src/config.rs to refactor parts of the new logic for better conciseness and maintainability.

Overall, excellent work on untangling the configuration logic and improving the user experience.

Comment thread src/config.rs Outdated
Comment thread src/config.rs
Comment thread src/config.rs
Comment on lines +291 to +302
// Scalar settings: project wins — fall back to hkrc when project has None
self.fail_fast = self.fail_fast.or(hkrc.fail_fast);
self.stage = self.stage.or(hkrc.stage);
self.display_skip_reasons = self.display_skip_reasons.take().or(hkrc.display_skip_reasons);
self.hide_warnings = self.hide_warnings.take().or(hkrc.hide_warnings);
self.warnings = self.warnings.take().or(hkrc.warnings);
self.exclude = self.exclude.take().or(hkrc.exclude);
self.profiles = self.profiles.take().or(hkrc.profiles);
self.skip_hooks = self.skip_hooks.take().or(hkrc.skip_hooks);
self.skip_steps = self.skip_steps.take().or(hkrc.skip_steps);
self.default_branch = self.default_branch.take().or(hkrc.default_branch);
self.min_hk_version = self.min_hk_version.take().or(hkrc.min_hk_version);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This block of code for merging scalar settings is quite repetitive. To improve maintainability and reduce boilerplate, consider using a macro to handle the merging pattern, especially for the non-Copy types that use .take().

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass was a big block of if-statements. 😓 I'm not sure macros are gonna do anything other than make the logic more difficult to understand. But, I'm not a Rust expert.

Copy link
Copy Markdown
Contributor Author

@ivy ivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made some quick comments! Let me know if you think this should go in a different direction!

Comment thread docs/configuration.md
Comment on lines +9 to +16
| Precedence | Source | Scope |
|---|---|---|
| 1 (lowest) | Built-in defaults | All projects |
| 2 | [hkrc](#hkrc) (`~/.config/hk/config.pkl`, `~/.hkrc.pkl`, or `--hkrc`) | All projects (user-level) |
| 3 | [Project config](#hk-pkl) (`hk.pkl` or `hk.local.pkl`) | Single project |
| 4 | [Git config](#git-configuration) (global, then local) | Per-repo |
| 5 | [Environment variables](#settings-reference) (`HK_*`) | Per-invocation |
| 6 (highest) | [CLI flags](#settings-reference) | Per-invocation |
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is mise…ish. Thoughts?

Comment thread docs/configuration.md
Comment on lines +254 to +260
```bash
# Skip a step permanently in this repo
git config --local hk.skipSteps "slow-linter,noisy-formatter"

# Skip for one run
HK_SKIP_STEPS=slow-linter hk run pre-commit
```
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it'd be a helpful example for grumbling engineers who run into hooks that aren't their style.

Comment thread docs/configuration.md
Comment on lines +262 to +264
**Completely replace a project's hooks locally**

Create `hk.local.pkl` in the project root (don't commit it). It replaces `hk.pkl` entirely — redefine only what you want:
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nuclear option. This was already the existing behavior but there wasn't a test covering this (so I added one)!

Comment thread docs/configuration.md
Comment on lines +341 to +343
> [!NOTE]
> Legacy hkrc files that amend `UserConfig.pkl` are still supported.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how/if you want to maintain backwards compatibility.

Comment thread test/hkrc.bats Outdated
Comment thread test/localconfig.bats
assert_output --partial "hello"
}

@test "hk.local.pkl takes precedence over hk.pkl" {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explicit test for hk.local.pkl > hk.pkl (mentioned in PR body)

ivy added 2 commits March 1, 2026 01:12
Address PR feedback: env vars from hkrc now only set when the project
config hasn't defined them (matching the documented precedence).
Also simplify hkrc path discovery with array + find().
@ivy ivy marked this pull request as ready for review March 1, 2026 09:31
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Mar 1, 2026

Greptile Summary

Fixes two critical bugs in hkrc handling and establishes clear config precedence semantics:

Fixed Issues:

  • Panic when .hkrc.pkl amends Config.pkl (format mismatch) — now auto-detects format via JSON keys (environment vs env)
  • Incorrect default path behavior — replaced hardcoded CWD-relative .hkrc.pkl with proper discovery: CWD → HOME → XDG config dir

Key Changes:

  • Implemented "project wins" merge semantics for new Config-format hkrc (env vars, hooks, steps are additive with project taking precedence)
  • Added comprehensive deprecation warnings for .hkrc.pkl paths and --hkrc flag, guiding users to ~/.config/hk/config.pkl
  • Created version-aware deprecation infrastructure with debug_assert reminders for cleanup
  • 433 lines of new tests covering discovery, format detection, merge semantics, and deprecation warnings
  • Extensive documentation updates with clear precedence tables and migration examples

Note: Legacy UserConfig format maintains "user wins" behavior for backward compatibility, while new Config format uses "project wins" as documented.

Confidence Score: 4/5

  • Safe to merge with minor behavioral inconsistency between config formats
  • Well-tested fix for critical bugs with comprehensive test coverage and clear migration path. Score reflects intentional but potentially confusing behavioral difference between legacy UserConfig (user wins) and new Config format (project wins) for environment variables.
  • src/config.rs — verify the environment variable precedence difference between UserConfig and Config formats is acceptable

Important Files Changed

Filename Overview
src/config.rs Refactored hkrc loading with format detection and "project wins" merge semantics. Backward compatible with legacy UserConfig format.
src/output.rs New deprecation warning infrastructure with version-aware warnings and debug assertions for cleanup reminders.
src/cli/mod.rs Hidden --hkrc flag from help and removed default value logic (now handled in apply_hkrc).
test/hkrc.bats Comprehensive test coverage (433 new lines) for hkrc discovery, format detection, merge semantics, and deprecation warnings.
docs/configuration.md Extensive documentation updates clarifying config precedence, merge semantics, and migration path from deprecated .hkrc.pkl.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[hk starts] --> B[Load project config<br/>hk.pkl or hk.local.pkl]
    B --> C[apply_hkrc called]
    C --> D{--hkrc flag set?}
    D -->|Yes| E[Use explicit path<br/>Show deprecation warning]
    D -->|No| F[Discovery mode]
    F --> G{.hkrc.pkl in CWD?}
    G -->|Yes| H[Use CWD .hkrc.pkl<br/>Show deprecation]
    G -->|No| I{~/.hkrc.pkl exists?}
    I -->|Yes| J[Use HOME .hkrc.pkl<br/>Show deprecation]
    I -->|No| K{XDG config.pkl exists?}
    K -->|Yes| L[Use XDG config.pkl<br/>No warning]
    K -->|No| M[No hkrc]
    E --> N{Parse pkl as JSON}
    H --> N
    J --> N
    L --> N
    N --> O{Has 'environment' key?}
    O -->|Yes| P[Parse as UserConfig<br/>Legacy format]
    O -->|No| Q[Parse as Config<br/>New format]
    P --> R[apply_user_config<br/>User wins for env]
    Q --> S[merge_from_hkrc<br/>Project wins for env]
    R --> T[Validate config]
    S --> T
    M --> T
    T --> U[Ready to run]
Loading

Last reviewed commit: 5082fae

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment thread src/config.rs
Comment on lines +306 to +309
if let Some(project_hook) = self.hooks.get_mut(&hook_name) {
for (step_name, hkrc_step) in hkrc_hook.steps {
project_hook.steps.entry(step_name).or_insert(hkrc_step);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider merging hook-level properties (fix, stash, stage, env) from hkrc when hooks collide. Currently only steps merge — hkrc hook properties are lost.

if let Some(project_hook) = self.hooks.get_mut(&hook_name) {
    // Merge hook-level properties with project-wins semantics
    project_hook.fix = project_hook.fix.or(hkrc_hook.fix);
    project_hook.stash = project_hook.stash.clone().or(hkrc_hook.stash.clone());
    project_hook.stage = project_hook.stage.or(hkrc_hook.stage);
    // ... merge env, report similarly
    
    for (step_name, hkrc_step) in hkrc_hook.steps {
        project_hook.steps.entry(step_name).or_insert(hkrc_step);
    }
}

@thejcannon
Copy link
Copy Markdown
Contributor

Honestly I wonder if we should deprecate hkrc.pkl in favor of hk.locak.pkl.

This is the allure of Pkl, that's is fungible

@jdx
Copy link
Copy Markdown
Owner

jdx commented Mar 1, 2026

Yeah I think we should deprecate hkrc

@ivy
Copy link
Copy Markdown
Contributor Author

ivy commented Mar 2, 2026

On it! 🫡 Should have more time for this tomorrow. Did you have a path in mind? I'll probably search around the codebase for some existing deprecation warnings (maybe check mise) and follow whatever pattern's there. Current version is v1.36.0. Deprecate and remove in v2? 🤷‍♀️

@jdx
Copy link
Copy Markdown
Owner

jdx commented Mar 2, 2026

yeah I think deprecate and remove in v2 sounds good. In mise I use this pattern as a reminder when the version changes to remove deprecated code:
https://github.com/jdx/mise/blob/2de27bf3b2f84858f7e0afb309eb25c26e11c197/src/plugins/core/ruby.rs#L393

Deprecate .hkrc.pkl (CWD and HOME) and --hkrc flag in favor of
~/.config/hk/config.pkl (global) and hk.local.pkl (per-project).
Adopts mise's deprecated_at! pattern with version-gated warnings
and debug_assert! to remind developers to remove in v2.

Nothing is removed — all hkrc code paths continue to work.
@ivy
Copy link
Copy Markdown
Contributor Author

ivy commented Mar 3, 2026

The plan's here: https://gist.github.com/ivy/8cd019536936cabe89ce20e2f7c8aac4

Will add some comments in a sec about some implementation decisions I made.

Copy link
Copy Markdown
Contributor Author

@ivy ivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified locally with a throwaway test locally. Total overkill, but I'm not super familiar with this codebase. 😅

Comment thread src/version.rs
Comment on lines +7 to +11
pub static VERSION: LazyLock<semver::Version> = LazyLock::new(|| {
env!("CARGO_PKG_VERSION")
.parse()
.expect("Malformed version")
});
Copy link
Copy Markdown
Contributor Author

@ivy ivy Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming: Mise has a cli::version::V because of a conflict with VERSION (string form) but in hk, we have a version() method instead.

Comment thread Cargo.toml
repository = "https://github.com/jdx/hk"
rust-version = "1.88.0"
version = "1.36.0"
version = "1.37.0"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bumped the version since 1.36.0 is already released and the tests won't work otherwise. This might conflict with the communique?

Comment thread src/config.rs
"2.0.0",
"hkrc-home",
"~/.hkrc.pkl is deprecated. Use {}/config.pkl instead.",
env::HK_CONFIG_DIR.display()
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm formatting HK_CONFIG_DIR in case it differs instead of printing the default path.

@ivy
Copy link
Copy Markdown
Contributor Author

ivy commented Mar 3, 2026

Test flake? On Windows:

[pkl:gen.ps1] $ D:\a\hk\hk\mise-tasks\pkl\gen.ps1
[pkl:gen] $ D:\a\hk\hk\mise-tasks\pkl\gen
[pkl:gen] pkl\Builtins.pkl
[pkl:gen.ps1] pkl\Builtins.pkl
[pkl:gen.ps1] pkl/builtins_meta.json
[pkl:gen] Traceback (most recent call last):
[pkl:gen]   File "D:\a\hk\hk\scripts\gen_builtins.py", line 122, in <module>
[pkl:gen]     main()
[pkl:gen]   File "D:\a\hk\hk\scripts\gen_builtins.py", line 113, in main
[pkl:gen]     os.replace(tmpfile, "pkl/builtins_meta.json")
[pkl:gen] PermissionError: [WinError 5] Access is denied: 'D:\\a\\hk\\hk\\pkl\\builtins_meta.json.ltbe7ukw.tmp' -> 'pkl/builtins_meta.json'
[pkl:gen.ps1] Finished in 9.52s
Finished in 9.55s
[pkl:gen] ERROR task failed

@jdx
Copy link
Copy Markdown
Owner

jdx commented Mar 3, 2026

@greptileai

@jdx jdx merged commit e622c73 into jdx:main Mar 3, 2026
34 of 36 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress 🚧 to Done ✅ in Development Environment 🛠️ Mar 3, 2026
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Mar 11, 2026
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [hk](https://github.com/jdx/hk) | minor | `1.36.0` → `1.38.0` |

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.38.0`](https://github.com/jdx/hk/blob/HEAD/CHANGELOG.md#1380---2026-03-06)

[Compare Source](jdx/hk@v1.37.0...v1.38.0)

##### 🚀 Features

- **(hook)** add `fail_on_fix` option by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;725](jdx/hk#725)

##### 🐛 Bug Fixes

- **(builtins)** remove redundant check/check\_diff from builtins by [@&#8203;nkakouros](https://github.com/nkakouros) in [#&#8203;726](jdx/hk#726)

##### 📦️ Dependency Updates

- update anthropics/claude-code-action digest to [`26ec041`](jdx/hk@26ec041) by [@&#8203;renovate\[bot\]](https://github.com/renovate\[bot]) in [#&#8203;720](jdx/hk#720)
- update jdx/mise-action digest to [`e79ddf6`](jdx/hk@e79ddf6) by [@&#8203;renovate\[bot\]](https://github.com/renovate\[bot]) in [#&#8203;721](jdx/hk#721)
- update actions-rust-lang/setup-rust-toolchain digest to [`a0b538f`](jdx/hk@a0b538f) by [@&#8203;renovate\[bot\]](https://github.com/renovate\[bot]) in [#&#8203;719](jdx/hk#719)
- update rust crate tokio to v1.50.0 by [@&#8203;renovate\[bot\]](https://github.com/renovate\[bot]) in [#&#8203;722](jdx/hk#722)

### [`v1.37.0`](https://github.com/jdx/hk/blob/HEAD/CHANGELOG.md#1370---2026-03-03)

[Compare Source](jdx/hk@v1.36.0...v1.37.0)

##### 🚀 Features

- **(hook)** add env support to hooks by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;709](jdx/hk#709)
- parse Go-style diffs by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;704](jdx/hk#704)

##### 🐛 Bug Fixes

- **(builtins)** strip extra trailing newlines in end-of-file-fixer by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;708](jdx/hk#708)
- **(docs)** correctly document what --all is about by [@&#8203;nkakouros](https://github.com/nkakouros) in [#&#8203;715](jdx/hk#715)
- **(git)** exclude untracked files from unstaged\_files set by [@&#8203;nkakouros](https://github.com/nkakouros) in [#&#8203;716](jdx/hk#716)
- **(hkrc)** config format and load order by [@&#8203;ivy](https://github.com/ivy) in [#&#8203;710](jdx/hk#710)
- **(release)** write release notes to file instead of capturing stdout by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;688](jdx/hk#688)
- **(release)** make release notes editorialization non-blocking by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;690](jdx/hk#690)
- **(step)** gate check\_diff forced check\_first on Fix mode only by [@&#8203;nkakouros](https://github.com/nkakouros) in [#&#8203;717](jdx/hk#717)

##### 📚 Documentation

- **(shanty)** add audio player with sea shanty recording by [@&#8203;jdx](https://github.com/jdx) in [67a25ad](jdx/hk@67a25ad)
- document config file search paths by [@&#8203;ivy](https://github.com/ivy) in [#&#8203;701](jdx/hk#701)
- require AI disclosure on GitHub comments by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;703](jdx/hk#703)

##### 🔍 Other Changes

- replace gen-release-notes script with communique by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;700](jdx/hk#700)
- add autofix.ci workflow by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;705](jdx/hk#705)

##### 📦️ Dependency Updates

- lock file maintenance by [@&#8203;renovate\[bot\]](https://github.com/renovate\[bot]) in [#&#8203;686](jdx/hk#686)
- update taiki-e/upload-rust-binary-action digest to [`f391289`](jdx/hk@f391289) by [@&#8203;renovate\[bot\]](https://github.com/renovate\[bot]) in [#&#8203;692](jdx/hk#692)
- update anthropics/claude-code-action digest to [`c22f7c3`](jdx/hk@c22f7c3) by [@&#8203;renovate\[bot\]](https://github.com/renovate\[bot]) in [#&#8203;691](jdx/hk#691)
- update rust crate libc to v0.2.181 by [@&#8203;renovate\[bot\]](https://github.com/renovate\[bot]) in [#&#8203;694](jdx/hk#694)
- update rust crate clap to v4.5.58 by [@&#8203;renovate\[bot\]](https://github.com/renovate\[bot]) in [#&#8203;693](jdx/hk#693)
- lock file maintenance by [@&#8203;renovate\[bot\]](https://github.com/renovate\[bot]) in [#&#8203;695](jdx/hk#695)
- update anthropics/claude-code-action digest to [`edd85d6`](jdx/hk@edd85d6) by [@&#8203;renovate\[bot\]](https://github.com/renovate\[bot]) in [#&#8203;698](jdx/hk#698)
- update rust crate clap to v4.5.60 by [@&#8203;renovate\[bot\]](https://github.com/renovate\[bot]) in [#&#8203;699](jdx/hk#699)
- lock file maintenance by [@&#8203;renovate\[bot\]](https://github.com/renovate\[bot]) in [#&#8203;702](jdx/hk#702)
- lock file maintenance by [@&#8203;renovate\[bot\]](https://github.com/renovate\[bot]) in [#&#8203;711](jdx/hk#711)

##### New Contributors

- [@&#8203;ivy](https://github.com/ivy) made their first contribution in [#&#8203;710](jdx/hk#710)
- [@&#8203;nkakouros](https://github.com/nkakouros) made their first contribution in [#&#8203;715](jdx/hk#715)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, 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:eyJjcmVhdGVkSW5WZXIiOiI0My40OS4wIiwidXBkYXRlZEluVmVyIjoiNDMuNTcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6Om1pbm9yIl19-->
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.

3 participants