Implements the core of SPEC.md — the manifest exchange, less audio-tier matching (§3) and federation (§9a), both of which the spec sequences as later work. - §2 Jmanifest format and series bundles - §3 cut matching: exact / runtime / loose tiers - §4 API, less POST /manifests/search - §5 rate limiting; §5a trust model, anonymous bearer tokens - §6 upload validation, all four stages - §7 relational storage, no JSON blob on the write path - §8 Rust + Axum + SQLite, single serialized writer, in-process job queue - §9a content addressing, computed on upload Reconciled against the system spec: - anneal_sec removed, withdrawn upstream by AR-012/AR-013. Presence follows track extent, so a track survives its own gaps and there is nothing to anneal. Its successor extinction_sec and the new gallery_scope are accepted and stored; scope enters the §7 ranking. A manifest still carrying anneal_sec is a hard 400, not silently ignored — it came from a pipeline whose window semantics differ from what this server assumes. - Audio signature: media under 120 s now emits no signature at all, matching scene-actor-extraction IR-007. The earlier §3 draft allowed a shortened window under 150 s, which was the weaker rule — a caller-varying length is the property SR-004 forbids. - UR IDs regularised to UR-nnn; docs/requirements.md registers 32 requirements, each tracing to an SR-nnn or PR-nnn. 189 tests: unit, end-to-end through the real router, and an injection suite covering SQL, JSON, header and Unicode payloads. Writing that suite found two real gaps, both fixed here: compatibility homoglyphs passed the §5a character class, and a one-frame audio signature was accepted on a feature-length item. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
31 lines
958 B
TOML
31 lines
958 B
TOML
[package]
|
|
name = "jray-server"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
rust-version = "1.85"
|
|
license = "GPL-3.0-or-later"
|
|
description = "JRay public server — community manifest exchange"
|
|
|
|
[dependencies]
|
|
axum = { version = "0.8", features = ["json", "query"] }
|
|
tokio = { version = "1", features = ["rt-multi-thread", "macros", "signal", "sync", "time"] }
|
|
tower = "0.5"
|
|
tower-http = { version = "0.6", features = ["trace", "timeout", "limit"] }
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
rusqlite = { version = "0.37", features = ["bundled"] }
|
|
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
unicode-normalization = "0.1"
|
|
unicode-general-category = "1"
|
|
sha2 = "0.10"
|
|
rand = "0.9"
|
|
ulid = "1"
|
|
thiserror = "2"
|
|
anyhow = "1"
|
|
|
|
[dev-dependencies]
|
|
tower = { version = "0.5", features = ["util"] }
|
|
http-body-util = "0.1"
|