Skip to content

feat(p2p-08): add runtime policy sync (#671) - #10

Open
jlon wants to merge 2 commits into
p2p-07-read-acceleration-baselinefrom
p2p-08-runtime-policy-sync
Open

feat(p2p-08): add runtime policy sync (#671)#10
jlon wants to merge 2 commits into
p2p-07-read-acceleration-baselinefrom
p2p-08-runtime-policy-sync

Conversation

@jlon

@jlon jlon commented Mar 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add master-driven runtime policy sync for peer and tenant allowlists.
  • Support startup and periodic refresh, signed updates, and version 0 rollback to local config.

Design

  • Expose policy through a dedicated GetP2pPolicy RPC instead of coupling it to unrelated metadata paths.
  • Serialize runtime updates behind a service lock and verify signatures before applying newer policy versions.

Implementation

  • Add client policy fetch/sync flow in FsClient, FsContext, and P2pService.
  • Add master policy RPC handling, signed policy generation from master config, and tenant-aware publish/fetch gating.

Verification

  • cargo test -p curvine-client signed_runtime_policy_updates_effective_tenant_whitelist
  • cargo test -p curvine-client runtime_policy_version_zero_restores_local_whitelist
  • cargo test -p curvine-server p2p_runtime_policy_uses_master_config_and_signing_key

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@jlon
jlon force-pushed the p2p-07-read-acceleration-baseline branch from 1376195 to b2a02bc Compare March 26, 2026 10:26
@jlon
jlon force-pushed the p2p-08-runtime-policy-sync branch from aff5165 to d10272d Compare March 26, 2026 10:26
@jlon
jlon force-pushed the p2p-07-read-acceleration-baseline branch from b2a02bc to 3be7b3b Compare March 27, 2026 09:32
@jlon
jlon force-pushed the p2p-08-runtime-policy-sync branch from d10272d to ec1930b Compare March 27, 2026 09:32
@jlon
jlon force-pushed the p2p-07-read-acceleration-baseline branch from 3be7b3b to 9a154ce Compare March 30, 2026 00:55
@jlon
jlon force-pushed the p2p-08-runtime-policy-sync branch from ec1930b to 07c2d7f Compare March 30, 2026 00:55
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.

1 participant