ACP test setup leaks session settings into the test process

Aperta
#527 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 5 giorni

@gmemuriuki ci sta già lavorando.

Dal 23/11/2026.

  • #528 di @gmemuriuki — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug
What happens

Starting an ACP test changes the test process's SYMPOSIUM_HOME, SYMPOSIUM_HOOK_TRACE, and PATH, even when the agent fails to launch. Other tests and child processes can then inherit settings meant for that session.

This affects opt-in ACP agent testing (SYMPOSIUM_ENABLE_AGENT_TESTING with an ACP backend selected), not simulation-only runs or the default Claude SDK backend. Three tests in tests/hook_agent.rs enter this path: two exercise ACP scenarios; the third starts a session before skipping its Claude-SDK-only assertions.

Steps to reproduce
  1. Give the test process a known SYMPOSIUM_HOME.
  2. Call run_with_acp_session with a nonexistent agent executable.
  3. After the launch error, compare the process environment with its original values.
Actual result

The launch fails with:

The system cannot find the file specified. (os error 2)

The regression then fails with:

assertion `left == right` failed: ACP launch failure changed SYMPOSIUM_HOME in the test process

The value now points to the session's temporary directory instead of the original home.

Expected result

ACP setup should leave the test process's environment unchanged, whether the agent starts or fails.

Environment
  • Symposium: 3516c051, with an uncommitted regression.
  • Agent: deliberately nonexistent executable; no account or network needed.
  • OS: Windows.
Notes

Reproduced independently by both of us. The local regression is tests::acp_launch_failure_preserves_environment in symposium-testlib.

run_with_acp_session sets process-wide variables before spawning the agent. On Unix this also raises an environment-mutation safety concern; no memory corruption has been reproduced.

Lingua principale
Rust
Stelle
247
Fork
30
Merge medio
4g 19h
PR unite (30g)
44

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di symposium-dev/symposium

Tutte le issue di symposium-dev/symposium

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.