Skip to content

Isolate shimmer tests from inherited mise usage_* environment #766

Description

@c0da-ricon

While re-reviewing #764 from a Pi-launched agent session, mise run test failed in test/agent/agent.bats until I explicitly cleared Pi/mise usage_* variables inherited from the outer shimmer agent --headless invocation.

Observed inherited env included:

usage_headless=true
usage_message=...
usage_model=openai-codex/gpt-5.5
usage_session=/home/runner/.pi/agent/sessions/...
usage_timeout=900

Failure shape: tests that call the repo-local shimmer agent task unexpectedly saw the outer usage_session / usage_* state, so they attempted to resume the live Pi session instead of exercising the test arguments. Example failure:

Error: No session matching '/home/runner/.pi/agent/sessions/...jsonl'
[wake] ERROR task failed
[agent] ERROR task failed

Workaround used for review:

env -u usage_cwd -u usage_headless -u usage_message -u usage_meta \
    -u usage_model -u usage_session -u usage_session_id -u usage_timeout \
    mise run test

That produced 148/148 passing.

This is likely a test isolation gap: the shared BATS helpers already clear ambient GIT_CONFIG_*; they may also need to clear inherited usage_* variables so tests run reliably from inside agent sessions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions