Documentation
¶
Overview ¶
Package healthfix decides the health sweep's duplicate fixes (hadron-cli #2027). It is pure over what the sweep observed — agent processes, terminal tabs, the reset and pause guards — so every rule of the issue's acceptance and the gate's edge limits is a table row here, not a wiring path.
The guards this package owns, from the issue and Xabat's CHECKED gate:
- the only agent is never stopped (nothing to decide below two agents);
- exactly one supervised agent: the others are stopped; none supervised: nothing is stopped and one alert is raised (the issue's "keep the oldest and report it" names the keeper for the report; the acceptance line "two unsupervised agents: nothing stopped, one alert" is the oracle); two or more supervised is an anomaly that fails closed to an alert;
- a bare-shell tab closes only when another, non-bare-shell tab of the same worktree remains — a worktree whose every tab is a bare shell is a no_agent report (relaunch is #1947's), and a tab running an agent never positively classifies bare shell in the first place;
- a resetting worker is skipped entirely and rechecked next sweep;
- under a team pause the fixes are decided but the worker is marked so the caller reports without applying.
Index ¶
Constants ¶
View Source
const ( StopAgent = "stop-agent" CloseTab = "close-tab" )
Actions.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
PID int
Base string // claude | codex
Display string // the redacted, bounded #1474 line
Supervised bool
StartTicks int64 // /proc start-time ticks; bigger means started later
}
Agent is one agent process the census found in a worktree.
type Alert ¶
type Alert struct {
Worker string
Code string // unsupervised-agents | multiple-supervised
Count int
}
Alert is a condition the sweep reports but does not act on.
Click to show internal directories.
Click to hide internal directories.