Skip to content

feat: glob support in the repo caveat matcher (adjoint/*) - #30

Merged
cptfinch merged 1 commit into
mainfrom
feat/repo-glob-matcher
Jul 22, 2026
Merged

cptfinch merged 1 commit into
mainfrom
feat/repo-glob-matcher

Conversation

@cptfinch

Copy link
Copy Markdown
Contributor

Closes #22.

Summary

  • RepoEq now matches via a minimal glob (* = any sequence) when the pattern contains * — e.g. repo = "adjoint/*" in a profile matches every repo under that owner
  • Exact-match patterns (no *) are byte-for-byte unchanged
  • No new Caveat variant, no macaroon serialisation change — purely a semantics change to how RepoEq is checked, per ADR 0008 Phase 2
  • Hand-rolled matcher, no new dependency (single wildcard type, no need for the glob crate)

Test plan

  • cargo fmt && cargo clippy --all-targets -- -D warnings && cargo test --all — all pass (31 unit + 28 CLI integration)
  • New tests: glob_match_cases, repo_eq_glob_matches_owner_prefix, repo_eq_exact_match_unchanged

Phase 2 of ADR 0008. RepoEq now matches via glob if the pattern
contains '*' (owner/*, */repo, etc.); exact-match patterns are
unchanged. No new Caveat variant, no macaroon format change.
@cptfinch
cptfinch merged commit f312df4 into main Jul 22, 2026
2 checks passed
@cptfinch
cptfinch deleted the feat/repo-glob-matcher branch July 22, 2026 11:04
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.

Glob support in the repo matcher (adjoint/*)

1 participant