feat: harden config diff and apply semantics - #5
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 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 |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Pull request overview
This PR hardens the config diff / config apply workflow by defining and enforcing conservative merge semantics, improving safety around stale plans, pagination completeness, and redaction of config values and error bodies.
Changes:
- Implement conservative merge assessment and apply flow with stable scopes + create/update/delete/unchanged counts, plus deterministic no-op handling.
- Add stricter pagination validation for source snapshots and stronger target identity validation for diff/apply.
- Update CLI help + READMEs and expand OpenAPI/CLI tests for the new contract and redaction behavior.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/openapi.rs | Updates and adds tests for redacted outputs, new diff/apply semantics, no-op, stale-plan, pagination validation, and error-body redaction. |
| tests/cli.rs | Verifies updated --help text for conservative merge semantics. |
| src/mutation.rs | Extends mutation plan metadata to include config-sync strategy/behavior and change counts; exposes MutationScope::render_table. |
| src/http.rs | Adds an OpenAPI request mode that redacts error bodies entirely to prevent leaking secrets from server errors. |
| src/error.rs | Introduces a structured stale_plan error variant with conflict categorization and operation context. |
| src/command.rs | Implements snapshot capture, diff assessment parsing/validation, stale-plan checks, no-op handling, and new structured diff/apply outputs. |
| src/cli.rs | Updates config diff/apply help text to document conservative merge behavior and no-op/deletion expectations. |
| README.zh.md | Documents the conservative merge contract, output fields, no-op/stale-plan behavior, and redaction guarantees (ZH). |
| README.md | Documents the conservative merge contract, output fields, no-op/stale-plan behavior, and redaction guarantees (EN). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 160714948f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 39e4eec8da
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
Testing
Refs apolloconfig/apollo#5668
Refs apolloconfig/apollo#5626