BrokerError.Error() drops the broker Stage — provision-stage rent faults reach the S4a card unlabelled (rent-fails-clean passes /provision/i only by coincidence) #673
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#673
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
internal/founding/access.go:169—func (e *BrokerError) Error() string { return e.Message }— discards theStagefield ("claim"/"provision"). A correctly-surfaced provision-stage rent failure therefore reaches the S4adata-status="rent-error"card as its bareMessageonly, with no mention of the stage it failed at.The
rent-fails-cleanhonesty leg asserts the rent-error text matches/provision/i(tests/e2e/journey.rented.spec.ts:179-184). Today that assertion only passes by coincidence — the broker's literal fault string for the rehearsal fault happens to contain the word "provision". Any other provision-stage failure whose message does not contain that word would fail the same honesty check for the same underlying reason: the stage never actually reaches the UI.Surfaced while fixing #672 (the transient post-create 404 that masked this leg's intended fault). Per #672's own note this is a separate, lower-severity gap and was deliberately NOT folded into #672's broker
pollActiveretry fix.Why this needs a decision, not a mechanical patch
BrokerError.Error()is used as a plainerror; the natural mechanical fix (prefixStageinto the string) changes an error message consumed in several places and is a blunt instrument. The real question is howStageshould reach the Vue S4a card — as a distinct field the card renders (a labelled "stage: provision" chip) vs. a formatted message vs. the test asserting on adata-status/data-fieldstage attribute rather than the free-text message. That's a small design/UX-contract call (DDR 0190'srent-errorblock), best made by a session/human, not guessed by a swarm agent.Proposed direction (for triage to confirm)
Carry
Stageto the S4a card explicitly — e.g. adata-fieldon therent-errorblock populated fromBrokerError.Stage— and change therent-fails-cleanassertion to check that structured stage rather than fishing for/provision/iin the free-text message. Then the honesty leg proves the stage genuinely propagated, not that a literal string happened to contain a word.Found while working #672.
Verified.
BrokerError.Error()returnse.Messageonly, droppingStage. Confirmed by reading the struct and its soleError()implementation, and by tracing that nothing between there and the frontend (the wasm bridge'sdraft()call, which surfaceserr.Error()as the JSError.messagethe S4a card renders intodata-field="fault-line") ever readsStageeither. Therent-fails-cleane2e leg's/provision/iassertion (s4aRentExpectFailin the wizard fixtures) passes today only because the rehearsal broker's literal fault message happens to contain the word "provision" — exactly the coincidence the issue describes.Ruled by agent under ADR 0174 — veto anytime.
Ruling: this is not an open design question — DDR 0190 (accepted 2026-08-21) already answers it. The accepted
p1-s4a-rent-a-server.htmlwireframe'sdata-field="fault-line"example content is literallyprovision — the broker couldn't create your server; nothing was left running. Try again.— i.e. the design contract is a single free-text line in{stage} — {message}form, not a separate structureddata-field="stage"chip. The issue's "proposed direction" (a distinct stage field/attribute) would reopen an already-accepted design decision rather than implement it. The correct fix is the mechanical one the issue's own body calls "blunt" but is in fact exactly what the wireframe specifies: formatStageinto the string in that shape, and stop relying on an incidental substring match to prove it.Why this is a two-way door: it's a formatting change inside one method plus one test-assertion tightening — revertible with a follow-up commit, touches no security posture, no credentials, no member-facing trust surface, and destroys nothing.
What proves it:
TestRentServer_...in the founding package,TestClient_RentProvisionErrorIsBrokerErrorin the brokerclient package) assert on the*BrokerError's.Stage/.Messagefields directly viaerrors.As, never on.Error()'s string shape — so they stay green through this change untouched.rent-fails-cleane2e leg already exercises exactly this path end-to-end against a real broker-reported provision failure, and its assertion is what needs tightening — from an incidental/provision/isubstring match to an assertion that the fault-line genuinely carries the stage (e.g. anchored at the start of the string), so the leg proves the stage propagated rather than proving a lucky word collision.Labelling
bug+ready-for-agentwith the brief below.Agent Brief
Category: bug
Summary:
BrokerError's error string drops the broker's failureStage, so the S4a rent-error card can't reliably show which stage (claimvsprovision) a rent failed at, and the leg that's supposed to prove this only passes by coincidence.Current behavior:
A rent failure carries a
Stage("claim" or "provision") and a plain-languageMessage, but the error's string form — the thing that ultimately reaches the S4a card's single fault-line paragraph — surfacesMessagealone.Stageis silently discarded between the broker boundary and the UI. Therent-fails-cleanrehearsal leg asserts the rendered fault-line matches/provision/i, and today that only passes because the rehearsal broker's specific fault message happens to contain the literal word "provision" — any other provision-stage message without that word would fail the same check for the same underlying reason.Desired behavior:
The error string reaching the S4a card's fault-line renders as
{stage} — {message}(em dash), matching the accepted DDR 0190 wireframe contract's example content exactly (p1-s4a-rent-a-server.html'sdata-field="fault-line"block:provision — the broker couldn't create your server; nothing was left running. Try again.). This applies uniformly to both failure stages (claimandprovision) — the type carries both today and the fix is generic, not provision-specific. No new DOM field or attribute is introduced; the existing singledata-field="fault-line"paragraph is where the stage now visibly appears.The
rent-fails-cleanleg's assertion should be tightened so it proves the stage genuinely propagated, not that a message happened to contain a matching word — e.g. assert the fault-line starts with the stage token, rather than a bare unanchored/provision/isubstring search anywhere in the text.Key interfaces:
Error() string) — currently returns the message field alone; should compose stage + message in the wireframe's established"{stage} — {message}"shape.rent-fails-cleane2e leg's fault-line assertion (currently an unanchored/provision/imatch against thedata-status="rent-error"block) — tighten to check the stage is actually what's driving the match, e.g. anchor the pattern at the start of the fault-line text.Acceptance criteria:
claim-stage rent failure's rendered fault-line text begins withclaim —.provision-stage rent failure's rendered fault-line text begins withprovision —.Stage/Messagestruct fields directly (viaerrors.As) continue to pass unmodified — they don't depend on the string form's shape.rent-fails-cleane2e leg's fault-line assertion is provably keyed on the stage (e.g. anchored match), not an incidental substring anywhere in the message — a mutation test (temporarily change the rehearsal fault message to not contain "provision" while keepingStage: "provision") would still pass with the new assertion and would have failed the old one.data-field/data-statusDOM attribute is added to the S4a wireframe or component — the fix stays inside the existing single fault-line paragraph, per DDR 0190's accepted contract.Out of scope:
claim-stage message wording beyond the stage prefix (e.g. "That community name is already taken…" stays as-is, just prefixed).broker/) — it already reports{error, stage}correctly; the gap is entirely on the consuming side.swarm-claim host=matou-dev-server-01 run=8917
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #673 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope
provision — DigitalOcean refused: Not Found#682