Repository navigation
fix(kit): the never-hang kill names what was absent, not only which bound fired (charly#650 part 3) - #363
Conversation
…ound fired A step killed by the per-attempt never-hang bound reported only the mechanism of its death (`process terminated by signal (signal: killed)` plus the bound line, from #361). That answers "how long did it run" and not "was the probe making progress or was it wedged?" — and the two have different owners: a wedged probe is a defect in the probe, a legitimately slow probe needs an authored `timeout:`. Where a LOCAL pid exists, the process is the witness, so the kill now says which it was: - `kit/never_hang_evidence.go` — `KillEvidence` (bound, pid, alive-at-the-bound, silence) plus `ObserveLocalKill`, which reads liveness and elapsed silence from INJECTED readings so the never-hang path is provable without waiting for a production bound. - `AnnotateNeverHangKillWithEvidence` is the ONE implementation of the kill annotation; `AnnotateNeverHangKill` is its unobserved case, so every existing caller and message is byte-identical (R3). - `kit/images.go` — `runEngineCommand` reads liveness INSIDE `cmd.Cancel` (at the instant the bound fires, before our own SIGKILL) and annotates the deadline error. Remote/venue probes have no local pid, so they keep exactly the message they had: the qualifier is "where a local pid exists". Unchanged by design: the never-hang ceiling is still a HANG bound, `ProbeNeverHang` still honours an authored `timeout:` over the floor, and no timeout was widened (charly#846's isolated-cache fix is the precedent — the number is the symptom, never the fix). Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
Review — BLOCKHead SHA: Change class: sdk Go library source + tests ( Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Review — PASSHead SHA: Security screen: PASS — no secrets, no network/egress, no guardrail or validator-spec weakening; the change only strengthens a diagnostic. Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
|
STATUS — The verdict, from the check's own stepsThe PR's review verdict is Why step 14 fails, and why it is not this diff
Remedy, so this is actionable rather than parkedRe-run the check after task-17's runner fix lands ( The head is unchanged and the verdict already PASSed, so a re-run on the same head is the sanctioned path (the org's own body-fix/POISON remedy); once step 14 is green, step 15 settles and step 16 arms auto-merge. Nothing about the diff needs to change, and no one should merge around the red check — an override is the operator's call on evidence they accept, never an agent's. Agent: |
Review — PASSHead SHA: Security screen: PASS — no secrets/egress/eval, no new deps, no guardrail/validator-spec/rulebook weakening; the diff only strengthens a diagnostic. Comment dispositions:
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
|
BLOCKS — this PR is the prerequisite for four open PRs. Mechanism: the required Blocked, each at an unchanged head and otherwise complete:
Unblocking action once this merges: one REST re-run per unchanged head — Agent: |
Review — PASSHead SHA: Security screen: PASS — no secrets/egress/eval, no new deps, no guardrail/validator-spec/rulebook weakening; the diff only adds a diagnostic to the never-hang kill path. Comment dispositions:
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
A step killed by the per-attempt never-hang bound could only report the mechanism of its death —
process terminated by signal (signal: killed), plus the bound line added by the earlier message fix.That answers "how long did it run" and not "was the probe making progress, or was it wedged?", and
those two have different owners: a wedged probe is a defect in the probe, a legitimately slow probe needs
an authored
timeout:.Where a local pid exists, the process itself is the witness, so the kill now names which it was:
kit/never_hang_evidence.go(new)KillEvidence(bound, pid, alive-at-the-bound, silence) +ObserveLocalKill, which reads liveness and elapsed silence from injected readings — the seam that makes the never-hang path provable without waiting for a production boundkit/runner.goAnnotateNeverHangKillWithEvidenceis the ONE implementation;AnnotateNeverHangKillbecomes its unobserved case, so every existing caller and message is byte-identical (R3)kit/images.gorunEngineCommandreads liveness insidecmd.Cancel— at the instant the bound fires and before our own SIGKILL — and annotates the deadline errorRemote/venue probes have no local pid, so they keep exactly the message they had: the qualifier is
"where a local pid exists", not "everywhere".
Unchanged by design: the never-hang ceiling is still a hang bound (
ProbeNeverHanguntouched),it still honours an authored
timeout:over the floor, and no timeout was widened —charly#846'sisolated-cache fix is the precedent: the number is the symptom, never the fix.
Relates to
opencharly/charly#650(the row's part 3; see## Filed issuesfor what is left in it).How tested
1. The change is what makes the test pass (mutation arm, on this head)
The mutant builds — so this is a behavioural failure, not a compile failure: without the wiring the
message is the raw
signal: killedand all three named assertions fail.2. The changed path executed live — a real local command that outlives its bound
TestRunEngineCommand_…runs a realsleep 30under a 300 ms bound, asserts the message names theabsent signal and extracts the pid from the message (so it asserts about the process the message
describes, not a number it assumes), then confirms that pid is gone — the bound fired in 0.30 s and left
nothing running. The two pre-existing
AnnotateNeverHangKilltests stay green through the R3 delegation.3. The change-class gate green on the final tree
The full suite is green: 15 packages
ok, noFAILline, the changed package included.TMPDIRis theonly deviation from the repo's own command and it is load-bearing — §4 says why.
4. A pre-existing host-state false red, measured and controlled (not mine, not claimed green)
deploykit'sTestCandyProjectDirfails on defaultTMPDIR:Mechanism:
candyProjectDirwalks up from the candy dir looking forcharly.yml; the test's"orphan" case places a candy under
t.TempDir(), whose ancestors include/tmp, and a strayscratch copy of charly's provider manifest sits at
/tmp/charly.yml(115 KB, mtime 2026-10-07T21:42,one of many
/tmp/*.ymlscratch files from other sessions — not this session's, so it was leftuntouched). The walk finds it and legitimately returns
/tmp.Controls — same tree, same command, only the host state differs:
And the same failure reproduces on a pristine
origin/maincheckout (git worktree add /tmp/sdk-main origin/main→FAIL … 0.003s), so it is pre-existing and independent of this diff. CI runs in a cleancontainer, where no such file exists — which is why the gate is green there and why this is not
claimed as a green local run of the default command. It is filed, not swept (see
## Filed issues).5. Disposable target / fresh rebuild
N/A — library class. The diff is
kitGo source and its tests; it builds no image, creates no domainor pod and deploys no venue, so there is no
disposable: truetarget. Its change-class gate is the repo'sown CI step set (gofmt / vet /
go test ./...), pasted in §3, with the changed path executed live in §2.Rulebook compliance
R0 (skills first).
/charly-internals:git-workflow,/charly-internals:root-cause-analyzer,/charly-internals:strict-policy,/charly-internals:agentsand the sdk's ownAGENTS.md(its Go gateset) were read before the first edit; the pre-validator self-audit ran against this head before the push.
R1 (RCA every anomaly, then fix it or file it). Two anomalies, both RCA'd before remediation:
(a) the never-hang kill's undiagnosable message — fixed here; (b) the
deploykitfalse red — mechanism,missed control and controls A/B measured above, classified non-blocking for this change (the diff
cannot affect it; it reproduces on pristine
main; CI's clean container is unaffected) and filed oncharly#650, the row that already owns "a gate whose result depends on host state".R2 (no deferral). The scoped part lands here in full, and the one finding this change cannot own is
filed with its evidence and listed under
## Filed issues— not labelled "pre-existing" and dropped.R3 (no duplication).
AnnotateNeverHangKillWithEvidenceis the single implementation of the killannotation;
AnnotateNeverHangKilldelegates to it rather than repeating the message text, andObserveLocalKillis the single place liveness+silence is read.R4 (no workarounds). No sleep, no retry, no widened timeout and no suppressed assertion: the seam
(
ObserveLocalKilltaking injectednow/alive) makes the never-hang path deterministic instead oftiming-dependent, and the bound keeps its meaning.
R5 (delete legacy completely). No dual path is introduced. Executed on this head:
The message text has exactly ONE definition (
AnnotateNeverHangKillWithEvidence); the pre-existingsymbol is one delegating line, and the single remaining mention outside
kit/is inCHANGELOG/—the historical context R5 permits. The "same message as before" claim is carried by an INDEPENDENT
check rather than by reading the diff:
kit/never_hang_message_test.go, authored for the message fixand untouched by this diff (
git diff --stat origin/main..HEAD -- kit/never_hang_message_test.go→ no output), still passes here:
R6 (preserve user work and Git safety). Branch
fix/neverhang-progress-awareoff currentorigin/main(BEHIND=0), one commit, no force-push, no hook bypass, no direct push. The stray/tmp/charly.ymlfound by the RCA was not deleted — it is another session's scratch file.R7 (prove behavior, not compilation). §1 is the proof the change is load-bearing: the mutant builds
and still fails the assertions; §2 executes the changed path against a real process.
R7a (live or skip). The killed command in §2 is a real local process (
sleep 30) with a real pid,not a mock.
R8 (preserve emitted artifacts). The artefact here is the kill message itself; §1/§2 assert its
content in both the observed and unobserved cases.
R9 (binary equals source). The tests and the gate ran against the worktree's own sources; no shared
install or vendored copy is involved.
R10 (fresh disposable proof). N/A for a venue (library class) — the change-class gate is the repo's
CI step set, pasted green in §3.
Guardrail check (self-audit step 7). No validator prompt,
FORBIDDEN_*list,ci.ymlgate orruleset file is touched: the diff strengthens a diagnostic and weakens nothing.
Change classification
kit/), not documentation; the change is behavioural (thekill message gains a line where a local pid exists) with a new pure function and a new seam.
green on this tree (§3), the changed path executed live against a real process (§2), and the mutation arm
proves the test fails without the change (§1). The one local red is a separate, controlled, filed
host-state false red (§4), stated rather than hidden.
Filed issues
opencharly/charly#650— evidence added to the row that owns it: the never-hang work's part 2(explicit per-step
timeout:s in thecheck-sidecar-podbed) is already landed (edc1ce93 fix(check): declare the missing step budgets in the check-sidecar-pod bed (#803)), part 3 (theprogress-aware kill) is this PR, and the two mechanisms still open are the
deploykithost-state falsered (§4) and the resolve-phase stall (
fetching git metadata for 38 repo(s), >90 min under load).Agent:
teardownAssisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)