Spaces:
Sleeping
Sleeping
|
Download TESTING.md from adarshukumar/LS: direct link, hf CLI and curl.
- Browser
- Download file 3.01 kB
-
https://huggingface.co/spaces/adarshukumar/LS/resolve/main/TESTING.md
- Command line
-
hf download hf://spaces/adarshukumar/LS/TESTING.md
-
curl -L -o TESTING.md https://huggingface.co/spaces/adarshukumar/LS/resolve/main/TESTING.md
3.01 kB
| # Verification record | |
| Tested in the Arena sandbox on **2026-10-07** (Asia/Calcutta). | |
| ## Final results | |
| | Layer | Result | | |
| |---|---| | |
| | Static Python compilation | passed | | |
| | Ruff critical checks (`E4,E7,E9,F,I`) on the new API/adapter/tests/scripts | passed | | |
| | Combined offline suite | **114 passed, 6 live-only skipped** | | |
| | Original Upstage live suite | **6/6 passed** | | |
| | Running-server smoke test | all checks passed | | |
| | Repeated ZCode coding-agent probe | **5/5 complete two-tool loops passed** | | |
| | OpenAI Python SDK probe | models, JSON chat, SSE+usage, and function call passed | | |
| | Secret/cache scan | no credential cache, `.env`, PEM, or old-provider reference included | | |
| ## Live Upstage coverage | |
| The copied source suite passed live checks for: | |
| 1. connection and short chat; | |
| 2. typed realtime streaming; | |
| 3. web-search sources; | |
| 4. multi-turn history; | |
| 5. fresh Next.js credential capture; and | |
| 6. reasoning/content separation with no `<think>` leakage. | |
| ## Running API coverage | |
| `smoke_test.py` passed against native Uvicorn on port 7860: | |
| - `/healthz`; | |
| - four-model discovery; | |
| - non-streaming Chat Completions; | |
| - realtime SSE and `[DONE]`; | |
| - streamed usage; | |
| - a required OpenAI function call; and | |
| - a follow-up turn containing an assistant `tool_calls` message and `role: tool` result. | |
| `live_zcode_test.py` was then run five consecutive times. Every run completed this two-step `tool_choice: auto` workflow: | |
| 1. Solar selected `read_file` for `README.md`. | |
| 2. The synthetic file result was returned as an OpenAI tool message. | |
| 3. Solar selected `write_file` with schema-valid `path` and `content` arguments. | |
| The repeated run exposed occasional Solar narration instead of a structured call during development. The final adapter now detects that failure mode, performs one strict JSON retry, applies bounded repair only to tool-shaped JSON, validates the selected name and arguments against the caller's schema, and never exposes the narration as a tool call. The five-run verification passed after that fix. | |
| ## OpenAI SDK coverage | |
| Using the official `openai` Python package with: | |
| ```python | |
| OpenAI(base_url="http://127.0.0.1:7860/v1", api_key="public") | |
| ``` | |
| all of the following passed live: | |
| - `client.models.list()`; | |
| - non-streaming `client.chat.completions.create(...)`; | |
| - streaming chunks plus the usage-only chunk; and | |
| - `tools` + `tool_choice="required"` returning a parsed SDK `tool_calls` object. | |
| ## Container note | |
| Docker/Podman is unavailable in this sandbox, so the image itself could not be executed here. The Dockerfile was reviewed statically and follows Hugging Face Docker Space conventions: `sdk: docker`, port `7860`, `0.0.0.0`, a health check, and non-root UID 1000. The exact application and pinned runtime dependencies were exercised natively. | |
| ## Re-run | |
| ```bash | |
| pytest -q | |
| UPSTAGE_LIVE=1 pytest -q tests/test_upstage_provider.py -k Live | |
| uvicorn app:app --host 0.0.0.0 --port 7860 | |
| python smoke_test.py http://127.0.0.1:7860 | |
| python live_zcode_test.py http://127.0.0.1:7860 | |
| ``` | |