jerpint / jerpint/woltspace

Remove primary wolt / WOLT_DIR legacy behavior

Open
#263 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
12
Forks
1
Avg merge
7h 13m
Merged PRs (30d)
31

Description

Problem

WOLT_DIR is a container-level env var set at boot by entrypoint_setup.py — it picks the first wolt found and makes it the "primary." This is a leftover from single-wolt days. In a multi-wolt system it's arbitrary and misleading.

Where WOLT_DIR is used (~12 files)

Container boot:

  • entrypoint_setup.py — resolves first wolt → sets WOLT_DIR
  • entrypoint.shtmux new-session -d -s main -c "$WOLT_DIR" (boot session), first-run viewport, TUI service

Server:

  • server/config.pyapp.py, tools.py — default memory dir, tool spawn dir

Bot:

  • bot/core.py — active wolt context (has switch_wolt() to change at runtime)
  • bot/telegram_adapter.py — default wolt dir

Other:

  • tui-service.js — tmux session working dir
  • cron/digest.mjs — memory/sparks dir

What's NOT affected

Sessions already work correctly — start_session() passes work_dir explicitly to tmux. WOLT_DIR is not used in session spawning code.

Proposed changes

  1. Remove "pick first wolt" logic from entrypoint_setup.pyWOLT_DIR should not default to an arbitrary wolt
  2. Replace main tmux session with a neutral landing (e.g. /workspace/wolts or no auto-boot) — sessions are spawned on demand via lodge/telegram/slack
  3. Make server/bot wolt-agnosticconfig.py, tools.py, core.py should derive context from the session, not a global env var
  4. TUI service — should get working dir from the session being connected, not WOLT_DIR

Impact

Medium refactor. ~12 files to update. Low risk since sessions already bypass WOLT_DIR.

Found during investigation of nunu wolf cron failure — the "primary wolt" env leaked into a failed session's shell prompt, causing confusion.

🤖 Generated with Claude Code

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing WOLT_DIR through entrypoint_setup.py, entrypoint.sh, server/config.py, server/app.py, server/tools.py, bot/core.py, bot/telegram_adapter.py, tui-service.js, and cron/digest.mjs. Confirm the existing explicit work_dir handling in start_session(). Done means no arbitrary primary wolt is selected, the main session has a neutral landing or no auto-boot, and server, bot, TUI, and cron behavior no longer depends on the global WOLT_DIR.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, python
Domain
backend, devops, tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.