@torrent-tv/proxy 2.80.15 → 2.80.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,14 +1,15 @@
1
+ ## 2.80.16
2
+
3
+ - **Fix**: THE SPINNER CARAVAN, by arithmetic alone, and the two props 2.80.15 carried are gone with it — the threshold that made a move pay for itself, and the exclusion that kept a live run off a deadline-less zone. Both were propping up a comparison that was wrong rather than indifferent. Three quantities were computed wrongly:
4
+ 1. **A body was charged a whole piece for the one it was already making.** `arrival = delay + (index - at + 1) / rate` is right for a body that does not exist yet and wrong for a run 0.8 s into a 0.9 s piece. `delaySec` is now when a body finishes the piece it STANDS ON — for a run that has produced something, one piece; for one still warming up, the measured time to a first piece less the time it has been alive. From #58, reaching #59 costs 0.14 + 0.94 = 1.08 s against 1.88 s for a kill and a cold start: a decision by eight hundred milliseconds, where the double charge had made it a coin flip lost by ten.
5
+ 2. **The piece was priced at the unpenalised rate** while arrivals used the penalised one, so every extra body looked cheaper than it is and the plan bought a second encoder where one served. One rate now, the one the arrangement itself puts in force, and each body states its own debt as a function of it — so there is nothing to dispatch on.
6
+ - **Fix**: What a move costs is `Infinity` until something has been measured, because a move is irreversible while leaving the encoder alone is always available; placing one where there is none takes the unknown the other way, since the film gets made or it does not. And a run killed before producing anything is a measurement too — a lower bound on the first output — which is the only reading a thrash can supply, since every run in one is killed before it finishes anything.
7
+ - **Chore**: Verified by simulation over sixty ticks against the map's real shape — one encoder placed, left alone, and moved exactly once, at the viewer's own seek. NOT yet seen in the field.
8
+
1
9
  ## 2.80.15
2
10
 
3
- - **Fix**: THE SPINNER CARAVAN, and its cause was one coercion. The priority map states `withinSeconds: null` for the film BEHIND the viewers — nobody is waiting there — and `deadlineReaderFor` read it through `Number()`, where `null` is 0. So the film a viewer had already passed was due IMMEDIATELY and was the most urgent material in the file. It bought encoders, and it took the run standing in front of the viewer because that run was the nearest body to it, and it did so again on every pass. Field 2026-09-08: 39 moves in one session, 24 of them between three adjacent numbers about 0.8 s apart, one viewer on a host affording three runs got three, and the picture stood still for 116.7 s in three interruptions, the worst 91.8 s. The map has said it plainly in every session's log; this line turned it into its opposite. Fourth time in this repository that the input to a calculation was not what the calculation assumed.
4
- - **Fix**: The objective is the map's OWN rank order, as a vector compared position by position — one pair per rank the map states, most urgent first: how long anybody waits at that rank, then when the last number of it is made. It was three seconds-valued terms with the ten ranks collapsed into two buckets, and "never" for the film behind is the film's own length 2024 s on a 48-minute file which outvotes everything above it. No weights, and none possible: a weight would let seconds at one rank buy seconds at another and would be a number nobody measured. The map is the source of truth about what matters and it already says so.
5
- - **Fix**: Residual work takes only spare capacity. A zone stating no deadline has nobody waiting in it, so a live run already standing in front of a viewer is never taken for it — taking it there means killing it, and the viewer waits out a cold start for film nobody asked for.
6
- - **Fix**: An act must pay for itself. Where an arrangement is only reachable by killing a running encoder, a gain smaller than what that killing costs is not a gain. The field numbers are that close: driving from #58 to #59 means making two pieces, 1.89 s at 4.45x on a 4.2 s grid, against a cold start and one piece, 1.88 s — the move was faster by ten milliseconds, and every one of the 39 was individually correct. The margin is the measured cost of the act, never a chosen figure.
7
- - **Fix**: The plan remembers what it is already carrying out. A staying run was priced as producing instantly however recently it had started; it is now priced at what it still has to go — the measured time to a first piece less the time it has been alive. A run 0.8 s old has 0.14 s left against 0.94 s to move it. One measured figure minus elapsed time, no state to keep.
8
- - **Fix**: What a move costs is `Infinity` until something has been measured, because a move is irreversible and leaving the encoder alone is always available; placing one where there is none takes the unknown the other way, since the film gets made or it does not. And a run killed before producing anything is a measurement too — a lower bound on the first output — which is the only reading a thrash can supply, since every run in one is killed before it finishes anything.
9
- - **Fix**: The average bitrate declared in the master came from a field that does not exist on a source file, so every variant was declared at the 400 kbit/s floor in 2.80.14 — nine times worse than the rule of thumb it replaced. It is read from where it is known: the torrent's own report of the file's length, with the probe's reading of the video stream covering the gap before that arrives.
10
- - **New**: The piece store's own line names its holders, and `AHEAD` no longer reaches memory.
11
- - **Chore**: `hls-session-manager.js` grew by four lines of wiring in its constructor, which the rule for that file does not allow. Stated rather than shuffled: the thing itself moved to `output/`, and what is left is two accessors handed over where wiring belongs.
11
+ - **Fix**: THE SPINNER CARAVAN, first attempt. Field 2026-09-08: 39 encoder moves in one session, 24 of them between three adjacent numbers about 0.8 s apart, one viewer on a host affording three runs got three, and the picture stood still for 116.7 s in three interruptions, the worst 91.8 s. This release fixed the reading of `withinSeconds: null` — the map marks the film BEHIND the viewers with it, meaning nobody is waiting there, and `deadlineReaderFor` read it through `Number()`, where it is 0, so that film was due IMMEDIATELY and was the most urgent material in the file. It also made the objective the map's own rank order, as a vector compared position by position rather than three seconds-valued terms with ten ranks collapsed into two buckets.
12
+ - **Chore**: It also carried two props that 2.80.16 removesa threshold requiring a move to beat staying by what moving costs, and an exclusion keeping a live run off any zone with no deadline. Both were written while the arrival arithmetic was still wrong; neither belongs in a model.
12
13
 
13
14
  ## 2.80.14
14
15
 
@@ -214,44 +214,58 @@ tail, p1 for what lies behind them.
214
214
  encoder where the map is indifferent. `wasted` is the swarm's bill for anything
215
215
  fetched twice.
216
216
 
217
- ## Three rules that stop an encoder being moved for nothing
218
-
219
- **A zone with no deadline never takes a live run.** Residual work the film
220
- behind the viewers, kept in case somebody seeks back is done with capacity
221
- that is left over, and a run already standing in front of a viewer is not left
222
- over.
223
-
224
- **An act must pay for itself.** Where an arrangement is only reachable by killing
225
- a running encoder, a gain smaller than what the killing costs is not a gain. The
226
- margin is the measured cost of the act.
227
-
228
- **The plan remembers what it is already carrying out.** A staying run is priced
229
- at what it still has to go the measured time to a first piece less the time it
230
- has been alive not at zero. A run 0.8 s old has 0.14 s left against 0.94 s to
231
- move it; one working half a minute has nothing left, and a move then happens
232
- exactly when the film it would reach sooner is worth the restart.
233
-
234
- And what a move costs is `Infinity` until something has been measured: a move is
235
- irreversible and leaving the encoder alone is always available. Placing one where
236
- there is none takes the unknown the other way, because the film gets made or it
237
- does not.
238
-
239
- ### What all three were for
240
-
241
- Field 2026-09-08. The map states `withinSeconds: null` for the film behind the
242
- viewers; `deadlineReaderFor` read it through `Number()`, where `null` is 0, so
243
- that film was due IMMEDIATELY and was the most urgent material in the file. It
244
- bought encoders and it took the run standing in front of the viewer, because
245
- that run was the nearest body to it 39 moves in one session, 24 of them between
246
- three adjacent numbers about 0.8 s apart. One viewer on a host affording three
247
- runs got three. The picture stood still for 116.7 s in three interruptions, the
248
- worst of them 91.8 s.
249
-
250
- The numbers are worth keeping because they are so close: driving from #58 to #59
251
- means making TWO pieces, 1.89 s at 4.45x on a 4.2 s grid, against a cold start
252
- and ONE piece, 0.94 + 0.94 = 1.88 s. Every one of those 39 moves was
253
- individually the cheapest arrangement it was offered. That is the signature of an
254
- optimiser with no memory, and the three rules above are what give it one.
217
+ ## Why an encoder is not moved for nothing, and it is not a rule
218
+
219
+ There is no threshold here, and there must not be one. What kept an encoder
220
+ moving was three quantities computed wrongly, not a policy that needed tuning.
221
+
222
+ **`delaySec` is when a body finishes the piece it STANDS ON.** For a run that has
223
+ produced something, one piece at the rate in force; for one still warming up, the
224
+ measured time to a first piece less the time it has already been alive. The
225
+ arrival of anything further on is that plus the pieces between, and nothing else.
226
+
227
+ It used to be `delay + (index - at + 1) / rate`, which charges every body a whole
228
+ piece for the one it is already making. That is right for a body that does not
229
+ exist yet and wrong for a run 0.8 s into a 0.9 s piece and the difference is
230
+ the whole fault: from #58, reaching #59 was priced at 1.89 s against 1.88 s for a
231
+ kill and a cold start, a coin flip lost by ten milliseconds. Priced correctly it
232
+ is 1.08 s against 1.88 s.
233
+
234
+ **One rate, the one the arrangement puts in force.** Concurrent encoders slow
235
+ each other, measured on this host, so a piece costs what it costs at the body
236
+ count the arrangement has. Taken from the unpenalised rate while arrivals used
237
+ the penalised one, an extra body looked cheaper than it is and the plan bought a
238
+ second encoder where one served.
239
+
240
+ **Each body states its own debt** where it is created, as a function of what one
241
+ piece costs because only there is it known what the body IS, and at the point
242
+ of pricing only how many there are. So there is no kind, no tag and no case
243
+ analysis.
244
+
245
+ **What a move costs is `Infinity` until something has been measured**, because a
246
+ move is irreversible while leaving the encoder alone is always available. Placing
247
+ one where there is none takes the unknown the other way: the film gets made or it
248
+ does not. And a run killed before producing anything is a measurement too — a
249
+ lower bound on the first output, and the only reading a thrash can supply, since
250
+ every run in one is killed before it finishes anything.
251
+
252
+ ### What that was for
253
+
254
+ Field 2026-09-08: 39 moves in one session, 24 of them between three adjacent
255
+ numbers about 0.8 s apart. One viewer on a host affording three runs got three.
256
+ The picture stood still for 116.7 s in three interruptions, the worst 91.8 s.
257
+
258
+ Compounding it, the map states `withinSeconds: null` for the film behind the
259
+ viewers — nobody is waiting there — and `deadlineReaderFor` read that through
260
+ `Number()`, where `null` is 0. So the film a viewer had already passed was due
261
+ IMMEDIATELY and was the most urgent material in the file: it bought encoders, and
262
+ it took the run standing in front of the viewer because that run was the nearest
263
+ body to it.
264
+
265
+ Checked by simulation over sixty ticks against the map's real shape — ten zones
266
+ doubling ahead of the viewer, one behind — at both one and three runs: the
267
+ encoder is placed once, left alone, and moved exactly once, at the viewer's own
268
+ seek.
255
269
 
256
270
  ## What is checked
257
271
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@torrent-tv/proxy",
3
- "version": "2.80.15",
3
+ "version": "2.80.16",
4
4
  "description": "Torrent proxy client that exposes webseed-like HTTP stream endpoint.",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "publishConfig": {