Fix policy definition version normalization - #2861
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAI Workspace policy definition requests now normalize version strings before encoding them. The pull-request workflow builds the workspace image using ChangesAI Workspace updates
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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. Comment |
This reverts commit 6bd6028.
|
Thank you for your contribution. |
Purpose
Applied policies in AI Workspace may store versions using the gateway format, such as
v1. Policy Hub expects the corresponding definition version as1.0, causing requests such as/versions/v1/definitionto fail.Fixes #2855
Goals
Ensure policy definitions load correctly when users inspect an applied policy in AI Workspace.
Approach
Normalize policy versions in the shared Policy Hub definition API helper:
v.major.minor.For example:
v1→1.0v1.0→1.01.0→1.0Because the normalization is implemented in the shared helper, it applies to both LLM Provider and LLM Proxy policy drawers.
User stories
As an AI Workspace user, I can inspect an applied policy and view its parameters without the policy definition request failing because of incompatible version formatting.
Documentation
N/A — this fixes internal request construction and does not change documented product behavior.
Automation tests
Security checks
Samples
N/A
Related PRs
N/A
Test environment
Static validation completed with
git diff --check. The production build could not be run because project dependencies are not installed in the local environment.