Skip to content

sprite-env services restart returns 404 (route missing?) #149

@handfuloflight

Description

@handfuloflight

Summary

sprite-env services restart <name> consistently fails with 404 page not found on current Sprite runtime, while start/signal endpoints work.

This appears to be either:

  1. Missing API route (POST /v1/services/{name}/restart) in runtime, or
  2. Stale CLI command wiring/help text in sprite-env.

Environment

  • sprite-env version: 0.0.1-rc35
  • Sprite: alpha (sprite_id: sprite-68d73250-5078-4644-b550-5f6a3237eec5)
  • OS: Linux alpha 6.12.47-fly x86_64

Reproduction

Inside Sprite shell (sprite console -o <org> -s <sprite>):

sprite-env services list
sprite-env services restart sandbox-agent

Result:

curl: (22) The requested URL returned error: 404
404 page not found

Also reproducible for other services:

sprite-env services restart rivetkit
sprite-env services restart gateway

All return the same 404.

Direct API checks

Using the internal socket directly:

# restart endpoint -> 404
curl -i -sS --unix-socket /.sprite/api.sock \
  -H 'Content-Type: application/json' \
  -X POST http://sprite/v1/services/sandbox-agent/restart

Returns:

HTTP/1.1 404 Not Found
...
404 page not found

But other endpoints are present:

# signal endpoint -> 204
curl -i -sS --unix-socket /.sprite/api.sock \
  -H 'Content-Type: application/json' \
  -X POST http://sprite/v1/services/signal \
  -d '{"name":"sandbox-agent","signal":"TERM"}'

# start endpoint -> 200 NDJSON stream
curl -i -sS --unix-socket /.sprite/api.sock \
  -H 'Content-Type: application/json' \
  -X POST http://sprite/v1/services/sandbox-agent/start

Expected

sprite-env services restart <name> should successfully restart the service, or the command/help should be removed if unsupported.

Actual

restart path always returns 404.

Workaround

stop + start works reliably:

sprite-env services stop <name>
sprite-env services start <name>

Impact

Automations that rely on sprite-env services restart fail and need special-case fallback logic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions