Skip to content

fix(runtime): require verified recovery authority after upgrades - #191

Merged
RentnerKev merged 1 commit into
mainfrom
fix/controller-recovery-upgrade-authority
Oct 6, 2026
Merged

RentnerKev merged 1 commit into
mainfrom
fix/controller-recovery-upgrade-authority

Conversation

@RentnerKev

Copy link
Copy Markdown
Member

Summary

Controller restart recovery now requires a bounded, regular authority file whose protocol and revision match the validated policy snapshot. Older snapshots wait for an explicit desired-state apply; newly confirmed configurations remain recoverable while the web service is offline.

Snapshot and authority are prepared together inside the existing activation fence. Rollback restores both files, unchanged retries repair missing authority, and certificate-only replacement requires authority for the current policy.

Related issue

Refs #72. Completes the upgrade behavior of #189, which was merged while this additional review was in progress.

Type of change

  • Bug fix
  • Documentation

Testing

  • 52 focused runtime tests passed, including legacy startup, explicit desired-state repair and offline restart, modified policy content, invalid/nonregular authority, authority-write failures, rollback and certificate rotation.
  • Locked offline all-target Clippy with warnings denied, Cargo format, scoped documentation formatting and git diff --check passed.
  • Linux CI exercises the additional Unix authority-symlink cases.
  • Reviewed the complete controller backup/restore paths: snapshot, authority and pending marker are copied together.

Checklist

  • I tested the relevant functionality.
  • Existing relevant tests pass.
  • I added or updated tests where appropriate.
  • This PR does not include secrets, credentials, production data, or private certificates/keys.
  • I updated operations documentation.
  • I linked the relevant review item.

Breaking changes

On the first startup after upgrading from a build without this recovery protocol, cached routes wait for the web service to reapply desired configuration. Snapshot v7 and the database schema are unchanged. Current confirmed snapshots remain recoverable offline; downgrades to older writers are unsupported.

Screenshots

None.

@RentnerKev RentnerKev added this to the v1.0.0-beta.1 milestone Oct 6, 2026
@RentnerKev RentnerKev added security Public security hardening or remediation; disclose vulnerabilities privately. area: runtime Caddy and privileged controller runtime behavior. labels Oct 6, 2026
@coderabbitai

coderabbitai Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 10 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: RentnerKev/RentnerProxy/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3d10534a-0070-42a8-8ca7-1b62417b1f15
📥 Commits

Reviewing files that changed from the base of the PR and between 168d7a2 and 24aad0d.

📒 Files selected for processing (5)
  • core/src/runtime/apply.rs
  • core/src/runtime/configuration.rs
  • core/src/runtime/mod.rs
  • core/tests/private/runtime/recovery.rs
  • docs/operations.md
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

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

@RentnerKev
RentnerKev merged commit 7cb58cc into main Oct 6, 2026
25 of 27 checks passed
@RentnerKev
RentnerKev deleted the fix/controller-recovery-upgrade-authority branch October 6, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Caddy and privileged controller runtime behavior. security Public security hardening or remediation; disclose vulnerabilities privately.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant