fix(marmot-interop): peel .result wrapper when reporting Test 10's B view

Post-v0.2 wn wraps `--json groups show` output in {"result": {...}},
so `jq '{name, epoch}'` was reading the top level where those keys
don't exist — Test 10 always logged "B state: {name: null, epoch: null}"
and the operator couldn't tell whether the race produced the expected
converged state on wn's side.

Peel the .result wrapper before extracting the fields; same pattern
already used everywhere else in the script that parses wn JSON.
This commit is contained in:
Claude
2026-04-22 21:54:18 +00:00
parent 7295c12c82
commit 6f3abac3b2
+4 -1
View File
@@ -1084,7 +1084,10 @@ test_10_concurrent_commits() {
step "verifying B's view is consistent (name + epoch)"
local b_view
b_view=$(wn_b --json groups show "$gid" 2>/dev/null | jq '{name, epoch}' 2>/dev/null || echo "{}")
# Post-v0.2 wn wraps `groups show` output in {"result": {...}}; peel
# that wrapper before extracting the fields so the info log isn't
# "name: null, epoch: null" on every run.
b_view=$(wn_b --json groups show "$gid" 2>/dev/null | jq '(.result // .) | {name, epoch}' 2>/dev/null || echo "{}")
info "B state: $b_view"
prompt_human "Read the group name now shown in Amethyst."