Requirements register, spec rewrite, and TRACES tags
jRay had no requirement IDs, so nothing in this repo could be traced to and the CI gate had no denominator to read. The other two components had already moved to registers; this brings the plugin level with them. Adds docs/requirements.md with 46 permanent JR-nnn IDs, each carrying a parent requirement, priority, status and verification tier, plus a per-requirement verification plan. JR is flat rather than split by theme: the plugin is one deployable with one audience, and JRay-public-server already ships UR/DR, so a second repo using those prefixes would make UR-007 ambiguous across registers. Rewrites SPEC.md as requirements prose with Current:/Gap: on every one. It had drifted into a format-plus-API reference that documented schema_version 1 while owning a format whose v2 shape was specified only in the other two repos, said nothing about SR-002's scene-scoped semantics, and carried the manifest exchange as a "planned" aside while its configuration classes were already implemented. Plugin-side exchange obligations move here from the server's spec, where they were an ownership inversion. Adds JR-038..041 for PR-005, which had no software row in any repo -- it was held structurally by SR-004 and GR-005 both being prohibitions, and a goal preserved only by prohibitions is the kind that erodes unnoticed. jRay is the component that actually opens a socket. Tags 18 units with the requirements they satisfy. Tags name what the code satisfies, so FileTransformationRegistration is not tagged JR-021: that requirement is a prohibition and was still violated elsewhere when this was written. Vendors jray-project as a submodule for the system spec and shared gate. TRACES: JR-001, JR-004, JR-005, JR-007, JR-008, JR-009, JR-010, JR-011 TRACES: JR-012, JR-013, JR-014, JR-015, JR-016, JR-017, JR-018, JR-019 TRACES: JR-020, JR-024, JR-025, JR-036, JR-038 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,110 @@
|
||||
namespace Jellyfin.Plugin.JRay.Configuration;
|
||||
|
||||
/// <summary>
|
||||
/// How far a configured manifest server is trusted. See the JRay public server
|
||||
/// specification, §9 "Trusting third-party servers".
|
||||
/// </summary>
|
||||
public enum ServerTrustLevel
|
||||
{
|
||||
/// <summary>
|
||||
/// Accept manifests, but never contribute to this server and never send
|
||||
/// library inventory beyond the single item being queried. The default for
|
||||
/// user-added servers.
|
||||
/// </summary>
|
||||
FetchOnly = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Eligible to contribute to, subject to <see cref="ManifestServer.AllowContribute"/>.
|
||||
/// </summary>
|
||||
Full = 1,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The minimum cut-match tier a fetched manifest must reach before it is stored.
|
||||
/// See the public server specification, §3 "Cut matching".
|
||||
/// </summary>
|
||||
public enum MatchTier
|
||||
{
|
||||
/// <summary>Audio 0.60–0.85, or runtimes within ±30s. Surfaced as a caveat in the UI.</summary>
|
||||
Loose = 0,
|
||||
|
||||
/// <summary>Runtimes within ±2s.</summary>
|
||||
Runtime = 1,
|
||||
|
||||
/// <summary>Audio signature score ≥ 0.85; may carry a non-zero offset.</summary>
|
||||
Audio = 2,
|
||||
|
||||
/// <summary>Identical <c>video_hash</c> — the same file.</summary>
|
||||
Exact = 3,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// One entry in the ordered list of manifest servers the plugin queries
|
||||
/// (public server specification, §9 "Multiple servers").
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The list is ordered because order *is* the user's trust ranking, made
|
||||
/// explicit: for a fetch, servers are tried in order and the first acceptable
|
||||
/// result wins. Querying every server for every item would multiply egress and
|
||||
/// leak the library to more parties.
|
||||
///
|
||||
/// <c>FetchOnly</c> is the default for user-added servers. Adding a third-party
|
||||
/// server means trusting its operator not to serve deliberately wrong actor
|
||||
/// data — the client-side controls bound the damage to bad overlay content,
|
||||
/// they cannot make wrong data right.
|
||||
/// </remarks>
|
||||
// TRACES: JR-025 | PR-005, PR-006
|
||||
public class ManifestServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ManifestServer"/> class.
|
||||
/// </summary>
|
||||
public ManifestServer()
|
||||
{
|
||||
Url = string.Empty;
|
||||
Name = string.Empty;
|
||||
Token = string.Empty;
|
||||
Enabled = false;
|
||||
AllowContribute = false;
|
||||
TrustLevel = ServerTrustLevel.FetchOnly;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the base URL of the server, e.g. "https://jray.tourolle.paris".
|
||||
/// HTTPS is required for non-loopback servers: a plaintext server would let
|
||||
/// any network intermediary rewrite actor overlays.
|
||||
/// </summary>
|
||||
public string Url { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the display label shown in the configuration page.
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the API token used to contribute manifests. Optional —
|
||||
/// required only to contribute, never to fetch. This is an anonymous bearer
|
||||
/// capability rather than an account (public server specification, §5a).
|
||||
/// </summary>
|
||||
public string Token { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this server is queried at all.
|
||||
/// Lets an admin disable an entry without deleting it and losing its token.
|
||||
/// </summary>
|
||||
public bool Enabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether locally generated manifests may be
|
||||
/// contributed to this server. Independent of fetching, and off by default:
|
||||
/// contribution is never fanned out, because broadcasting uploads to every
|
||||
/// configured server would multiply privacy exposure without the user
|
||||
/// intending it.
|
||||
/// </summary>
|
||||
public bool AllowContribute { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how far this server is trusted.
|
||||
/// </summary>
|
||||
public ServerTrustLevel TrustLevel { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user