File size: 1,856 Bytes
5dd1bb4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# System Behavior: deployment

> Living document. Updated by `/archive-spec` when features are completed.
> Last archived: F007 on 2026-03-28

---

## Added

### HF Spaces deployment
<!-- since: F007 -->

The SQLEnv server accepts connections on a public HuggingFace Spaces URL. Visitors can connect via WebSocket, reset an episode, execute actions (`DESCRIBE`, `SAMPLE`, `QUERY`, `ANSWER`), and receive observations without local setup. The server exposes a healthy status on `/health`.

### Bundled Spider databases in Docker
<!-- since: F007 -->

The Docker image bundles Spider SQLite databases so the server starts without an external download step. Episodes are playable immediately after container startup.

### Colab training notebook
<!-- since: F007 -->

A notebook at `notebooks/train_grpo.ipynb` accepts a HF Space URL, connects to SQLEnv, runs a GRPO training loop, evaluates on held-out questions, and produces matplotlib learning curves in a Colab-compatible flow.

### Blog post outline
<!-- since: F007 -->

A structured outline at `docs/blog-outline.md` provides the narrative skeleton (hook, problem, solution, results, and try-it sections) for manual polish and HF blog submission.

### Polished README experience
<!-- since: F007 -->

The repository README presents a project overview, architecture, streamlined quickstart, action reference, training artifact link, and HF Space link, without development-phase caveats.

## Modified

### Dockerfile runtime packaging and startup
<!-- since: F007 | previously: F001 -->

Before: the Docker image built the server but did not bundle required database assets, and startup assumptions were local-first.

After: the Docker image includes bundled Spider SQLite assets, respects the `PORT` environment variable (defaulting to `8000`), and runs as a non-root user for HF Spaces compatibility.