From 49a3ccc1594413e7c8b78051b85ea5b0c5ac7bde Mon Sep 17 00:00:00 2001 From: Prism Network Date: Fri, 14 Aug 2026 15:59:13 +0200 Subject: [PATCH] tell a renter it is their workspace being refused a restore below the trust floor answered with the vault's error, so the message said the floor was sealed into an item and the code read vault_trust_floor_unmet. verified against a real lease, which is how the wrong noun turned up. Signed-off-by: Prism Network --- services/control-plane/src/main.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/services/control-plane/src/main.rs b/services/control-plane/src/main.rs index 1bb706a..e91fcc4 100644 --- a/services/control-plane/src/main.rs +++ b/services/control-plane/src/main.rs @@ -352,6 +352,11 @@ enum StoreError { WorkspaceVersionConflict, #[error("workspace limit reached")] WorkspaceFull, + #[error("lease trust class {lease} is below the workspace's floor {floor}")] + WorkspaceTrustFloorUnmet { + floor: &'static str, + lease: &'static str, + }, #[error("storage failure")] Storage(#[source] SqlError), } @@ -5237,7 +5242,7 @@ async fn download_workspace( ) })?; if !vault_release_permitted(workspace.min_trust_class, lease_trust_class) { - return Err(store_error(StoreError::VaultTrustFloorUnmet { + return Err(store_error(StoreError::WorkspaceTrustFloorUnmet { floor: workspace.min_trust_class.label(), lease: lease_trust_class.label(), })); @@ -6439,6 +6444,11 @@ fn store_error(error: StoreError) -> (StatusCode, Json) { "vault_full", "this account is holding the maximum number of vault items", ), + StoreError::WorkspaceTrustFloorUnmet { .. } => forbidden( + "workspace_trust_floor_unmet", + "this lease's trust class is below the floor sealed into this workspace; \ + lower the floor deliberately or restore onto capacity that qualifies", + ), StoreError::VaultTrustFloorUnmet { .. } => forbidden( "vault_trust_floor_unmet", "the lease's trust class is below the floor sealed into this item; \