Tests: test_time.py ignores the job's TIME_* environment #51

Closed
opened 2026-10-14 20:30:23 +00:00 by teahubxyz · 3 comments
Owner

The suite assumes a clean environment, but a worker's run shell inherits the job's TIME_* variables (TIME_WORKER, TIME_MODE, …), so python3 .github/time/test_time.py fails there. Seen on #50: an assertion near line 158 failed in the worker's shell while CI, with a clean environment, was green.

  • At the top of .github/time/test_time.py, before time.py is imported, remove every TIME_* variable and the seat keys (ANTHROPIC_API_KEY, VENICE_API_KEY, CURSOR_API_KEY, TIME_TOKEN) from os.environ, so each check sets only what it needs.
  • No other behaviour changes.

DONE: PR open; the suite passes both in a clean environment and with TIME_WORKER=claude:sonnet TIME_MODE=live TIME_DAILY_USD=0 exported; CI green.

The suite assumes a clean environment, but a worker's `run` shell inherits the job's `TIME_*` variables (`TIME_WORKER`, `TIME_MODE`, …), so `python3 .github/time/test_time.py` fails there. Seen on #50: an assertion near line 158 failed in the worker's shell while CI, with a clean environment, was green. - At the top of `.github/time/test_time.py`, before `time.py` is imported, remove every `TIME_*` variable and the seat keys (`ANTHROPIC_API_KEY`, `VENICE_API_KEY`, `CURSOR_API_KEY`, `TIME_TOKEN`) from `os.environ`, so each check sets only what it needs. - No other behaviour changes. DONE: PR open; the suite passes both in a clean environment and with `TIME_WORKER=claude:sonnet TIME_MODE=live TIME_DAILY_USD=0` exported; CI green.
teahubxyz added the queued label 2026-10-14 20:30:23 +00:00
time added ready and removed queued labels 2026-10-14 21:03:31 +00:00

⏱️ Time: Claude Sonnet (Anthropic) is working on this now, on branch time/card-51.

⏱️ Time: Claude Sonnet (Anthropic) is working on this now, on branch `time/card-51`. <!-- time {"beat":"dispatched","launched":true,"worker":"anthropic"} -->

⏱️ Time: sonnet opened PR #54 (5 steps, claude-sonnet-5-5). Review and landing follow on the next beat.

⏱️ Time: `sonnet` opened PR #54 (5 steps, claude-sonnet-5-5). Review and landing follow on the next beat. <!-- time {"beat":"dispatched","worker":"anthropic","pr":54,"steps":5,"seat":"sonnet","model":"claude-sonnet-5-5"} -->

⏱️ Time: PR #54 is up for this card. haiku reviewed it on the PR.

⏱️ Time: PR #54 is up for this card. `haiku` reviewed it on the PR. <!-- time {"beat":"pr","pr":54,"launched":false,"review":"venice","seat":"haiku"} -->
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: teahubxyz/time#51