You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
codeownership validate --diff not respecting owned_globs #147
I recently noticed that my calls to codeownership validate --diff had started to fail for files that were not specifically included in the owned_globs part of our code_ownership.config file.
I first verified that when running just codeownership validate without --diff that the validation was still succeeding (which it was).
Then I verified that adding the extension of the file I was expecting to not fail validation to my owned_globs did cause it to fail.
Additionally, I verified that specifically excluding the file path in unowned_globs did not allow the --diff command to succeed.
Then I decided to figure out the last version that the --diff command was running successfully for my setup.
I determined that the change occurred in the 2.0.0.5 release and has been an issue since.
The specific error that occurs in the validate command is:
This is fixed as of code_ownership 2.1.2 (released 2026-04-17), which picked up codeowners-rs v0.3.2 and with it rubyatscale/codeowners-rs#89, "Fix validate to respect owned_globs when files specified."
I reproduced your setup — owned_globs: ['app/**/*.rb'], with a file outside that glob (script/deploy.rb) staged — and ran codeownership validate --diff against each release:
version
result
2.0.0.pre.5
Unowned files detected: script/deploy.rb
2.1.1
Unowned files detected
2.1.2
passes
2.1.4 (latest)
passes
As a control, an unowned file insideowned_globs still fails --diff on 2.1.4, so staged files are genuinely being validated — out-of-glob files are just correctly ignored now.
Upgrading to 2.1.2 or later should resolve it. Closing, but please reopen if you still see it on a current version.
Activity
dduugg commentedon Sep 25, 2026
This is fixed as of code_ownership 2.1.2 (released 2026-04-17), which picked up codeowners-rs v0.3.2 and with it rubyatscale/codeowners-rs#89, "Fix validate to respect owned_globs when files specified."
I reproduced your setup —
owned_globs: ['app/**/*.rb'], with a file outside that glob (script/deploy.rb) staged — and rancodeownership validate --diffagainst each release:Unowned files detected: script/deploy.rbUnowned files detectedAs a control, an unowned file inside
owned_globsstill fails--diffon 2.1.4, so staged files are genuinely being validated — out-of-glob files are just correctly ignored now.Upgrading to 2.1.2 or later should resolve it. Closing, but please reopen if you still see it on a current version.