feat(agent-config): policy_data model and minimal merge patches [7/21] - #328
Open
gusfcarvalho wants to merge 2 commits into
Open
gusfcarvalho wants to merge 2 commits into
gusfcarvalho wants to merge 2 commits into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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 |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Numeric literals can be silently rounded, and null-valued object members are incorrectly converted into deletions.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Adds structured policy_data editing utilities, minimal merge-patch generation, and agent configuration API contracts.
Changes:
- Adds policy-data tree parsing and mutation helpers.
- Generates minimal RFC 7396 patches with tests.
- Defines shared agent-config API types and errors.
| File | Description |
|---|---|
src/utils/agent-config/policy-data.ts |
Adds tree, scalar, mask, and environment-reference helpers. |
src/utils/agent-config/policy-data-patch.ts |
Builds minimal policy-data merge patches. |
src/utils/agent-config/__tests__/policy-data.spec.ts |
Tests policy-data helpers. |
src/utils/agent-config/__tests__/policy-data-patch.spec.ts |
Tests merge-patch behavior. |
src/composables/agent-config/api-types.ts |
Defines agent-config client contracts. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+64
to
+65
| if (!deepEqual(before, after)) | ||
| out.push({ op: 'set', ptr, value: clone(after) }); |
Comment on lines
+116
to
+121
| /** True when `n` survives a JSON round trip as typed: finite, and an integer only up to 2^53. */ | ||
| function isStorableNumber(n: number): boolean { | ||
| return ( | ||
| Number.isFinite(n) && | ||
| !(Number.isInteger(n) && Math.abs(n) > Number.MAX_SAFE_INTEGER) | ||
| ); |
gusfcarvalho
force-pushed
the
agent-config/07-policy-data
branch
from
October 5, 2026 16:32
f382778 to
251c193
Compare
This was referenced Oct 6, 2026
ccf-lisa
Bot
force-pushed
the
agent-config/07-policy-data
branch
from
October 6, 2026 09:40
251c193 to
f12948f
Compare
ccf-lisa
Bot
force-pushed
the
agent-config/07-policy-data
branch
from
October 6, 2026 11:38
f12948f to
a403fa1
Compare
This was referenced Oct 6, 2026
Open
This was referenced Oct 6, 2026
Layer 7 of 21 in the stacked split of #318. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion policy-data.ts reuses validation.ts isStorableNumber and exports hasUnstorableNumber for the raw policy_data view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ccf-lisa
Bot
force-pushed
the
agent-config/07-policy-data
branch
from
October 6, 2026 13:32
a403fa1 to
a1f76ff
Compare
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.


Part 7 of 21 of the stacked split of #318 (agent remote configuration). Every layer adds the final version of its files from #318, and only imports from layers below it, so each layer passes
make reviewableon its own. Nothing is reachable in the app until layer 20 wires the Configuration tab in.What
Models
policy_dataas a tree and records edits as minimal merge patches (key-level and list-element changes, masked-value handling). Also adds the API request/response types for the agent-config endpoints.Tests
Unit specs for policy-data and policy-data-patch.
🤖 Generated with Claude Code