name: test-fakelag-disabled description: Golden/L2 tests disable ircd fake-lag via IRCD_TEST_CONFIG; needed for scripted multi-command scenarios metadata: node_type: memory type: project originSessionId: d19a4e9a-1c8c-48a2-9b90-e8bd9d3cac73#
The ircd fake-lag (penalty) throttle is disabled under the test harness. ircd/s_bsd.c has a cached ircd_no_fakelag() helper (true when IRCD_TEST_CONFIG is set, which only the golden harness sets) that bypasses both MAXPENALTY gates: the client_packet recvQ-processing loop AND the read_packet read-event re-arming. MAXPENALTY itself is left intact because s_user.c/channel.c use it for recipient/output limits that shape the wire — only command timing is affected, never bytes.
Why: scripted golden tests pipeline several commands and wait for each reply; with fake-lag on, the server defers queued commands (and stops reading the socket) once penalty runs ahead of the clock, so reads time out and tests go flaky/slow (60s vs 11s). Both the read_packet gate and the client_packet gate must be bypassed — bypassing only one leaves the socket unread.
How to apply: prefer single-read-until-unique-sentinel (PING/PONG) capture in golden tests, but fake-lag-off is the backstop. If editing any C source other than ircd.c, note that ircd-golden/build.rs now does rerun-if-changed on all of ../ircd and ../common so cref-ircd relinks (it links the cbuild objects). See [[p0-l2-golden-harness]] and [[p5-s2s-golden-harness]].