Two links of the heavy chain, built on the #25 job backbone. Both ship the CODE
now; they go live the moment erable ssh is back (yt-dlp install) — no GPU needed.
#27 — artifact store (artifacts.py). Big binaries (fetched sources, later stems/
loops) live content-addressed on local disk under FOURIER_ARTIFACTS, tracked as
ordinary cache rows (kind→result_ref), so the existing LRU cache.gc() already
evicts the coldest under a cap. Freebox was the original SSOT plan — deferred per
PLN; erable-local for now. Serving is zero-copy via nginx X-Accel-Redirect
(FOURIER_X_ACCEL), FileResponse fallback in dev. resolve() refuses path traversal
/ anything outside the root.
#29 — /sources (engines/sources.py + POST /sources). The worker shells out to
yt-dlp → bestaudio → 44.1k WAV (analysis-ready for /separate, /loops, features),
content-addresses it, stores it, and aliases url→content_id so a repeat URL is an
idempotent born-done job (no re-download). Submit returns 202 {job_id}; poll
/jobs/{id}. URL scope is OPEN (any http(s)) per PLN — gated by the platform apikey
+ nechapi monitoring — but we still hard-block the SSRF footguns (non-http(s),
localhost, RFC1918/link-local/reserved IPs; incl. the 169.254.169.254 metadata
classic). The fetch is a thin seam so tests mock the network with a synthetic WAV.
Also: GET /artifacts/{cid}/{name} serving endpoint; healthz reports yt-dlp
presence; _meter now counts by ROUTE TEMPLATE not concrete path (else /jobs/{id}
& /artifacts/{id} would mint unbounded Prometheus series). OpenAPI refreshed
13→17 ops, @nech/api regenerated (submitSource/getArtifact/getJob/cancelJob).
yt-dlp added to requirements-deploy; DEPLOY.md §5b documents the yt-dlp+ffmpeg
install and the nginx internal location. 78→95 tests green.
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| clients | Loading commit data... | |
| deploy | Loading commit data... | |
| engines | Loading commit data... | |
| tests | Loading commit data... | |
| .dockerignore | Loading commit data... | |
| .gitignore | Loading commit data... | |
| DEPLOY.md | Loading commit data... | |
| Dockerfile | Loading commit data... | |
| README.md | Loading commit data... | |
| SRE.md | Loading commit data... | |
| VERDACCIO.md | Loading commit data... | |
| app.py | Loading commit data... | |
| artifacts.py | Loading commit data... | |
| auth.py | Loading commit data... | |
| cache.py | Loading commit data... | |
| config.py | Loading commit data... | |
| db.py | Loading commit data... | |
| fourier.py | Loading commit data... | |
| jobs.py | Loading commit data... | |
| requirements-deploy.txt | Loading commit data... | |
| requirements-test.txt | Loading commit data... | |
| requirements.txt | Loading commit data... | |
| scopes.py | Loading commit data... | |
| worker.py | Loading commit data... |