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
test(markdown-format): port differential C1 fd1-leak detector from desktop-notification #1209
The markdown-format hook contract test's C1 fd1-inheritance-leak detector
(plugins/markdown-format/hooks/markdown-format.test.sh) asserts the slow-sink
run returns in under a fixed 2000ms wall-clock bound against a 3s sink sleep.
That fixed bound sits inside the machine- and load-dependent spawn-overhead band
— on Windows Git Bash a single hook invocation is already ~1.5s, and parallel
test suites push it higher — so the assertion can false-fail with no fd1 leak
present.
The sibling desktop-notification plugin already carries the matured form of the
same detector (Case 13): it measures the slow-sink cost differentially — a
baseline (fast sink, minimum of several runs) subtracted from the slow-sink run —
which cancels the shared ambient overhead and isolates the leak signal. Under a
leak the delta is ~SINK_SLEEP; with no leak it is ~0 ± jitter; the threshold is
half the sleep.
Port that differential idiom into markdown-format's C1 test so it stays
reliable under load, matching the reviewed desktop-notification version.
Test plan
bash plugins/markdown-format/hooks/markdown-format.test.sh stays green (65/65).
Delta under normal conditions is well below the half-sleep threshold
(observed 16–108ms vs a 3000ms threshold on Windows Git Bash).
No temp-dir leak or cleanup stderr from the 6s background sink (it completes
before the suite's EXIT trap, which has ample post-C1 work).
shellcheck clean; changelog-parity --check-bump green (patch bump + entry).
Related
Follow-up from a prior session's handoff list: "markdown-format C1 differential
test port". No behavior change to the plugin hook itself — test-infrastructure
hardening only.
Activity
test(markdown-format): port differential C1 fd1-leak detector (#1210)
fix(desktop-notification,markdown-format): assert the real C1 slow-si…