fix: attach_command from one builder, no kill/start_command, row-less stop, one herdr name rule, registry format 2 (Issue #71) #73

Merged
Godopu merged 15 commits from fix/issue-71 into main 2026-10-26 22:28:51 +00:00
Showing only changes of commit 50e2998a20 - Show all commits
+6 -5
View File
@@ -155,11 +155,12 @@ class HerdrError(Exception):
class HerdrSource(object):
"""Every herdr and OS read the judgement needs, in one place."""
def __init__(self, target, agent, session=None):
def __init__(self, target, agent, session=None, name=None):
self.target, self.session = target, session or None
# herdr knows the agent only by its sanitized name (#66); the kind is
# read off the original name, whose suffix a long name's hash replaces.
self.name = sanitize_herdr_agent_name(target)
# `name` is the name herdr knows the agent by (#66), worked out once
# by StallWatch (#71); the kind is read off the original name, whose
# suffix a long name's hash replaces.
self.name = name or target
self.agent = resolve_agent(agent, target)
adapter = get_adapter(self.agent) if self.agent else None
self.resident = tuple(adapter.resident_children) if adapter else ()
@@ -225,8 +226,8 @@ class HerdrSource(object):
class StallWatch(object):
def __init__(self, args, source=None):
self.args = args
self.src = source or HerdrSource(args.target, args.agent, args.herdr_session)
self.herdr_name = sanitize_herdr_agent_name(args.target) # for herdr only; logs keep args.target
self.src = source or HerdrSource(args.target, args.agent, args.herdr_session, name=self.herdr_name)
name = resolve_agent(args.agent, args.target)
adapter = get_adapter(name) if name else None
reliable = bool(adapter.agent_status_reliable) if adapter else True