Testing and Releasing Trading Changes
Test trading changes with replay and shadow traffic, then set rollout and rollback gates.
These prompts are original practice. They are not questions from a named employer or a live hiring loop.
Replay fidelity
A simulated router sees normal traffic at 4,000 messages per second and bursts at 10,000. One recording preserves wire intervals, while another batches every second. Production has a 2 ms queue-age objective.
1.Which input preserves burst shape?
2.What does constant-rate replay hide?
3.Which clock should drive deterministic replay?
4.What must a replay check before comparing latency?
5.How should a delay introduced by replay infrastructure be treated?
6.How could you test results for several burst sizes?
7.What proves the 2 ms objective held in the tested run?
8.What about upstream pauses in the recording?
9.What if the recorded feed is incomplete?
10.Why retain a replay seed?
Shadow isolation
A candidate computes routes in shadow while the incumbent alone sends orders. The candidate sees mirrored inputs and records hypothetical decisions. It has no production writer credentials.
11.What is the primary safety boundary?
12.Can the candidate's hypothetical orders count as executed?
13.What comparator should match before judging differences?
14.Why limit shadow CPU usage?
15.What if mirror lag rises above the comparison threshold?
16.What should logs distinguish about order IDs?
17.Which finding can shadow mode establish directly?
18.What complementary test estimates candidate fill effects?
19.What if the candidate sends any message to a live trading path?
20.What should a useful shadow report include?
Gate arithmetic
A canary handles 2,000 orders. It has 12 rejects against a 0.5% maximum, p99 3 ms against 4 ms maximum, and zero unexplained state differences. All gates must hold.
21.What reject rate is observed?
22.How many rejects would exactly meet the cap?
23.Which latency gate result applies?
24.Can the canary ramp now?
25.By how many rejects is the observed count over the cap?
26.What breakdown helps diagnose the rejects?
27.How should a state mismatch be handled even if reject data improve?
28.What metric is missing if only completed acknowledgments are timed?
29.What would ensure an equivalent comparison with control?
30.Why set the thresholds before testing?
Reconciliation at restart
A test sends 100 orders. Venue records show 60 fills, 30 cancels, and 10 rejects, each exclusive. The candidate's ledger shows 58 fills, 32 cancels, and 10 rejects. An independent execution feed is authoritative for fills.
31.Do the ledgers agree just because each totals 100?
32.How many fewer fills are recorded locally?
33.What should be joined to identify the wrong records?
34.Can the two count differences alone prove exactly two records are wrong?
35.What should be checked about any fill appearing twice?
36.What if a late correction changes quantity?
37.What should a side-effect check inspect?
38.Why include a cancel race in replay?
39.When should rollout resume?
40.What evidence should the failure retain?
Rollback safety
An update writes journal schema V2. The prior binary reads only V1. The rollout allows an approved conversion path after fencing writers and reconciling externally visible orders.
41.Can a simple binary rollback read V2 safely?
42.What first protects against duplicate transmissions?
43.Why preserve the original journal before conversion?
44.What should conversion tests include?
45.Why verify venue state after conversion?
46.What if the old application cannot enforce a newly required limit?
47.How can backward compatibility lower rollout risk?
48.What gate precedes normal flow after rollback?
49.What indicates the rollback was effective?
50.What should the team document before release?
Latency distribution
The launch gate uses p99 acknowledgment no greater than 8 ms. A matched baseline has p50 1 ms and p99 5 ms. Candidate p50 is 0.8 ms and p99 is 9 ms. Both samples include only completed acknowledgments.
51.How does median latency change?
52.How does p99 change?
53.By how much does candidate p99 miss the gate?
54.What must be added for missing acknowledgment risk?
55.Which diagnostic helps locate the regression?
56.What if latency rises only at peak traffic?
57.Why report tail sample counts?
58.What if control and candidate traffic differ in order size?
59.Which response fits a breached hard gate?
60.What should recovery verification include?
Protocol compatibility
A new application decodes both old and new reports. A venue simulator can send duplicates, delayed corrections, and messages with omitted optional fields. A separate venue test verifies actual session behavior.
61.What test checks an omitted optional field?
62.How should delayed corrections be verified?
63.What identifies duplicate business events?
64.Why test actual sessions in addition to simulation?
65.What test covers unsupported mandatory versions?
66.What should never be inferred from a heartbeat?
67.How should an unknown wire field affect a known order?
68.Which end-to-end records should be compared?
69.What if a test venue omits a rare order type?
70.What is the best release artifact for known differences?
Risk invariants
A position limit is 1,000 shares. There are 600 held and a 250-share live buy. A cancel request for the buy is pending. The candidate will be tested against the incumbent under order and cancel races.
71.What worst-case long position is currently counted?
72.What additional buy is the largest allowed?
73.If a 100-share fill arrives on that buy, what worst-case position is counted now?
74.After the remaining buy is confirmed canceled, what headroom remains then?
75.Which invariant detects an early reserve release?
76.What test pressures the race?
77.Why compare both versions using the same initial state?
78.What if the incumbent also releases wrong capacity?
79.What record helps audit each limit result?
80.When should sampling allow skipping risk correctness checks?
Capacity ramp
A desk normally processes 20,000 child requests per minute. Rollout stages are 5%, 20%, and 50%. Each stage needs five healthy minutes. Control allocation remains stable.
81.What rate corresponds to 5%?
82.What rate corresponds to 20%?
83.What rate corresponds to 50%?
84.How many requests are expected in five minutes at 20%?
85.What minimum elapsed observation time covers all three sequential stages?
86.Why observe a full stage before advancing?
87.What if actual total traffic doubles?
88.What is appropriate if a shared dependency saturates?
89.What should remain available throughout the ramp?
90.What should an unmatched canary sample be used for?
Release sign-off
The planned change passes replay and shadow. A low-volume pilot meets rejects and tail latency but has one unresolved fill. Policy requires zero unknown executions before expansion.
91.Does passing performance gates authorize expansion?
92.Which source should resolve the missing fill?
93.What does a passing replay establish?
94.What does shadow add?
95.What does a pilot add that shadow lacks?
96.What should be retained for a release review?
97.Who should authorize promotion?
98.What should happen if a stop gate fails after promotion?
99.What finding would support resuming after repair?
100.What should update the next replay case library?
101.What makes the final go/no-go record useful later?