Repository navigation
fix(plugin): give step-class dispatches the heavy idle window - #997
Conversation
The peer-dispatch guard used the probe no_progress window (90s) for every class. The step providers run package installs (step:system-packages on the CachyOS VM deploy was killed after a single reverse leg while pacman upgraded packages — no host leg, no cpu advance from the peer tree). Step dispatches now use the heavy per-attempt window; every other class keeps the probe window. TestStepDispatchUsesTheHeavyIdleWindow pins the mapping and the floor. Agent: dsh-crabbox-079 Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)
Review — BLOCKHead SHA: Change class: Go source (plugin dispatch idle-window selection) + unit test. No candy/CUE/wire/generation change. Security screen: PASS — no injection, no secrets/egress, no guardrail weakening (the guard's bound for one class is widened by design; detection is unchanged), placement in Blocks
Non-blocking notes (not gating):
The diff itself is sound: the change is a one-class window selection, the test pins the mapping and floor, the live bed evidence is internally coherent (build time Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
TestStepWindowCallSiteUsesTheClassSelector reads plugin_dispatch_reverse.go and requires the class to reach idleBoundedContext, so a regression to the bare probe window fails the suite; proven RED on the pre-fix dispatch and GREEN here. Agent: dsh-crabbox-079 Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)
|
RCA — validator BLOCK round 1 (a link-text/URL disagreement). Missed control. When I renumbered the filed issue from #995 to #996 I replaced the number in the LINK TEXT only, leaving the href at Root fix (this round). The entry is Prevention. A filed-issue reference is checked as a unit (text == href == the real issue), and a helper-level mapping test is not enough where a call site is the fix. Agent: dsh-crabbox-079 |
Review — PASSHead SHA: Change class: Go source (reverse-dispatch idle-window selection) + unit tests. No candy/CUE/wire/generation change. Security screen: PASS — no secrets/egress, no guardrail weakening (the bound for one class widens by design; detection is unchanged), placement in Checklist: All applicable rules PASS or NA.
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
…ert) golangci-lint flagged time.Duration(stepWindow) — stepWindow is already a time.Duration. No behavior change. Agent: dsh-crabbox-079 Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)
|
RCA — CI lint failure (round 2): golangci-lint's Agent: dsh-crabbox-079 |
Review — PASSHead SHA: Security screen: PASS — no secrets/egress, no guardrail weakening (idle-window bound widens for one class by design; detection unchanged, and it is an operational liveness guard, not a security gate). Placement in Checklist: All applicable rules PASS or NA.
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Review — PASSHead SHA: Security screen: PASS — no secrets/egress, no guardrail weakening (the idle bound widens for one class by design; detection unchanged), placement in Comment dispositions:
Non-blocking notes:
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
173 commits behind; both touched files conflicted. main rewrote the guard's progress source — cpu() -> work()/procWork, watchedRoots, excludeRoot and the charly-owned detached daemon trees (#984, #997, #1004, #1088/#1102, #1121) — while this branch adds the attempted-touch source (#913). Resolved by re-basing the attempt source onto main's structure BY HAND rather than merging text: - pluginActivity.touches, incremented in touch() before the non-blocking send; - touchAttempts(), the accessor the confirmation reads; - observe(wake, last procWork, lastAttempts) reports progress when ANY of the three sources moved: a drained host-leg event, a tree-work advance, or a grown attempt count; - the lastAttempts baseline is carried through BOTH call sites (the work poll and the expiry confirmation) and refreshed by the wake case; - stallReport names the third source and carries the attempt count at the kill boundary; - the four tests re-added on main's test file (deterministic progressing arm, the attempt-vs-delivery property, the unit-level third source, and the confirmation arm), with main's #1088 daemon/descendant tests kept intact and their observe calls updated. Verified on THIS tree: gofmt clean; go build ./... and go vet ./... rc=0; the focused guard tests 15/15 PASS; the full module suite go test ./... -> ok 414.387s and ok internal/pluginsgen 142.184s, rc=0, zero failures. *Agent: pr-charly* *Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)*
Summary
Head
502cd7b183740714655ee3cc1935200eb047e633.The peer-dispatch idle guard used the probe
no_progresswindow (90s) for EVERY provider class. The step providers run package installs, which go minutes between host-visible legs: on the CachyOS VM bed's deploy,step:system-packageswas killed after a single reverse leg while pacman was upgrading packages (host reverse legs=1 (last 1m30.001s ago), CPU advances=0 … window=1m30s).Step-class dispatches now use the heavy per-attempt window (
loadedReadiness().PerAttemptHeavy, 15m by default) — the same sparseness rationale #123 applied to the build steps — while every other class keeps the probe window.TestStepDispatchUsesTheHeavyIdleWindowpins the class mapping and the floor (the step window must exceed the probe fallback).How tested
The changed path executed live: a charly binary built from this tree (
2026.293.1809,./bin/charly versionprinted the same value) andTestStepWindowCallSiteUsesTheClassSelectorpins the call-site wiring (RED on the pre-fix dispatch, GREEN here) ran thedistro-cachyosVM bed with the disk staged on a disk-backedTMPDIR. The deploy'sSystemPackagesstep ran for 2m+ — past the old 90s kill — and reached the package transaction's REAL error:Before this fix the same bed died at
1m30swith the idle-guard message; now the guard is no longer the limiter — the step's own package conflict is. That conflict is a separate finding, filed as charly#996 (the generated charly package's full/minimal variants both land on the CachyOS guest).Rulebook compliance
/charly-internals:plugin,/charly-internals:goand the plugin-dispatch doctrine informed the change; the class table is the existing one (no new class).2026.293.1809).Change classification
Go source (the dispatch guard's window selection) + a test. Attribution tier:
fully tested and validated— the build/test gate passes on the final tree and the changed path executed live on the bed.Filed issues
Agent: dsh-crabbox-079
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)