fix(issue-50): the loop path waits by the registry on its pending record (review F1-F3)
F1: from phase two on, the loop's `_registry_wait` ran before the record was reset to pending, so the waiter held a terminal record: the engine refused its dispatch_wait_at merge and other waiters never saw it in the FIFO. The wait (and the idle wait after it) now follows the `--status pending` update; s1 pins the order and u3c shows why a terminal self record cannot signal. F2: the real-herdr box teardown survives a hung stop/delete, kills a server bootstrapped by a late client call, and asserts the server and HOME are gone. F3: the delegate-job SKILL.md exit 5 row names the registry wait. Also drops the dead loop in s1. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
05bffc6475
commit
3705bc72a8
4 files changed
+56
-23
No files matched your search
@@ -518,7 +518,19 @@ EOF
|
||||
exit 5
|
||||
fi
|
||||
|
||||
# Registry wait (Issue #50), then idle wait
|
||||
# Update job details in registry
|
||||
"$PY" "$SCRIPT_DIR/scripts/registry.py" --registry-dir "$REGISTRY_DIR" update \
|
||||
--job "$JOB_ID" \
|
||||
--agent-session "$current_session" \
|
||||
--prompt-file "$job_dir/prompt.md" \
|
||||
--iteration "$iteration" \
|
||||
--attempt-id "$attempt" \
|
||||
--role "$display_role" \
|
||||
--status "pending"
|
||||
|
||||
# Registry wait (Issue #50), then idle wait - on the record just reset to
|
||||
# pending for this phase, so the waiter's signal is written and other
|
||||
# waiters see this job in the FIFO (review F1)
|
||||
local cur_agent="$AGENT"
|
||||
[ "$_phase" = "reviewer" ] && cur_agent="$REVIEWER"
|
||||
if [ "$cur_agent" != "human" ] && ! _is_remote "$current_session"; then
|
||||
@@ -534,16 +546,6 @@ EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
# Update job details in registry
|
||||
"$PY" "$SCRIPT_DIR/scripts/registry.py" --registry-dir "$REGISTRY_DIR" update \
|
||||
--job "$JOB_ID" \
|
||||
--agent-session "$current_session" \
|
||||
--prompt-file "$job_dir/prompt.md" \
|
||||
--iteration "$iteration" \
|
||||
--attempt-id "$attempt" \
|
||||
--role "$display_role" \
|
||||
--status "pending"
|
||||
|
||||
local _disp_tok=""
|
||||
_disp_tok="$("$PY" -c "import json, os; p=os.path.join('$REGISTRY_DIR', '$JOB_ID.json'); print(json.load(open(p)).get('dispatch_token','') or '') if os.path.exists(p) else print('')" 2>/dev/null || true)"
|
||||
|
||||
|
||||
Reference in new issue
Block a user