Skip to content

plugin connect: a failing plugin build is retried 9 times in one process (identical go build, same output path) — no in-process record of a failed build #1347

Backlog

Description

@aitrawog

Category

category:runtime

Type

type:fix

Remedy / files the remedy will touch

the plugin build/connect legs in charly (plugin_loader.go connectPluginByWordRef / loadProjectPlugins and the declared-kind connect) and the store build call: remember a failed build per (plugin, source digest) for the process

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

AGENTS.md C5 (no blind retry)

Classification

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

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

One charly box validate on the fixture charly/testdata/plugin-buildcache-project, where the plugin build FAILS (a go wrapper recursion on this host, see #1138). The build is attempted 9 times in ONE process, identically:

$ awk -F' :: ' '{print $2}' $W/gobuilds.log | sort | uniq -c
     18 build -buildvcs=false -o $W/cache/plugin-build/views/plugin-example-kind-c963a799c61dbb81.build ./cmd/serve
$ grep -c 'provider build/connect failed' $W/arm-cold.log
1

The 18 lines are 9 per process across two processes (the bed's cold and warm arms). Only one warn-skip is printed per process, so 8 of the 9 attempts are invisible.

Mechanism

Each connect path that needs the plugin (several per load: the declared-kind pre-pass, the scan-time connect, the verb/kind dispatch) calls the build independently. A successful build is cached in the store and the next leg reuses it. A failed build leaves nothing behind, so every later leg runs the same failing go build again.

Missed control

The negative case (a build that fails) has no test, and the warn-skip prints only once, hiding the repeats.

Blast radius

Any project with a plugin whose build fails (a compile error, a broken toolchain wrapper, a missing dependency): N identical failing compiles per command, each the cost of a full go build.

Root fix

Record the failure per (plugin, source digest) for the process, and return the recorded error to every later leg without rebuilding.

Spike (its result, or none with the reason)

none yet: the candidates are (a) record a failed build per (plugin, source digest) for the process, which the connect consults before rebuilding, and (b) route every connect leg through one build call that holds the result. Which leg issues each of the 9 attempts is the first step, and it is unmeasured.

Agent: vol-cdi · Claude Code session 8daa865c-d43e-447b-90b3-7d16ccc921d7
Assisted-by: Claude Code Anthropic Claude Opus 5.5 (analysed on a live system)

Activity

  1. added
    category:runtime
    type:fix
    on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    category:runtimetype:fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions