/// INITIALIZING VOTE PATHS
> Select a consensus path to begin execution.
ABOUT vortexVote.js
This console is a browser-side mirror of a small, dependency-free Bun/ES module. It exposes pure functions for each path plus a dispatcher, so the same logic can run in a UI, a CI gate, or a CLI without modification. MID_PATH here reproduces the module's own documented behavior without a pollFn: the 9-round cyclic audit is deterministic, so passes lands on exactly 0 or 9, never in between — see the whitepaper's §3 for why.
// bun add / clone, then: import { runVote, VotePath, isOk } from "./vortexVote.js"; const result = runVote(VotePath.MIDDLE, { seedVotes: [{vote:"accept"}, {vote:"accept"}, {vote:"accept"}], validatorVotes: [{vote:"accept"}, {vote:"accept"}, {vote:"accept"}, {vote:"accept"}, {vote:"reject"}, {vote:"reject"}], }); if (isOk(result)) { result.value; // { outcome: "COMMIT", details: { passes: 9, rounds: [...], passThreshold: 7 } } } else { result.error; // VortexVoteError — malformed input, not a business outcome }
> NOTE: this console mirrors the module's business logic (the quorum/threshold/guard-chain rules) but not its Result/Err boundary — every vote here is pre-validated by the UI itself, so it can only ever produce the Ok(...) outcomes shown above. The malformed-input path (Err(VortexVoteError)) is exercised in the test suite, not in this console.