fix(lib.sh): one herdr name rule; the shim's agent attach resolves its target (Issue #71)
- One _sanitize_herdr_agent_name: the shim gets lib.sh's definition through `declare -f` instead of a second copy. Without shasum/sha1sum/openssl it hashes with python3 (same result as lib_py.agents.sanitize); with none of them it fails instead of truncating or appending 00000000. - Every caller stops on that failure: new-session before any pane is made, the lookups report failure, and has-session takes the name lib.sh computed (the cwd-relative import and its lower()[:32] fallback are gone). - `herdr agent attach <name>` through the shim resolves the target like get/read/prompt; options after the target are kept. Refs #71 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
29cc4fd904
commit
4243da507c
2 files changed
+45
-52
No files matched your search
@@ -895,8 +895,8 @@ finalize_unfinished() {
|
||||
FINAL_JOB_STATUS="$final"
|
||||
if [ "$step" = "probe" ]; then
|
||||
local sess="${target_sess#herdr:}" target_agent diag="no"
|
||||
target_agent=$(_sanitize_herdr_agent_name "$sess")
|
||||
_within_deadline "$deadline" _agent_still_working "$sess" "$target_agent" && diag="yes"
|
||||
target_agent=$(_sanitize_herdr_agent_name "$sess") || target_agent=""
|
||||
[ -n "$target_agent" ] && _within_deadline "$deadline" _agent_still_working "$sess" "$target_agent" && diag="yes"
|
||||
echo "liveness: no wire event for ${IDLE_TIMEOUT}s on job $job_id; herdr/pane says busy=$diag (diagnostic only, not evidence)" >&2
|
||||
fi
|
||||
# The answer comes back on fd 3: stdout carries registry.py's close output.
|
||||
|
||||
Reference in new issue
Block a user