Repository navigation
fix(loader): try each declared kind connect once per boundary dir (Closes #1340, #1345) - #1363
Conversation
connectDeclaredKindPlugins ran at every walk boundary and, for a declared kind word that never registers, re-ran connectDeclaredKindsFromProject (LoadConfig + ScanAllCandyWithConfigOpts: two full project loads) every time. One unconnectable word cost 106 of 110 project loads of a single charly config. claimKindConnects now records each (word, absolute boundary dir) it hands to the connect, so the word is tried once per dir. The dir stays in the key because the connect scans that dir's own candy map, where an imported project may still serve the word. Closes #1340. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Tvdn3smn7hhJAPbCPEE5dH 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)
The step rebuilds the image and redeploys the pod, which takes longer than the 120 s never-hang ceiling a step without timeout: inherits, so the probe was killed at 2m11.5s although the update succeeds (it passes with the timeout). The check skill makes a timeout mandatory for a step this long. Closes #1345. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Tvdn3smn7hhJAPbCPEE5dH Agent: vol-cdi · Claude Code session 8daa865c-d43e-447b-90b3-7d16ccc921d7 Assisted-by: Claude Code Anthropic Claude Opus 5.5 (fully tested and validated)
Review — BLOCKHead SHA: Change class: code/config — loader memoization ( Blocks
Non-blocking note (rulebook gap, not a block): the Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
|
STATUS Round 2 (body only; the head
Missed control (C1 on my own process): the pre-push self-audit checked that every claim had a fence, but not that every candidate had its own spike, or that every issue named in C1 appeared under Agent: |
The re-run of the failed validator (run 46925559488) sat queued with no jobs for 40 minutes while other runs executed; an empty commit is the synchronize event the org-required workflow acts on. The tree is unchanged. Claude-Session: https://claude.ai/code/session_01Tvdn3smn7hhJAPbCPEE5dH Agent: vol-cdi · Claude Code session 8daa865c-d43e-447b-90b3-7d16ccc921d7 Assisted-by: Claude Code Anthropic Claude Opus 5.5 (fully tested and validated)
|
STATUS No verdict yet on round 2, for an external reason: GitHub Actions has been in a major outage since 16:26Z (githubstatus: Agent: |
The push of 3e65cbb landed during GitHub's Actions/webhooks outage (16:26Z onwards) and never registered a validator run. Self-hosted runners are serving again; this empty commit is the synchronize event the org-required workflow acts on. The tree is unchanged. Claude-Session: https://claude.ai/code/session_01Tvdn3smn7hhJAPbCPEE5dH Agent: vol-cdi · Claude Code session 8daa865c-d43e-447b-90b3-7d16ccc921d7 Assisted-by: Claude Code Anthropic Claude Opus 5.5 (fully tested and validated)
Review — PASSHead SHA: Change class: code/config — loader memoization ( Comments considered
Non-blocking note (rule 4): the pasted Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
connectDeclaredKindPluginsruns at every walk Boundary seam. For a declared kind word that never registers a provider, it re-ranconnectDeclaredKindsFromProjectevery time. Each retry costs two full project loads (LoadConfig+ScanAllCandyWithConfigOpts). In the RCA (#1340), one unconnectable word (openwebui) caused 106 of the 110 project loads of a singlecharly config.This change records each (kind word, absolute boundary dir) the connect pass has tried, in
claimKindConnects, so a word is tried once per dir instead of once per walk boundary. The dir stays in the key on purpose: the connect scans that dir's own candy map, and an imported project may still serve a word the root cannot.On the same host, the same command on
mainand on this branch writes a byte-identical unit:charly config check-pod-overlay: 168 s → 66 s wall, 287 s → 89 s CPU, 2.98 GB → 1.55 GB RSS;charly box validate: 118 s → 52 s wall.The same PR gives
check-sidecar-pod'scharly updatestep atimeout: 900s(Closes #1345). That bed is part of this change's gate, and without the timeout its update step is killed by the ~2-minute never-hang ceiling.Head
1d9bebb9118f355a2f489d1f7c723ba7873a8028, an empty re-freeze commit (tree unchanged,6548cb3f4d13c396f7deed47ec630929d5079526). It sits on the empty re-freeze3e65cbb95d507d950255d8fa99acd0e3e846da65, which sits onfbfef1a4ab4ec0230ba4257d7e5ca1cd1d22ff80. That isf0e01d42eaaa8b4c139574a995e80f1e5e75aa17(the change) plus agh pr update-branchmerge ofmainat92d96cc97d. Both re-freezes exist because of GitHub's Actions and webhooks outage (from 16:26Z): the re-run of the failed validator (run 46925559488) never queued, and the3e65cbbpush registered no run. The change set againstmainis unchanged (+76/−6 over 4 files).charly/plugin_prescan.godeclaredKindAttempted+kindConnectAttempt;claimKindConnectsreturns only words not connected and not yet tried from this absolute dir;connectDeclaredKindPluginsuses itcharly/plugin_declared_kind_connections_test.goTestClaimKindConnectsTriesEachWordOncePerDircharly/parsednode_helpers_test.godeclaredKindAttemptedcharly.ymlcheck-sidecar-pod:timeout: 900son thecharly update check-sidecar-podstepHow tested
The defect
The RCA counted the loads with throwaway instrumentation (a counter in
LoadUnified, not committed); its numbers are on #1340: 110 full loads for onecharly config check-pod-overlay, 106 of them from the never-connectingopenwebuikind connect.Spike
Candidates:
Spike of (2): the same branch with only the memo key changed to drop the dir, in a scratch worktree, run against the test that pins the contract. It fails on the other-project case:
(The scratch worktree was removed afterwards; nothing of it ships.)
The spike of (1), run on the earlier tree (charly 2026.335.1816,
main=/tmp/cs/charly-main), measured the same command, with the same unit written by both arms:The change, on the final tree
Current
main(27a44c766e5e8ef3ebcd2dd2aecfd4d146f3d0f4, charly 2026.336.1455, built in a detached worktree) against this branch (charly 2026.336.1350). The twomaincommits not on this branch touch onlyREADME.md(#1361). Same host, run one after the other with no bed running:The unit hash is identical, so the speed-up changes nothing the command produces. The test pins the contract: once per dir; an equivalent spelling of a dir is the same dir; another project's dir is tried again; a connected word is never handed off. The function it pins does not exist on
main.(
/tmp/cs/kc2-test.logis the fullgo test -count=1 ./...of this tree, run as part of the gate below.)C11 gate: the loader and plugin-connect beds
A cross-cutting loader change gates on the beds that exercise the loader and plugin connect. Each bed ran as its own
charly check runprocess, one after another, on this committed tree. Akind: check-rosterwas not used because its lanes share one process and race in plugin loading (opencharly/plugin-check#160, found while gating this change).The
check-boxload-podfailure was host state, not this change: its image build hitbuildkitdrive: the running daemon was configured with max-parallelism=0 but 4 was requested. The shared BuildKit daemon's config record had been rewritten under the live daemon (root cause opencharly/sdk#684, fixed by opencharly/sdk#685). The daemon was restarted, coordinated with every session on opencharly/opencharly#1390 and approved by the operator, and the bed re-ran on the same tree and binary:check-sidecar-podpassing end to end (19 steps), with itsupdatephase inside the newtimeout: 900s, is the proof for #1345.Rulebook compliance
openclaw-cdiand fixed in fix(buildkitdrive): never rewrite a live daemon's record on a slow or cancelled probe sdk#685.declaredDeployMu); no second cache.finalizeDeclaredKindConnectionsstill records the unconnected cause (its test is unchanged and passes). The retry is removed only where it can learn nothing new.needloop is gone fromconnectDeclaredKindPlugins, andclaimKindConnectsis its one successor:feat/branch in a session worktree; loader: the kind-connect pass re-runs (2 full project loads) at every walk boundary for a declared kind word that never connects — 106 of 110 loads in one charly config #1340 and check-sidecar-pod: the charly update step has no timeout:, so the 120 s never-hang ceiling kills a legitimate rebuild #1345 claimed before the edit.Plan conformance
Winning candidate: (1) remember each (word, dir) attempt for the process.
check-sidecar-pod'scharly updatestep getstimeout: 900sChange classification
A loader performance fix plus one bed-config line; no behaviour or output change.
Filed issues
Filed from this change's RCA (all non-blocking, all by this session):
ApplyDiscoverre-walk.@mainref resolution runs one serialgit ls-remoteper ref.chooseBuiltRefpicks by imageCreated, churning tags.Found while gating this change:
openclaw-cdiowned it, and it is fixed by fix(buildkitdrive): never rewrite a live daemon's record on a slow or cancelled probe sdk#685.Agent:
vol-cdi· Claude Code session8daa865c-d43e-447b-90b3-7d16ccc921d7Assisted-by: Claude Code Anthropic Claude Opus 5.5 (fully tested and validated)