Skip to content

fix: issue with misconfiguration of data.json#6

Closed
reecebedding wants to merge 1 commit into
mainfrom
fix/policy-data-misconfig
Closed

fix: issue with misconfiguration of data.json#6
reecebedding wants to merge 1 commit into
mainfrom
fix/policy-data-misconfig

Conversation

@reecebedding
Copy link
Copy Markdown
Member

@reecebedding reecebedding commented Jun 3, 2026

Summary by CodeRabbit

  • Refactor
    • Streamlined the policy evaluation workflow by simplifying how policy data is processed, removing redundant intermediate steps for improved efficiency.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 3, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4c18e1e2-1dc4-4844-bd72-615c32d35e4b

📥 Commits

Reviewing files that changed from the base of the PR and between d10dc77 and ed1a7c1.

📒 Files selected for processing (1)
  • internal/eval.go

📝 Walkthrough

Walkthrough

This PR simplifies policy data handling in internal/eval.go. PolicyEvaluator.Eval now passes the provided policyData parameter directly to policyManager.NewPolicyProcessor instead of loading and merging additional data from a data.json file in the bundle root, eliminating the loadBundleRootData helper and its associated dependencies.

Changes

Policy Data Handling

Layer / File(s) Summary
Remove bundle data loader and use provided policyData
internal/eval.go
The loadBundleRootData call within the policy evaluation loop is removed; NewPolicyProcessor now receives policyData directly. The unused loadBundleRootData helper function is deleted, and its imports (encoding/json, os, path/filepath) are removed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A bundle no more shall load its root,
Policydata flows straight, no detour route,
Imports pruned clean, the helper unbound,
Simpler paths make the logic sound! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly addresses the main change: fixing misconfiguration of data.json by removing the redundant loadBundleRootData helper and passing policyData directly to the policy manager.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@saltpy-cs saltpy-cs closed this Jun 3, 2026
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.

2 participants