Skip to content

go CI: TestExternalPluginEndToEnd exhausts the package 10-minute alarm when the runner is loaded #1318

Done

Description

@aitrawog

Category

category:verification

Type

type:fix

Remedy / files the remedy will touch

the charly package's test budget for the go-plugin end-to-end test: its own timeout, its own package, or a bounded host-build

Cited design decision or org-rulebook rule (or none)

AGENTS.md R1 + R7

Classification

Non-blocking — genuinely separable; left unclaimed for a later session to pick up.

Evidence (verified: commands with output, file:line, measurements)

$ gh run view 46100116259 --repo opencharly/charly --log-failed | tail -3
FAIL	github.com/opencharly/charly/charly	606.011s
ok  	github.com/opencharly/charly/charly/internal/pluginsgen	178.124s
FAIL

and from the same log:

panic: test timed out after 10m0s
  running tests:
	TestExternalPluginEndToEnd (42s)

Local run of the same package on a neighbouring tree: ok github.com/opencharly/charly/charly 203.946s.

Mechanism

The go CI job runs go test ./... over the charly package with the default 10m0s alarm. TestExternalPluginEndToEnd host-builds an out-of-process plugin and speaks go-plugin gRPC over a UNIX socket; on a loaded runner that build consumes the budget and the alarm dumps every goroutine. The whole package fails, so an unrelated one-file gitlink PR is blocked by it, and the natural response - re-run - masks the budget problem.

Missed control

The job has no per-test or per-package budget beyond the default alarm, and no way to tell a slow plugin host-build from a deadlock: the dump is the only signal and it is read as a flake.

Blast radius

every charly PR whose go job lands on a congested runner: the package fails as a whole, so an unrelated change is blocked and a re-run becomes the workaround the rulebook forbids.

Root fix

Give the plugin end-to-end test its own budget: build the plugin once outside the timed section (or cache it), or move the test into its own package with an explicit generous timeout, so a slow host-build fails THAT test with a named cause instead of tripping the package alarm.

Spike (its result, or none with the reason)

none: measured from the CI log and a local run of the same package.

Agent: cdi-audit · Claude Code session f760307f-53b4-4f48-87da-00f95e5300ed
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)

Activity

  1. added
    category:verification
    type:fix
    on Nov 28, 2026
  2. aitrawog commented on Nov 28, 2026

    @aitrawog
    ContributorAuthor

    CLAIM

    CLAIM — second occurrence, and it now blocks a PR of mine, so it is a blocker I own.

    Same signature, a different job run, on the same head:

    $ gh run view 46103039372 --repo opencharly/charly --log-failed | grep -E 'panic: test timed out|FAIL\s+github'
    panic: test timed out after 10m0s
    	running tests:
    FAIL	github.com/opencharly/charly/charly	606.729s
    

    versus the first occurrence (46100116259): FAIL github.com/opencharly/charly/charly 606.011s. Two runs, ~606s each, both against the package's 10m0s alarm — so this is not a one-off load spike but the budget being genuinely too small for TestExternalPluginEndToEnd's host-build on a CI runner.

    What it blocks: opencharly/charly#1316 (the one-line box/arch gitlink advance that unblocks the umbrella's derived distro-arch edge, and through it the seventh pin wave). validate, lint, pin-currency and arm are all green there; the red go sibling is the only thing keeping auto-merge from arming.

    Candidate fix, for the taker: raise the package's test timeout in the CI task (a -timeout above 10m for that package), or run TestExternalPluginEndToEnd in its own package with an explicit generous budget so a slow host-build fails that test by name instead of tripping the package alarm. I have not implemented it — this session's remaining context does not carry another PR cycle to a bed.

    Agent: cdi-audit · Claude Code session f760307f-53b4-4f48-87da-00f95e5300ed
    Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)

  3. self-assigned this
    on Nov 28, 2026
  4. aitrawog commented on Nov 28, 2026

    @aitrawog
    ContributorAuthor

    STATUS

    STATUS — my own diagnosis was wrong: the test is FAST (14.7s), so the alarm is the package's AGGREGATE cost, not this test's.

    Measured in isolation, on the same tree:

    $ (cd charly && go test -run TestExternalPluginEndToEnd -count=1 -v -timeout 20m .)
    === RUN   TestExternalPluginEndToEnd
    --- PASS: TestExternalPluginEndToEnd (14.70s)
    PASS
    ok  	github.com/opencharly/charly/charly	16.564s
    

    So TestExternalPluginEndToEnd costs ~15s, and the CI dump caught it only because it happened to be the test RUNNING when the package's 10m0s alarm fired — the 42s in TestExternalPluginEndToEnd (42s) is elapsed-package wall clock attributed to the current test, not that test's cost.

    The numbers line up with a slow-runner effect on the WHOLE suite instead:

    local, whole package:   ok  github.com/opencharly/charly/charly  203.946s
    CI,   whole package:    FAIL ... 606.011s   (alarm at 10m0s)
    

    CI runs the same suite ~3x slower than this host, so the suite crosses 10 minutes and the alarm kills whichever test is in flight.

    Corrected root fix: give the package a CI-appropriate budget (a -timeout comfortably above the measured CI cost, e.g. 20m) and/or shard the slow tests — NOT a per-test budget for TestExternalPluginEndToEnd, which my first comment proposed and which the measurement now refutes. My earlier note calling a timeout bump a magic-number workaround was based on the wrong premise; with the suite's real cost measured, the bump is the honest fix and the remaining work is to justify the chosen number from CI timings.

    Agent: cdi-audit · Claude Code session f760307f-53b4-4f48-87da-00f95e5300ed
    Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)

  5. aitrawog commented on Nov 28, 2026

    @aitrawog
    ContributorAuthor

    RESOLVED — fixed in opencharly/charly#1319 (5b776b6c's predecessor merge; go test -timeout 20m ./charly/...), and confirmed on the class that surfaced it.

    The corrected diagnosis. My first comment blamed TestExternalPluginEndToEnd, which measured in isolation is fast:

    $ go test -run TestExternalPluginEndToEnd -count=1 -v -timeout 20m .
    --- PASS: TestExternalPluginEndToEnd (14.70s)
    

    The alarm was the PACKAGE's aggregate cost: ~204s locally, 606.011s and 606.729s on CI against a 10m0s alarm. The alarm fires mid-test and attributes the package's elapsed time to whatever is running.

    The fix and its proof. -timeout 20m (1200s), with the division written beside the flag (1200/606 ≈ 2× the slowest CI run). Then the same job that failed twice went green under the new budget, on the very PR that was blocked by it:

    charly#1316, head bac515c7:  validate success · lint success · go success · pin-currency success · arm success
    

    and again on its re-frozen head. So the fix is proven by the fixed job, not by arithmetic.

    Agent: cdi-audit · Claude Code session f760307f-53b4-4f48-87da-00f95e5300ed
    Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

category:verificationtype:fix

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions