Skip to content

Build against the local engine by default; take elixir_torrent 0.7.0 - #17

Merged
daniboybye merged 5 commits into
mainfrom
build/local-engine-default
Oct 18, 2026
Merged

daniboybye merged 5 commits into
mainfrom
build/local-engine-default

Conversation

@daniboybye

Copy link
Copy Markdown
Owner

Requested by Daniel Urumov

Before: a local build used the Hex engine unless ELIXIR_TORRENT_PATH was set, and setting it broke mix mac.dmg as soon as the local engine's dependencies ran ahead of mix.lock (deps.get --check-locked failed). The DMG was named 0.1.0 whenever deps were not yet fetched, the debug build silently dropped log lines above ~500/s, bandit carried two advisories, and the app embedded engine 0.6.8.

After: with both repositories side by side, mix deps.get, mix test and mix mac.dmg use the local ../ElixirTorrent with their own gitignored mix.local.lock, while CI (or ELIXIR_TORRENT_HEX=1) builds the Hex release pinned by mix.lock. The DMG carries the real version, the debug log is complete, bandit is 1.13.1, and the app ships engine 0.7.0 on OTP 29.1.2.

How:

  • mix.exs resolves the engine source (ELIXIR_TORRENT_PATH → Hex when ELIXIR_TORRENT_HEX=1 or CI → sibling checkout → Hex) and selects lockfile: "mix.local.lock" for a local engine; the DMG script enforces --check-locked only for the Hex source, and its config probes use --no-deps-check.
  • config/prod.exs: a debug build disables the default handler's burst limit and raises its queue limits.
  • Dependencies: bandit 1.13.1 (EEF-CVE-2026-105659, EEF-CVE-2026-105660), elixir_torrent 0.7.0, phoenix_pubsub 2.4.1, hackney 4.8.5 chain; Erlang/OTP 29.1.2.

Checked locally in CI mode (Hex engine, mix.lock unchanged): deps audit, format, warnings-as-errors (dev and test), Credo, Sobelow, Dialyzer, coverage run (150 tests), SwiftLint --strict, and the 3 macOS integration tests. The Codecov upload and the Windows build run only in CI.

🤖 Generated with Claude Code

daniboybye and others added 5 commits October 18, 2026 20:54
mix.exs now resolves the engine as ELIXIR_TORRENT_PATH, then Hex when
ELIXIR_TORRENT_HEX=1 or CI is set, then ../ElixirTorrent when it exists,
then Hex. A machine with both repos builds the local engine with no setup,
and CI keeps building the published package.

A path dependency resolves the engine's own requirements, which run ahead
of the committed lock as soon as the engine bumps one (hackney 4.8.4 to
4.8.5 broke mac.dmg's deps.get --check-locked). A local build therefore
uses a gitignored mix.local.lock seeded from mix.lock, and the build
script enforces --check-locked only for the Hex source.

The script's mix config probes gained --no-deps-check, so the DMG is no
longer named 0.1.0 when deps are not fetched or locked yet.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1.12.5 carries EEF-CVE-2026-105659 (HTTP/2 send deadlines reset on every
WINDOW_UPDATE, so a trickling stream can pin a process) and
EEF-CVE-2026-105660 (unvalidated HTTP/1 request-target authority).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The debug build writes ~500-900 lines/s, above the default handler's
overload protection (burst_limit_max_count 500 per second, drop_mode_qlen
200). Every line past the cap was discarded, info and warning included: a
debug log read 501 lines in its median second and was missing whole
events such as a magnet's metadata_ok. The debug build now disables the
burst limit and lets the queue grow to 5000 before it blocks and 20000
before it drops. Production builds are unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
elixir_torrent 0.7.0 is published on Hex (magnets keep their peers, per-
tracker min interval, no orphaned uTP connections). The lock also moves
phoenix_pubsub to 2.4.1 and the hackney chain to 4.8.5; every other
dependency is already on its latest release.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Matches the engine, which moved to the latest OTP 29 patch for 0.7.0.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@daniboybye daniboybye self-assigned this Oct 18, 2026
@codecov

codecov Bot commented Oct 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@daniboybye
daniboybye merged commit 5c0ef9a into main Oct 18, 2026
2 checks passed
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.

1 participant