fix(schema): restrict absent packages to pacman - #12815
Conversation
Entire-Checkpoint: 01M1R234TW6RKEYCNYMBH5KE2T
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited) Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe package schema adds pacman-specific state validation. End-to-end schema tests add valid apt declarations and verify that apt rejects ChangesPackage schema validation
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to Package removal declarations are now limited to pacman while supported apt package declarations remain valid. The schema behavior is covered by strict validation tests, with no current merge-readiness risk identified. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
Greptile SummaryThis PR narrows declarative package-removal schema support to pacman entries without changing the shared package-option schema.
Confidence Score: 5/5The PR appears safe to merge; the schema restriction and its focused fixtures match the stated behavior. No actionable failures remain: supported non-pacman forms still validate, pacman removal remains valid, and non-pacman removal is covered by a failing schema fixture. Important Files Changed
Reviews (1): Last reviewed commit: "fix(schema): restrict absent packages to..." | Re-trigger Greptile |
|
This PR currently has failing checks. If this continues for 7 days, it will be closed automatically. This is warning day 1 of 7. Please update the PR when you have a chance. Feel free to reopen or create a new PR if it is closed and you'd like to continue working on it. This comment was generated by an automated workflow. |
The schema currently accepts
"apt:curl" = { state = "absent" }, although only pacman implements declarative package removal. Restrictabsenttopacman:entries while preserving string versions, omitted state, and explicitpresentfor other managers. Keep the shared package-option schema intact.Adds a non-pacman invalid fixture and verifies ordinary apt entries alongside the existing valid pacman removal fixture. Runtime behavior is unchanged.
Follow-up to #12785; addresses the outside-diff finding in #12741. Based directly on
main.Validation:
mise run render:schema,mise run lint-fix(including strict schema compilation and Cargo check), andmise run --skip-deps test:e2e e2e/config/test_schema_tombipassed. The e2e harness used the existing binary because the change only affects schema and fixtures.AI-assisted — Tool: Codex; model: openai/unavailable; version: unavailable.
Summary by CodeRabbit
New Features
state = "present"alongside existing version formats.Bug Fixes