jerpint / jerpint/woltspace

FastAPI server missing WOLT_DIR in entrypoint.sh — breaks tool registry

Open Beginner friendly
#232 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

In container/entrypoint.sh line 43, the FastAPI server is started without WOLT_DIR:

# Current (broken):
(cd "$WOLTSPACE_DIR" && uv run --project server uvicorn server.app:app \
  --host 0.0.0.0 --port 7777 --reload --timeout-graceful-shutdown 1) &

Compare with the TUI service which correctly passes it:

# TUI (works):
TUI_PORT=3001 WOLT_DIR="$WOLT_DIR" node "$WOLTSPACE_DIR/server/tui-service.js" &

Impact

server/config.py:9 defaults WOLT_DIR to WOLTSPACE_DIR when not set, so:

  • Server reads .state/tool-registry.json from /workspace/woltspace/.state/ instead of the wolt's .state/
  • tool_registry.restore() fails silently — no tools registered on startup
  • tool_registry.spawn() uses wrong cwd — spawned tools can't find their files (e.g. widget_api.py import error)
  • All /tools/{name}/ proxy routes return 404 through the tunnel

Fix

One-line change in container/entrypoint.sh:

- (cd "$WOLTSPACE_DIR" && uv run --project server uvicorn server.app:app --host 0.0.0.0 --port 7777 --reload --timeout-graceful-shutdown 1) &
+ (cd "$WOLTSPACE_DIR" && WOLT_DIR="$WOLT_DIR" uv run --project server uvicorn server.app:app --host 0.0.0.0 --port 7777 --reload --timeout-graceful-shutdown 1) &

Workaround

Currently using absolute paths in /tools/spawn API calls and keepalive scripts. Survives keepalive restarts but not server rebuilds.

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 at line 43 of container/entrypoint.sh and compare the FastAPI launch command with the TUI service command. Pass the existing WOLT_DIR value to the server, then verify that server/config.py uses it and that tool registry restoration and tool proxy routes work with a wolt-specific state directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, fastapi, python
Domain
api, backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
92/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.