feat(update): fix schema-3 verify-before-parse and add replay floor, TrustStore, pin pruning, and InstallCoordinator

This commit is contained in:
faumaray committed 2026-11-25 21:04:52 +03:00
1 parent 00d7478335
commit 47736cb6ce
13 files changed
+2663 -23

No files matched your search

+16
View File
@@ -8,10 +8,16 @@
#include <cstdint>
#include <filesystem>
#include <optional>
#include <span>
#include <vector>
namespace Void::Update
{
struct PruneReport {
std::vector<Semver::Version> removed{};
std::vector<Semver::Version> skipped_due_to_pins{};
bool batch_limit_reached{false};
};
struct PendingActivation {
std::optional<Semver::Version> previousVersion;
Semver::Version candidateVersion;
@@ -86,6 +92,16 @@ namespace Void::Update
Void::Result::Result<std::vector<Semver::Version>>
prune(std::size_t retainedPreviousVersions);
/// Pin-aware bounded pruning pass. Never deletes the active
/// version, pending activation candidate/previous, top
/// `retainedPreviousVersions` healthy versions, or any version in
/// `pinnedVersions`. Reports pin-blocked candidates and honors
/// `batchLimit` (default 16 publications per pass).
[[nodiscard]] Void::Result::Result<PruneReport>
pruneWithPins(std::size_t retainedPreviousVersions,
std::span<const Semver::Version> pinnedVersions,
std::size_t batchLimit = 16);
[[nodiscard]] Void::Result::Result<std::optional<Semver::Version>>
currentVersion() const;
[[nodiscard]] Void::Result::Result<std::optional<PendingActivation>>