fix(repo): anchor the config.yaml ignore rule to the repository root - #265
Merged
himanshu231204 merged 2 commits intoAug 1, 2026
Merged
Conversation
A bare config.yaml pattern matches at any depth, so it silently ignores example configs under examples/. Anchoring it to /config.yaml keeps the developer-secret protection at the root while allowing nested example configs to be tracked normally. Co-Authored-By: Kimi K2.7 Code <noreply@kimi.com>
|
🎉 Congratulations @Nitjsefnie! Your pull request has been successfully merged into main. 🚀 Thank you for contributing to OpenAgentHQ and helping improve the project. We truly appreciate your contribution and hope to see you back with more amazing PRs! Happy Open Sourcing! ❤️ |
2 tasks
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.
Description
The root
.gitignorecarried a bareconfig.yamlrule. A gitignore pattern with no slash in it is unanchored and matches at any depth, so it also swallowed example configs underexamples/that are meant to be committed —git addexits 0 and stages nothing, with no warning. This anchors the rule to the repository root (/config.yaml), which keeps the developer-secret protection exactly where it was intended and stops it reaching nested paths..gitignoreis the only file changed.Why anchoring rather than a negation. #248 offered both
/config.yamland a!examples/**/config.yamlnegation. Anchoring is the narrower and more predictable of the two: it fixes every directory at once rather than carving out one, and it cannot be defeated by a parent-directory exclusion the way a negation can. Happy to switch to the negation form if you would rather keep the rule broad — your call.Type of Change
Related Issues
Closes #248
How Has This Been Tested?
Both halves were checked, because the second is what proves the protection was not simply deleted.
Before, on a clean checkout of
main:After:
Full suite, single process, as the Coverage job runs it (
uv run --no-sync pytest --cov=openagent_eval --cov-report=term-missing --cov-fail-under=75):Identical to the base, as expected for a
.gitignore-only change.uv run pytest)uv run ruff check .) — not ticked:ruff check .exits non-zero on pre-existing findings atmainitself, so this box cannot be honestly ticked on any PR here. This change touches no Python and adds no findings.uv run mypy openagent_eval/) — not ticked, same reason; also unaffected by a.gitignorechange.Checklist
git check-ignore -vtranscripts above are the evidence, in both directions.Additional Notes
Bug discovered while doing this work, filed separately:
That one is the same defect on
.gitignore:242, which this PR deliberately leaves alone so it closes #248 exactly as written. Two details worth having from that investigation:config.*.yamlon line 242 already subsumesconfig.groq.yamlon line 241 (git reports 242 as the matching rule, so 241 never fires), and line 242 does not cover line 240, because the*sits between two dots and cannot match an empty middle. Say the word and I will fold the anchoring of line 242 into this PR instead of a second one.Generated by Claude Opus 5 (brief, review), Kimi K2.7 Code (implementation)