Note
Reviews paused
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.
Use the checkboxes below for quick actions:
- βΆοΈ Resume reviews
- π Trigger review
No actionable comments were generated in the recent review. π
βΉοΈ Recent review info
βοΈ Run configuration
- Configuration used: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
c1d16102-343d-43a4-8157-5786649baa30
π₯ Commits
Reviewing files that changed from the base of the PR and between 349acfb26e5deb96fbcbc8d2aae5a3898167a033 and fe994064a71c03bc41088f95cc5bf752e7bab9bb.
π Files selected for processing (7)
core/crates/ployz-store/src/review/authored.rscore/crates/ployz-store/src/review/mod.rscore/crates/ployz-store/src/review/sealed.rscore/crates/ployz-store/src/scope.rscore/crates/ployz-store/src/storage/migrations/0015_sealed_variable.sqlcore/crates/ployz-store/src/storage/mod.rscore/crates/ployz-store/tests/review.rs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
π Summary
Summary by CodeRabbit
- Bug Fixes
- Restoring or undoing history preserves current sealed values instead of replacing them with older secrets. Sealed variables deleted since the saved version remain deleted, and variables added since then remain in place.
- History will not restore a plain-text value for a key that was previously sealed; it reports a conflict and requires the value to be set again.
- Documentation
- Clarified how History handles sealed variables. Existing exclusions for deleted Volume data and private-image credential rotations remain unchanged.
History preparation now preserves sealed variable values when it adjusts a saved configuration. The store records sealed variables per environment. History actions conflict when they would restore plaintext for a key that was previously sealed.
Changes: Sealed Variable History
Layer / File(s) Summary Record sealed variables
core/crates/ployz-store/src/storage/migrations/0015_sealed_variable.sql,core/crates/ployz-store/src/storage/mod.rs,core/crates/ployz-store/src/review/sealed.rs,core/crates/ployz-store/src/review/mod.rs,core/crates/ployz-store/src/scope.rsThe migration adds an environment-scoped table for sealed variable history. Working-state persistence records sealed variables, and review code loads and matches them by service and variable identity. Adjust history targets for sealed variables
core/crates/ployz-store/src/review/authored.rsprepare_historyadjusts its target before preparation. It preserves sealed values and returns a conflict if a target would restore plaintext for a previously sealed key.Verify and document sealed-value history rules
core/crates/ployz-store/tests/review.rs,docs/user/deploy/deployments.mdTests cover previews, staging, deployment, rotations, added and deleted keys, and plaintext restoration conflicts. The documentation describes these history rules and retained exclusions. Priority: β Normal
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
- Bug Fixes
Merge Risk: βͺ Minimal Β· up to fe994
No new issue requiring a change before merge is established by this review.
Security architecture risk: π΅ Low Β· up to fe994
History restores gain durable protection for sealed variables without expanding access. No introduced or worsened security vulnerability was established. Protection for existing unsaved seals during upgrade, and behavior when reverting to an older version, remain limited or uncertain.
Retained concerns No architecture-level concerns identified.
Security review details
Security Blast Radius
- observed β Each history operation is scoped to an environment resolved through the actor's organization and project. Snapshot and ledger queries use that environment ID. The inspected changes do not add cross-organization selection or new privileges.
Trust Boundaries and Controls
- observed β Attacker-controlled history selectors remain behind actor-scoped environment resolution. The mutating path locks the environment, rejects stale review versions, applies sealed-history checks, and validates the target before writing. Overwrite confirmation does not bypass these controls.
Resilience and Maintainability Implications
- observed β The added tests specify preservation across rotation, deletion, addition, repeated history actions, and sealing between saves. These support the normal transition contract but do not establish pre-upgrade backfill or operational binary-rollback safety.
Hardening Proposals
- proposed β Consider backfilling existing sealed working-state identities during upgrade and defining older-version rollback or mixed-writer restrictions. These would extend the new guarantee to legacy unsaved seals and prevent reliance on enforcement unavailable in older versions.
Pre-merge checks Β· Passed 4 Β· Failed 1
Failed Failed checks (1 warning)
Check name Status Explanation Resolution Docstring Coverage Warning Docstring coverage is 55.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 6 files. (1 skipped: β¦ Write docstrings for the functions missing them to satisfy the coverage threshold. Passed Passed checks (4 passed)
Check name Status Explanation 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. Title check Passed The title clearly summarizes the main change: history operations no longer change sealed variables. Description check Passed The description directly explains the sealed-variable history behavior, the prior plaintext restoration issue, and the added test coverage.
Full details: Docstring Coverage
Explanation
Docstring coverage is 55.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 6 files. (1 skipped: 1 unsupported.)
β¨ Finishing Touches π‘ 2
-
π Generate docstrings π‘
- Commit to this branch
- Create a new PR
π οΈ Fix failing CI checks π‘
- Commit to this branch
- Create a new PR
π§ͺ Generate unit tests (beta)
- Commit to this branch
- Create a new PR
- Autofix Β· Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.