Diagnose a missing vote
Identify the first stage that gives an unexpected result. Save the dialect definition and the thread identifier. Save the complete message with the authenticated signer identity. Record the addresses of its predecessors. Use these inputs to repeat the check.
| Symptom | Examine | What to do |
|---|---|---|
| The application cannot install the dialect | Parse error, undefined verb, redefined core verb or invalid state reference | Check the definition on its own. Declare source state fields before the fields derived from them. |
| The Vote button gives no act | The sender’s intent result and local opener | Check the choice against the options. Supply a valid clock. A refused intent has no canonical vote to deliver. |
| A delivered vote is pending | Its cited predecessor and the receiver’s accepted history | Get the missing predecessor. Check its admission. If the runtime accepts it, retry the vote. |
| Admission rejects the act | The returned reason, field types, bounds and authenticated signer | Compare the actual message to the installed definition. For role-scoped verbs, examine the root’s cast. |
| Admission succeeds but the tally does not change | Domain eligibility, address, signer and competing ballots | Check for duplicate delivery. Check the domain. Examine the current ballot for this signer. |
Reproduce each stage
Use the command line to isolate parsing or examine a definition. In a JavaScript receiver, runtime.admit(thread, history, candidate) returns the individual verdict. runtime.verdicts(thread, records) shows which records are pending, accepted or rejected after replay. runtime.read(thread, records) exposes the projections. Examine the per-signer ballots map before its histogram.
In Rust, check the outer Result of admit_str before you decode its JSON verdict. A frame error prevents evaluation. A pending verdict means evaluation succeeded with incomplete causal evidence. Supply only accepted records to the native fold, as in Admit and fold a thread in Rust.
Check a refused vote
Run the lunch poll example. Bob first votes for Sushi. The receiver accepts that vote. Bob then tries to vote for Soup. The sender refuses that choice because the proposal lists only Sushi and Pizza. The receiver gets no second vote. The example prints:
Soup rejected: outside the proposed options
Tally: {"Sushi":1}
Check a rejected proposal
Copy the poll dialect as shown in Run a lunch poll. In your copy, change (max-list 24) to (max-list 1). Run the example with that file.
node node_modules/@anuna/cbcl/examples/lunch-vote.mjs poll.cbcl
The receiver rejects the proposal because it contains two options. Look for this error:
Error: {"verdict":"rejected","reason":"state shape: shape violation: :options of 'propose' exceeds max-list 1"}
The program stops before Bob can vote or the receiver can print a tally.