Skip to content

feat(config): support global local override via runok.local.yml#105

Merged
fohte merged 2 commits intomainfrom
fohte/support-global-local-config
Feb 26, 2026
Merged

feat(config): support global local override via runok.local.yml#105
fohte merged 2 commits intomainfrom
fohte/support-global-local-config

Conversation

@fohte
Copy link
Owner

@fohte fohte commented Feb 26, 2026

Why

  • Users who manage their global config in dotfiles via git have no place to add machine-specific rules (e.g. allowing internal tools) at the global level
    • Project-local config has runok.local.yml for personal overrides, but the global config lacked an equivalent mechanism

What

  • Auto-load ~/.config/runok/runok.local.yml (or .yaml) as a global local override
    • Merge priority: global < global local override < project < project local override

Open with Devin

….local.yml

Allow users to create a machine-specific global override config at
~/.config/runok/runok.local.yml (or .yaml) that is not tracked by
dotfiles. This is useful when the global config is version-controlled
but the user needs machine-specific rules (e.g. internal tool allow).

Merge priority: global < global local override < project < project local override

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@gemini-code-assist
Copy link

Summary of Changes

Hello @fohte, 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 the need for machine-specific global configuration overrides, similar to how project-local overrides function. It introduces a new runok.local.yml (or .yaml) file at the global level, allowing users to manage personal or machine-specific settings without impacting their main global configuration, especially useful for those managing global configs via version control. The changes ensure these new overrides are loaded and merged correctly within the existing configuration hierarchy.

Highlights

  • Global Local Override Configuration: Introduced support for a global local override configuration file, ~/.config/runok/runok.local.yml (or .yaml), allowing users to define machine-specific rules that override global settings without modifying their main global configuration.
  • Configuration Merge Priority: Updated the configuration loading mechanism to incorporate the new global local override. The new merge priority is: global < global local override < project < project local override.
  • Configuration Loader Enhancements: Modified the DefaultConfigLoader to store the global configuration directory and added a new private method to determine the path for the global local override file, preferring .yml over .yaml.
  • Comprehensive Test Coverage: Added extensive unit tests to validate the correct loading, merging, and priority of the new global local override configuration, including scenarios for file preference and error handling.
Changelog
  • src/config/loader.rs
    • Added global_config_dir field to DefaultConfigLoader to store the directory for global configuration files.
    • Modified DefaultConfigLoader::new and DefaultConfigLoader::with_global_path to correctly initialize global_config_dir.
    • Implemented global_local_override_config_path method to locate runok.local.yml or runok.local.yaml in the global config directory.
    • Integrated the loading of the global local override configuration into the ConfigLoader::load method.
    • Adjusted the configuration merging logic to apply global local overrides after global configuration but before project-specific configurations.
    • Added a write_global_local helper function to TestEnv for writing global local override files in tests.
    • Introduced several new test cases to verify the functionality, priority, and error handling of the global local override feature.
Activity
  • No human activity has been recorded on this pull request yet.
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
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

gemini-code-assist[bot]

This comment was marked as resolved.

…ution

The `.yml`-then-`.yaml` fallback logic was repeated across three
methods (`global_local_override_config_path`, `local_config_path`,
`local_override_config_path`). Extract a shared `find_config` helper
that takes a directory and candidate filenames.
@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.93%. Comparing base (10c9e9c) to head (1032760).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #105      +/-   ##
==========================================
+ Coverage   89.82%   89.93%   +0.11%     
==========================================
  Files          29       29              
  Lines        6242     6332      +90     
==========================================
+ Hits         5607     5695      +88     
- Misses        635      637       +2     
Flag Coverage Δ
Linux 89.78% <100.00%> (+0.11%) ⬆️
macOS 91.87% <100.00%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fohte fohte merged commit c9091d3 into main Feb 26, 2026
6 checks passed
@fohte fohte deleted the fohte/support-global-local-config branch February 26, 2026 12:12
@fohte-bot fohte-bot bot mentioned this pull request Feb 25, 2026
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