Skip to content

Commit 827b62d

Browse files
committed
test: trace rollback release inputs
1 parent 12ef9b6 commit 827b62d

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

tests/fm-account-routing.test.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,12 @@ case "$*" in
297297
printf '{"schema":%s,"task":"%s","profile":"%s","provider":"%s","pool":"%s","workspace":"%s","session_id":"sess-%s","session_event_seq":%s,"updated_at":"%s"}\n' "$session_schema" "$task" "$profile" "$provider" "$pool" "$workspace" "$task" "$session_event_seq" "$updated_at"
298298
;;
299299
*" lease release "*)
300+
if [ "${FM_FAKE_AF_RELEASE_TRACE:-0}" = 1 ]; then
301+
printf 'release-trace fail=%s fail-once=%s swap=%s sleep=%s marker=%s\n' \
302+
"${FM_FAKE_AF_RELEASE_FAIL:-}" "${FM_FAKE_AF_RELEASE_FAIL_ONCE:-}" \
303+
"${FM_FAKE_AF_RELEASE_SWAP_BACKUP:-}" "${FM_FAKE_AF_RELEASE_SLEEP:-}" \
304+
"${FM_FAKE_AF_RELEASE_MARKER:-}" >> "$FM_FAKE_AF_LOG"
305+
fi
300306
[ -z "${FM_FAKE_AF_RELEASE_SLEEP:-}" ] || sleep "$FM_FAKE_AF_RELEASE_SLEEP"
301307
[ -z "${FM_FAKE_AF_RELEASE_MARKER:-}" ] || touch "$FM_FAKE_AF_RELEASE_MARKER"
302308
[ "${FM_FAKE_AF_RELEASE_FAIL:-0}" != 1 ] || exit 43
@@ -1025,7 +1031,8 @@ test_failed_managed_respawn_restores_unmanaged_metadata() {
10251031
for artifact in status turn-ended check.sh pi-ext.ts grok-turnend-token; do
10261032
printf 'prior-%s\n' "$artifact" > "$HOME_DIR/state/$id.$artifact"
10271033
done
1028-
out=$(FM_FAKE_AF_SESSION_MISSING=1 run_spawn "$id" "$PROJ_DIR" --account-pool claude-crew)
1034+
out=$(FM_FAKE_AF_SESSION_MISSING=1 FM_FAKE_AF_RELEASE_TRACE=1 \
1035+
run_spawn "$id" "$PROJ_DIR" --account-pool claude-crew)
10291036
status=$?
10301037
[ "$status" -ne 0 ] || fail "managed respawn without a session mapping unexpectedly succeeded"
10311038
if ! cmp -s "$HOME_DIR/state/$id.meta" "$expected"; then

0 commit comments

Comments
 (0)