mir-backend-beam

Solid

Make It Right (BEAM runtime tier). Erlang VM / BEAM reliability footguns shared across every BEAM-based backend (Phoenix, Nerves, Broadway, pure Erlang/OTP) — distinct from the generic backend gates and from any one framework's mechanics. Covers: let-it-crash + supervision tree design (restart strategies, max_restarts escalation, poison-message crash-loops and why a catch-all handle_info does NOT stop them), unbounded mailbox growth and real backpressure (a GenServer.call timeout does not shed load; GenStage/Broadway; OTP 28 priority messages are not backpressure), hot GenServer as a serial bottleneck and when to use ETS / :counters / :persistent_term instead, blocking handle_call timing out callers, per-process heap isolation and refc-binary retention, distributed Erlang hazards (netsplits, :global, pairwise ordering, :erpc), what Elixir's set-theoretic type checker does and does not catch, and VM-level security (binary_to_term, atom exhaustion, distribution cookie/EPMD, :os.cmd vs System.cmd, OTP TLS/term-d

API & Backend 15 stars 0 forks Updated 1 weeks ago Apache-2.0

Install

View on GitHub

Quality Score: 81/100

Stars 20%
40
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# /mir-backend-beam · Make It Right (BEAM runtime) The middle tier. `mir-backend` decides **what is correct** (any language). The framework module (e.g. `mir-backend-beam-phoenix`) knows the **library's mechanics**. This tier owns what's true for **all BEAM backends because they run on the Erlang VM** — the process model, message-passing concurrency, and fault-tolerance primitives that Phoenix, Nerves, Broadway, and plain Erlang all inherit. **Runtime assumed:** Elixir 1.20 on OTP 27–29; syntax examples are Elixir, the notes hold for Erlang directly. Verified 13 Aug 2026: **Elixir 1.20.3** is the current stable line (1.21 is unreleased, in development on `main`); **OTP 29.0.5** (4 Aug 2026) is the current major, with **28.5.0.5** and **27.3.4.16** as maintained lines. Elixir 1.20 requires OTP 27+ and supports up to OTP 29; Elixir 1.19 required OTP 28.1+ to run on the OTP 28 line. If the project is on OTP 26 or older, that is a Gate 4 risk row — the July 2026 security batch below was not backported below 27.3.4.15. Load order: `mir-backend` → `mir-backend-beam` → `<framework module>`. ## The BEAM footguns AI walks into (framework-agnostic) ### 1. Let-it-crash + supervision — design the tree, don't rescue everything A crashed worker is restarted by its supervisor without taking down the rest of the system. AI undermines this by wrapping every operation in `try/rescue`, converting a clean crash into a swallowed error that leaves the process alive with invalid state. - **Le...

Details

Author
anantbhandarkar
Repository
anantbhandarkar/make-it-right
Created
3 months ago
Last Updated
1 weeks ago
Language
Python
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

API & Backend Solid

mir-backend-beam-phoenix

Make It Right (Phoenix module). Phoenix + LiveView + Ecto + Plug + PostgreSQL specific reliability augmentation. Chains: mir-backend (generic gates) -> mir-backend-beam (BEAM runtime) -> this (Phoenix/LiveView/Ecto/Plug library mechanics). Adds the mechanical footguns the framework-agnostic tiers omit: LiveView per-connection process memory, with streams vs temporary_assigns for large collections; the async-assign APIs (assign_async/4, start_async/4 + handle_async/3, cancel_async/3) and why a bare Task.async in a LiveView kills the LiveView on crash; handle_event as a public websocket endpoint that must re-authorize on every event; Phoenix 1.8 scopes threading %Scope{} through context functions; Ecto N+1 on unloaded associations; changeset cast/4 as the mass-assignment allow-list; and migration safety on populated tables (concurrently, disable_ddl_transaction, expand/contract, NOT VALID + VALIDATE). TRIGGER only when the BEAM backend stack is Phoenix - building, reviewing, or debugging a Phoenix controller, L

15 Updated 1 weeks ago
anantbhandarkar
API & Backend Solid

mir-backend-go

Make It Right (Go runtime tier). Go 1.25/1.26 runtime reliability footguns shared across every Go backend framework (Gin, Fiber, Echo, chi, stdlib net/http) — distinct from the generic backend gates and from any one framework's mechanics. Covers: goroutine leaks (the #1 Go reliability bug) and the runtime goroutineleak profile, context propagation and cancellation, data races and `go test -race`, channel ownership rules, goroutine-level panic recovery, the nil-interface/nil-pointer trap, defer-in-loop resource buildup, slice aliasing, error wrapping with errors.Is/As/AsType, sync.WaitGroup.Go, the Go 1.22 per-iteration loop-variable change and its go.mod gating, deterministic concurrency tests with testing/synctest, container-aware GOMAXPROCS, log/slog structured logging, and Go-level security mechanics (http.Server timeouts, net/http CrossOriginProtection, os.Root path containment, SSRF dialer control, module checksum verification, govulncheck). TRIGGER when the backend runtime is Go — sits between mir-backe

15 Updated 1 weeks ago
anantbhandarkar
AI & Automation Solid

mir-backend-rust

Make It Right (Rust runtime tier). Async Rust on Tokio runtime reliability footguns that are shared across EVERY Rust backend framework (Axum, Actix-web, Warp, Poem) — distinct from the generic backend gates and from any one framework's mechanics. Covers: blocking the async runtime (std::thread::sleep / blocking I/O inside async tasks starves Tokio worker threads), holding a std::sync::MutexGuard across an .await point (Send error on a multi-thread runtime, silent deadlock on a current-thread one), cancellation safety (futures dropped at any .await under timeout/select!/disconnect leaving partial state), panic-poisoned Mutexes, Arc-based shared state with 'static bounds on spawned tasks, async fn in traits and the still-unsolved Send-bound problem, spawn_blocking thread-pool exhaustion, bounded vs unbounded channels for backpressure, and timeout discipline on every outbound call. TRIGGER when the backend runtime is Rust — sits between mir-backend (generic) and the framework module. SKIP for Python/Node/JVM/Go

15 Updated 1 weeks ago
anantbhandarkar