Two worker environment builders: containerEnv and kitrun.WorkerEnv #1869

Closed
opened 2026-11-12 09:35:06 +00:00 by sam · 2 comments
Owner

Problem

The worker's environment (NATS URL and token, State Store URL, token and CA, worktree UID and GID) is built twice: Daemon.containerEnv for the default path and kitrun.WorkerEnv for Kit tasks. They differ in where the endpoints point (daemon address versus relay ports) and both carry the broker token on an external broker.

Wanted

One builder for the worker environment, pointing at the relay, with no broker token once auth callout lands.

Done when

Only one function produces the worker's environment. Depends on #1865.

## Problem The worker's environment (NATS URL and token, State Store URL, token and CA, worktree UID and GID) is built twice: `Daemon.containerEnv` for the default path and `kitrun.WorkerEnv` for Kit tasks. They differ in where the endpoints point (daemon address versus relay ports) and both carry the broker token on an external broker. ## Wanted One builder for the worker environment, pointing at the relay, with no broker token once auth callout lands. ## Done when Only one function produces the worker's environment. Depends on #1865.
Author
Owner

With #1877, kitrun.WorkerEnv goes and containerEnv is the only builder. If #1867 moves default tasks behind the relay, containerEnv takes over the relay addressing that WorkerEnv had.


Generated by Claude Code

With #1877, `kitrun.WorkerEnv` goes and `containerEnv` is the only builder. If #1867 moves default tasks behind the relay, `containerEnv` takes over the relay addressing that `WorkerEnv` had. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

Closing: #1877 deletes kitrun.WorkerEnv, leaving containerEnv as the only builder. Pointing it at the relay is part of #1867.


Generated by Claude Code

Closing: #1877 deletes `kitrun.WorkerEnv`, leaving `containerEnv` as the only builder. Pointing it at the relay is part of #1867. --- _Generated by [Claude Code](https://claude.ai/code)_
sam closed this issue 2026-11-12 09:49:24 +00:00
sam added the mediumchore labels 2026-11-12 15:51:30 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1869