Repository navigation
Conversation
Review requests and coverage uploads take the repository's stable Proofline ID, but CI and scripts usually know the provider's owner/name (GITHUB_REPOSITORY in GitHub Actions). find_repository resolves it on the sync and async clients with one list_repositories read, and RepositoryName is now exported from proofline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Who this helps
Anyone calling
request_review,request_patch_review,upload_coverage_reportsor the other repository operations from CI or a script. Those calls take the repository's stable Proofline ID, but a GitHub Actions job only knowsGITHUB_REPOSITORY(owner/name). Today every caller lists repositories and writes their own matching loop, and the easy versions of that loop get case handling wrong or silently take the first partial match.What it does
find_repository(organization_id, full_name)on bothProoflineClientandAsyncProoflineClient, built on onelist_repositoriesread. It returns the typedRepositoryName, which is now exported fromproofline.owner/name, and an exact spelling wins over a variant that differs only in case. Only ASCII letters fold, so a Unicode look-alike such as the Kelvin sign in\u212aitnever resolves tokit./, an empty part, surrounding whitespace, or a non-string) raisesValueErrorbefore any request, following thehead_commit_shapattern.ProoflineErrorwithurn:proofline:sdk:repository-not-found. The detail notes that a repository-restricted token only sees its allowlist and that a renamed repository is listed under its new name, the two usual reasons a name is missing.urn:proofline:sdk:ambiguous-repositoryinstead of guessing.repository_name. Server problems from the list call, such as a 403, are kept unchanged.scripts/contracts.pynext toiter_reviewsandwait_for_review, so the operation-coverage contract still holds.Decisions
Octo-Org/APIandocto-org/apias the same repository, so callers should not have to normalize. If a listing ever holds two entries that differ only in case, the caller's exact spelling is the strongest signal; anything still ambiguous is refused, not guessed.octo-org/aporocto/apimust never resolve toocto-org/apiin CI, because that would request a review on the wrong repository.repository.id.How I verified it
tests/test_http.pyagainst the real loopback server, for both the sync and async clients (10 cases):octo-org/api-docsorother-org/apirepository-not-found, and the detail never contains the tokenValueErrorwith zero requests sentstr.lower().python3 scripts/check.pypasses end to end: regeneration, contracts, ruff, mypy, 226 tests, and the wheel and sdist smoke installs.🤖 Generated with Claude Code
https://claude.ai/code/session_01WS5MykmV7shybNY7mjLYLt