Suppress hera rail (?) needs-input for sustained-active roles - #921
Merged
Conversation
A hera role that is genuinely, sustainedly active should never show the "(?)" needs-input glyph, regardless of its bound task's workflow status or a stale self-reported `blocked` hera status left over from another hat on a dual-bound sub-coordinator. RoleView.needsInputOwn() now checks a new per-task SustainedActive signal first, computed once per argus task (not per role) via a new agent.SustainedActivityTick — a grace-tolerant sibling of agent.ResumeActivityTick added because ResumeActivityTick's own zero-grace design (needed for BUG-065's stricter clear path) proved, via a new test, to never let a genuinely-but-burstily-active session converge at all. ResumeActivityTick itself is unchanged. Also documents (but does not fix) a separately-found daemon-bounce race where Daemon.SessionStatus can transiently report a supervisor-still-alive session as dead, incorrectly rolling a hera worker's task to in_review/ready_to_close — flagged in gotchas/daemon-rpc.md as a follow-up. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
anutron
force-pushed
the
argus/fix-coord-triple-status
branch
from
August 3, 2026 00:00
16ee39f to
b14d8ce
Compare
Merging this branch changes the coverage (1 decrease, 2 increase)
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Aaron's product ask:
(?)should mean "genuinely stuck, no path forward without a human" — not "some flag is technically true regardless of current activity." False positives train the operator to dismiss(?)on sight, which degrades the signal for every other agent too.Ground-truth investigation of a live false positive (hera role
contrib-classifier, a nested sub-orchestrator coordinator dual-bound to the same argus task as its parent-orchestrator worker hat, perMaterializeHeraSubCoordinator) — genuinely active for 7+ minutes / 30k+ tokens streamed, still showing(?)— ruled out the working hypothesis (a stale self-reportedblockedflag stuck on one hat, uncleared due to cross-hat scoping): both hats'hera_role_statusreadworking, notblocked, and the existingautoClearBlockedHeraRolesauto-clear pass is already keyed by shared task ID, not per-role.Live daemon.log/ux.log forensics instead found:
in_review/ready_to_closestatus came from a separate daemon-bounce race:Daemon.SessionStatustransiently reported the supervisor-still-alive session as dead right after a daemon restart, firingRollHeraWorkerToReviewon a task that never actually died. Documented as a known, unfixed follow-up ingotchas/daemon-rpc.md— out of scope here (bigger, higher-stakes daemon/supervisor reattach concern, not required by the(?)acceptance criteria).(?)glyph itself traces to the PTY-content needs-input scan (RoleView.NeedsInput) —agent.ResumeActivityTick's zero-grace-period consecutive-tick counter can never sustain 5 ticks for a session whose content classification is bursty (this role's narrated numbered-findings output periodically looked like a parked prompt), even during genuinely substantial activity. A new test (TestResumeActivityTick's "mostly-working... never converges either") proves this.What changed
RoleView.needsInputOwn()now checks a newSustainedActivesignal first and returnsfalseunconditionally when set — suppressing both the content-scan flag and a self-reportedblockedladder status.SustainedActiveis computed once per argus task (not per role), threadedApp→HeraPage.SetSustainedActive→BuildModel→buildRoleView→RoleView, exactly likeNeedsInput/SessionIdle/SessionRunningalready are. Because it's task-scoped, two roles sharing one live binding's task ID (a dual-bound sub-coordinator's worker hat + coordinator hat) automatically read the identical value — no per-hat lookup needed.agent.SustainedActivityTick, a grace-tolerant sibling ofagent.ResumeActivityTick(one-tick grace mirroringEscalateParkedSelection's BUG-060 pattern, reusing the sameNeedsInputResumeTicksthreshold — no new dial).ResumeActivityTickitself is unchanged and still exclusively backs BUG-065/BUG-066's stricter clear paths.IsActive(one tick) but not yetSustainedActiveis unaffected — this is a narrowing, not a removal, of BUG-A's invariant.Routed through OpenSpec (
narrow-needs-input-sustained-active, archived in this PR per repo convention) with delta specs sharpening thehera-viewcapability's status-icon-precedence and needs-input requirements.Test plan
TestSustainedActivityTick(convergence on bursty patterns, grace semantics, still-refuses-genuinely-blocked patterns) andTestResumeActivityTick's new non-convergence proof.internal/tui/heratests: content-flag suppression, self-reported-blocked suppression, dual-bound cross-hat suppression, no-regression-on-unrelated-idle-blocked.BuildModel/buildRoleViewcall sites updated for the new parameter; full existing hera/tui/agent suites pass unchanged.make build/vet/fmt-check/lint-pr/test-cover-gateall clean.make vulnfails only on pre-existing Go 1.26.3 stdlib CVEs (toolchain-only, CIcontinue-on-error, unrelated to this diff — confirmed none of the flagged code paths are touched by this change).🤖 Generated with Claude Code