integration: the 0.46.0 pre-releases, and releases by one dispatch #35

Merged
mikluko merged 49 commits from integration into main 2026-11-25 22:09:46 +00:00
Owner

The work of the 0.46.0 pre-releases, rebased onto main, and the release flow of flakybin.

Production runs v0.46.0-pre.3, whose schema is at migration 35. 0.46.0 was cut from main without migrations 31–35, Flux took it as newer than the pre-release, and the API refuses the newer schema. The next release from this branch, 0.47.0 by the notes, carries them.

  • The open [0.46.0] entry of integration is the fragment .changelog/integration.md; the rebase kept main's CHANGELOG.md.
  • vendorHash follows libarr; the flake's ldflags point at sarak.sh/mikluko/libarr/version.
  • release.yaml is one dispatch from main, with prerelease; cut.yaml, build.yaml and pre-release.yaml are gone. The archives and the .deb packages stay, built from new flake outputs linux-amd64 and linux-arm64.

Build, Package and the chart step ran locally on NixOS with VERSION=0.47.0-test; the push, the Debian upload and the release steps have not run.

Merged as fast-forward to keep the pre-released commits.

🤖 Generated with Claude Code

The work of the 0.46.0 pre-releases, rebased onto main, and the release flow of flakybin. Production runs v0.46.0-pre.3, whose schema is at migration 35. 0.46.0 was cut from main without migrations 31–35, Flux took it as newer than the pre-release, and the API refuses the newer schema. The next release from this branch, 0.47.0 by the notes, carries them. - The open `[0.46.0]` entry of integration is the fragment `.changelog/integration.md`; the rebase kept main's CHANGELOG.md. - `vendorHash` follows libarr; the flake's ldflags point at `sarak.sh/mikluko/libarr/version`. - `release.yaml` is one dispatch from main, with `prerelease`; `cut.yaml`, `build.yaml` and `pre-release.yaml` are gone. The archives and the `.deb` packages stay, built from new flake outputs `linux-amd64` and `linux-arm64`. Build, Package and the chart step ran locally on NixOS with `VERSION=0.47.0-test`; the push, the Debian upload and the release steps have not run. Merged as fast-forward to keep the pre-released commits. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A query cut short by the node stopping is not counted.

Assisted-by: Claude Code (claude-sonnet-5-5)
The movie rule took any quality word, resolutions included, as its marker
beside the year. It now wants a source or encoding tag, and WEB-DLRip is one:
before, only the WEB-DL word was, so the rule fired on the 720p of
Heart.of.the.Beast.2026.720p.AMZN.WEB-DLRip.

Assisted-by: Claude Code (claude-sonnet-5-5)
The source was only ever the classifier's answer, and the classifier runs in
the background for torrents of unknown kind alone, so a release whose kind
the rules decided, as UHD.Bluray.REMUX and WEB-DLRip are, kept none. The
rules now give remux, disc_image, web or encode, the classifier's own values;
a stored source is the rules' until the classifier examines the release, and
its answer replaces it. A bare BluRay says nothing: it is an encode or a
remux.

Releases stored without a source get one from a one-time backfill.

Assisted-by: Claude Code (claude-sonnet-5-5)
The password is a secretKeyRef to the one key of api.existingSecret, not
envFrom: the workers keep no access to the API's other tokens.

Assisted-by: Claude Code (claude-opus-5-5)
The intake still enqueues into task_queue, as Sight does: the fetch and
probe order streams come with the fetchers' move to NATS. A sniffer with
no NATS connection keeps reporting to Sight, so the chart's default,
api.nats.enabled false, keeps working.

The intake's check is one read on the read pool per batch; the stored
hashes' last_seen still moves, in a write of its own, or retention would
drop torrents that are sighted every day. Sight's per-request stored
answer, which the sniffer's peer counts depend on, becomes the core
subject sniffarr.stored that every sniffer subscribes to.

Assisted-by: Claude Code (claude-opus-5-5)
The ldflags move to sarak.sh/mikluko/libarr/version. The database meter
scope becomes sarak.sh/mikluko/libarr/database; the WAL gauge keeps its
name, sniffarr.db.wal.size. /static/ is served precompressed with brotli
and gzip, answers only GET and HEAD and lists no directories.

Assisted-by: Claude Code (claude-opus-5-5)
Assisted-by: Claude Code (claude-opus-5-5)
The tooltip classes become .tt and .tc, which app.js copies into; the
top table's .tt becomes .topt. ?lang= takes only en and ru.

Assisted-by: Claude Code (claude-opus-5-5)
Assisted-by: Claude Code (claude-opus-5-5)
Assisted-by: Claude Code (claude-opus-5-5)
libarr's README names its ui assets the shared copies; sniffarr's were
byte-identical.

Assisted-by: Claude Code (claude-opus-5-5)
Runs on the broker's own fx module, so the server options, streams and
consumers are the production ones; workers connect as the worker user
over loopback. Each step runs in a child process so that the kill case
is a real SIGKILL and each RSS is its own.

Assisted-by: Claude Code (claude-opus-5-5)
The -api start timeout grows by the broker's budget rather than the
broker running outside fx's start, which would leave the server running
uncleanly when a later constructor fails. hack/natsload measured the
start at 0.43 s for 1M orders and 1.7 s for 5M after a SIGKILL, warm
page cache; 5 minutes leaves room for a cold disk and a larger store,
inside the chart's hour-long startup probe.

Assisted-by: Claude Code (claude-opus-5-5)
Nothing outside -api connects to NATS: the workers' listener, the worker
user, the sniff's publishing, sniffarr.stored and the chart's values go.
Sight publishes to the sightings stream and reads the store only; the
intake does the writes.

Nats-Msg-Id is the infohash alone, so a sample and an announce of one hash
within the 5-minute window are one sighting: the announce neither revives
nor promotes it.

The JetStream domain sniffarr does not change what the leaf test sees: a
leaf with JetStream passes no $JS.API upstream with or without it. It is
there so a hub that shares JetStream across the link never serves the
API's streams.

Assisted-by: Claude Code (claude-opus-5-5)
With the infohash alone, an announce within 5 minutes of a sample of the
same hash was dropped as a duplicate and never promoted the queued sample.

Assisted-by: Claude Code (claude-opus-5-5)
Assisted-by: Claude Code (claude-sonnet-5-5)
Assisted-by: Claude Code (claude-sonnet-5-5)
Assisted-by: Claude Code (claude-sonnet-5-5)
Assisted-by: Claude Code (claude-sonnet-5-5)
Assisted-by: Claude Code (claude-sonnet-5-5)
Assisted-by: Claude Code (claude-sonnet-5-5)
Assisted-by: Claude Code (claude-sonnet-5-5)
Assisted-by: Claude Code (claude-sonnet-5-5)
Assisted-by: Claude Code (claude-sonnet-5-5)
One tier in place of alpha, beta and rc. The changelog's open entry names the
version undated; the workflow numbers the tags, so a pre-release never becomes
a heading, as in action-changelog's release-branch ceremony. Run by hand
because every pre-release rolls out to saraksh.

Assisted-by: Claude Code (claude-opus-5-5)
The runner's shell runs with pipefail, and grep matching no tag failed the
step.

Assisted-by: Claude Code (claude-opus-5-5)
The template tested the probability pointer, so a score of 0.00 passed as
a dub signal; the line now comes from Base.Meta, which joins only the
fields that carry a value.

Assisted-by: Claude Code (claude-sonnet-5-5)
The hash filled its line and the inline button wrapped under it. The two
now share a flex row, the hash wrapping inside it; the magnet row takes
the same wrapper.

Assisted-by: Claude Code (claude-sonnet-5-5)
Fetchers keep the Fetch protocol; internal/orders is the API's facade over
the stream. It pulls 32 at a time per lane, holds what it hands out,
marks it in progress every 30 s against an AckWait of 2 minutes, and naks
an order whose stream ends or whose SNIFFARR_FETCH_LEASE runs out. A
result that comes after its stream ended still finds the order for a
lease, so the fetcher's carried-over result is stored rather than fetched
again.

Retries are scheduled messages, never NakWithDelay, which keeps the
ack-pending slot for the whole delay. The retry is published after the
ack, under a Nats-Msg-Id per hash and attempt.

Promotion is a second order at the announce's priority. A copy taken
while the first is held is acked and dropped; a later one is fetched,
its metadata lands as a duplicate and its failure retries nothing,
since the result checks the store before scheduling.

Migration 031 moves the queued fetches and lookups into task_backlog;
the API publishes it into the stream at start, a chunk at a time under
stable message IDs, and drops the table once empty. The probes stay in
task_queue until their own stream takes them.

SNIFFARR_QUEUE_MAX_SIZE and _MAX_AGE go: limits on a work queue stream
drop whole blocks and recount every consumer. Bounding the backlog is
sniffarr-qcj.8.

Assisted-by: Claude Code (claude-opus-5-5)
The day's budget is checked under a mutex around the take, counting the
probes held at SNIFFARR_PROBE_MAX_BYTES each, so concurrent ProbeTask calls
cannot overshoot it. Orders at P1 to P3 are checked against ProbeDue as
they come out and acknowledged when stale; P0 requests are not.

Background probes are published only while P3 holds nothing, handed out
or not, 64 at a time under a Nats-Msg-Id per hash.

Migration 032 moves every row left in task_queue into task_backlog, which
the API publishes into the streams at start, then drops task_queue. With
probes off the API purges PROBE_ORDERS after that move.

Release hands orders back in stream order, so that they are redelivered
in the order they were published.

Assisted-by: Claude Code (claude-opus-5-5)
Jev's own kind question knows movie, series and other only, so a
category question rides the reading's second request for the kinds
sniffarr keeps apart: music, book, software, adult, other.

sniffarr's tmdb.Chooser takes classify.ChoiceInput, not libarr's
tmdb.ChoiceInput, so Client.Choose adapts a per-call typesafe.Chooser
rather than the matcher taking one directly.

typesafe.Client sends "Bearer " for an empty key; a transport drops it
so a keyless SNIFFARR_CLASSIFY_URL still gets no Authorization header.

Assisted-by: Claude Code (claude-opus-5-5)
The naks are sent without a reply, so a FetchNoWait right after Run
returns could beat them to the server.

Assisted-by: Claude Code (claude-opus-5-5)
The period's weight is (1-9^-done)·9/8: three quarters by the middle.
It vanishes linearly at the start, which cancels the 1/done of the
pace, so the tenth-of-the-period gate goes.

Assisted-by: Claude Code (claude-opus-5-5)
The default is English alone. With one language the page is in it
whatever ?lang=, the cookie or the person's locale say, so <html lang>
matches; Accept-Language is not read. The same contract goes to spidarr
as SPIDARR_UI_LANGUAGES.

Assisted-by: Claude Code (claude-opus-5-5)
Assisted-by: Claude Code (claude-opus-5-5)
A stored torrent took the discovery of its order's priority, which a
Torznab listing at P2 would have read as announce. The order now carries
Sniffarr-Discovery, its retries keep it, and an order without it still
serves its priority's. A fifth priority was rejected: it would split the
order streams, the data page and Stats for one more lane.

Assisted-by: Claude Code (claude-opus-5-5)
A listing again replaces what the source tells of the release, unlike
feed_items, which kept the first: a source such as spidarr adds the IMDb,
TMDB and TVDB IDs once it has matched the release, and the layer that
classifies by listings wants the latest.

Assisted-by: Claude Code (claude-opus-5-5)
SNIFFARR_SOURCES lists the sources in order, each set under
SNIFFARR_SOURCE_<NAME>_, the shape SNIFFARR_FEEDS had: a list of names in
one variable reads in any env file and chart, where a JSON or URL-encoded
list would not. The mode is read and kept for the searches of active
sources; nothing reads the order yet.

A poll pages until it reaches a listing recorded before, so a source that
lists more than a page between polls loses none, up to 500. A listing
with no infohash is skipped: a source that serves .torrent links only
would need its files fetched, which sniffarr does not do.

libarr's torznab has no client and no constant for the imdb attr; both
live here.

Assisted-by: Claude Code (claude-opus-5-5)
A list rather than one token, so each source can be given the audience
it checks; the chart names no source itself, and the token files are
pointed at in api.env.

Assisted-by: Claude Code (claude-opus-5-5)
The probe pods hold 8-10 GiB of heap with about 4,500 seeded torrents
each; a heap profile is what tells which part of the client holds it.

Assisted-by: Claude Code (claude-opus-5-5)
A probe holds the head of one file, which few peers lack, so most seeds
never reach ratio 1 and lived out -seed-max-age.

The pieces a seed has are read once, when it is added or restored:
reading piece state takes the client lock per piece, too dear for every
minute over thousands of seeds. Add therefore takes the torrent anew, so
a re-probe's pieces count.

A restored seed is judged by -seed-idle alone; its peers have not
connected at the first check.

The check reads the torrents outside the Seeder mutex, and the state
file takes the upload from the last check, so Add, Has and the gauges no
longer wait on the client.

Assisted-by: Claude Code (claude-opus-5-5)
Each torrent opened in the client holds about 2 MiB of per-piece state,
so opening every saved seed before the first check undid a lowered
-seed-max-age for the first minutes after a restart. The opens run
outside the Seeder mutex: Start restores before Run and before any probe.

Assisted-by: Claude Code (claude-opus-5-5)
Width alone classes the quality, so a 3840x1600 scope frame stays 2160p.
quality_layer marks a probe's quality, which the names backfill leaves.
Already probed releases are filled by a batched backfill rather than a
migration: picking the video track and classing it needs the Go rules.
Track.default travels from the fetcher so the default video track can be
picked; tracks stored without it fall back to the first video track.

Assisted-by: Claude Code (claude-opus-5-5)
The contract agreed with spidarr: an empty SNIFFARR_UI_LANGUAGES is an
error, and the signed-in person's locale comes after the cookie and before
Accept-Language.

Assisted-by: Claude Code (claude-opus-5-5)
0.46.0 was released from main without it, so its notes go to the next
release. The rebase onto main kept main's CHANGELOG.md.

Assisted-By: Claude <noreply@anthropic.com>
Assisted-By: Claude <noreply@anthropic.com>
Assisted-By: Claude <noreply@anthropic.com>
Release by one dispatch, with pre-releases, from a VERSION file
Some checks failed
CI / changelog (pull_request) Successful in 4s
CI / build (pull_request) Successful in 51s
CI / test (pull_request) Failing after 1m45s
6e15f83f90
As in flakybin: release.yaml folds the fragments, commits CHANGELOG.md and
VERSION to main, runs CI on that commit, builds and publishes, and
publishes the release last, which cuts the tag. With prerelease it cuts
vX-pre.N from main untouched, VERSION overwritten and staged in the
checkout. Cut, Build and the pre-releases from integration are gone.

Unlike flakybin, the release keeps the archives and the .deb packages:
the flake gains linux-amd64 and linux-arm64, packaged with nfpm from the
dev shell, and the archives wait on a draft until the image, the chart
and the packages are out. CI builds every flake output on a pull request
in place of build.yaml.

The flake reads VERSION instead of --impure, so manifest-version runs
again.

Assisted-By: Claude <noreply@anthropic.com>
mikluko force-pushed integration from 6e15f83f90
Some checks failed
CI / changelog (pull_request) Successful in 4s
CI / build (pull_request) Successful in 51s
CI / test (pull_request) Failing after 1m45s
to 0b4011258f
Some checks failed
CI / changelog (pull_request) Successful in 2s
CI / build (pull_request) Successful in 26s
CI / test (pull_request) Failing after 1m43s
2026-11-25 22:02:50 +00:00
Compare
orders: TestRetryKeepsDiscovery waits for the orders it takes
All checks were successful
CI / changelog (pull_request) Successful in 3s
CI / build (pull_request) Successful in 22s
CI / test (pull_request) Successful in 1m29s
27ba6e31b1
Take pulls without waiting, and on a loaded runner the pull came before
the published orders (runs 251, 252).

Assisted-By: Claude <noreply@anthropic.com>
Sign in to join this conversation.
No description provided.