You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
job_rules.t27: take the trusted N, F and M from network/quorum.t27, drop the TEMP copy #8849
specs/network/job_rules.t27 (the network job's rules, see #8790 and PR #8793) still carries its own TEMP copy of the trusted quorum: TRUSTED_N 4, TRUSTED_F 1, TRUSTED_M 3 and trusted_quorum(), restating network/mvp_v2.t27.
PR #8807 (see #8788) put the quorum in one place: specs/network/quorum.t27, with TRUSTED_N/F/M, trusted_config(), safe_m() and quorum_admits() (2M > N + F and M <= N - F, M to N operator votes). quorum.t27 uses no hash and no signature scheme, so job_rules.t27 can import it next to ed25519.
Change
job_rules.t27 use network::quorum;. Delete its TEMP TRUSTED_N/F/M and trusted_quorum.
quorum_verdict() answers QV_QUORUM when quorum_admits(trusted_config(), votes). Everything else stays: BELOW_QUORUM from TEST_CREDIT_MIN_VOTES, NO_VOTE, SPLIT.
Tests and the invariant read quorum.t27's values.
Then (trios, hosting-mvp)
Re-vendor job_rules.t27 and rebuild job_rules.wasm (t27c gen Zig + zig wasm32-freestanding) and queen-network-rules.gen.ts, behind TRIOS_QUEEN_NETWORK_JOBS (off by default).
Given specs/network/job_rules.t27 currently defines its own TRUSTED_N 4, TRUSTED_F 1, TRUSTED_M 3 and trusted_quorum(), When the spec is updated to use network::quorum; and those local definitions are removed, Then quorum_verdict() uses quorum_admits(trusted_config(), votes) from quorum.t27 for the QV_QUORUM case.
Requirements
FR-001: specs/network/job_rules.t27 MUST use network::quorum;.
FR-002: specs/network/job_rules.t27 MUST delete its local TRUSTED_N, TRUSTED_F, TRUSTED_M constants and trusted_quorum() function.
FR-003: quorum_verdict() in job_rules.t27 MUST return QV_QUORUM when quorum_admits(trusted_config(), votes) is true.
FR-004: The BELOW_QUORUM, NO_VOTE, and SPLIT verdict logic in job_rules.t27 MUST remain unchanged.
Success Criteria
t27c check specs/network/job_rules.t27 exits 0
t27c check specs/network/quorum.t27 exits 0
5 tests in specs/network/job_rules.t27 pass (exit 0)
specs/network/job_rules.t27 imports network::quorum and no longer defines TRUSTED_N, TRUSTED_F, TRUSTED_M, or trusted_quorum
Activity
network: job_rules.t27 takes the trusted N, F and M from quorum.t27, …
feat(queen): the network job's quorum is t27 network/quorum.t27's -- …