Zero-Server Signed APT, AF_PACKET DHCPv4, Failover Self-Blackhole Guards, 46 Adapter Seams, and Post-Resize Magenta Despill
A 24-hour systems-engineering dispatch: launching a <200 KiB zero-server signed APT repository on GitHub Pages + Cloudflare 302 redirects and squashing four firstboot races for v0.16.8–v0.16.9; closing six bare-metal Linux edge traps including raw AF_PACKET DHCPv4, SO_RCVTIMEO {0,0} infinite blocks, T1/T2 lease renewals, VRRP self-blackhole guards, and netns Confirm gates; hardening all 46 security audit seams in the Paperclip adapter and plugin; landing 11 upstream runtime PRs plus live K8s studios; and shipping 154 painted 2D storybook assets with post-resize magenta despill and 40/40 passing Godot scenes.

Steady state rarely breaks a system. Transitions do.
Fresh images boot before sshd finishes generating host keys. An edge firewall grabs a DHCP lease once at PID 1 boot, throws away the timer, and goes dark days later at T1. A protojson unmarshal failure leaves dirty fields on a struct before falling back to encoding/json. An AI agent adapter validates a loopback URL with .local mDNS enabled, or strips dangerous environment variables everywhere except the actual spawn boundary. Even a 2D sprite pipeline breaks on transition: key out a magenta background before downscaling and bilinear resampling happily paints fresh pink halos right back onto every anti-aliased edge.
Over the past 24 hours across five parallel engineering tracks, the unifying theme was transition-safe engineering: locking down firstboot races, lease renewals, VRRP failovers, sandboxed process spawns, and asset downscaling so systems stay honest when state changes.
1. Zero-Server Signed APT (apt.axonwall.com) & Four Firstboot Races (v0.16.8–v0.16.9)
Hosting an official Debian/Ubuntu APT repository usually means maintaining an S3 bucket, a persistent VPS running reprepro, or both. In axonwall/apt (5e5cb8a, 1,545 lines across 9 files) paired with axonwall/axonwall (d26b08c6), we eliminated the origin server completely using a split-plane zero-server APT architecture:
- Metadata Plane (
< 200 KiBon GitHub Pages): A Python builder (scripts/build-apt-repo.py,813lines) fetches the latest 5 stablev*releases plusrolling-latestfrom GitHub Releases, verifies every.debagainst its.deb.sha256and.deb.sha256.sigusingkeys/release-signing/release-signing.pub, extractscontrolmetadata, and generates GPG-signeddists/trixie,dists/stable, anddists/rollingindexes plusaxonwall-archive-keyring.gpg. Zero.debpayloads ever touch GitHub Pages. - Payload Plane (Cloudflare
302→ GitHub Releases): Cloudflare serves/dists/*and keyrings directly from GitHub Pages while redirectinghttps://apt.axonwall.com/pool/*/*with HTTP302tohttps://github.com/axonwall/axonwall/releases/download/${1}/${2}. Becauseaptnatively follows HTTPS redirects and checks the cryptographicInReleasesignature + exact package SHA-256 hash before invokingdpkg, trust remains pinned to the signed metadata. - Self-Updating Trust: Commit
d26b08c6bundlesaxonwall-archive-keyring.gpgdirectly inside.debbuilds and dispatches theapt.axonwall.comrebuild workflow automatically on every release.
Four Firstboot & Packaging Races Squashed (562e4dbc, ff799082)
Before cutting v0.16.8 and v0.16.9, firstboot verification caught four classic boot-order and serialization bugs:
- The
sshdHostkey Race: Freshly provisioned appliances could startssh.servicebeforeaxonwall-firstbootfinished writing or generating SSH host keys. Adding a deterministic systemd drop-in (10-axonwall-hostkeys.conf) withExecStartPrehostkey generation closes the race window before port 22 opens. - Dirty Struct Leakage in
protojsonFallback: InunmarshalApplyBundleHTTP, whenprotojson.UnmarshalOptions{DiscardUnknown: true}failed on camelCase or legacy JSON payloads and fell back toencoding/json.Unmarshal, partial fields decoded byprotojsonsurvived onreq. Callingreq.Reset()before the fallback—and explicitly hydrating camelCasejobId,bundleHash,nftScript,reloadServices,confirmTimeoutSeconds,signature, andfiles[].fileMode—fixed/v1/apply,/v1/confirm, and/v1/rollbackcleanly. agent.token0640Validation & Boot Unit Enablement: Tightened0640token permission checks across firstboot scripts and ensuredkea-dhcp4-serverandunboundare explicitly enabled across reboots rather than only started during initial provisioning.- Debian 13 Trixie Package Alignment (
ff799082): Updated the CrowdSec firewall bouncer plugin manifest from the legacynftablespackage suffix to Debian 13'scrowdsec-firewall-bouncer.
2. Bare-Metal Edge Routing & HA Failover: Six Brutal Linux Networking Traps
When an edge perimeter runs as a minimal pure-Go PID 1 Unified Kernel Image (UKI) with CONFIG_MODULES=n, there is no dhclient fallback, no shell wrapper to hide behind, and no room for half-configured failover scripts. Deep-dive testing on real WAN/LAN failover transitions surfaced six brutal Linux networking traps—and pushed the verification suite to 380/380 passing @axonwall/lib tests plus full Go satellite and HA failover suites.

Trap 1: AF_PACKET DHCPv4 & the SO_RCVTIMEO {0, 0} Infinite Block
Upstream ISP modems and bridges routinely fail to deliver AF_INET broadcast DHCP offers before an interface holds a configured IPv4 source. Moving the satellite's pure-Go DHCPv4 client to raw AF_PACKET (SOCK_DGRAM, ETH_P_IP) with hand-rolled RFC 1071 inetChecksum(), buildIPv4UDPPacket(), and parseDHCPv4FromIPv4Frame() solved unaddressed-interface acquisition—until a subtle Linux socket semantic surfaced in the receive loop.
On Linux, passing Timeval{Sec: 0, Usec: 0} to SO_RCVTIMEO does not mean "return immediately"—it means disable the receive timeout and block forever! If a receive loop computes remaining budget rem := deadline.Sub(time.Now()) and 0 < rem < time.Microsecond, integer division truncates rem straight to {0, 0} and hangs the loop indefinitely:
rem := time.Until(deadline)
if rem < time.Microsecond {
break // Never pass Timeval{0, 0} to SO_RCVTIMEO: Linux treats it as infinite wait
}
tv := syscall.NsecToTimeval(rem.Nanoseconds())
if err := syscall.SetsockoptTimeval(fd, syscall.SOL_SOCKET, syscall.SO_RCVTIMEO, &tv); err != nil {
return lease, err
}
Trap 2: Boot-Once DHCP Without a T1/T2 Renewal Loop
Acquiring a DHCPv4 lease once during PID 1 initialization and discarding lease.LeaseTime is a ticking clock: hours later when the upstream CMTS lease expires, WAN silently vanishes. The satellite edge engine now runs a background RFC 2131 T1 (LeaseTime/2) / T2 renewal loop (RenewDHCPv4Lease) paired with staggered Gratuitous ARP broadcasts (+0s, +3s, +8s) so upstream switches and peers immediately refresh ARP caches after cold boots or link flaps.
Trap 3: VRRP Self-Blackhole Loops & netns-Gated Confirm
Consider a control host sitting behind a hosted edge VM where the edge owns the LAN gateway VIP. If a config edit or schema strip drops the edge health-check script (chk_edge_down_*), Keepalived sees no check, promotes the backup control host to MASTER, and stamps the LAN gateway VIP onto the host's own bridge—stealing the gateway IP while WAN is delegated to the edge and blackholing the entire LAN!
Two permanent safeguards now prevent that class of self-inflicted outage:
- Daemon Self-Blackhole Guard:
generateKeepalivedinspects the hosted edge's activeuser-data(parseHostedEdgeEth1IPs); whenever any VRRP VIP matches the hosted edge's LAN IP, it automatically emits a liveness check—even if the declarative config omitted it—andHAEngine.OnTransitionflushes stale bridge ARP entries for the VIP onFAULT/BACKUPinstead of triggering false storage/identity demotions on single-node edge guards. - Synthetic
netnsLAN-Client Forwarding Probe (forwarding_probe.go): ConfigConfirmno longer trusts a blind 2-second sleep. Before confirming an apply, the daemon spins up an ephemeral isolated network namespace attached to the LAN bridge and verifies live ICMP, DNS, HTTP, and HTTPS forwarding through the gateway. If forwarding fails,Confirmrejects and triggers automatic rollback.
Trap 4: The Rosenpass failClosedBootGuard PostUp Time Bomb
Post-quantum WireGuard extensions (Rosenpass) often include a fail-closed boot guard that injects a random ephemeral preshared key at interface startup so peers cannot pass plaintext-PFS traffic before Rosenpass key exchange completes. The bug: when rosenpass.enabled was set alongside peers: [], the compiler fell back to emitting PostUp = sh -c 'head -c 32 /dev/urandom | base64 | wg set %i peer ... preshared-key /dev/stdin' for every peer on the WireGuard interface—including standard non-Rosenpass peers! Any service restart or reboot would silently overwrite every tunnel's PSK with random entropy. Scoping PostUp strictly to enabled rosenpass.peers matching the target interface eliminated the time bomb completely.
Trap 5: nftables ft_fastpath Swallowing Virtual & Overlay Interfaces
Linux nftables flowtables (flow add @ft_fastpath) accelerate established TCP/UDP forwarding—unless your iifname / oifname filter accidentally captures bridges, container CNIs, WireGuard, or Tailscale tunnels, bypassing policy hooks or breaking encapsulated paths. The compiler now explicitly excludes br-, vmbr, vxlan, cni, flannel, cilium, virbr, ovs, tap, veth, wg, and tailscale prefixes from ft_fastpath device lists, while satellite nftables rules pin flow add @fastpath strictly to { wanDev, lanDev }.
Trap 6: Unconfigured UPS Daemons, A/B ESP Slots & mTLS Edge Repair
Three smaller reliability guardrails rounded out the sweep:
nut.confMODE=noneGuard (service_ctl.go):nutIsConfigured()inspects/etc/nut/nut.confsoreloadOrRestartServicecleanly stops/skipsnut-client,nut-monitor, andnut-serveron nodes without UPS hardware instead of failing config applies.- Dual-Slot EFI Staging (
esp_slot.go) & mTLS Heal (subordinate_heal.go/subordinate_client.go): Added explicit EFI System Partition slot discovery andDIAGNOSE_EDGE/REPAIR_EDGEdiagnostics over the mTLS control channel so the host can inspect live kernel interfaces and/proc/net/routeon the zero-shell edge UKI without SSH.
3. Hardening 46 Security Audit Seams in the Paperclip Adapter & Plugin
Over in Eluvixrouter/eluvix (fac5a4c, +541 / -54 across 8 files), a comprehensive security hardening pass closed all 46 audit findings (H3–H5, M4–M6, L7–L10) across the Paperclip local adapter and auto-assignment plugin.
Security bugs in local AI-agent adapters are almost always trust-boundary illusions—assuming a config object is benign because it lives locally, or assuming .local means "my machine":
Here are the highest-leverage seams hardened in fac5a4c:
- Dropping
.localFrom Loopback (H3,H4,L8):validateLoopbackUrlandvalidateLoopbackEluvixUrlpreviously allowedeluvix.local. Because.localresolves via/etc/hosts, mDNS, or LAN DNS—not kernel loopback—a poisoned.localname could siphon Paperclip JWTs orelx_API keys off the host. Both the adapter and plugin now strictly allow only127.0.0.1,localhost, and::1acrosseluvixBaseUrl,PAPERCLIP_API_URL, andruntimeMcp.url. - Spawn Environment Scrubbing,
cwdConfinement & Binary Allowlists (H5): Config-supplied environment variables can no longer overridePATH,LD_PRELOAD,LD_LIBRARY_PATH,NODE_OPTIONS,DYLD_*, orOPENCODE_*(defense-in-depth at bothexecute.tsandspawnOpenCodeServer). ConfiguredopencodeBinaryvalues are checked againstOPENCODE_BINARY_ALLOWLIST, andcwdis confined inside the adapter's resolved workspace root:
const DANGEROUS_CHILD_ENV_KEYS = ['PATH', 'LD_PRELOAD', 'LD_LIBRARY_PATH', 'NODE_OPTIONS'];
function sanitizeConfigEnv(envMap: Record<string, string | undefined>) {
const out: Record<string, string | undefined> = {};
for (const [k, v] of Object.entries(envMap)) {
if (DANGEROUS_CHILD_ENV_KEYS.includes(k) || k.startsWith('DYLD_') || k.startsWith('OPENCODE_')) {
continue;
}
out[k] = v;
}
return out;
}
function confineCwd(configuredCwd: string): string {
const workspaceRoot = path.resolve(process.cwd());
const resolved = path.resolve(configuredCwd);
return resolved === workspaceRoot || resolved.startsWith(workspaceRoot + path.sep)
? resolved
: workspaceRoot;
}
- Company-Scoped Agent Verification & Rate Quotas (
M4,M5): Auto-assign and approval flows now fetchctx.agents.list({ companyId })and reject any recommendedagentIdthat does not belong to the target company, while proposals count towardmaxPerHour. - Upfront Secret Resolution & Tool-Call Log Redaction (
M6):resolveEluvixHmacSecretruns before pre-flight health checks so connection errors andtool_callJSON log lines are scrubbed byredactSecrets(includingelx_*tokens with digits/underscores) just like assistant stdout. file:Secret Caps & Handler Input Clamping (L7,L10): Secretfile:references are restricted to regular files<= 4096bytes inside allowlisted directories (blocking/dev/zeroor arbitrary file reads), and plugin handlers enforce server-side bounds (MAX_TEXT_CHARS = 10_000, priority/sensitivity allowlists, finite numericweights, and clampedtopN).
4. Upstream Momentum: 11 Merged paperclipai/paperclip PRs & Live Cluster Studios
While hardening the adapter downstream, 11 pull requests landed upstream in paperclipai/paperclip, clustering into three clean runtime-reliability themes:
| Pattern | Merged PRs | Engineering Fix |
|---|---|---|
| Cancellation & Recovery Fidelity | #22506, #15922, #15923 | Never restart a cancelled cursor-local run as a fresh session; stamp explicit attribution on cancel_continuations cancellations; stop capping new runs at the legacy disposition-repair allowance. |
| Config, Auth & Proxy Plumbing | #22595, #18116, #22501 | Merge issue-level adapter override env per key instead of clobbering the whole map; preserve existing grant scopes when re-ensuring without one; handle client socket errors cleanly inside the sandbox allowlist proxy. |
| Quotas, Pagination & Docs Honesty | #18110, #15671, #15669, #16533, #15936 | Match hyphenated 5-hour provider quota wording in claude-local; parse retry timestamps from codex-local usage limits; honor offset when listing company heartbeat runs; warn in the CLI when run list hits the server page cap; document the enforced 1800s timeoutSec default. |
Meanwhile, two sibling ecosystem milestones clicked into place:
DeployCoop/vigilant-octo-waffle(PR #161 merged,+1,704 / -33across 17 files, merge6eba5d0): The Sloth-SLOs-as-code + Grafana Tempo PR that yesterday's post covered as open is now on main with CI all green — four PrometheusServiceLevel CRs (five SLOs, 30-day windows), a live Prometheus API client feeding real burn rates into the SLO studio, and Tempo 3.2.1 wired to the OpenTelemetry collector with a Grafana datasource.DeployCoop/vigilant-octo-waffle(PR #162 merged,+8,774 / -827): Landed the final six Kubernetes operator studios (Mesh, DR, Postmortem, KEDA, Wasm, and Rewind) wired to real cluster CRDs, x509 certificates, Velero backups, and ArgoCD history—completing live telemetry parity across the control plane.CrewsAIdarr/CrewsAIdarr(PR #9 opened,+316 / -1): Followed up Phase 2's local-first SQLite FTS memory bridge with Phase 3 documentation, configuration schemas, and operator runbooks for the Eluvix MCP consumer.
5. Graphics Craft Break: 154 Painted Storybook Assets & Post-Resize Magenta Despill
To keep the systems brain sharp, one parallel track pushed a 2D Godot tower-defense graphics pipeline from placeholder shapes to 154 hand-painted Arthur Rackham-inspired pen-and-ink and watercolor assets—coordinated across 5 parallel painter subagents with disjoint file ownership (Battlefield, Combat VFX, Storybook UI, Atlas & Title, and Ambient & Weather) and verified across 40/40 headless Godot test scenes (passed=40, fails=0) plus Xvfb opengl3 captures.

The standout technical lesson from that pipeline applies to any automated sprite or UI asset slicer: the ordering trap between chroma-keying and downscaling.
When generating high-resolution sprite sheets on a #FF00FF magenta key background and resizing down to game tile dimensions:
- If you run chroma-key + edge despill first and resize second, bilinear or Lanczos filtering samples neighboring transparent pixels whose RGB channels may still carry residual magenta (
R > G, B > G) and blends them right back into semi-transparent boundary pixels—creating an unmistakable neon-pink halo around every tower and UI seal. - Moving the 3-pixel outer-edge magenta despill pass after resizing in the asset slicer strips residual magenta chroma strictly from the final exported alpha boundary, leaving clean pen-and-ink silhouettes against dark twilight maps and sunlit meadows alike.
Pair that with softening puddle boundaries in shaders/terrain_bake.gdshader into layered watercolor washes, and every visual subsystem cleared automated inspection without sacrificing framerate or Android APK readiness.
The Takeaway: Five Rules for Transition-Safe Systems
- Split metadata trust from payload weight: A
< 200 KiBGPG-signed APT index on static hosting plus302CDN redirects gives you full cryptographic verification with zero origin servers to patch. - Respect kernel edge-case semantics:
SO_RCVTIMEO {0, 0}means "block forever,"protojsonfallback needsreq.Reset(), andssh-keygenneeds an explicitExecStartPreordering barrier. - Gate failover and confirmation on live end-to-end probes: Auto-guard VRRP VIPs against self-blackholing and verify real forwarding inside an isolated
netnsbefore confirming network config changes. - Never trust
.localor un-scrubbed childenv: Lock local IPC strictly to numeric/loopback hosts, stripLD_PRELOAD/PATH/NODE_OPTIONSat spawn boundaries, and redact secrets before the very first network call. - Despill after downscaling: Whether it's sprites or telemetry, transformations near boundaries always re-expose edge artifacts—clean the boundary at the final output resolution.