mosaic comms: socket resolution is tool-owned (B2) (#1476)
ci/woodpecker/push/publish Pipeline was successful

Co-authored-by: marcie <[email protected]>
This commit was merged in pull request #1476.
This commit is contained in:
2026-08-29 23:35:37 +00:00
committed by orch-01
parent ee6c842918
commit 94d626dff9
2 changed files with 15 additions and 1 deletions
@@ -15,6 +15,17 @@ import { afterEach, describe, expect, it } from 'vitest';
import { fleetCommsSendArgs, registerCommsCommand, tmuxSendArgs } from './comms.js';
describe('arg translation', () => {
// B2 (2026-08-29): when --socket is omitted, the CLI forwards NO -L and
// agent-send.sh's own resolution governs (explicit -L > MOSAIC_TMUX_SOCKET
// > unique hit > ambiguity refusal). Forwarding a guessed default here
// would defeat that resolution and reintroduce the stale-twin defect.
it('omits -L entirely when --socket is not given (tool-owned resolution)', () => {
const args = tmuxSendArgs('orch-01', 'hello', {});
expect(args).toEqual(['-s', 'orch-01', '-m', 'hello']);
expect(args).not.toContain('-L');
expect(args.join(' ')).not.toContain('-L');
});
it('tmux path: -s/-C/-L/-f/-m per agent-send.sh getopts', () => {
expect(tmuxSendArgs('orch-01', 'hello', {})).toEqual(['-s', 'orch-01', '-m', 'hello']);
expect(