Show scheduled enactment for approved tech referenda - #140
Conversation
Approved status used to print the approval block and tell the user to check the scheduler. Look up Scheduler::Lookup for the pallet-referenda enactment task so status prints the actual enactment block and ETA, or that it already executed. Also include an absolute UTC time for past blocks, matching the future-block format.
n13
left a comment
There was a problem hiding this comment.
Verdict: REQUEST_CHANGES — the new terminal status can report a failed or cancelled enactment as executed.
Blocking finding
- [P1] Do not infer execution from a missing scheduler lookup (
src/cli/tech_referenda.rs:960):Scheduler::Lookupis removed for every terminal scheduler outcome, not only successful dispatch. The runtime metadata includesCanceled,CallUnavailable, andPermanentlyOverweight, and aDispatchedevent can itself contain an error, while the referendum record remainsApproved. In each of those cases thisNonearm tells the operatoralready executed, even when the approved call was never enacted. Please either resolve the matching scheduler outcome/result from events or use neutral wording such asno longer scheduled; execution outcome unavailable.
Validation
cargo +nightly fmt --all -- --check— passedSKIP_CIRCUIT_BUILD=1 cargo test --locked tech_referenda::tests— passed (4 library + 4 binary tests)SKIP_CIRCUIT_BUILD=1 cargo clippy --all-targets --locked -- -D warnings— passed- All six GitHub CI jobs are green at
8288db768e018e54ca2035bfb11aba141caef07e
The task-name formula and pending-enactment lookup otherwise match the chain implementation.
…scheduled A missing Scheduler::Lookup entry does not imply successful dispatch — the lookup is also removed for Canceled, CallUnavailable, and PermanentlyOverweight outcomes. Report the outcome as unavailable instead of claiming the enactment was already executed. Addresses review on #140
n13
left a comment
There was a problem hiding this comment.
Verdict: APPROVE — the prior scheduler-outcome blocker is resolved and no blocking findings remain.
The new head replaces the unsupported already executed inference with the accurate neutral status no longer scheduled; execution outcome unavailable. I rechecked the complete base-to-head diff: the enactment task-name derivation matches pallet-referenda, the pending block is read from Scheduler::Lookup at the same chain state as the referendum, and the past/future ETA formatting remains sound.
Validation
- Reviewed intervening commit
8288db7..c97c471and full difff0a6432...c97c471 git diff --check f0a6432...c97c471— passedcargo +nightly fmt --all -- --check— passedSKIP_CIRCUIT_BUILD=1 cargo test --locked tech_referenda::tests— passed (4 library + 4 binary tests)- All six GitHub CI jobs passed at
c97c47119fa4897887a6b86ef51d47a34e044cd0
No blocking findings.
quantus tech-referenda statusalready printed phase and enactment estimates for ongoing referenda (#132 / #133), but Approved still only said "check the scheduler". This fills that gap.What's new
Scheduler::Lookupfor the pallet-referenda enactment task (blake2_256(("assembly", "enactment", index))) and print the actual scheduled block + ETAformat_block_etanow includes an absolute UTC timestamp for blocks in the past, matching the future-block format (e.g.block 797055 (~46min ago, ≈ 2026-08-10 12:21 UTC))Related older work that this is not a duplicate of:
Tests
enactment_task_name_matches_pallet_referenda_formulaformat_block_eta_includes_absolute_time_for_past_and_future