From 94574103655ebd4edc4ff95b0c9caebae52afa1c Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 23 Sep 2026 21:35:06 +0200 Subject: [PATCH] Log every refused Eve command with its operation and message A sign-in completion that Heimdall redeemed was refused by Ghostlight with no trace outside the browser that received it. The command-result builder now logs every refusal (not accepted, completed or pending) at warn, with the operation and the refusal message, never the payload. Co-Authored-By: Claude Opus 5.5 --- crates/ghostlight-dungeon/src/eve.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/crates/ghostlight-dungeon/src/eve.rs b/crates/ghostlight-dungeon/src/eve.rs index d5649d4..5faf7e7 100644 --- a/crates/ghostlight-dungeon/src/eve.rs +++ b/crates/ghostlight-dungeon/src/eve.rs @@ -712,6 +712,18 @@ pub(crate) fn command_result( plugin_payload: Option, receipt_extra: Option, ) -> Value { + let message = message.into(); + // A refusal is otherwise visible only to the browser that received it. + // The operator log gets the operation and the refusal's own message, + // never the payload. + if !matches!(state, "accepted" | "completed" | "pending") { + tracing::warn!( + operation = %invocation.operation.operation_id, + state, + message = %message, + "Eve command not accepted" + ); + } let mut receipt = json!({ "schema":COMMAND_RECEIPT_SCHEMA, "receiptId":Uuid::new_v4().to_string(), @@ -722,7 +734,7 @@ pub(crate) fn command_result( "authority":PROVIDER_ID, "providerId":PROVIDER_ID, "surfaceId":SURFACE_ID, - "message":message.into(), + "message":message, // The contract requires a source version and refuses a null one. A // command that reports no version reports the surface it was decided // against, which is 0 before any world exists.