Spaces:
Running
Running
|
Download PROGRESS.md from igardner/StockAnalysis: direct link, hf CLI and curl.
- Browser
- Download file 3.77 kB
-
https://huggingface.co/spaces/igardner/StockAnalysis/resolve/main/PROGRESS.md
- Command line
-
hf download hf://spaces/igardner/StockAnalysis/PROGRESS.md
-
curl -L -o PROGRESS.md https://huggingface.co/spaces/igardner/StockAnalysis/resolve/main/PROGRESS.md
3.77 kB
Progress log
Running notes for the StockAnalysis rebuild. Every entry below is committed and pushed before the next step starts, so the work survives a reset.
2026-10-25
- Read the HF docs for Spaces as Agent Tools and Spaces as API endpoints, plus
Gradio's API-visibility and curl pages. Confirmed the live contract:
agents.md->/gradio_api/info->POST /gradio_api/call/v2/<endpoint>->GET /gradio_api/call/<endpoint>/<event_id>. - Confirmed
api_visibility="private"hides an event from the API docs and Gradio clients but does not block direct HTTP. - Baseline repo had only the old smoke-test dashboard. No earlier stock-analysis work was present in the working tree or in git history.
- Ignored local session transcripts and agent tooling so they are not published to the public Space repo.
- Decision: no local servers, no
/tmp, nokill/pkill, no process cleanup. Verification is limited to static checks and offline unit checks. - Added
external_api.py: readsEXTERNAL_API_URL, sends the ticker request withHF_TOKENwhen present, passes JSON through unchanged, and wraps non-JSON or error responses. IncludesSTOCK_MODEL_IDwhen set. - Added
local_parser.py: optional OpenAI-compatible local model call (Ollama/vLLM/LM Studio) that converts non-JSON upstream text into JSON. It is opt-in viaLOCAL_PARSER_URLandLOCAL_PARSER_MODEL, and its prompt forbids inventing data. - Ran offline checks with mocked responses for JSON, text, error, and parse
paths. No servers started, no processes touched, no
/tmpfiles. - Rewrote
app.pyaround stock analysis: status pills, ticker/horizon/risk/ question form, JSON result, raw-response accordion, API/agents accordion, and a fixed bottom-right smoke-test panel that keeps the live model table, history, download, and settings. - Only the
Analyzeevent is public (api_name="analyze"). Smoke-test and page load events are marked private, with a documented caveat that private is not a security boundary for direct HTTP. - Added
agents.mdwith the HF one-shot block, the concrete/analyzerequest/poll flow, three-output contract, curl andgradio_clientexamples, and the error/response shapes. python -m py_compile app.py external_api.py local_parser.py smoke.pypassed.- Rewrote
README.mdfor the stock-analysis app. Kept the 30-model snapshot, the last smoke-test result, the dynamic selection rules, storage layout, and smoke-test settings. Added the agent contract, configuration table, custom model slot, local parser setup, external adapter contract, and disclaimer. - Expanded
agents.mdwith explicit boundaries, promises, input/output rules, error and retry guidance, auth/data-handling rules, discovery notes, and a clear no-guarantee disclaimer. README now points at those details. - Pushed the full local history to
origin/main(1beeba1..4567005). The sessionHF_TOKENwas used from the environment through a one-shot credential helper; it was not written to the repo or a credential store. - Live schema still showed the old app after the push. The runtime API reported
devMode: true, runtime SHAf5c9dc1, and repo SHA34ae3c8. - Incident: I wrongly treated dev mode as the problem, disabled it, and
triggered a factory reboot. That tears down the live dev container. I
re-enabled dev mode immediately, but the factory reboot had already been
submitted and could not be safely canceled; it remained
RUNNING_BUILDINGwith the old runtime SHA. - Lesson: dev mode intentionally suppresses rebuilds. Do not disable dev mode or factory-reboot a live dev container. No further lifecycle actions.
- Next: only local commits and
git push; do not touch the Space lifecycle.