Skip to content

Say what a server writes where the registrator said nothing does (#385) - #386

Merged
iderex merged 2 commits into
masterfrom
registrator/the-comment-says-what-a-server-writes
Sep 7, 2026
Merged

iderex merged 2 commits into
masterfrom
registrator/the-comment-says-what-a-server-writes

Conversation

@iderex

@iderex iderex commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Two comments thirty-one lines apart in PluginServiceRegistrator.cs disagreed
about whether a server writes a pairing record, and both were in force. This
makes the first one say what the tree does. Issue #385.

What was wrong

At origin/master 4f5cd668cacdb5f4a6637741728131e4e1ee90a5:

git show origin/master:Jellyfin.Plugin.ServerPairing/PluginServiceRegistrator.cs | grep -n 'nothing on a server writes a record\|the administrative plane opens a window through it now'
146:        // What is unchanged is that nothing on a server writes a record, because nothing joins an
177:        // THE ENDPOINT THAT WOULD: the administrative plane opens a window through it now, which

Line 146 said nothing joins an enrolment to the state machine, named issue #350
for the join, and concluded that the read above it answers an empty list on
every server. Line 177 said the join exists and that the administrative plane
calls it.

Which of the two is true

The second. The join is in the tree and the route reaches it:

git grep -n 'LocalEvent.WindowOpened' origin/master -- Jellyfin.Plugin.ServerPairing/Protocol/Enrolment.cs
origin/master:Jellyfin.Plugin.ServerPairing/Protocol/Enrolment.cs:115:        _pairings.Apply(pairingId, LocalEvent.WindowOpened, actor, at, address);

git grep -n 'public IActionResult OpenEnrolmentWindow' origin/master -- Jellyfin.Plugin.ServerPairing/Api/AdministrativePlaneController.cs
origin/master:Jellyfin.Plugin.ServerPairing/Api/AdministrativePlaneController.cs:295:    public IActionResult OpenEnrolmentWindow()

git grep -n 'record.State == PairingState.Offered' origin/master -- Jellyfin.Plugin.ServerPairing/Api/AdministrativePlaneController.cs
origin/master:Jellyfin.Plugin.ServerPairing/Api/AdministrativePlaneController.cs:217:                .Where(record => record.State == PairingState.Offered)

gh issue view 350 --repo Flowfin/jellyfin-plugin-server-pairing --json number,state,stateReason --jq '"\(.number) \(.state) \(.stateReason)"'
350 CLOSED COMPLETED

The controller's own remark already carries this correction where the read
happens. Only the registrator was left stating the absence.

Why it is worth a change rather than a note

The false sentence is the one a reader meets first, it is stated as what is
UNCHANGED, and it names a closed issue as the reason for an absence, so
following the number arrives at work finished and invites the reading that
something else filled the gap. It also travels: it is the claim under which the
consumer contract in #43 was recorded as waiting on an enrolment that cannot
run, and re-reading this file for that issue is how the disagreement was found.

What the replacement says

The form the rest of the file already uses for a sentence that stopped being
true - what the comment used to say, then what the tree does now. The one
absence that is still real is named with an open issue rather than a closed
one: no record reaches PairingState.Active, because nothing derives a long
term key pair for the ceremony in #19 to compare.

git grep -lni 'ECDiffieHellman' origin/master -- Jellyfin.Plugin.ServerPairing ; echo "exit=$?"
exit=1

A second commit the first one made necessary

The rewritten comment is four lines longer than what it replaced, so every line
below it in that file moved by four, and two of them are pasted in
docs/logging.md as the reading that shows which types take a logger.
Reproduce every pasted reading refused the first head for it and named the
site:

reading-check: 89 reading(s) judged at HEAD - 85 reproduced, 0 historical, 3 pointer(s), 1 bad.
STALE  docs/logging.md:200  the pasted output no longer reproduces at HEAD

The two numbers are carried, 220 to 224 and 239 to 243. That check is green on
the head this pull request now carries. It found the breakage rather than a
reader finding it, which is the whole reason it exists.

A thing met while repairing that and NOT repaired here. docs/lifecycle.md
pastes two lines of the same file as 50 and 160, and the file answers 52 and
264:

git grep -n 'AddHostedService' -- Jellyfin.Plugin.ServerPairing/PluginServiceRegistrator.cs
Jellyfin.Plugin.ServerPairing/PluginServiceRegistrator.cs:52:        serviceCollection.AddHostedService<ConfigurationAtStartup>();
Jellyfin.Plugin.ServerPairing/PluginServiceRegistrator.cs:264:        serviceCollection.AddHostedService<StoreAtStartup>();

Both were wrong before this branch existed, by two lines and by a hundred and
four, so neither is this change's doing. That block pastes its command without
the origin/master: prefix the refused one carries, and what the check does
with a paste in that shape is not measured here. It is left as it stands rather
than corrected in a change about a comment.

The means

Comment text in a C# file this tree already carries. The artefact is a sentence
inside an existing source file, so the means is forced by where the defect is;
it adds no language, no runtime and no dependency, and it is judged by the
suites and the gate that already run on this repository.

What was run

dotnet build Jellyfin.Plugin.ServerPairing.Tests/Jellyfin.Plugin.ServerPairing.Tests.csproj -warnaserror
0 Warnung(en)
0 Fehler

dotnet test Jellyfin.Plugin.ServerPairing.Tests/Jellyfin.Plugin.ServerPairing.Tests.csproj -f net10.0
Bestanden!   : Fehler:     0, erfolgreich:  1238, übersprungen:     6, gesamt:  1244

Both targets compiled. This machine carries no .NET 9 runtime and none was
installed for this, so the net9.0 target was compiled and not executed here;
Build and test on this pull request is what says the other line passes. The
six skips are the POSIX permission cases, which do not run on Windows.

Not claimed

Nothing here was measured against a running Jellyfin server. No enrolment
window has been opened on one, no record has been read back from one, and this
change alters no behaviour: the diff is a comment and two line numbers in a
document.

git diff --name-only origin/master...HEAD
Jellyfin.Plugin.ServerPairing/PluginServiceRegistrator.cs
docs/logging.md

No check reads either sentence. reading-check.yml re-runs a pasted reading
and neither of these was one, so a comment stating the opposite of the file it
sits in is refused by nothing here and none is proposed by this change.

This board has no second reader tonight. The commands above stand in place of
one rather than beside one.

Closes #385

Two comments thirty-one lines apart in PluginServiceRegistrator.cs disagreed
about whether a server writes a pairing record, and both were in force. The
one at the record store registration said nothing on a server writes a record
because nothing joins an enrolment to the state machine, named issue #350 for
the join, and concluded that the read above it answers an empty list on every
server. The one at the state machine registration, thirty-one lines below,
said the join exists and that the administrative plane calls it.

The second is the true one. Enrolment.Open applies LocalEvent.WindowOpened
through the state machine, AdministrativePlaneController.OpenEnrolmentWindow
calls it, and the windows read answers with the record in PairingState.Offered
that produces. The controller's own remark already carries that correction and
says so at the read; only the registrator was left stating the absence.

The false sentence is the one a reader meets first, it is stated as what is
UNCHANGED, and it names an issue that is closed as completed as the reason for
the absence. Following that number arrives at work finished and invites the
reading that something else filled the gap. It is also a sentence that
travels: it is the claim that kept the consumer contract in issue #43 recorded
as waiting on an enrolment that could not run, and re-reading the file for
that issue is how the disagreement was found.

The paragraph is rewritten in the form the rest of the file already uses for a
sentence that stopped being true: it says what the comment used to say, then
what the tree does now. What replaces it names issue #19, which is open, for
the one absence that is still real - no record reaches PairingState.Active,
because nothing derives a long term key pair for the ceremony to compare.

Nothing but comment text changes. Both targets build with warnings as errors,
0 warnings and 0 errors, and the suite is green on net10.0 with 1238 passed, 6
skipped and 0 failures; this machine carries no .NET 9 runtime and none was
installed for this, so the net9.0 target was compiled and not executed here.
Nothing was measured against a running Jellyfin server.

Closes #385

Signed-off-by: Nils Lehnen <30603423+iderex@users.noreply.github.com>
The comment rewritten in the commit before this one is four lines longer than
what it replaced, so every line below it in PluginServiceRegistrator.cs moved
by four, and two of them are pasted in docs/logging.md as the reading that
shows which types take a logger. `Reproduce every pasted reading` refused the
head for it, naming docs/logging.md:200 and printing the two lines as removed
and their successors as added.

The two numbers are updated to what the command prints now, 220 to 224 and 239
to 243. The third line that block pastes is at 130, above the edit, and is
unchanged.

Found by the check rather than by reading, on the run of this pull request:

    reading-check: 89 reading(s) judged at HEAD - 85 reproduced, 0 historical, 3 pointer(s), 1 bad.

A thing met while repairing it and not repaired here. docs/lifecycle.md pastes
two lines of the same file as 50 and 160 and the file answers 52 and 264:

    git grep -n 'AddHostedService' -- Jellyfin.Plugin.ServerPairing/PluginServiceRegistrator.cs
    Jellyfin.Plugin.ServerPairing/PluginServiceRegistrator.cs:52:        serviceCollection.AddHostedService<ConfigurationAtStartup>();
    Jellyfin.Plugin.ServerPairing/PluginServiceRegistrator.cs:264:        serviceCollection.AddHostedService<StoreAtStartup>();

Both were already wrong before this branch, by two lines and by a hundred and
four, so neither is this change's doing and the check does not refuse either.
That block pastes its command without the `origin/master:` prefix the refused
one carries, which is the difference between the two, and what the check does
with a paste in that shape is not measured here. It is left as it stands rather
than corrected in a change about a comment.

This commit is documentation text and changes no behaviour.

Signed-off-by: Nils Lehnen <30603423+iderex@users.noreply.github.com>
@iderex
iderex merged commit 6d37f70 into master Sep 7, 2026
21 checks passed
@iderex
iderex deleted the registrator/the-comment-says-what-a-server-writes branch September 7, 2026 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Two comments in the service registrator disagree about whether a server writes a pairing record

1 participant