commit 7b8710675cbbe50f062fe34312bb244ee2fbbb66
parent af4dd2dac29f2d56bc086f383546b460071b5a7b
Author: triesap <tyson@radroots.org>
Date: Sun, 10 May 2026 16:15:44 +0000
cli: close account proof vocabulary
- add account resolution to health check output
- align listing update approval metadata and docs
- document shared account-resolution fields
- cover health and approval parity in cli tests
Diffstat:
3 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/src/operation_core.rs b/src/operation_core.rs
@@ -139,6 +139,7 @@ impl OperationService<HealthCheckRunRequest> for CoreOperationService<'_> {
let actions = health_actions(self.config, store.state.as_str(), &account, &publish);
json_operation_result::<HealthCheckRunResult>(json!({
"state": state,
+ "account_resolution": account_resolution_view(&account),
"checks": {
"workspace": {
"state": "ready",
diff --git a/src/operation_registry.rs b/src/operation_registry.rs
@@ -617,8 +617,8 @@ pub const OPERATION_REGISTRY: &[OperationSpec] = &[
"Update general listing fields.",
Seller,
true,
- Conditional,
- Medium,
+ Required,
+ High,
false,
true
),
@@ -1412,6 +1412,7 @@ mod tests {
"farm.publish",
"listing.rebind",
"listing.publish",
+ "listing.update",
"listing.archive",
"order.submit",
"order.rebind",
diff --git a/tests/target_cli.rs b/tests/target_cli.rs
@@ -679,6 +679,11 @@ fn health_check_exposes_publish_readiness() {
assert_eq!(value["operation_id"], "health.check.run");
assert_eq!(value["result"]["state"], "needs_attention");
+ assert_eq!(
+ value["result"]["account_resolution"]["status"],
+ "unresolved"
+ );
+ assert_eq!(value["result"]["account_resolution"]["source"], "none");
assert_eq!(value["result"]["checks"]["publish"]["mode"], "radrootsd");
assert_eq!(value["result"]["checks"]["publish"]["state"], "unavailable");
assert_eq!(value["result"]["checks"]["publish"]["executable"], false);
@@ -722,6 +727,19 @@ fn health_check_marks_relay_publish_ready_with_secret_backed_local_account() {
assert_eq!(value["operation_id"], "health.check.run");
assert_eq!(value["result"]["state"], "ready");
+ assert_eq!(value["result"]["account_resolution"]["status"], "resolved");
+ assert_eq!(
+ value["result"]["account_resolution"]["source"],
+ "default_account"
+ );
+ assert_eq!(
+ value["result"]["account_resolution"]["resolved_account"]["custody"],
+ "secret_backed"
+ );
+ assert_eq!(
+ value["result"]["account_resolution"]["resolved_account"]["write_capable"],
+ true
+ );
assert_eq!(value["result"]["checks"]["publish"]["mode"], "nostr_relay");
assert_eq!(value["result"]["checks"]["publish"]["state"], "ready");
assert_eq!(value["result"]["checks"]["publish"]["executable"], true);