Add hierarchical .gito/config.toml support#257
Open
praphulmc-tt wants to merge 1 commit into
Open
Conversation
Discover every `<subdir>/.gito/config.toml` under the repo root and merge them with bundled defaults and the root project config so that: - Lists (aux_files, exclude_files, mention_triggers) accumulate across all levels (deduped). - prompt_vars and pipeline_steps are unioned; the root config wins on any key/name conflict, while sub-directory configs fill in values the root did not explicitly set. - Pipeline steps defined in a sub-directory carry a `scope` field and only run against diff entries under that directory; if no diff file matches, the step is skipped. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds hierarchical
.gito/config.tomlsupport: every<subdir>/.gito/config.tomlunder the repo root is discovered and merged with bundled defaults + the root
project config.
Merge rules (each level contributes only the keys it explicitly wrote):
aux_files,exclude_files,mention_triggers) — accumulate acrossall levels, deduped.
prompt_vars— union of keys; root wins on key conflict.pipeline_steps— union of step names; root wins on name conflict.Per-step field-level merge is preserved (root setting
enabled=falsestillinherits
callfrom defaults).prompt,retries,max_code_tokens, …) — root supersedes;sub-directory configs only fill values the root left unset.
Pipeline step scoping: steps defined inside a sub-directory carry a
scopefield equal to that directory;
Pipeline.runfiltersctx.diffto files underthe scope and skips the step entirely when no diff files match. Steps defined
in the root config keep
scope=""and remain repo-wide.Back-compat: the existing single-file
ProjectConfig.load(config_path=...)API is unchanged; if no
repo_rootis passed, discovery is skipped andbehavior matches main.
Test plan
tests/test_project_config.py: cumulative lists, root-winsscalars, root-wins prompt_vars, pipeline step scope + per-field inheritance,
ignored-dir pruning.
tests/test_pipeline.py:matches_pathboundaries, scopeddiff filtering, scoped-step skip when no matching files.
pytest tests/test_project_config.py tests/test_pipeline.py→ 18passed locally.
gito review --against mainagainst this branch locally — no issues found.