Compare commits

..

1 Commits

Author SHA1 Message Date
Jarvis
c33e00b6b3 chore(release): bump @mosaicstack/mosaic 0.0.36 -> 0.0.37
Some checks failed
ci/woodpecker/pr/ci Pipeline was canceled
ci/woodpecker/push/ci Pipeline failed
Batched release: P4 upgrade-safe migration (#590), F1 init wizard+presets (#591),
P4.1 (#593), fleet ps unmanaged sessions (#586), HB consistency fixes (#595),
orchestrator-mutable fleet add/remove (#596), Fleet Suite PRD (#588).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RMoEx7hfdFGjUiCHuN1RRi
2026-06-21 18:27:10 -05:00
2 changed files with 11 additions and 22 deletions

View File

@@ -32,15 +32,8 @@ MOSAIC_AGENT_COMMAND='bash --noprofile --norc -i' \
"$START" "$AGENT" "$START" "$AGENT"
tmux -L "$SOCKET" has-session -t "=$AGENT:0.0" || fail "agent session was not created" tmux -L "$SOCKET" has-session -t "=$AGENT:0.0" || fail "agent session was not created"
# Retry: pane_current_path briefly reflects the tmux server's cwd until the pane actual_dir=$(tmux -L "$SOCKET" display-message -p -t "=$AGENT:0.0" '#{pane_current_path}')
# process establishes its own cwd (the -c start dir). Poll until it settles. [ "$actual_dir" = "$WORKDIR" ] || fail "agent workdir mismatch: $actual_dir"
actual_dir=""
for _ in $(seq 1 30); do
actual_dir=$(tmux -L "$SOCKET" display-message -p -t "=$AGENT:0.0" '#{pane_current_path}')
[ "$actual_dir" = "$WORKDIR" ] && break
sleep 0.1
done
[ "$actual_dir" = "$WORKDIR" ] || fail "agent workdir mismatch: $actual_dir (expected $WORKDIR)"
# ── Test 2: idempotency (duplicate start prints 'already running') ───────────── # ── Test 2: idempotency (duplicate start prints 'already running') ─────────────
MOSAIC_TMUX_SOCKET="$SOCKET" \ MOSAIC_TMUX_SOCKET="$SOCKET" \

View File

@@ -1438,19 +1438,15 @@ export function registerFleetAgentCommands(
await runChecked(runner, buildAgentWatchCreateViewerCommand(agent, viewerName, socketName)); await runChecked(runner, buildAgentWatchCreateViewerCommand(agent, viewerName, socketName));
let exitCode = 0;
try {
const [bin, args] = splitCommand(buildAgentWatchAttachCommand(viewerName, socketName)); const [bin, args] = splitCommand(buildAgentWatchAttachCommand(viewerName, socketName));
exitCode = await iRunner(bin, args); const exitCode = await iRunner(bin, args);
} finally {
// ALWAYS clean up the viewer session — even if attach threw or the process was // Best-effort cleanup of the viewer session regardless of how the user detached.
// interrupted — so stale grouped *-watch-* sessions never accumulate. Errors here // Errors here are intentionally suppressed — the agent session is unaffected.
// are intentionally suppressed; the agent session is unaffected.
const killResult = await runner( const killResult = await runner(
...splitCommand(buildAgentWatchKillViewerCommand(viewerName, socketName)), ...splitCommand(buildAgentWatchKillViewerCommand(viewerName, socketName)),
); );
void killResult; void killResult; // result is intentionally ignored
}
if (exitCode !== 0) { if (exitCode !== 0) {
process.exitCode = exitCode; process.exitCode = exitCode;