Refusal assertion depends on the real process environment
The finding
The first call injects environ={...} explicitly. The second call omits environ, so mask_channel presumably falls back to the real os.environ. If SCOUT_MASK_TOKEN is set in the shell or CI environment running the tests (likely on the homelab host where scout is configured), no ChannelError is raised. The test then fails, or unset.requests is non-empty. This makes the test environment-dependent rather than deterministic.
1| """The Snapcast and argus-mask voice channels, and the audio conversion they share."""
2|
3| from __future__ import annotations
4|
5| import asyncio
6| import dataclasses
7| import functools
8| import io
9| import json
10| import math
11| import os
12| import struct
13| import sys
14| import threading
15| import time
16| import wave
17| from datetime import UTC, datetime
18|
19| import httpx
20| import pytestThe work pack
Recommendation. Pass an explicit empty mapping (environ={}) to the second mask_channel call, or use monkeypatch.delenv("SCOUT_MASK_TOKEN", raising=False), so the 'not set' path is exercised deterministically.
Acceptance criteria
- Address: Refusal assertion depends on the real process environment
- Keep the change scoped to the cited file/symbols unless impact requires otherwise
- Pass an explicit empty mapping (
environ={}) to the secondmask_channelcall, or usemonkeypatch.delenv("SCOUT_MASK_TOKEN", raising=False), so the 'not set' path is exercised deterministically. - Re-check
tests/test_voice_channels.pyafter the fix
Status
- claimed
- wontfix
How it was judged
The agent checked the finding against the code and found it wrong. No fix, no test run: the pack was closed with this note, which a person can read and overturn.
Wrong: the test helper mask_channel() builds MaskChannel with environ=environ or {}, never os.environ, so the second call already runs against an empty mapping, whatever the real environment holds.