Summary
There is currently no way to query the live state of the deployment server without reading logs. Adding a GET /status endpoint would expose which repos have active workers, whether queues are backed up, and the last deployment result for each repo.
Problem
When something goes wrong (e.g. a deployment is stuck or a queue is growing), there is no quick way to inspect the server state without ssh-ing in and tailing logs. A lightweight status endpoint would make it easy to check from a browser, curl, or a monitoring script.
Proposed Solution
Add a GET /status endpoint that returns a JSON snapshot of the current server state:
{
"repos": {
"my-repo/main": {
"worker_active": true,
"queue_depth": 2,
"last_deployment": {
"status": "success",
"commit": "abc1234",
"timestamp": "2026-03-24T10:15:00Z"
}
}
}
}
Implementation notes:
- Worker thread state is already tracked in the
workers dict — queue_depth can be derived from the existing Queue object.
last_deployment can be stored in a small in-memory dict keyed by repo/branch, updated at the end of each worker run.
- No persistence needed — state resets on server restart.
Acceptance Criteria
Summary
There is currently no way to query the live state of the deployment server without reading logs. Adding a
GET /statusendpoint would expose which repos have active workers, whether queues are backed up, and the last deployment result for each repo.Problem
When something goes wrong (e.g. a deployment is stuck or a queue is growing), there is no quick way to inspect the server state without
ssh-ing in and tailing logs. A lightweight status endpoint would make it easy to check from a browser,curl, or a monitoring script.Proposed Solution
Add a
GET /statusendpoint that returns a JSON snapshot of the current server state:{ "repos": { "my-repo/main": { "worker_active": true, "queue_depth": 2, "last_deployment": { "status": "success", "commit": "abc1234", "timestamp": "2026-03-24T10:15:00Z" } } } }Implementation notes:
workersdict —queue_depthcan be derived from the existingQueueobject.last_deploymentcan be stored in a small in-memory dict keyed byrepo/branch, updated at the end of each worker run.Acceptance Criteria
GET /statusreturns200 OKwith a JSON body