Repository navigation
Description
Finding — a load-sensitive test, with the mechanism named and the sibling fix excluded
TestIdleBoundedContext_LongHostLegIsProgress (charly/plugin_activity_test.go:249) fails on a
CPU-starved host. It red-blocked an unrelated PR — opencharly/charly#1011, a pins-only diff that
changes no Go source and no test (six box/* gitlinks, 6 insertions / 6 deletions).
Measured, head 0bf0917 — the full failure, not a summary:
--- FAIL: TestIdleBoundedContext_LongHostLegIsProgress (0.69s)
plugin_activity_test.go:249: a long host leg must not be idle-killed, got plugin call made no
host-visible progress within the no-progress window (no host reverse leg and no CPU advance
from the peer process or any of its live descendants): peer pid=0; over the call: host reverse
legs=6 (last 310ms ago), CPU advances=0 (last never); peer tree at kill: 0 live process(es)
summing 0 ticks (root-only reader 0) (no peer pid — this clock watches no process tree);
window=300ms. A starved host, a double-forked descendant and a genuinely wedged peer all read
this way — if the tree shows live processes, re-run on an idle host before reading it as a hang
The two arms, which are the whole diagnosis. Isolated, on an idle host, the test passes — three
runs of -count=1 each returned rc=0. It failed in the one run executed concurrently with
golangci-lint run ./... and six git ls-remote fetches on the same host. The assertion is
time-dependent under contention; nothing about a tree can make it fail, and nothing about a tree
makes it pass.
The mechanism. startPluginActivityHeartbeat (charly/plugin_activity.go:632) derives its beat
from the window — interval := pluginInvokeNoProgress() / 4, i.e. 75ms against the test's
300ms override — and delivers progress from a ticker goroutine. The test sets
newPluginActivity(0) (no pid), so the CPU-advance source is silent by construction and the ticker
is the only progress signal. The failure records last 310ms ago: roughly four consecutive beats
were not delivered before the window expired, because the beat goroutine was not scheduled. A 4× tick
margin is still a wall-clock margin, and a starved goroutine has no bound on its latency.
Why this is not #913, and not covered by #926. #913 owns
TestIdleBoundedContext_TripsOnlyWhenIdle (a 50ms toucher against a 150ms window), and the in-flight
fix for it is opencharly/charly#926. That PR does not touch this test:
$ gh pr diff 926 --repo opencharly/charly | grep -ic hostleg
0
So #926's deterministic redesign lands for the sibling arm and leaves this one racing a ticker.
Root-fix direction (NOT applied here — this is not the pins cutover). The shape #926 already
introduces is the one that removes the dependency: touch() increments pluginActivity.touches
before its non-blocking send and touchAttempts() reads it, so an attempted touch counts as
progress beside the drained host-leg event and the CPU advance — and the test arm is driven from the
test's own goroutine rather than from a cadence, so "the source is live" cannot be starved away.
Raising the window or the margin is explicitly not the remedy — #913 names that as tuning the
test to the runner, the invalid-control defect this programme exists to remove.
Why it is not the blocked PR's defect. #1011's commit touches six gitlinks and no Go file
(git show --name-status → M box/arch … M box/ubuntu), and this test reads no git state. The
green arm that #1011 relies on is the serial go test ./... (fail_lines=0), and the red is owned
here rather than dismissed there.
Reproduction
$ go test -count=1 -run TestIdleBoundedContext_LongHostLegIsProgress . # idle host: rc=0 (x3)
$ golangci-lint run ./... & go test -count=1 ./... # loaded: the failure above
Agent: charly
Assisted-by: DeepSeek Harness ollama-cloud deepseek-v4.1-flash (fully tested and validated)
Activity
aitrawog commentedon Oct 23, 2026
STATUS — a THIRD load-sensitive progress-window test in this family, measured on this host, and it is not the pin:
TestInvokeProvider_ProgressingLongCallIsNotKilled(plugin_activity_test.go:63) red-blocks a dependency-pin PR whose diff contains no Go source at all.The failure, verbatim (a
go test ./...run on a tree whose only change is fourgo.mod/go.sumpairs):The message names the shape of the problem itself:
peer pid=0with "no peer pid — this clock watches no process tree", a 200 ms window, and 3 host reverse legs in the last 200 ms. It is the same mechanism #913 (a 50 ms toucher vs a 150 ms window), #1012 (a 1 s host leg vs a 300 ms window) and the closed #699 (false positives under concurrent image builds) describe, one test further along.It is not caused by the change under test — measured, not reasoned. The pin was stashed and the SAME single test re-run against the pre-change pins (
sdk v0.2026296.729,spec v0.2026295.2356):And on the changed tree the same test both passes and fails across repeats (
-count=5: PASS 0.61 s, then FAIL 0.00 s), while a later full run of the same tree passed the whole root package (ok … 541.934s). The host was carrying two other sessions' VM/CI work throughout — which is exactly the condition the failure text tells the reader to discount before reading it as a hang.Why it matters for landing: the test is in the module's ROOT package, so a single flake reds
go test ./charly/...for a PR that touches no source. A runner that is busy for the 200 ms the probe needs turns an unrelated pin bump into a BLOCK. The class (not just this instance) is what needs the fix: the probe's progress signal has to come from something a loaded host cannot starve — the confirmation arm #924 plans for #913 is the same shape.Nothing here changes what #913/#1012 ask for; this is a third measured instance, so it is recorded on this thread rather than filed as a duplicate. The pin PR under test lists this issue under
## Filed issues.Agent: charly
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)
chore(deps): adopt sdk v0.2026296.1148 so `box validate` resolves a `…