All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
Prefer the pane's MOSAIC_AGENT_NAME and query only the local tmux server when falling back, so destination socket holders cannot corrupt reply routing. Add red-first regression coverage for env, local-session, and unknown sender paths. Co-Authored-By: OpenAI GPT <noreply@openai.com>
2.7 KiB
2.7 KiB
Issue #808 — agent-send sender identity
Objective
Fix cross-socket agent-send.sh preambles so replies route to the real sender rather than a destination-socket holder session.
Scope and acceptance criteria
- Prefer exported
MOSAIC_AGENT_NAMEas the authoritative sender session name. - If it is unset, query the sender's local/default tmux socket for
#Swithout destination-Larguments. - Preserve
?when sender identity cannot be determined. - Do not alter destination socket dispatch.
- Add red-first regressions for all three identity paths.
Plan
- Extend
agent-send.test.shwith deterministic fake-tmux coverage. - Run the test against the unpatched implementation and record RED evidence.
- Apply the minimal sender lookup fix only.
- Run the focused suite and repository quality gates.
- Commit, queue-guard, push, and open an author-only PR for independent review.
Constraints and risks
- Worker lane is author-only: no self-review or merge.
docs/TASKS.mdand mission state are orchestrator-owned and will not be modified.- Pre-existing runtime changes under
.mosaic/orchestrator/are excluded from this work. - Budget: no explicit token cap; keep changes limited to the shell tool, sibling regression test, and this scratchpad.
Evidence
- RED:
bash packages/mosaic/framework/tools/tmux/agent-send.test.shfailed on the unpatched implementation withPASS=12 FAIL=3; it selecteddestination-holderinstead of bothMOSAIC_AGENT_NAME=authoritative-agentand local sessionlocal-agent. The genuinely unavailable sender case already exercised and preserved?. - GREEN:
bash packages/mosaic/framework/tools/tmux/agent-send.test.shpassed withPASS=15 FAIL=0; coverage includes env authority, local/default tmux fallback across a destination-L, explicit rejection of the destination holder, and?fallback. - Syntax:
bash -n packages/mosaic/framework/tools/tmux/agent-send.sh packages/mosaic/framework/tools/tmux/agent-send.test.shpassed. - Quality gates:
pnpm typecheck(42/42 tasks),pnpm lint(23/23 tasks), andpnpm format:checkall passed after installing the frozen lockfile dependencies. The first install attempt failed because pnpm's configured store pointed at/root; retrying with the existing user-owned store (--store-dir /home/hermes/.local/share/pnpm/store) succeeded without changing tracked dependency files. - Documentation: no public API or operator workflow changed; the source comment, regression-test contract, and this implementation record cover the internal bug fix.
- Independent review: intentionally pending for the reviewer assigned by
mosaic-100; this author-only lane will not self-review or merge.