Repository navigation
Swap pilot: five chat guards run t27c gen-rust output behind adapters; original tests unchanged #1895
Copy link
Copy link
Open
Description
Part of #1812. Uses the baseline of #1825 (PR #1827).
Goal
Prove the swap end to end on the 5 trios-chat ports that are already merged in gHashTag/t27 and whose t27c gen-rust output compiles. Record the cost per file (minutes and adapter lines) so the remaining waves are estimated from measurements.
Files
Original file (under crates/trios-chat/) |
t27 spec (merged in gHashTag/t27) | Seal on t27 master | Generated verdict shape |
|---|---|---|---|
rings/CR-CHAT-01/src/key_package_expiry_guard.rs |
PR 8187 | src_port::trios::crates::trios-chat::rings::CR-CHAT-01::src::key_package_expiry_guard.json |
i32 codes KPX_OK..KPX_ZERO_LIFETIME |
rings/CR-CHAT-02/src/epoch_rollover_wraparound_guard.rs |
PR 7647 | src_port::epoch_rollover_wraparound_guard.json |
enum with an extra Ok variant |
rings/CR-CHAT-03/src/ratchet_tree_resolution_guard.rs |
PR 8461 | src_port::ratchet_tree_resolution_guard.json |
struct { ok, error }; RTRS_MAX_RESOLUTION is u32 in the port, usize in the original |
rings/CR-CHAT-03/src/unmerged_leaves_bound_guard.rs |
PR 8445 | src_port::unmerged_leaves_bound_guard.json |
i32 codes |
rings/CR-CHAT-07/src/cover_decoy_ratio_governor.rs |
PR 7969 | src_port::cover_decoy_ratio_governor.json |
i32 codes |
Files this PR touches
Owner work done by dmitrii-f-t27 in PR (linked below); not a bee task, please do not shape or dispatch it.
crates/trios-chat/rings/CR-CHAT-01/src/key_package_expiry_guard.rscrates/trios-chat/rings/CR-CHAT-01/src/t27gen/key_package_expiry_guard.rscrates/trios-chat/rings/CR-CHAT-02/src/epoch_rollover_wraparound_guard.rscrates/trios-chat/rings/CR-CHAT-02/src/t27gen/epoch_rollover_wraparound_guard.rscrates/trios-chat/rings/CR-CHAT-03/src/ratchet_tree_resolution_guard.rscrates/trios-chat/rings/CR-CHAT-03/src/t27gen/ratchet_tree_resolution_guard.rscrates/trios-chat/rings/CR-CHAT-03/src/unmerged_leaves_bound_guard.rscrates/trios-chat/rings/CR-CHAT-03/src/t27gen/unmerged_leaves_bound_guard.rscrates/trios-chat/rings/CR-CHAT-07/src/cover_decoy_ratio_governor.rscrates/trios-chat/rings/CR-CHAT-07/src/t27gen/cover_decoy_ratio_governor.rscrates/trios-chat/rings/CR-CHAT-01/Cargo.toml,CR-CHAT-02/Cargo.toml,CR-CHAT-03/Cargo.toml,CR-CHAT-07/Cargo.toml(only a[lints.rust]check-cfg entry)crates/trios-chat/T27_PIN
User Scenarios
- Given the five original guard files at trios
8b229e9489ee, when their logic is replaced byt27c gen-rustoutput behind an adapter, then every original test of the four rings passes unchanged and the frozen e2e, falsifier and vector outputs are identical. - Given a vendored generated file, when one comparison in it is flipped, then at least one original test fails; when it is regenerated, all pass again.
Requirements
- FR-001: each
rings/<R>/src/t27gen/<stem>.rsMUST be byte-identical tot27c gen-rustoutput at the t27 SHA recorded inT27_PIN, and its sha256 MUST equal the seal'sgen_hash_rust. - FR-002: each
rings/<R>/src/<stem>.rsMUST keep the original pub consts (original types), error enums with derives and#[non_exhaustive], docs and the original#[cfg(test)]module byte for byte. - FR-003: generated items MUST stay private (
mod t27gen, neverpub mod). - FR-004: no new compiler warnings outside
mod t27gen.
Success Criteria
- For each of
trios-chat-cr-chat-01,-02,-03,-07:cargo test -p <pkg> -- --list 2>/dev/null | grep ': test$' | sort | diff - crates/trios-chat/golden/test-names/<pkg>.txtprints nothing, andcargo test -p <pkg>reports the baseline count with 0 failed. - For each swapped file:
diff <(git show 8b229e9489ee:crates/trios-chat/rings/<R>/src/<stem>.rs | sed -n '/^#.cfg(test)./,$p') <(sed -n '/^#.cfg(test)./,$p' crates/trios-chat/rings/<R>/src/<stem>.rs)prints nothing. $T27C gen-rust <spec> | cmp - crates/trios-chat/rings/<R>/src/t27gen/<stem>.rsis silent with t27c built at the pinned SHA;shasum -a 256of each vendored file equals the seal'sgen_hash_rust.cargo test -p trios-chat --test t27_pinpasses (5 rows);cargo test -p trios-chat --test r_chat_guardgives 3/3.e2e_chat_25PASS list,falsifier_runnerstdout and exit code, andgolden_vectorsoutput are identical togolden/.- Mutation proof for all 5 files: flipping one comparison in each
t27gen/file makes at least 1 original test fail; regenerating restores all tests, andcmpagainst fresh gen-rust output is silent. Counts in the PR. - Minutes and adapter lines per file are recorded in the PR and copied to the epic.
- The required checks
no-js-check,Test,Constitutional Enforcementandguardare green on the latest SHA.
Not in this issue
- The t27 issues 7634, 8366 and 8125 stay open although their PRs merged; closing them needs triage rights on gHashTag/t27.
- The ratchet_tree_resolution_guard spec asserts only ok / not ok. Making its tests assert the exact variant is a W1 follow-up in gHashTag/t27.
Dmitrii Fedorov (@dmitrii-f-t27)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
Merge chat-t27/w0-baseline-golden-pin (BR-IO-CHAT-07 baseline) into t…