fix(xtest): normalize refs/heads/ prefix in version resolution#444
fix(xtest): normalize refs/heads/ prefix in version resolution#444dmihalcik-virtru merged 3 commits intomainfrom
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 49 minutes and 52 seconds.Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the _annotate function in resolve.py to strip the refs/heads/ prefix from the version string and adds a test case to verify resolution for non-main branches. The review feedback points out a potential regression where stripping this prefix could cause branch names that resemble hexadecimal SHAs to be incorrectly processed by SHA resolution logic later in the function. It also suggests using str.removeprefix() for better readability and notes that this change might affect the alias field in the final result.
X-Test Results✅ go-v0.14.0 |
Resolves refs/heads/<branch> inputs (other than main) by stripping the prefix before lookup, so callers passing full git refs like refs/heads/release/sdk-v0.17 no longer fail version resolution. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3fcd0b6 to
8275879
Compare
X-Test Failure Report |
X-Test Failure Report |
|
X-Test Results✅ go-v0.14.0 |



Resolves refs/heads/ inputs (other than main) by stripping the
prefix before lookup, so callers passing full git refs like
refs/heads/release/sdk-v0.17 no longer fail version resolution.
Example failure this should fix: https://github.com/opentdf/web-sdk/actions/runs/25129340002
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com