Changelog
All notable changes to MiBee Steward are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[0.10.0] - 2026-11-24
Added
- Diagnosis: the "device keeps changing its IP" question answered with a verdict (#761): field-verified on a real incident — one offline box had split into four device rows with sightings at ~30 addresses that never answered on the wire. A new per-device diagnosis engine joins the address-observation history (device_sightings) with the per-IP scan-liveness facts (scan_snapshots), the multi-homed presence layer and the change stream, and classifies the pattern with an evidence chain:
stale_arp_scan_artifact(many sighted addresses, none answering a scan — the sightings came from stale ARP-cache reads, not a moving device; the only high-confidence class, precisely because it rests on liveness facts),multihomed_alias(one box actively present in several networks),locally_administered_mac(the neutral U/L-bit fact: MAC-based binding will not stick),ip_slot_takeover(the change stream saw the MAC replaced at an unchanged address) andhostname_identity_split(sibling rows announcing the same hostname under different MACs). Design rule: sightings alone are ambiguous — they record what a vantage OBSERVED, including stale ARP-cache reads — so every address is cross-checked against the snapshot's miss/flap counters before a verdict is issued. New read-only APIGET /api/v1/devices/{id}/diagnosis(openapi + both generated clients updated) and a device-detail "Network Diagnosis" panel (verdict badge, findings with evidence, per-address liveness timeline, same-hostname sibling rows; en/zh docs). Deliberately not an alert — per the impact-first rule the verdict is pull-based. Zero schema change: every input row is written by the existing pipelines. Implementation note: two of the reads (sibling rows by hostname, per-IP liveness) run as raw SQL because sqlc's SQLite parser truncates their statements (the documented ListStaleAgentSnapshots parser bug). - Diagnosis: the identity verdict is now visible right in the device list (#767): #761's engine correctly classified the "device keeps changing IP" incident (one physical box split across a bond MAC row, a wifi MAC row and MAC-less mDNS ghosts), but the verdict lived only in each device's detail network tab — searching the box still showed N unrelated rows and looked like the fix had done nothing. The device list now lifts the SAME classification onto every affected row as at-a-glance badges: "same device" when several rows share a normalized hostname (first DNS label, so a Tailscale FQDN
n305-server.tail1234.ts.netgroups with the baren305-server), and "multi-homed" when the engine recordedip_aliasesfor the MAC. Hover tooltips explain the identity-split / dual-homed semantics. Pure frontend: reuses thescan_attributes.hostname+extras.ip_aliasesalready in the list payload — zero backend, zero schema, zero codegen; the rules mirror the server classifier so the list and detail panel never disagree. Info/watch-level badges, never alerts (impact-first rule). - Networks as a first-class entity: the Network Center (#771): the previous /networks page was a CRUD table — egress/NAT type was buried three levels inside a device detail page, quality/routing/assets were scattered, and there was no view of how networks interconnect. A new read-only /network-center page gives networks a first-class home with four layers: an overview of every network (egress IP, NAT type, quality, device count + interconnect map), drill-down into a network (gateway profile, per-vantage quality, routing/interconnects, network assets), an inter-network topology (cross-network RTT/loss/jitter with clickable nodes to switch networks), and a cross-network asset list. Pure frontend aggregation of existing endpoints (/networks, /devices, /probe-quality, /probe-egress, /probe-matrix, /agents/status) — zero schema, zero new API, zero codegen. The lab networks are an experimentable sample; the site/network/subnet structure fits any network form.
- Gateway NAT verdict surfaced in the device header (#769): the cone/symmetric classification (
scan_attributes.gateway.nat_mapping, #754) was buried three levels deep — device detail → Discovery tab → Discovery panel → Network Profile card — so asking "is this network symmetric or cone?" had no visible answer. The device header now shows the verdict inline next to the type/network badges: "symmetric (EDM)" (amber) / "cone (EIM)" (green), with a "NAT mapping behavior" tooltip. Same data source and i18n keys as the deep card — never a second opinion; devices without a gateway profile show nothing. Pure frontend. - Probe: the site matrix gets its own heat view (#748): #747 wired the mesh legs but reading them meant scrolling a flat target list. A new
GET /api/v1/probe-matrix?window=aggregates themesh-*legs into the N×N grid the data describes: sources (rows) and destinations (columns) are the center plus every registered agent, cells carry the window's sample count, ok rate, p50, loss and jitter. Identity comes from the leg's own metadata, never from parsing the target name — agent ids may contain "-", somesh-a-b-to-c-dis ambiguous as a string; the source is the leg's vantage and the destination is the agent whose last report came from the leg's target IP, exactly how the autogen sweep built it. A leg whose destination agent has deregistered is dropped rather than attributed to a phantom column. The probes page gains the corresponding panel: collapsed by default, fetched lazily on first open, sharing the egress panel's window chips, cells coloured by health before latency, an em dash for "no leg" and an ellipsis for "not reported" so a 0 ms timeout burn can never read as a healthy link, and a click drills into that leg's existing history chart. openapi + both generated clients updated; en/zh docs. - Probe: burst sampling — packet loss and jitter become first-class metrics (#744, SCHEMA v11 — upgrading requires a database rebuild): a 60s-cadence probe can never see microburst loss, and jitter simply did not exist. An icmp target's options now carry
burst_count(1–20 echoes per round) andburst_interval_ms(10–1000 gap; CRUD-validated, absent = the legacy single ping with byte-identical behavior). A burst round reportsloss_pctandjitter_ms(mean absolute difference of consecutive echo RTTs) intoprobe_results(new columns), the history dialog (a Loss/Jitter chart mode + detail columns, target-gated — the response omits the fields on clean 0% rounds), and the quality verdicts as the stable codesloss_burst/jitter_high(probe.quality.loss_pct_thresholddefault 5%,jitter_degraded_msdefault 30). The window mean runs over EVERY row of a burst target — a clean 0% round is real data, excluding it would bias the mean upward. Both halves of the #277 vantage split carry the metrics (engine persistence +AgentResultReport; the Rust agent's icmp arm runs the same burst shape with Go-parity math, wire-pinned). openapi + both generated clients updated; en/zh docs. Upgrade note: SchemaVersion 10 → 11 (burst columns +vantage_hostnet+agent_statuscolumns) — backup → fresh database → rescan; probe history series reset. - Probe: UDP-egress attribution — "UDP dead but TCP alive" is its own code (#745): when every icmp leg of a vantage is dead while TCP-reachable legs still pass, the degraded verdict gains
udp_egress_blocked.tcp_alive_udp_dead— a UDP-path problem, not an offline network. Attribution only: appended to an already-degraded verdict, never minting or upgrading one (the impact-first alerting rule). The simple category verdicts get the same attribution. Tested for the positive, the everything-dead-is-egress_down, and the healthy-no-code cases. - Probe: the site-to-site matrix wires itself (#747): with
probe.autogen.mesh_enabled(default on), every autogen sweep reconciles the vantage matrix from the fleet's report source addresses: center→agent legs (vantage=center) and ordered agent→agent legs (the SOURCE agent executes), icmp with a 10-echo burst block,source=systemso the legs land in the quality category and join the #608 matrix views.agent_status.last_source_iprecords the peer address each report arrived from (RemoteAddr; X-Forwarded-For deliberately not trusted). Legs follow address drift, park when an agent deregisters, revive on return; unknown addresses contribute no legs. The N×N RTT/loss/jitter matrix exists without manual wiring. - agent-rs: HostNet attribution — "is it my network or the target" answered with counters (#746): agents sample their OWN network facts every 5 minutes — per-interface rx/tx error + drop counters from /proc/net/dev, the default-route fingerprint from /proc/net/route (
iface|gateway; a change between samples is a route event), and one DNS-resolution timing against the CENTER host (the same resolution the report path itself depends on) — riding the report meta asmeta.hostnet(raw counters, center-side deltas; a counter going backwards = interface reset, not regression). The center lands the series invantage_hostnet(schema 11, swept with the probe history window) and decorates degraded vantage verdicts withvantage_local_degraded.iface_errors/vantage_local_degraded.route_change— attribution only, never minting a verdict. Parsers are pure and socket-free; the Linux collector is a thin reader; failures never wedge the report path. - agent-rs: SNTP clock offset rides the report (#749): agents sample SNTP (RFC 4330) against the public NTP pool every 5 minutes; the calibrated offset (local − server, ms) rides
meta.clock_offset_msand is stored onagent_status.sntp_offset_ms, rendered next to the report-time heuristic on the agents page. Codec pure and TDD'd; failure = 0 (unknown), never wedging the report loop. - Probe: gateway profile — the router's "can do what" half (#750–#754): an opt-in network-capability portrait for the network's primary router device.
probe.nat(settings center;GET/PUT /settings/probes/stun-servers, default OFF — probing exposes the site's public mapping to third parties) carries the STUN server list: shipped defaults are PUBLIC infrastructure only (Cloudflare / Google / Nextcloud / Bilibili / Antisip; the product ships zero self-hosted STUN — neutrality constraint), built-ins may be disabled but never dropped, user nodes up to 8 rows with format/dedupe validation, and a WYSIWYG one-shot test (POST …/test: one RFC 5389 Binding Request from the center, mapped address + RTT back — a stdlib-only ~180-line STUN client, codec TDD'd). A settings change dispatchesgateway_probeto every registered agent (endpoints only ride the channel — the secret-free command contract holds): the agent-rs gateway probe runs SSDP M-SEARCH (multi-ST, case-insensitive Location) → device description control-URL extraction → WANIPConnection GetExternalIPAddress + AddPortMapping SOAP (the mapping IS the capability test) and the NAT mapping-behavior classification (one socket, ≥2 distinct servers: identical mappings = cone/EIM, any difference = symmetric/EDM, fewer than two answers = unknown, never guessed). The evidence lands in the router device'sscan_attributes.gateway(read-modify-write preserving other engine sections) and renders as a "Network Profile" block on the device page. All pure helpers TDD'd socket-free; eim/edm/unknown is a stable value. - Dashboard: 2D/3D chart toggle — the topology pill comes to the dashboard (#741): every default chart card (status pie, type pie, location bar, lifecycle bar, tag bar) gains a header 2D/3D segmented toggle that re-renders it as an isometric pseudo-3D chart — extruded 3D pies (elliptical top face + rim wall + radial cut faces, painter-ordered far-to-near) and cuboid bars, drawn by ECharts custom series. Deliberately NO new dependency: echarts-gl is not echarts-6-compatible and three.js is disproportionate for widget-sized cards, so the 3D forms are pure zrender polygon drawing (new
lib/charts/chart3d.tsbuilders, unit-tested); the heartbeat gauge has no 3D analog and stays 2D in both modes. The preference persists in localStorage; the 3D pies label each wide slice with its name and percentage directly on the chart (the legend component collects entries per series only for custom series, so no dead legend is shipped) while the tooltip keeps the 2D shape ("name: value (pct%)"); the sharedChartcomponent gains areinitKeyprop because echarts merge-mode setOption cannot swap a series' type in place. - Probe: the quality matrix and autogen switches move into the web UI — the dead-end hints become actions (#737): 0.9.0's probes page told users to "enable probe.autogen in settings" and to manage the egress matrix "via the probe.quality config", but the settings page had no probe section and the API no probe-policy surface — on rigs whose kept config lacks the probe block (every upgrade form except OpenWrt's migrate-config) both features sat off forever with no web path to them. The settings-center overlay gains
probe.quality/probe.autogenrows carrying ONLY the web-editable switches (matrix contents/thresholds stay YAML-managed): newGET/PUT /api/v1/settings/probes(admin), a new Settings → Probes section (source-baded "web-managed vs from-config" like the auth section), and services that merge the switch at their point of use — a flip reseeds the quality matrix / runs one autogen sweep immediately, no restart (the established archive-engine overlay pattern). The probes page's empty states are now the controls: the LAN section offers "create probes for discovered services" (newPOST /api/v1/probe-targets/autogen-sweepruns one reconcile now and reports created/enabled/parked), the quality section (list + panel) offers "enable the egress quality matrix" (admin).probe.qualityitself defaults ON for an absent key (*bool+EffectiveEnabled, the episodes-pointer contract): upgrade-carried pre-v0.8 configs stop silently losing the matrix; an explicitenabled: falsestill wins and doctor's warn now points at the web switch. openapi + both generated clients updated; docs (web-ui/configuration, en+zh) updated. - LAN announce: the ecosystem service discovery trio (#729): the center now announces ITSELF on the LAN so the Scout app's one-shot scan recognizes it (type
steward) instead of requiring a hand-typed address. Three surfaces under oneannounce:config block (default ON — the app shows nothing it cannot find, so announcing IS the visibility;enabled: falsestays fully invisible): the mDNS advertisement_mibee-steward._tcp(TXTver/id/name/tls/api, the exact shape of the NVR service — the app's parser takes it with zero new code), the public identity endpointGET /.well-known/mibee-service({"service":"steward","name","ver","id"}— unauthenticated four fields, the /health disclosure posture), and a UDP responder (default port 49091, registry confirmation tracked in #729) answering the sharedMIBEE-NVR-DISCv1?probe withtype=stewardbehind the same anti-amplification rules as the NVR (exact-frame match, oversized drop, per-source throttle). The responder is a hand-rolled RFC 6762-conforming mDNS engine (x/net/dns/dnsmessage), NOT hashicorp/mdns: the library answers ordinary multicast (QM) queries unicast, which strict resolvers like avahi-daemon silently drop —avahi-browsenever sees the service (tcpdump-verified on the rig). Known-answer suppression (§7.1), a 3x startup announcement burst (§8.1), legacy one-shot queries answered unicast with the transaction ID echoed, and per-interface group joins with SO_REUSEADDR (no REUSEPORT) so it coexists with avahi/systemd-resolved and the scanner's own passive mDNS evidence listener. A stable instance ID (data/instance-id, generated once, survives restarts/upgrades/IP changes — deliberately a file, not a schema change) anchors all three surfaces and is the app-side bind/merge key. Announcing surfaces fail soft (log once, continue — snmptrap posture); config:announce.enabled/name/mdns/udp/udp_port/tls; docs: configuration.md + api.md (en/zh). - OpenWrt installer: additive config migrations for kept configs (#727): the upgrade rule "existing config is kept" also meant a config generated before a feature's config block existed never gained it — the server treats the missing key as OFF forever, with nothing in the UI saying why (first field case: a pre-v0.8.0 config upgraded to 0.9.0 never seeded the #608 egress-quality matrix, no matter how long it waited). A new self-contained
deploy/openwrt/migrate-config.sh(the #688 detect-lans.sh pattern: POSIX ash, busybox-awk safe, shipped in the tar.gz/.ipk/.apk, fixture test harness committed alongside) runs on every kept-config install: missing default blocks are ADDED (probe.quality→enabled: true, every other knob at its built-in default), anything set explicitly wins (enabled: falsestays off), re-runs are byte-identical no-ops (same-version reinstall stays the standard verification path), and a failed rewrite leaves the config untouched and aborts the install loudly.install.shcalls it on the upgrade path (tarball and--from-ipkalike);check-openwrtnow also EXECUTES the committed shell test harnesses (detect-lans + migrate-config) instead of onlysh -n-ing them. For upgrade forms with no installer (binary/systemd, Docker),doctorgains aprobe.qualitycheck that warns with the one-line fix while the matrix is off.
Fixed
-
Web: the agents fleet-offset cell printed its own markup (double-escaped
htmlfragment): the column showed the literal text<span class="text-text-muted"> · SNTP -4.2msinstead of a grey suffix, because the SNTP part was built with onehtmlcall and then interpolated into a second one.html()escapes every interpolation — that is its whole purpose — and its output is an ordinary string, so the inner fragment's tags were escaped a second time and rendered as text. Fixed by keeping the cell in a single template and letting the conditional pick a text value. The helper's doc comment previously told people to nest that way and called it safe; that guidance was wrong and is now replaced with the working pattern plus an explicit warning. Two regression tests pin the trap so the next person who composes a cell from fragments finds out in CI: one asserts that nesting really does double-escape (documented behaviour, not a supported pattern), the other asserts the correct single-template shape renders<span class="mut"> · SNTP -4.2ms</span>. Same pass: three places in the probes table concatenated anhtmlfragment into a bare template string — valid markup today, but a raw string path where a future interpolation would not be escaped; they now fold the wrapper into the samehtmlcall. A scan of all 103htmlcall sites found no other instance of the double-escape class. -
Web: the Network Center stops being dark in light theme (#773):
network-center/+page.sveltereferenced a legacy GitHub-dark palette (--surface,--surface-2,--border,--muted,--fg,--bg,--accent) thatthemes.cssnever defines, so all 74 colours silently fell through to dark hex fallbacks and the page ignored the theme switch while the rest of the app followed it. Every colour now resolves from the--color-*tokens both themes define; tints usecolor-mix()instead ofrgba()picked against a dark backdrop. Same views, same data, same endpoints. -
Sweep: the whole-UI click-through fixes (#737 follow-up): three dead ends the page-by-page audit surfaced. (1) The change history rendered probe and quality events as bare '#116'/#117' in the Device column — the entity ids meant nothing to a user.
probe_failed/probe_recoveredrows now resolve their target name from the event payload ('quality-http-204'), andquality_degraded/quality_recoveredepisodes render the affected vantage with agent ids mapped to their network name ('lan-63 · 192.0.2.0/24'). (2) The networks page's 观测网段 (observed subnets) section was permanently empty on distributed setups: the runner records subnets only for LOCAL scans (its gateway source is the center's own /proc/net/route), and agent-fed networks — the common case — never wrote a row. Agent reports now record their DETECTED on-link subnets (meta.self_interfaces, #686) into the subnets table, keyed (network_id, cidr), refreshed per report; the section'slast_seenalso renders localized instead of a raw RFC3339Nano stamp. (3) A parked device row (its address claimed by another device, e.g. a randomized-MAC client) printed the raw '#park:<id>' sentinel in the IP column; the list now shows an 'address released' chip with the doctrine tooltip, the expand strip drops the sentinel, and the dashboard's offline-device card stops linking the sentinel as a search term. -
Probe: the quality switch-on path revives parked matrix rows (#737):
QualityService.Seedcreated missing rows and refreshed drifted ones but never re-enabled a parkedsource=systemrow — flipprobe.qualityfrom off to on and every previously parked row stayed parked, so the quality board stayed empty until each row was hand-deleted (the observed "the egress probes never initialized" on 0.9.0 rigs). The matrix is switch-managed by design: with the switch on, seed revives parked system rows (per-row parking is superseded by the master switch; config still governs membership). Switch lifecycle pinned by a routes-level end-to-end test over the real router (park on off → revive on on). -
Probe: section summaries and the failing headline stop counting parked rows (#737): the per-section "N enabled · N ok · N failing" summary and the "68 of 113 failing" headline fed off
latestOverallfor ALL targets including disabled ones — 58 parked auto targets' stale failures inflated the board into a false alarm the visible rows couldn't explain (the numbers didn't reconcile: 42 enabled, 34 ok, 66 failing). Summaries now count enabled targets only and report the paused population separately ("… · 58 paused"), and the failing headline/pill count enabled problems only, matching the health bar's paused segment it already had. -
Probe: region-blocked reference targets read as unreachable, not broken (#737): the international reference group's google/cloudflare legs fail from every China-network vantage by construction, but the quality matrix rendered them as
0% · 0mscells with aninsufficient data · 0verdict — indistinguishable from a matrix that never initialized (half of the "egress probes didn't generate" report). A reference row whose every column istarget_downnow renders neutral "unreachable" cells and a "reference targets unreachable" verdict badge (tooltip: excluded from this network's verdict by the cross-vantage isolation rule). -
Probe: per-stage timing breakdown — "where did the milliseconds go" answered per run (#717): the probe portfolio's measurement gap closes. The center's http module now runs under
httptraceand reports four stages per run — DNS resolve, TCP connect, TLS handshake, wait-for-response (TTFB) — plus the address the run actually used; tcp reports connect-ms + the connected address; icmp reports the echo reply's remaining TTL (hop budget from the destination's side). Failed runs keep the stages that completed (a timeout mid-handshake still tells you what DNS/connect cost — the #720 attribution question stops being a guess from error text). The Rust agent measures what it can see through reqwest: the DNS stage (its resilient resolve loop is already outside the client) and the resolved IP, riding the existing probe-report rows as an optionalphasesblock (snake_case, omitempty — old centers ignore it, old agents just don't send it). Everything lands inprobe_ext.db(probe_phases, swept by the sameretention.probe_ext_dayscutoff as egress/path) through aPhasesSinkthe engine and the agent-ingest path both write; dns/tls modules record nothing (nothing meaningful to decompose). New API:GET /probe-targets/{id}/phases(openapi + both generated clients). UI: the results-history modal gains a Total/Stages toggle — stacked DNS/connect/TLS/response bars per run with a dashed reply-TTL line on the right axis (icmp), tooltips carrying resolved IP, TTL and the run total; the toggle appears only when the target's module produced phase rows. Known simplification: agent http rows carry dns_ms+resolved_ip only (reqwest hides the sub-request phases); center rows carry the full decomposition. -
Probe: quality degradation episodes — impact-only alerting lands (#716/#720): the probe extension's final piece. A detector (5-minute loop) judges every target×vantage track against its OWN baseline — 72h median until seven days of history exist, then the same weekday×hour buckets — over aligned 15-minute windows: a track degrades when p50 ≥ max(base×ratio, base+min_delta) or ok-rate ≤ base−drop, and only counts after
min_windowsconsecutive degraded windows. An episode opens only on cross-confirmation: network-level (one egress group's quality reference points mostly degraded) or path-level (one destination /24 degraded from that egress group's view, ≥2 targets, with the ≥2-vantage rule degrading to ≥2 targets when only one vantage watches). Attribution rides inside the episode: same-window (±30min) egress identity changes (adjacent echo rounds with differing public-IP sets), path changes on the involved targets, whether other egress groups degraded too (destination-side hint), and the dominant failure shape (dns/connect/timeout/tls classification). Per the #716 ruling,alert_requires_attribution(default true) keeps unattributed episodes recorded-but-silent (UI yellow); attributed ones firequality_degraded, resolution firesquality_recovered(dedup-paired per episode). The system quality-matrix targets stop emitting per-targetprobe_failed/probe_recovered(their tracks feed the detector instead — dozens of flaps/day from a flaky reference point were pure noise); manual/autogen targets keep them. Episodes live inprobe_ext.db(quality_episodes), served byGET /probe-quality/episodes?days=&active=; openapi + both generated clients updated. UI: a probes-page degradation banner (60s cadence; red = notified, yellow = recorded-only) opening a 24-hour episode list (sharedEpisodeDetailcomponent: before/after metrics, attribution, status), change-history rows for the two new event types, notification-rule event options with labels (plus the previously missingspeaks_with_new/listen_port_addeddisplay labels), and the dashboard's probe-quality card marks actively-degrading vantages. Config:probe.quality.episodes.*. -
Probe: agent-side egress + path reporting — the vantage cards light up (#716/#718/#719): agents now run the same egress echo rounds and zero-privilege path traces as the center and report them home, so the probes page's "Egress & Paths" panel shows every vantage, not just the center's. Protocol (all backward compatible): a new
egressplan command pushes the echo-source set + cadence to agents that declared theegresscapability (fingerprint-deduped and refreshed like probe plans; disabling egress on the center ships one empty clearing plan); theprobeplan payload gains atraceblock (categories/interval/max_ttl/per_hop, only for agents declaringtrace— a Linux-only capability, where the tracer lives) and each spec carries its center-derivedcategory; agents batch results toPOST /agents/egress-reportandPOST /agents/path-report(agent-token auth, the reporting agent's identity overrides any vantage claim, failed batches park and retry — the #554 pattern). The center enriches reported public IPs with origin ASN through its one Cymru cache, re-derives target names from the live rows, and recounts visible hops; path snapshots additionally fire right after a failed probe (trigger=failure, rate-limited to one per target per 10 minutes). The agent tracer adds a defense-in-depth reserved-address gate (loopback/link-local/multicast/documentation literals are refused; private ranges stay traceable). Rust:egress.rs(HTTP/STUN/DNS echo sources, /proc/net/route local layer) +tracer.rs(a semantic port of the Go tracer: per-TTL TCP connects with a hash-fixed source port and IP_RECVERR error-queue walking, ICMP ping sockets with seq-carries-TTL and IP_RECVTTL reply TTL); openapi + both generated clients updated. -
Probe: egress identity recording + zero-privilege path tracing, first landing (#716/#718/#719): the probes page gains an "Egress & Paths" panel whose collapsed header always shows the current public IP (plus AS and pool size), and whose expanded view shows per-vantage egress cards — the distinct public IPs observed by a multi-transport echo-source set (HTTP/STUN/DNS, configurable, replaceable with self-hosted sources), origin ASN enrichment via Team Cymru, and the local default-route gateway — plus the latest traced path to every external/quality target (resolved IP, hop list with RTTs, reached TTL, reply TTL) and a "Trace now" button. Recording only: per the #716 ruling, egress/route changes never notify on their own. The data lives in a new side database
data/probe_ext.db(the heartbeat.db pattern — additive DDL, no SchemaVersion bump, binary-swap upgrade), swept byretention.probe_ext_days. The tracer needs zero capabilities (TCP connect / ICMP ping sockets with IP_TTL + IP_RECVERR, ICMP reply TTL via IP_RECVTTL); config:probe.egress.*(default on in the example config),probe.trace.*. New APIs:GET /probe-egress,GET /probe-paths,GET /probe-targets/{id}/paths,POST /probe-targets/{id}/trace. Agent-side egress/path reporting (so agent vantages fill their cards too) lands in a follow-up. -
Probe: synthetic HTTP probes send a product User-Agent (#713): some public sites reject common tool UAs — www.qq.com answers Go's default
Go-http-client/1.1(and curl's) with 501 — so the built-in egress-quality targetquality-http-qqfailed on every center run and the center's domestic verdict sat atdegradedpermanently. Both probe HTTP paths (option-less andexecuteHTTPOptions) now sendMiBeeSteward-probe/<version> (+https://github.com/Mi-Bee-Studio/MiBeeSteward), and the engine andRunTargetbuild their executor from one constructor so the two paths cannot drift apart again. Heartbeat checks against LAN devices keep Go's default User-Agent (unchanged).
Changed
-
Web: Network Center typography and spacing pass: measured against the running instance rather than eyeballed, and every item was a wrong value, not a preference. The view rendered with no page gutter at all (
padding: 0px— content flush against the sidebar and the place tab bar while every other page uses 24px), and it ran on thirteen discrete type sizes (10/11/11.5/12/12.5/13/14/15/16/17/18/26/28px) in which the page heading (28px) and the KPI numbers (26px) carried the same weight, so nothing read as more important than anything else — now exactly the app's six steps (12/13/15/17/19/26) with title > KPI > body restored. The three metric cells did not line up between cards (repeat(3,1fr)let a long egress IP widen its own column — 117.6 / 106.2 / 106.2px measured), and fixing that surfaced two follow-on defects worth recording: equal columns first clipped192.0.2.10to121.8.49..., and allowing a break then split192.0.2.11across two lines and made that one card's metric row taller than its neighbours'. Addresses now stay on one line and shrink throughclamp(12px,1.05vw,13px). The segmented control's selected state differed from unselected by seven levels of luminance (24,24,27 vs 31,31,35), which reads as "nothing is selected" — it now uses the primary tint the rest of the app uses, with hover and focus-visible states. One sentence appeared three times ("点击卡片进入网络详情": the section note plus both card footers); the note is gone and the card CTA is just "详情". Also: the interconnect teaser wore the address style (monospace, no wrap) for a full sentence and overflowed its card, the quality-strip segments get rounded ends, the 24px section top margin no longer doubles up with the stats block's 24px bottom margin, and under 760px the metric labels wrapped mid-word ("设备 / 在" / "线") until the cells were tightened. -
Web: the sidebar holds places, not features — 13 entries became 5 (IA rework): the nav was organized by what the software can do, so every new capability added a row: an admin's sidebar had thirteen entries across three groups, and the daily-use items were buried among occasional ones. It is now organized by where a person goes to do their job — 总览 / 资产 / 网络 / 观测 / 系统管理 — and capabilities live inside each place as a tab bar. 资产 absorbs devices, changes, archive, fingerprint coverage, documents and the four-page scan center; 网络 absorbs the network overview, the segment registry and the collector fleet; 系统管理 absorbs users, the audit log and the settings centre (profile/password/2FA/appearance plus the admin sub-pages). Routes and URLs are unchanged — the grouping is SvelteKit route groups, so every existing bookmark, deep link and API path still resolves, and back/forward walk tabs because tab state is the path.
devices/+layout.svelte's tab bar moved todevices/(scan)/+layout.svelte(one level down, same five destinations). The settings footer link now renders only for non-admins, who never see the admin place. Page-level headings that only repeated the tab name (device list, changes, documents, archive, fingerprints, segments, collectors, users, audit, and the four scan pages) were removed so one fact appears once; their action buttons and one-line descriptions stayed. A regression test pins the five-entry shape and the sub-route highlighting, so a future capability that grows the sidebar fails CI instead of silently making it longer. Diagnostic aid from the same pass: the in-app browser's frozen animation clock makes a light-theme switch read as "still dark" in screenshots — computed colours are correct once transitions are disabled, so themes were verified with transitions suppressed. -
Archive: IP is not device identity — archived records keep their address as history (#737, SCHEMA v10 — upgrading requires a database rebuild): an archived record's
ip_addressis the LAST address the device was recorded at, and IPs get reassigned at any time — yet the identity resolver was archive-blind, so a new occupant of an archived record's address silently morphed the entry (a MAC-less stranger updated it in place; a never-seen real MAC ADOPTED the record by filling its MAC; a swap-in took the archived row over as a replacement — and one archived device returning could then restore into an address an active device already held). The (ip, network) slot is now unique among LIVE rows only (devices(ip_address, network_id) WHERE archived_at IS NULL— SchemaVersion 10), and every slot/fallback/holder lookup in the identity engine is archived-blind: a new occupant of an archived record's address starts its own row, the archive entry stays exactly what it was (IP preserved as history), and an archived device still returns through its own MAC (primary identity) — at the recorded IP (restore clock starts) or at a new one (roam; the record follows its device). IP-only records (never collected a MAC/hostname) render in the archive as 「未识别设备 · 仅 IP 记录」 with the column relabeled 「最后记录 IP / MAC」; restoring into an address an active device now holds is rejected with a 409 and an actionable message until the duplicate is resolved (edit the address or delete the tombstone); the auto-restore skips the same way. Heartbeat/route/neighbor attribution prefers the live row when an archive record and a live row share an address. Upgrade note (the project's standing doctrine): crossing a schema boundary means backup → fresh database → rescan repopulates; archive entries do not survive the rebuild and re-accrue as devices cycle offline. -
agent-rs: DNS replies with chained compression pointers parse again (#714): the agent's DNS decoder followed at most one compression pointer per name and rejected the rest as "double pointer", but RFC 1035 lets a pointer's target itself end in a pointer — the shape DNSPod uses for CNAME answers. Every agent run of the built-in
quality-dns-dnspodtarget therefore failed, steering the agent egress verdict toupstream_resolverand naming DNSPod as the culprit. Pointers are now followed repeatedly under a 16-jump cap, so pointer loops still fail fast. The same decoder parses mDNS and reverse-DNS replies, where a parse error silently dropped the whole packet; those packets are read now too. -
agent-rs: http probes send the product User-Agent (#713): parity with the center's probe fix — agent http probes now send
MiBeeSteward-probe/<version> (+https://github.com/Mi-Bee-Studio/MiBeeSteward)instead of no User-Agent, so both tracks of a target present the same identity to the probed site. -
agent-rs: UDP DNS probes retransmit inside the timeout budget (#715): the agent's hand-rolled DNS client fired exactly one UDP query — one dropped packet failed the whole probe. On the affected armv7 agent that meant ~25%
i/o timeouton the built-inquality-dns-*tracks over three days (500/1,960 runs; 31probe_failed/probe_recoveredflaps) while the same box's TCP/53 direct check ran at 99.9% — the upstream drops UDP/53 per-packet at 50–87% inside minute-scale clusters, independent of transaction id.udp_querynow makes up to 3 attempts inside the caller's timeout (same socket / stable 5-tuple, fresh transaction id per attempt so a late reply to an earlier attempt can never satisfy a later one), matching the center's RetryProber ladder. Covered by fake-resolver tests (drop-two-then-answer, all-dropped). -
Scanner: rtsp services no longer auto-seed a TCP:554 heartbeat (#731): every heartbeat tick opened a bare TCP connection to the camera's RTSP port — and on small streaming devices (ESP32-class cameras with a self-built RTSP server) every accept hatches and tears down a FULL RTSP session (task threads), so the 30s default tick was a 2,880-per-day "session hatch → discard" churn that became the trigger schedule for periodic memory corruption on one such device. rtsp now returns no heartbeat spec (the MiotHandler precedent): the device falls through to the bridge's device-level ICMP fallback — liveness is what the heartbeat wants from a camera anyway, and the CameraHandler already reasoned "cameras may drop RTSP without the host being down". Operators who want port-level RTSP monitoring can still add a TCP heartbeat manually. NVR made the same call for its reconnector (NvrRtsp #711, 5s floor + Retry-After).
[0.9.0] - 2026-11-07
Added
- Docs: the archive/ledger portfolio gets its tour + upgrade callouts (#670): the Web UI tour (en/zh) gains the Asset Archive & Ledger section — the archive page, the six-source dossier timeline, and the tags dictionary settings, all with screenshots captured through the sanitizing proxy — and the device-inventory / dashboard sections now describe the ledger badge, tag chips, lifecycle filter, and the two ledger-caliber cards. The deployment guide (en/zh) calls out the two schema-8→9 fresh-database realities: the archive learner's window restarts from deployment day (a known-cycle device needs ~one cycle of re-accumulated appearance points before smart exemption re-engages;
force_activeprotects it immediately), and ledger columns / tag assignments exist only from the new database onward (the old inventory's CSV export is the practical migration source). - Asset ledger: lifecycle / owner / asset number go live (#669): the #662 schema columns now have their API and UI. Devices gain an editable ledger state — lifecycle (
in_use/spare/repair/lent/retired, enum-checked with a typed 400), a free-text responsible person (owner), and the organization's asset number — on create and partial update. A physical asset with neither IP nor MAC is a first-class device: manual rows carry NULL network_id and SQLite's unique index treats NULLs as distinct, so IP-less assets coexist andasset_nois their identity (the search box now matches owner and asset_no too, so ledger-only assets stay findable). The devices page gains an exactlifecycle_statefilter (dropdown, rides the URL like the other filters) and an inline lifecycle badge on non-in_userows (the population norm stays quiet; spare/repair/lent/retired get muted state-colored chips). The dashboard's overview aggregate grows two ledger-caliber cards: lifecycle distribution (fixed-state-order bar, ACTIVE devices only — archived devices are out of the working inventory) and device count by tag (per dictionary tag, a device counts once per carried tag so the sum may exceed the total; top-8, count-sorted). openapi + both generated clients updated; en/zh. - agent-rs: self-network reporting + blank-cidr fallback fill (#686): agents now detect their host's actual IPv4 on-link subnets from
/proc/net/route(pure parsing, no new deps: little-endian hex, on-link rows give each interface's subnet, the default-route row names the primary, link-local and lo skipped) and ship them inmeta.self_interfaces(name/cidr/primary; absent on detection failure and on older agents — the wire shape is byte-compatible, pinned by the golden-shape test). The center consumes it as a FALLBACK in the #19 networks.cidr backfill: when the agent's configurednetwork_cidrclaim is absent, the detected primary fills the bound network's blank cidr instead — never overwriting an established value (same non-clobber rule, mismatch still logs). Deliberately NOT persisted in agent_status (that would need a schema bump) and NOT a sqlc query (sqlc 1.31.1 truncates multi-bind UPDATE text — re-confirmed with both an''literal andLENGTH(x) = 0; note extended in db/queries/networks.sql): the fill rides the existing raw-SQL backfill path. - OpenWrt installer: multi-LAN detection (#688): the first-install config generation only ever looked at
network.lan— on multi-LAN routers (lan2 / extra static bridges) the other segments never reached the generated config nor the operator's attention. The address math moved into a self-containeddeploy/openwrt/detect-lans.sh(POSIX ash, no ipcalc required, stubbed-uci test harness committed alongside) that enumerates EVERY static interface —lanfirst, others in uci order, dhcp/pppoe skipped by design, iStoreOS CIDR-form ipaddr handled. install.sh takes the first segment for the config'snetwork.*identity as before, and prints the additional segments with a pointer (declare them on the Networks page or deploy one agent per segment — the YAML schema binds one network per center). Shipped in both the tar.gz and the .ipk;check-openwrtcovers the new scripts (CR scan +sh -n). - First-scan completion guidance (#687): the scan-task page now snapshots whether the inventory was empty when a run is triggered; when that run completes with live hosts, the plain "scan done" toast is replaced by a celebratory "First scan complete — N devices discovered!" with a 15-second window and a View devices action that jumps to the inventory — the first-run journey previously dead-ended at a five-second toast. Reuses the toast system's existing action slot (no new component); best-effort detection means a failed stats probe just falls back to the normal toast, never a wrong celebration.
- First-use checklist on the dashboard (#683): after the browser first-run password setup, admins landing on an empty dashboard get a three-step card above the attention banner: (1) create your first scan task — one button that opens the #678 detected-networks picker; (2) an optional "-demo preview" hint the user acks; (3) a multi-network pointer to the Agents page. Steps 1 and 3 complete themselves from server state (a scan task exists / an agent is registered), so the card tracks reality instead of clicks; the whole card retires permanently — persisted per center origin in localStorage — once every step is done, the user hides it, or the first scan puts devices on the board. Plain state, no tour-library dependency; en/zh.
- Scan forms no longer lie about defaults (#685): the task form's pre-filled pipeline silently disagreed with the backend — port_scan
22,80,443,8080,9100vs the backendDefaultPipelineConfig's22,80,443,9100, prometheus9090vs9090,9100— so a task saved without opening the advanced section ran different ports than the form displayed. The default now lives in ONE place (web/src/lib/utils/pipelineDefaults.ts, used by the task form and the pipeline editor's fallback andfullpreset) and is pinned byte-for-byte to the backend by a unit test. The quick-scan timeout field also stopped pretending: the sync handler floors any per-host value below 5s to 10s (multi-probe pipeline floor), so the 1-10s field defaulting to 2 was really 10 — the field now offers 5-10, defaults to 10, and says so next to itself (en/zh). - Zero-config first run: a missing config file is generated, not fatal (#682): the bare-binary first-use path used to end before it began — no config file meant an immediate abort, and the old default
-configpointed atconfigs/config.example.yamlwhose placeholderjwt_secretis rejected by validation, so./mibee-stewardin a fresh directory exited with an error. Now the default config path isconfig.yaml, and when that file (any-configpath) does not exist, the server generates a minimal valid one — random 32-bytejwt_secret(base64, file mode 0600), emptyinitial_admin_passwordso the browser first-run setup creates the admin password, defaults everywhere else — prints where it wrote it plus the URL to open, and keeps starting. An EXISTING file is never rewritten, however broken (that failure still belongs to the config error);allow_reserved_targetsandmaster_keyare deliberately not seeded.doctorandreset-admin-passwordalso default toconfig.yamlfor consistency (their behavior is otherwise unchanged; deployments passing an explicit-config— every package unit file — are unaffected). Thedoctor/resetdefaults previously pointing at the example file also made baremibee-steward doctorfail on fresh directories;make dev(go run ./cmd/server/) now boots a fresh instance out of the box. - First-use one-click scan task: the center detects its own networks (#678): new read-only
GET /api/v1/system/network-interfacesenumerates the host's IPv4 interfaces (UP, non-loopback, link-local skipped) as scan suggestions — on-link CIDR, a/24-clamped suggested CIDR (a/16DHCP lease no longer tempts a 65k-host first scan), naming-convention kind classification (lan/wireless/virtual/vpn:br-lancounts as LAN,docker0/veth*/br-<id>/cni/flannel/cali*as virtual,wg/tailscale/tunas VPN), the default-route primary marker (UDP-connect route resolution — a routing decision, no packets), container detection, andbridge_container/no_lanwarning keys (10/8 is deliberately NOT a bridge signal — real LANs live there). UI: the dashboard's Scan Network button opens a detected-networks picker — multi-select with LAN-like interfaces pre-checked; one daily-2am task per selected network is created with the default pipeline and triggered immediately, landing on the run page; the quick-scan and scan-task forms gain a "Use My Network" prefill.internal/netinfois unit-tested; openapi.yaml + both generated clients updated (route covered by the parity contract test). The reserved-space rejection semantics of #317 are untouched — detected networks are RFC1918 by construction. - Scan-target forms: frontend parity with the backend's target rules (#684): what the backend rejects on submit is now rejected at typing, with a human explanation instead of a raw Go error string. New
analyzeScanTargetmirrorsinternal/cidrutilexactly — reserved-space rejection with both-endpoint overlap semantics (127/8, 169.254/16, 224/4, 255.255.255.255, 240/4, unspecified;126.0.0.0/7-style half-reserved blocks caught via the last address), explicit IPv6-unsupported wording, and reversed last-octet ranges — andvalidateScanTargetnow delegates to it, so the quick-scan, task, and agent-command forms all gain the checks. The forms also show what used to be invisible: an address-capacity count with the 1024 (synchronous) and 4096 (task) cap warnings at exactly the backend's strict->boundary, and on the task form an executor hint — a single-CIDR target normalized against the registered networks says whether the run will be dispatched to the network's bound agent or executed on the center itself (mirroringResolveNetworkFromTargets), resolving the "which box will scan this" mystery. Unit tests pin the cidrutil corpus, the boundary caps, and the normalization; all existingvalidateScanTargettests pass unchanged through the delegation. - Asset archive + tags: schema foundation (#662): the devices table gained the archive lifecycle columns (
archived_at,archive_pin(''/force_archive/force_active), per-devicearchive_offline_days_override,online_since,periodic+periodic_cycle_days) and the ledger columns (lifecycle_state,owner,asset_no); new tables:asset_archive_events(the permanent archive lifecycle event stream — change_log's 30d and device_liveness' 7d retention cannot back a 60-day pattern-learning window),tags(dictionary) anddevice_tags(M2M); the legacy free-textdevices.tagscolumn is deprecated. SchemaVersion 8→9 (fresh-DB policy unchanged). - Asset archive engine: auto-archive replaces physical deletion (#663): a scanner-discovered device offline past the threshold (per-device override > global
archive.offline_days, default 7d; no-MAC devices take a 24h fast lane) moves to the archive —archived_atstamped, full history preserved — instead of being physically deleted (the oldsilent_device_*prune is retired; the roamed-orphan duplicate reap is the only remaining device-row delete, a duplicate is not an asset). An archived device continuously online ≥archive.restore_online_minutes(default 60) auto-restores into the asset library; brief 1-2 blips only recordonline_blipevents (also the data source of the pattern learner) and stay archived. Pins override everything:force_activeis never auto-archived,force_archiveis never auto-restored. Manual devices (scan_source != 'scanner_v2') respond to manual archive only. Every transition writesasset_archive_events; thresholds re-read from the settings overlay every engine tick, so runtime changes apply without restart. - Archive smart exemption: the periodic-pattern learner (#664): devices that keep coming back on a stable cycle (e.g. appear once a month) are no longer auto-archived. The learner reads appearance points from
asset_archive_events(manual operations excluded — people are not device behavior) and recognizes a pattern at ≥3 points spanning ≥archive.smart.min_history_days(default 60) with adjacent intervals within ±25% of their median → the device is stampedperiodic+periodic_cycle_days. The exemption only engages while the effective threshold stays belowarchive.smart.max_threshold_days(default 30 — a month-scale threshold should not be second-guessed) and the pattern is alive (last appearance ≤ 2× the cycle; a stale pattern must see the device actually return once before it can re-exempt). A pattern recognized on an already-archived device auto-restores it. - Tag dictionary + archive API suite (#665, #666): tags move from a free-text column to a proper dictionary (
internal/external/temporary/pendingseeded idempotently, built-ins delete-protected) with per-device M2M tagging, batch tagging, and a backfill of the legacy column; the devices list/detail carrydictionary_tagsand a?tag_id=server-side filter. Archive API:GET /archive(paginated),GET /archive/{id}/dossier— the six-source dossier timeline (archive events, change log, config versions, TLS certificates, documents, sightings merged newest-first),POST /devices/{id}/archive|restore(a manual restore breaks aforce_archivepin and clears it), andPUT /devices/{id}/archive-settings(per-device threshold override). - Archive UI: the archive page + tags UX (#667, #668):
/archivelists archived devices with periodic/forced badges and the archive time, manual restore (force-breaking a pin asks first), and the pin toggles; a row opens the/archive/[id]dossier timeline./settings/tagsmanages the dictionary (built-ins protected, color picker per tag). The devices page gains the tag filter, inline tag badges, batch tagging over selected rows, and excludes archived rows by default (archived=three-state param); the device editor's free-text tag box became a dictionary chip multi-select. Top-nav entry; en/zh throughout. - Topology view: interactive 2D/3D dual renderer (#635): the L2 topology graph (devices page → Topology) can now be rendered by either of two interchangeable canvases behind one contract — the existing ECharts 2D force graph and a new three.js 3D scene (toggle in the toolbar; the choice rides the URL as
&dim=3dso it is shareable/reloadable). The 3D scene finally delivers what the 2D comments always promised: a Y-axis LAYER BAND (gateway on top, switches/routers, then access, endpoints at the bottom) with a deterministic layout (phyllotaxis seeds + a fixed number of manual force ticks — the same graph always lays out the same way, and theme/freshness rebuilds re-resolve colors without restarting the layout). Interactions mirror 2D: drag empty space = orbit, wheel = zoom, drag a NODE = move it on a camera-facing plane (hand-placed positions survive poll rebuilds; edges and badges follow), click node/edge = the same detail panels, double-click = the device page, and a hover info card (name · IP · type · status · brand — 2D's ECharts tooltip parity) identifies any point without clicking. Node identification got its own control group: color by layer / by device type (six buckets — network gear, cameras, computers/servers, mobile, smart devices/IoT, other; the root/core LAYER always classifies as network gear regardless of the vendor string the scanner reported, so hiding "other" can never delete the gateway and its edges) and label density auto / all / none (a 94-node graph can label every point). The type chips double as click-to-filter toggles (same interaction as the layer pills and the edge-type legend; filters combine, edges drop with their endpoints). Both canvases consume one set of renderer-agnostic style rules (sizes, ring badges, the edge opacity ladder, search dimming) extracted into pure functions, so the two views cannot drift. Engineering: the three.js + d3-force-3d bundle (~640 KB) is a separate lazy chunk loaded on the first 2D→3D toggle; WebGL-less environments stay on 2D with a hint; the render loop carries a frozen-clock watchdog (500 ms without a frame falls back to a setTimeout driver, keeping embedded-browser/webview hosts rendering); CSS2D labels are real DOM text. Verified on the ARM rig against 94 real devices / 279 edges. - Agent command coalescing at enqueue (#648): the pull model has no backpressure — while an agent is offline the scheduler kept enqueueing a command per tick, and the serial poller then ground through the whole backlog on reconnect (observed: 650+ pending rows after a day-long center outage, fresh probe plans starved behind hours of stale rescans). Two rules now bound the queue without losing work: a
probecommand is a full-plan snapshot, so a newer plan deletes any still-pending one (delete-then-insert); an identical still-pendingscan(same payload bytes — json.Marshal sorts map keys, so the bytes are deterministic) is returned as-is. Run-row supersession semantics are unchanged. Verified in the routes test suite (the #390 dispatch test now pins the coalescing semantics). - agent-rs: DNS retry in the http prober (#649): a transient resolver failure (the center's own name flapping during a router restart) no longer fails a probe run as a hard error — host resolution is retried before the attempt is scored.
- agent-rs: agent-side remote-ops opt-in gate (#650):
remote_ops_enabled: falseinagent.yamlnow actually gates the command executor (restart / config-reload / logs-tail are refused with acomplete failedreason) — the Go→Rust port had lost the agent-side half of the switch (the center-side fleet toggle remained). Defense in depth restored. - Probes page: fetch every target page (#651): the probes list read only the first page of
GET /probe-targets— with more targets than one page, later targets silently vanished from the management UI (they kept probing; the page just didn't show them). The page now follows pagination until exhausted. - Notification delivery resilience: bounded delayed-retry window (#633): a retryable delivery failure (receiver briefly unreachable — an alert center restarting, a network blip) no longer dies after the fast 3-attempt ladder. The dispatcher parks the job and requeues it with growing backoff (30s doubling to a 5-minute cap, swept every 15s) until
notify.retry_window_minutesexpires (default 30; negative disables, restoring the old give-up-after-ladder behavior); expiry writes the final failed row. In-memory only by design — zero schema change, and a window deliberately does not survive a restart (documented). Verified live: with the receiving Bell stopped, a Steward notification parks; restarting Bell inside the window re-delivers and logssent. - Configurable liveness thresholds: the two notification-declaration boundaries from the #608 wiring are now config keys instead of constants —
probe.notify_fail_threshold(consecutive failing runs beforeprobe_failed; 0 = default 3, range 1–10;MIBEE_PROBE_NOTIFY_FAIL_THRESHOLD) andagent_fleet.offline_threshold_minutes(staleness beforeagent_offline; 0 = default 10, range 1–1440;MIBEE_AGENT_FLEET_OFFLINE_THRESHOLD_MINUTES). Field-tuning without recompiling; defaults and behavior unchanged. - Agent fleet liveness events (#608 follow-up, MiBeeBell integration step 3): a dead agent is a blind network segment — now it says so. A new
agentwatch.Sweeper(30s cadence) evaluates every fleet row'slast_report_atagainst a 10-minute threshold (two fully quiet cycles at the recommended 300s probe cadence): going stale emitsagent_offline, the next fresh report emitsagent_recovered(change_log rows withentity_type=agent, identity inagent_id+ after_data snapshot — zero schema change). First sight adopts the current staleness silently (a center restart must not synthesize stale alerts). The rule engine grew a third path: agent rules are scopeallonly, per-(rule,agent/<id>) cooldown; the alert envelope mapsagent_offline→error/agent_recovered→infowithsource_ref: agent/<id>pairing firing/resolved. UI dropdown + openapi enum gain the two types. - Agent-vantage probe tracks emit liveness events too (extends the probe liveness entry below): the transition detector is now keyed per (target, vantage) track and
IngestAgentResultsfeeds it with each agent-reported result — a site fine from the center but dead from an agent's network (vantage-local outage) declares its ownprobe_failedwithtags.vantagenaming the track. All tracks of one target share the notification identity (source_ref: probe/<id>), so a site failing on every vantage still dispatches once per rule cooldown window. Agent tracks have no persisted per-vantage state and start fresh after a center restart. - Probe liveness events wire into notifications (#608 follow-up, MiBeeBell integration step 2): the probe engine now detects per-target liveness transitions and drives the existing notification rule engine — a target failing 3 consecutive runs (deliberate flap damping;
fail/timeoutboth count) emitsprobe_failed, the first success after that emitsprobe_recovered(change_log rows withentity_type=probe_target, zero schema change — the table's change_type/entity_type columns were always free-form). The rule engine grew a dedicated path for these: probe rules support scopeallonly (a probe target probes an arbitrary endpoint and is not network-scoped), payload identity comes from the live target row (survives renames) with the recorder's after_data snapshot as fallback for deleted targets, and per-(rule, target) cooldown keys onprobe/<id>. In the alert envelope (formatalert)probe_failedmaps toerror/probe_recoveredtoinfo, and both carry the stablesource_ref: probe/<id>so the dedup key pairs firing/resolved per target across renames. UI: the rule form's event dropdown gains the types (en/zh); openapi enum updated. - Webhook alert-envelope format — generic external alert-center integration: the generic
webhookchannel gains aformatconfig field.raw(default) keeps the historical Steward payload byte-for-byte;alertPOSTs a receiver-agnostic alert envelope{type, severity, title, body, source, source_ref, tags, resolved, dedup_key, occurred_at}— the minimal universal alert shape, so any external alert center (self-hosted MiBeeBell being one instance, not a special case) can consume severity/firing-resolved/dedup semantics. Severity maps deterministically from the event type (device_lost→error, recoveries/additions →info, identity/visibility changes →warning; Steward never emitscritical— escalation is the receiver's job).*_recoveredevents carryresolved: trueAND the samededup_keyas the event they resolve (key type-segment is the firing event), so receivers pair firing/resolved the way Alertmanager pairs group keys;dedup_keyis<source>/<type>/<source_ref>withsource_refthe stable device identity (MAC → IP → name), giving receivers per-device cooldown windows for free.sourcedefaults tomibee-steward, overridable per channel. UI: payload-format select + source field in the channel form; docs:docs/{en,zh}/integrations.mddocument the full contract.
Fixed
- Tags management page: admin buttons never rendered (#676 follow-up of #667): the admin gate read a property directly off the auth store object, which is always
undefinedoutside the store's reactive context — so the Edit/New/Delete buttons quietly never appeared even for admins. The gate now subscribes to the store. Also (#677): built-in tags display localized names by key (internal/external/temporary/pending show their zh names on a Chinese UI); a user rename is treated as an override and takes precedence over the localized default. - Topology: edges to unidentified neighbors never rendered (#636): an adjacency whose far end was only a MAC (no matching device yet) got target id
-1from the graph builder with a "component handles it" comment — but no component ever created that stub node, so ECharts silently dropped every such link while the legend still counted them (canvas missing edges, legend inflated). The renderer now synthesizes one dashed stub node per unseen MAC (grouped,(unknown)collapsing MAC-less edges) and re-points those links at it; clicking the stub explains "unidentified neighbor". Verified live with a phantomdevice_neighborsrow: legend count and canvas edges agree. - Topology: edge freshness and offline dimming never advanced on a static page (#637): the 60s poll's change-detector signature covered structure only (node ids +
from>to:protocol) — not per-edgelast_seenor per-nodestatus— so an unchanged skeleton short-circuited every poll, and the staleness verdicts (10 min generic / 5 min WiFi, #585) were computed once at option-build time: a ghost edge never faded unless the user poked the page. The signature is now a puretopologyFingerprint(structure +last_seen+status, order-insensitive) so silent polls deliver freshness data, and a 30s freshness tick re-resolves the time-driven styles (positions are id-stable across the merge, so the force layout never restarts); the edge panel's "last seen" age ticks along. - Topology: double fetch on mount + stale colors after a theme flip (#638, #639): mounting fired
/topologytwice (onMount and the networkId$effectboth raced; the first response was discarded) — the effect owns the first fetch now. And every canvas color was resolved from CSS variables once at option-build time: adata-themeflip re-initialized the chart but re-served the same stale option, leaving the old theme's colors. Both canvases observedata-themeand rebuild (toolbar pills/legend re-resolve too). Verified: mount requests 2 → 1; a theme flip moves the canvas from 100% old-theme pixels to the new palette. - openapi:
TopologyEdge.protocol/DeviceNeighbor.protocolenums lagged the implementation (#640): the backend emitsspeaks-with(materialized traffic edges, #500) and the neighbor table transparently carriesQ-BRIDGE-MIB/STPfrom agent reports — none were in the enum; androute-tableedges (with their dest_subnet/next_hop metadata, #528) had no frontend style and fell through to the grey default. Enums extended (both clients regenerated), handler comment synced, and route-table edges got their own blue-dashed identity. A pinned test asserts the fallback for genuinely unknown future protocols. - Topology: frozen-clock embedded browsers rendered a blank 3D canvas: PR3's fade-in tween and the 3D render loop were driven by
requestAnimationFrame— hosts with a frozendocument.timeline(embedded browsers/webviews; the same hosts where WAAPI/CSS animations never advance) never fire rAF, so the canvas painted zero frames and the fade stuck at its start opacity (and CSS2D labels, attached on render frames, never appeared). The render loop now carries a watchdog: no frame within 500 ms switches to a setTimeout driver (~30 fps); the fade tween uses setTimeout with a 400 ms full-opacity backstop. - Notification channel with empty config returned 200 with an empty body: a create/update request that omitted
config(or sentnull) stored""innotification_channels(the column'sDEFAULT '{}'never applies — the INSERT names the column), and every later read of that row failed JSON encoding; because the response helper writes the status header before encoding, the failure surfaced as HTTP 200 with an empty body, breaking channel list/get for as long as the row existed. Write-side normalization now defaults blank/null to{}and rejects non-object config with a 400 (ErrInvalidChannelConfig); a read-side backstop re-defaults any pre-existing empty rows. Regression tests cover create/update/read paths and the invalid-config rejections. - doctor: empty
auth.initial_admin_passwordis healthy, not a failure (#679): empty is the installer default (deb/rpm postinst, OpenWrt install.sh) and a designed path — the passwordless admin is created and the first login redirects to the browser setup flow (POST /auth/setup). The old fail verdict made the systemd unit's ExecStartPre block a freshly installed instance and painted every new install's doctor run red. Doctor now reports ok ("browser first-run setup will create the admin password"); the config-matrix test pins the new arm. - quick-start described the first-run flow backwards (#680): both language versions claimed an empty
initial_admin_passwordaborts startup (it is the browser first-run path), the minimal-config sample forced a password, and the troubleshooting table repeated the wrong claim. Corrected en/zh (both password paths documented), and the troubleshooting table now points atmibee-steward doctor. - devices empty state pointed the wrong way (#681): with an empty inventory the devices page told you to create a device by hand while the dashboard said to run your first scan — and the first scan lands you exactly on the devices list. The empty state now matches the dashboard (same copy plus a "Scan Network" CTA to the scan-tasks page); manual create stays on the page toolbar.
- Scan-task page: completion feedback survived slow scheduler pickups (#695): a trigger whose run row took longer than ~5 minutes to appear (observed: 2.5-5.5min scheduler pickups on a loaded rig) hit the poll budget and the completion toast silently never fired — the page stopped watching right before the scan ran. Polling now degrades instead of giving up: after 5 minutes without a run row it drops to a 15s fallback cadence (one "still waiting, you'll get the notice" heads-up at the transition) and keeps watching for up to 2h, so the completion toast lands whenever the run finally appears. The trigger's pre-run stub no longer claims "Running" while nothing is scanning — it renders as a muted "Queued" badge (with a tooltip explaining the wait) and offers no Cancel, since gocron's RunNow is fire-and-forget with nothing to cancel yet. An open page also no longer goes blind: a 15s silent refresh (visible tab only, paused while a modal is open) feeds the task list and auto-attaches run polling, so cron-tick runs, triggers from another tab, and late pickups all surface without a manual reload.
scheduler.TriggerNowlogs "scan trigger accepted" so the gap to executeScan's "scan job started" measures pickup latency on the ops timeline. Also fixes a latent #687 bug: the first-scan celebration toast's View-devices action calledgoto()without importing it — clicking the CTA threw a ReferenceError instead of navigating.
[0.8.0] - 2026-10-24
Added
-
deb/rpm native packages (#620): every release now ships
mibee-steward(center) andmibee-agentpackages for the Debian and Red Hat families -.deb+.rpm, amd64/arm64/armhf (= armv7hl), built by a new nfpm pipeline (deploy/nfpm/recipes +make package-deb/package-rpm/package-agent-deb/package-agent-rpm; the newdeb-rpmrelease job reuses the release binaries and builds the arm center binary itself; checksums inSHA256SUMS.deb-rpm). The package layout is the binary-deployment (方案 A) layout exactly -/opt/mibee-steward, the shipped systemd unit (numeric uid 1000), logrotate as a no-clobber config file, the backup script - so package installs and manual installs are interchangeable. Lifecycle mirrors the OpenWrt installers' doctrine: first install GENERATES the config (random jwt_secret, browser first-run admin password, plain-HTTP LAN cookie) and opens + persistsping_group_range; upgrades never touch config or data; purge removes the generated config but deliberately keepsdata/. The agent package adds a dedicated system-level unit (agent-rs/deploy/systemd/, unprivilegedmibee-agentuser, config +agent.dbunder/etc/mibee), derivesnetwork.name/cidrfrom the default route, and stays stopped until center credentials are filled in.make check-nfpm(committed-tree CR scan +sh -n, wired into CI's packaging gate) guards the sources. The packaging-landscape survey behind this (deferred: apt/yum repo, HA add-on, Helm; rejected: snap/flatpak/AppImage/brew/SPK/QPKG with reasons) is recorded in #620-#624. -
Egress-quality window chips + the 7d/30d trend (#608 follow-up, 2026-10-24): the quality panel now answers "over time", not just "right now". Window chips (15m / 1h / 6h / 24h) widen the live matrices' lookback — the API always accepted
windowup to 1440 minutes (0.57s measured on the ARM rig), the UI just never exposed it. Below the matrices a new trend charts each config group's per-vantage ok-rate over the last 7 days (hourly buckets) or 30 days (daily buckets), served byGET /api/v1/probe-quality/history?days=7|30: aggregation is pushed into SQL (one row per target × vantage × bucket — a 30-day month is a few hundred bucket rows, not ~800k raw results), then Go replays the EXACT same verdict chain per bucket (cross-vantage target-down isolation included); per-bucket latency is the documented approximation (mean success latency stands in for p50). A verdict-colored strip under the primary group reads at a glance. Raw probe results keep their 30-day retention (retention.probe_results_days), so the 30-day chart starts wherever the data starts; the read-time "no state table" doctrine from #608 is intact. Tests: 4 service-level (bucket shape, range/granularity switch, per-bucket isolation, non-system exclusion) + 3 page-level (window refetch, trend render + range switch, empty-state hint); page suite 31. -
Probe options + the dns module (#605, parent #603): probe targets gain a per-module
optionsJSON block, stored on the row and shipped verbatim to vantage agents. http:method(GET/HEAD),expected_status(exact allowed codes, empty = the legacy <400 rule),keyword+keyword_mode(contains / not_contains / regex, body inspection capped at 1 MiB),ignore_tls_errors(default false = verify TLS, the explicit opt-out for self-signed internal sites); tcp:sendpayload written right after connect +expectbanner match (expect_mode). A NEWdnsmodule lands with it (bare-domain target;recordA/AAAA/CNAME/TXT,resolverhost[:port] with 53 implied — empty = the system resolver,expected_ipsintersect assertion on A/AAAA answers). Option-less targets keep bit-for-bit legacy semantics; fields foreign to the module are rejected at CRUD time instead of silently no-opping. Deliberately no custom headers or credentials anywhere in options: they are plaintext in the DB and must keep the agent command channel secret-free. The demo seed grows to four targets, including a dns example (demo-dns, dns example.com). -
Agent 0.2.0: probe parity, capability declaration (#604): the Rust agent executes all five probe modules. tcp and dns execution added — tcp was a live bug (plans were shipped to agents but execution failed "unknown module"); http now VERIFIES TLS by default (behavior change: 0.1.x accepted any certificate;
ignore_tls_errorsis the per-target opt-out), matching the center's posture; icmp and tls accept hostnames (system resolver);cert_trustedis a real webpki-roots verifying handshake replacing the old self_signed approximation; failed report batches park-not-drop (bounded 100-batch oldest-first queue, 4-attempt 1s→8s backoff ladder, 4xx terminal — the reporter's #554 pattern); first runs stagger deterministically over each target's first minute so a fresh plan does not march in lockstep. The agent declaressupported_modulesin its report meta →agent_status.supported_modules, and the center's dispatcher filters plans per agent by that declaration — legacy agents (≤0.1.x, no declaration) are assumed{icmp, http, tls}and held back from tcp/dns plans with a one-time upgrade hint logged. Running tcp or dns vantage targets therefore requires mibee-agent 0.2.0+. -
Device-bound probe targets + discover-then-probe autogen (#606):
probe_targets.device_idoptionally binds a target to a discovered asset (GET /probe-targets?device_id=filters; device deletion unbinds — auto targets are disabled by the detach, manual and system ones keep running unbound), and the newprobe.autogenpolicy (default OFF — it writes rows on its own) auto-creates device-boundsource=autotargets from discovered services: http/https services get http targets, every other TCP service a plain port probe, vantage preferring the device's own network's agent (probing across the WAN back-haul would measure the tunnel, not the service). Lifecycle: a service that leaves the scan parks its target (kept for history), a reappearance revives it, manual targets are never touched, and the population is capped (max_targets, default 100) on a 15-minute reconcile sweep. Division of labor, stated once and enforced by shape: heartbeat answers device reachability, probing answers service-level semantics. The UI side: per-service one-click probe creation on the device page, a bound-targets panel, and a read-only "service not in latest scan" badge. -
probe.max_concurrency(#607): the probe engine's concurrency semaphore is configurable (default 8 — the historical hard-coded value; 0 = default, capped at 64) instead of hard-coded. -
Network egress quality (#608):
probe.qualityseeds a system matrix of public probe points (source=system, vantageall) executed from EVERY vantage — center + all agents — and analyzed per network over a sliding window (default 15 min, read-time aggregation, no state table). The verdict chain is deterministic —egress_down > dns_fault > upstream_resolver > degraded > ok— with cross-vantage target isolation (a target failing on ALL vantages is target-side and excluded from network verdicts; needs more than one reporting vantage so a single-vantage wholesale failure still reads as the network's outage). The diagnosis semantics are structural: two public resolvers give a DNS differential, a DNS-free direct-IP TCP leg (223.5.5.5:53) separates "resolution broken" from "egress dead", 204 endpoints measure plain HTTP reachability, and the international group is reference-only — cross-border variance is its own signal, not an egress fault. Every value is configurable (groups, thresholds, cadence — nothing hardcoded); a bare config defaults quality OFF (the normalizer does not force-enable), whileconfigs/config.example.yamlshipsenabled: trueas the recommended value. Served atGET /api/v1/probe-quality?window=(CapProbeRead); verdicts and scores export asmibee_probe_egress_verdict{vantage,group,verdict}/mibee_probe_quality_score{vantage,group}gauges refreshed on a 1-minute loop — metrics only, notification wiring deliberately not built. Reseed semantics: config edits refresh system rows, a config entry removed deletes the row with its history, a UI-deleted row reseeds on restart (remove it from config — or disableprobe.quality— to delete it for good), and disabling parks the matrix. -
Schema v8 (#609):
probe_targetsgainsoptions(JSON),device_id(optional device binding),source(manual|auto|system) and thednsmodule CHECK;agent_statusgainssupported_modules. Fresh-only doctrine unchanged — crossing from generation 7 is backup → remove the old DB → start fresh → rescan (agents also need 0.2.0+ for tcp/dns plans, see #604). -
Probe doc drift fixed (#610): the 拨测/probes sections in
docs/{en,zh}/web-ui.mdhad claimed DNS support since #277-era copy edits while no dns module existed — with #605 shipped the text becomes true, and every probe doc surface (features, api, architecture, distributed, configuration, agent-rs, introduction, comparison, product-scope) now states the module set exactly as http/tls/tcp/icmp/dns plus the options/binding/quality surfaces; drifted enum comments inopenapi.yamlwere corrected in place. -
Self-hosted opkg feed (#563):
make feed-indexturns the built.ipkpackages (center + agent) into a self-contained feed directory — opkg-standardPackages/Packages.gzindexes withFilename/Size/SHA256sumstanzas — that any static file server can host. Routers subscribe once via/etc/opkg/customfeeds.confand upgrades become plainopkg update && opkg upgrade(or the LuCI package page). The generator (scripts/make_opkg_feed.sh) digs the control metadata out of each ipk (the./-prefixed gzip-tar members) and is busybox-compatible; the CI openwrt job smokes the index shape on every PR. Index stanzas carry per-package SHA256sum so opkg verifies downloads against the fetched index; the index itself is unsigned (usign signing is a follow-up) — serve it from a host you control. Field-verified on the rig: a router subscribed to a feed hosted on the LAN sawmibee-steward 0.7.3from the index with install state untouched.
Changed
- Probes page redesigned health-first (2026-10-23, tightened 2026-10-24 after rig feedback): the page now answers "any problems right now" before anything else. A summary bar leads with the failing-target count (per-module breakdown, one-click Problems only filter), the worst egress verdict per vantage, and certificate expiry counts. The target list sorts failing/timeout rows to the top of their section with an error tint, prints a failing track's error message directly in the status cell (full text on hover), and clicking a target's name opens an expandable troubleshoot row — per-vantage latest results, full error text, quick actions (probe / history / certificate / edit) without opening the history modal; the certificate column's days-left badge is itself the chain button now. The per-module overview cards (a success rate riding on single-sample noise, duplicating the section summaries) are gone; their one useful signal survives as the failing-by-module breakdown on the summary bar. Layout iteration 2 (user feedback: "make it friendlier, collapse by default"): the egress-quality and certificate panels moved up between the summary bar and the list as one-line collapsible headers, the three list sections default COLLAPSED — each header carries its count, a red failing badge, and the enabled/ok/failing summary so nothing is lost folded — and search/filter matches auto-expand the sections they hit (folding back when cleared). The trend is a collapsible sub-block inside the quality panel whose query runs only on first open. Pure presentation — no API, schema or config changes; the page suite pins the behavior (31 tests, 33 with the trend). Docs screenshots re-shot through the sanitizing proxy against the new layout (probes.webp + pb-probes.webp, en/zh) and the playbooks walkthrough rewritten to match; web-ui/api already updated bilingually.
Fixed
-
Probes page 429 storm on autogen fleets (field-reported 2026-10-24): the certificate badges fired one
GET /probe-targets/{id}/certificatesper tls/http target on EVERY 10-second list poll — fine at hand-managed scale, but an autogen fleet (50+ http targets on the rig) burst 50+ parallel requests per poll and blew the global 600/min/IP rate limit, filling the browser console with 429s. Certificates are collected by the probe engine per RUN, so the page now stamps each fetched cert with the target'slast_run_atand refetches only targets whose run advanced — steady state is 1-2 requests per poll (the targets that actually ran), failures cache as empty until the next run (a rate-limited sweep cannot retry-loop), and even the cold-start sweep goes out in chunks of 5. Page test pins the once-per-run behavior (32 tests). -
TestBackfillHostServiceUUIDs time-bomb defused (2026-10-24, latent from #618): the #612 backfill test pinned the "recent" device's
last_seento the hardcoded'2026-10-19T00:00:00Z'while its "stale" twin seeded at insert-time now — five days after the test was written, "recent" aged past "stale" and the suite failed on any checkout. The twin is now explicitly pushed 24h into the past, so the semantics hold forever. No product code touched. -
Agent-fed service data chain made consistent (#612): three interlocked defects starved agent-scanned networks of service identity data. (1) A passive discovery batch (the agent's between-scans sweeps — and an agent restart re-reports its WHOLE LAN with every probe field empty) hit the device bridge, whose UPDATE overwrote
open_ports/detected_servicesunconditionally — one passive batch cleared the scanned-in services of the entire network (field-observed: lan-63 went 33/33 → 0/33). Passive batches now assert liveness/identity only: the store keeps the existing service columns when the report carries no observation (the same CASE-keep doctrine brand/model already had), while an active scan that genuinely observed no services still clears stale ones; a host FIRST seen passively gets a canonical[]instead of the empty preserve-marker. The center's own passive discovery sources get the same protection. (2) The anti-entropy hash fast path (matchingX-Network-State-Hash→ bridge skipped) meant a wiped row could never recover — every later scan batch hashed the same as before the wipe and was skipped forever. The stable path now carries a reconcile rider: report hosts carrying services while their center row's columns are empty are re-bridged right there (ack gains areconciledcount; steady state costs one indexed SELECT). (3)host_services.device_uuidwas resolved at write time only, so rows written before their device row existed sat empty forever on networks that never re-run RecordServices (fresh center DB: 67/67 empty) — a startup + hourly background sweep backfills them from the device now holding the ip (most-recently-seen wins). -
Five dangling i18n keys + a coverage guard (user report 2026-10-19): the devices pages' error branches referenced four message keys that existed in NEITHER catalog (the invalid-id empty state on the device detail page, the invalid-IP hints in the CSV import preview, the networks-load-failure chip) and the TLS cert row called a
certificates.ViewCertkey that never existed (optional-chained, so the aria-label silently degraded) — every one on an error path no test exercised, which is why CI never caught them. The four missing keys are added to both catalogs, the cert row now uses the existingcertificates.ViewDetailskey, and a new vitest guard (i18n-coverage.test.ts) enforces three invariants from now on: en/zh key-set parity, no CJK leakage in English values, and every statically referencedm['…']key must exist in both catalogs — a future dangling key failsnpm test, not the field. -
HTTP Server headers no longer brand devices: the last-resort
httpServerToBrandfold could only ever produce denylisted web-server names (nginx/Apache/Caddy/IIS/lighttpd — every possible output is a denylist member), so an unknown-vendor box fronted by nginx showed “nginx” as its BRAND — a false vendor claim in an asset registry (the rig carried exactly five such rows, incl. an fnOS NAS branded “nginx”). Both folds (Go + Rust agent) now never brand from the Server header — the SSDP path had made this same call long ago, the HTTP path finally matches it; the Server string stays visible in the service/identity evidence. The store's junk-brand heal now also clears a stored denylisted/letter-less brand when the scan carries NO real brand (not only when one arrives), so the five legacy rows self-heal to an empty brand on their next scan; curated brands (user edits) are never touched. Reported brand coverage drops honestly — the cleared rows were never real identifications. Product decision 2026-10-17. -
Web-server brand denylist becomes a shared data layer read by both stacks (2026-10-15 daily-round handoff): the junk-brand denylist (nginx, Apache, MiniDLNA, … — software names that must never become a device brand) lived as TWO hardcoded arrays, one in the Go orchestrator and one in the Rust agent's fold, and they had drifted: the Rust copy was missing
sdk(an fnOS Server-header regression field-found 2026-10-12), so agent-folded brands the center would have rejected kept passing on the wire. Single source of truth now:configs/fingerprints/web-server-brands.txt, synced into the Go embed (internal/service/scannerv2/web_server_brands.txt) and the Rust agent assets by the newmake sync-webserver-brands; CI's asset-drift check fails when either copy drifts, and tests on both sides pin the parsed nine-name list (comments skipped, lowercase). -
Garbage hostnames are now gated on every path, agent and local alike (completes the 2026-10-15 mojibake handoff): the center-side
plausibleHostnamegate landed 2026-10-16 on only two of the four fold entry points (hostname evidence and the TLS-CN fallback), leaving the mDNS and NetBIOS folds un-gated — and the Rust agent had no gate at all, so a broken NBNS/mDNS decoder's mojibake (the field rig's binary-garbage hostname row) rode the wire into the center. Every write site now gates in BOTH stacks: the four fold entry points (hostname evidence, TLS-CN, mDNS, NetBIOS; Rust mirrors the Go semantics — valid text, no control runes, CJK marketing suffixes like TL-XDR3040易展版 pass, and Rust rejects the lossy-decode U+FFFD marker where Go saw invalid bytes) plus the agent's PASSIVE sweep (DHCP-lease and DNS-sighting names — the field-found row's mojibake arrived through exactly this path, live-verified on the rig). On the center, the agent-wire conversion gatesHostname/SysNamebefore they reachdevices.nameor scan_attributes, and a garbage-name heal overwrites rows still carrying pre-gate mojibake as their display name (fill-when-empty semantics alone would keep the junk forever; plausible names, user edits included, are never touched). -
Multi-network centers: a scan run follows the TASK's network, not the wiring-time singleton (the R68S zero-edge residue): scheduled scan tasks carry their own
network_id, butRun()used the singleton network resolved once from confignetwork.name(empty → "default") for every network-scoped step — device tagging survived only via MAC-primary identity, while ARP injection, edge derivation, lost detection, subnet recording and the local anchor all ran against a network that holds nothing (on the soft-router rig: both LAN scans completed, zerodevice_neighborsrows). The run now adopts the task's network for its whole finalize chain, with a loopback end-to-end test pinning the tag. -
Agent-scanned networks finally get topology edges — the zero-edge graph on the distributed rig (2026-10-16 sweep): three breaks stacked to render the graph edge-less on every agent-scanned segment. (1)
deriveTopologyEdgesonly ran in the local-scan finalize, so wire neighbors reported by agents sat indevice_neighborsforever without atopology_edgesrow — the agent-report ingest now materializes them after each applied batch. (2) No agent ever reported adjacency on an unmanaged network: agent-rs 0.1.8 derives the gateway star from its own/proc/net/arp+/proc/net/routeafter each scan (gateway pick: default-route gateway when it lies INSIDE the scanned subnet → the subnet's first address when present in the ARP table → the router vantage, where the agent itself is the gateway and its LAN-interface MAC — read from sysfs via the ARP table's device column — is the star center) and ships oneARPwire neighbor per alive host. (3) The center-local ARP star mis-picked its center on the router itself: the default route points at the WAN upstream (outside every scanned subnet, no device row), so on a soft-router center every edge resolved to nothing and the step produced zero rows — the same three-tier gateway pick now scopes the choice to the scanned CIDR and falls back to the box's own anchored interface MAC. After both fixes the rig graphs render the real gateway stars (lan-62 and lan-63 both centered on the bridging router) plus the existing route-table edge. -
Unbound scan tasks scope by their target CIDR (the R68S residue, layer 2): the task-network fix above assumed tasks carry
network_id, but the rig's transplant-era tasks carry NULL — created before per-task binding existed, only their target CIDR identifies the network. Such tasks now resolve the network whosecidrcontains the first parseable target (identical CIDR or containing row), so the whole finalize chain lands on the right network even for pre-binding task rows; regression test pins the NULL-network_id shape. -
扫描结果 page no longer empty on agent-only centers:
scan_resultsrows were written only by the local Runner's persistHost, so a center whose every network is agent-scanned (the distributed rig) showed "暂无扫描结果" while scans ran every cycle and the dashboard logged runs. Scan-origin agent reports now write per-hostscan_resultslinked to the network's pending dispatch-run (the same runbackfillAgentRunStatscloses), with the same field shape the local path writes; passive trickles and run-less batches are skipped (no honest linkage). -
"上次确认存活" no longer freezes on continuously-online agent devices:
last_online_atcomes from thedevice_livenessseries, but only state TRANSITIONS sampled it — the lease sweeper writes anonlineverdict only on offline→online recovery, and center-side heartbeat probing deliberately skips agent-managed networks, so a device that had been up for weeks showed its last transition (on the rig: Oct 7) next to a scan that had seen it minutes ago.RecordAliveSnapshotsnow samples anonlineverdict per alive host per report, throttled in the heartbeat service to one row per device per 5 minutes so the series gains honesty without write amplification. -
Heartbeat configs no longer display "间隔: 0秒 · 超时: 0秒": agent-reported heartbeat configs carry interval/timeout
0meaning "use the service defaults" (the prober falls back to 30s/5s), and the device-detail tab printed the raw zero. Zero now renders as the localized "default" (tooltip: follows the global heartbeat settings), and the edit form prefills the effective defaults instead of an invalidmin=1zero. -
"远端" badge tooltip no longer claims federation for plain agent segments: every read-only mirror device (agent-managed OR federated peer) showed "镜像自联邦对端网段" — wrong copy for a home LAN scanned by its own agent. The badge now says the segment is managed by an agent / federation peer and edits belong at the data source; the topology layer pills also carry
aria-pressedlike every other toggle pill. -
Topology orphan ocean collapses into a group node + enrichment guidance (#584): the default deployment shape (center on a plain box, eBPF/hostapd off) yields an ARP star at best — on the demo data, 4 edges and 15 floating islands (75%); the force layout filled the canvas with zero relationship information and gave no hint how to change that. Degree-0 nodes now collapse by default into one dashed group node ("no topology data · N devices") that opens a member list linking to each device (one pill expands them back, layer filters respected); the capability surface was already complete — WiFi associations, device-to-device traffic, SNMP wiring — so a guidance row names each unlit edge family and links straight to the settings page where its source is enabled (hostapd on a router-form agent, passive observation, SNMP credentials for managed switches).
-
Topology edges show freshness; ghosts fade (#585):
topology_edgesalways carriedlast_seenbut the API dropped it and the UI drew every edge as a live connection — a WiFi client that left the AP kept its amber association forever (#539 fixed the data side and explicitly deferred this UI half), and an offline device's edges rendered at full strength. The topology payload now carries each edge family'slast_seen(neighbor-derived, speaks-with, materialized route-table; OpenAPI + clients regenerated), the graph fades and dashed-izes edges past their freshness threshold (10 minutes generic, 5 minutes for volatile WiFi associations) and dims any edge with an offline endpoint, and the tooltip + link panel show "last seen: N min ago" with a "possibly stale" flag. Unknown age never fades. -
Topology edge-type legend + weak-evidence hierarchy + port-missing explanations (#583): the graph drew seven edge styles but the legend only explained node layers, so a grey dotted ARP inference read the same as a green solid LLDP wiring fact. The legend now lists every edge type actually present (line-style swatch + name + count; unknown protocols included), each pill toggles its whole type on/off like the layer pills; weak-evidence types (ARP, speaks-with) render fainter than hard facts even at full visibility and carry a "weak evidence" tag in the legend; and the link panel explains a missing port per protocol instead of a bare dash (ARP infers from the gateway table, speaks-with has no port concept, LLDP/CDP neighbor didn't report, Bridge/STP need SNMP credentials) — the graph's most valuable troubleshooting fact now has a way forward, not a dead end.
-
Escape closes modals in every dispatch shape (#582, #567 residue): the modal answered Escape only for keydowns that bubbled up to its backdrop (Svelte-delegated), so non-bubbling synthetic KeyboardEvents - the JS constructor default, common in automation and key injection - never reached a handler, and with focus outside the modal the event never traversed the backdrop at all (the app layout carried a querySelector-click-X workaround patching exactly that half; both half-fixes are now retired). The Modal owns Escape via a document-capture listener registered while open: capture observes the key regardless of target, focus position, or bubbles; an open-modal stack guarantees only the topmost modal answers when modals stack, the event is claimed outright (no double onClose), and the closable=false in-flight lock keeps its "Escape works again once the request settles" semantics. Tests pin the non-bubbling case, the focus-outside case, single onClose per keypress, and the lock.
-
Demo seed probe targets stay in documentation namespaces (#572): the demo seed's tcp probe target was
1.1.1.1:53- a live Cloudflare anycast address demo installs dialed every 60s, violating the demo contract (RFC 5737 ranges / RFC 2606 domains only, never real infrastructure) and producing constant failure noise on isolated demo boxes. Seed targets now use TEST-NET-3 and example.org hosts, and the seed test pins the documentation-namespace rule for probe targets the way it already did for device IPs. -
Demo banner no longer breaks the app shell layout (#566): the demo-mode banner rendered as a flex child of the
h-screenshell between the sidebar and main, stretching into a full-height column - at 1280px the dashboard crushed to ~440px with vertical text, at every width a dead strip ran the full screen height and intercepted pointer events across it. The banner is now afixed bottom-0strip that is pointer-transparent except its own wipe button, and main reserves the strip height so content scrolls to rest above it. -
Modal close no longer depends on an animation finishing (#567): Svelte outro transitions wait on the Web Animations clock, and in hosts whose document timeline never advances (embedded webviews on old tablets/kiosks, jsdom, some Electron hosts)
onfinishnever fired -openflipped false but the backdrop+dialog DOM lingered forever, shadowing the page and swallowing every pointer event under it; X / cancel / Escape / successful saves all "did nothing" and only F5 recovered. Closing now removes the DOM on the spot (no outro), and the intro is transform-only (in:scale): a frozen clock degrades to a 0.95-scaled but fully visible and usable dialog instead of an opacity-keyed fade that would pin the scrim invisible. New component tests pin all close paths against an animate stub whose onfinish never fires (jsdom already provides exactly that pathology). -
DELETE /api/v1/users/{id}now exists (#568): the UI's row-level delete button called an endpoint that was never implemented - every single-user delete answered chi's sub-router 404 while the row stayed in the list (only the batch endpoint existed). New UserService.DeleteUser + handler mirror the batch path's self-delete guard, answer a real 404 for missing IDs, and audit-logadmin.user.delete; OpenAPI declares the operation, Go + TS clients regenerated, handler tests pin success/404/self-delete/invalid-ID. -
i18n / a11y batch (#569): backend errors arrive as English literal strings (no error codes on the wire) and rendered raw into the Chinese UI - getErrorMessage now maps the strings users actually hit (reserved-address-space scan guard #317, same/weak password guards, user-delete self guard, scan server-timeout) to localized copy, bilingual message keys added, unknown strings still pass through so operators keep exact diagnostics. The topology link/node detail panels' close buttons carry the localized aria-label instead of hardcoded English "close" (screen readers read Chinese pages in Chinese). The users-page modals' inputs have proper label for/id associations (create/reset/scope forms were unnamed for assistive tech). The login form's stale error banner is cleared when the forced-password-change modal opens.
-
Quick scan no longer false-fails on long synchronous scans (#570): the API client hard-coded a 30s timeout for every request, but POST /scanner/scan holds the request open for the whole scan (a demo /28 of unroutable documentation IPs with 2s probe timeouts ran 36s server-side) - the UI reported "request timeout" within seconds while the server completed fine, inviting duplicate submissions. The client gains a per-request
timeoutMsoverride and the scan call passes a 5-minute budget (the cancel button aborts earlier); tests pin both the 30s default and the override with a hanging fetch under fake timers. -
Root-level
GET /healthreturns health JSON instead of SPA HTML (#571): external monitors, container probes and load balancers that conventionally probe/healthused to get200 + index.htmlfrom the SPA fallback - an API-down process with the SPA still serving looked healthy. The root path now serves the exact same JSON as/api/v1/health(registered next to/metrics; OpenAPI parity test extended, bilingual API docs note the alias). -
Toast robustness + ECharts teardown race (#573): repeated identical toasts (same type + message) merge into one row with a ×N counter and a restarted dismiss window instead of stacking duplicates; hover now really pauses auto-dismiss (previously only the CSS progress bar froze while the store timer kept running and dismissed mid-read); and toast removal no longer waits on an outro transition (the same frozen-animation-clock pathology as #567 - the store dropped the toast but its DOM lingered forever). The heartbeat tab's one-off
Cannot read properties of undefined (reading 'off')on first open is fixed: Chart's event-binding effects captured the reactive instance variable, and the unmount teardown disposed + undefined'd it before the effect cleanup re-read it - the cleanup now unbinds from the same captured instance it bound to.
[0.7.3] - 2026-10-13
Added
-
agent-rs coverage ratchet (#559): the Rust workspace now has the same coverage floor the Go side has had — a dedicated
agent-rs-coverageCI job runscargo llvm-covover the whole workspace and fails below the line coverage pinned inagent-rs/coverage-floor.txt(lcov LF/LH totals, the closest analog of Go statement coverage; computed from per-file summary records so cargo-llvm-cov's text-table reshuffles cannot break the gate).make coverage-agent-rs{,-gate,-bump}mirror the Go targets, the floor only ever moves up, and dev/CI measurement differences are absorbed by the initial conservative floor (re-pinned from the first CI run's number). Local gate verified both directions against a real measurement (76.6% current, 73.0 initial floor). -
Federation phase 2: mirror freshness + cross-segment bridges (#556, #557 — the two follow-ups flagged when #379 closed). An agent/peer-managed segment is only as fresh as its owning agent's last report — during the 2026-10-12 migration an agent sat silent for 19 minutes and nothing on the UI could tell (#554's field find). The networks list now carries
agent_last_used_atplus a derivedagent_staleflag (5-minute window, the same rule as the Agents page's Active state, computed per request — nothing persisted, recovery is automatic): a stale segment swaps the neutral "Remote" badge for an amber "Remote · stale" one with the last report time, dims its device rows, warns next to the network filter, and the Networks page shows the last report per agent-managed segment. Viewer-visible by construction — the fact rides the plain /networks read, not the agent-management API. On the graph side, the multi-homed presence facts of #526 finally have a face: a device present in more than one segment (the dual-NIC router, the box bridging the LANs) is the cross-segment link point, so the topology graph marks those nodes with a blue ring + label marker and a count pill, and every presence entry in the node card names its segment (name · CIDR · address+ reporting vantage, hydrated server-side onto the topology payload) instead of a bare#idchip. OpenAPI + generated clients updated both sides. -
Agent-side interface/route fusion - the wire gap #528/#529 shipped with (deployment-review find): the interface census and route-table collection landed with the center-side extraction pipeline, but
ReportedHostcarried nointerfaces/routesarrays - agent (and federated-peer) collection was silently dropped at the wire boundary while local scans worked (the rig verification had only exercised the local path). The wire format now carries both arrays (Go + Rust parity, same channel doctrine asneighbors),ReportedHostToReportrebuilds them as interface/route evidence soApplyReport's extractors land them exactly like a local scan, and the embedded peer reporter ships them too. -
Read-only center federation (#379): two centers can mirror each other's segment - each fully manages its own network, and holds a near-real-time device-portrait mirror (list + detail) of the peer's devices. Zero new wire protocol: the embedded peer reporter (
peer.*config; ported from the retired Go-agent Reporter) ships scans and passive discoveries over the exact agent-report channel the Rust agents use, so the peer's ingestion, anti-entropy state hash, lease liveness, and change events all apply verbatim. Nothing else is shared - not probe targets, documents, TLS chains, backups, credentials, or any command dispatch (a peer can never trigger scans/probes/reboots in the other segment). Setup is pure existing API: create the peer's network row + mint a token on it (minting stampsnetworks.agent_id). The network-origin read-only fence guards the mirrors: every mutating route (device edit/delete, batch delete/status, systems, documents, heartbeat configs - ~15 routes) returns 403 for devices in anagent_id-managed network, local admins included - hand edits would be overwritten by the next report wave anyway. The fence also closes the pre-existing hole in the plain center+agent architecture (mirrored agent devices used to be editable). The UI hides edit/delete/link for mirrored devices and badges them "remote network" (bilingual). Cross-segment topology link points stay a phase-2 candidate on top of #526's presence facts. -
Interface census + route-table edges - schema window part 2 (#528, #529, generation 7): the IF-MIB + ipAddrTable walk records every port of the device itself into the new
device_interfacestable (ifIndex, name, description, MAC, link speed, and the IPv4 each port answers at - the multi-homed detail a single address row can never express; vanished ports keep their frozen last-seen row).GET /devices/{id}/interfaces+ a detail-page Interfaces panel (bilingual). The ipRouteTable walk (#528) collects every non-direct route; routes whose next hop resolves to a known device materialize topology edges (router -> next hop, viaroute-table, destination subnet in metadata - the more specific subnet wins when routes share a hop), and the topology graph now unions thesetopology_edgesrows with the neighbor-derived set - previously the materialized-edge table had NO reader, so route edges (and any future edge writer) would never have rendered. Direct routes are skipped: the connected-subnet fact already lives in the census and per-network presence. Both probes ship Go + agent-rs parity (same OIDs, same evidence shapes, byte-parity helpers tested); agent reports fuse through the same extraction pipeline as local scans. -
Multi-homed identity + vantage provenance, the schema-v6 window opens (#526, #527): a dual-homed router reported by agents on both of its networks used to ping-pong its device row between their reports at scan cadence (each report read as a roam), and nothing recorded WHERE and VIA WHOM a device was ever seen. Two new tables land in this window (fresh-DB generation 6 — crossing from v5 is the usual backup → new DB → rescan):
device_network_presence(one row per (device, network): the address the asset answers at in that segment, refreshed by every report) anddevice_sightings(append-style address history keyed by (device, ip, mac, vantage, source): same tuple refreshes last_seen/see_count, a changed tuple appends — the roaming/move archaeology feed). Identity resolution: a report from a foreign network no longer roams the row while a fresh presence (24h window) exists elsewhere — the router stays one graph node anchored to its home; a genuine mover (all other presences stale) relocates, and the roam now carriesnetwork_idwith it (previously it lagged forever, feeding the reconcile drift counter). Every bridge apply records a sighting with its vantage (empty = center-local, else the agent id);device_neighborsgains the reportingagent_idcolumn. Query surface:GET /devices/{id}/sightings?limit=&vantage=(new, newest-first), neighbor responses carryagent_id, topology nodes carry their presencenetworksarray — the graph's node card shows the multi-homed interconnect fact ("which device bridges these segments"), and the device detail page gains a Sighting History panel (bilingual). Rust agent untouched: reports fuse through the same center-side bridge. -
STP port roles + factual root bridge for the topology graph (#525): the STP-MIB probe now walks
dot1dStpPortRole(root/designated/alternate/backup/disabled) alongside the designated-bridge edges, and readsdot1dStpDesignatedRootin the same scalar Get as the bridge address. Each bridge's view lands in the typedscan_attributes.stp(own bridge MAC, root bridge MAC,is_root, per-port roles keyed by ifName) — no schema change, the topology node query extractsstp_rootviajson_extract. The graph'sdetectRoottakes the collected fact as pass 0, ahead of every heuristic (ARP in-degree → router type → .1/degree): a bridge whose dot1dStp walk says "I am the root" IS the root. Neighbor edges carry aport_rolekey, and the device-level evidence survives even on the root bridge itself (where every designated bridge is self and no edge remains — previously the probe returned nothing for exactly the most interesting device). agent-rs gains byte-parity collection (same OIDs, same role names, same ports-string order), and agent-reported evidence fuses through the same center-side fold. The web-ui/playbooks claims about "STP roles on edges" are finally backed by collection. -
Local anchor + MAC-keyed chassis sightings: LLDP/CDP neighbor edges land, chassis-only devices reach the inventory (#522, field-found on the first WITH_LLDP/CDP run): the scan center's own device row never had a MAC — ARP to a local address takes the kernel's loopback shortcut, no wire frame exists — so
RecordNeighborsByMACresolved the local end of every LLDP/CDP frame edge against nothing and silently dropped the rows; the chassis host-sighting path (Emit(NewHostEvent{IP:""})) was equally dead, unknown MACs were dropped on arrival. Two-part fix: (a) the center fills its own interface MACs into its device rows at wiring time and after every scan (AnchorLocalInterfaces, fill-empty-only, network-scoped — self-healing so the scan that creates the row anchors it in the same pass); (b) MAC-keyed sightings got a real channel — an unknown LLDP/CDP chassis or NDP MAC anchors a device row through the normal device bridge with the#anchor:<mac>placeholder IP (unique by construction, same doctrine as the#park:sentinels, so several chassis rows coexist under the(ip, network_id)unique index), MAC-primary identity merges the row into the identified one when an address later lands, and the ICMP fallback heartbeat seeds exactly then (nothing to probe before that). Identity resolution now treats no-location reports (empty or placeholder IP) as MAC-only — never a slot fallback, never a take-over, never a roam target — so a chassis re-sighting cannot blank a known address, and the display-name chain falls back to the MAC instead of rendering the sentinel. hostapd associations stay enrich-existing-only (an association is the AP's view, not a frame from the client), and a chassis re-sighting of a known device no longer writes a junk WiFi telemetry blob. NDP sightings from the eBPF observer ride the same channel (passive:ebpf:nd), closing the #497 forward reference; the discovery status endpoint gains aMACOnlyAnchoredcounter. -
Review burn-down: the #539 P2/P3 checklist, all 21 items dispositioned (fixed, documented, or explicitly accepted): SSDP description fetch gains a per-USN 10-minute cooldown (every scan cycle no longer re-GETs every UPnP device), the misleading remaining-budget parameter is gone (the fetch carries its own fixed 2s after the listen window — the actual #506 design), a mid-body disconnect aborts classification instead of parsing the truncated XML, and LOCATION hosts in loopback/link-local/unspecified/multicast space are refused outright (#317 belt). Corpus: the ssdp-description rule passes through model_number/udn/device_type, friendly_name now rides the hostname channel (0.8, same tier as NetBIOS), the eBPF mDNS capture gains a query-keyed 0.5 floor identity (previously it never matched ANY rule), and the Android opt-55 rule run is tightened to 28,51,58,59 (present in both known AOSP variants). BPF: the opt-55 window read failing no longer renders zeros, and ARP ops 3/8 (InARP/ATM) no longer record as "reply". Observer: the passive buffer map is ceilinged at 10k IPs (halved on breach — per-IP caps don't cap IP count) and failed starts release the loaded BPF objects immediately. RecordNeighborsByMAC resolves duplicate-MAC rows with the same (status='online', last_seen) ordering as ResolveDeviceIdentity. hostapd: an EMPTY association list still updates the previous-sweep set (a roamed-away-and-back STA is reported again). snmptrap: enterprise OID sub-identifiers decode as BER base-128 (PEN 8072 rendered as .190.56 before). Release checksums list the four shipped center artifacts explicitly instead of a wildcard. Frontend: the WiFi edge style the #505 notes promised (amber dashed) actually exists now. docs/zh/changelog.md: the ten Unreleased entries and 0.7.1's four missing entries are translated. Comment drift aligned (event v3/v4, opt55 12B/name 32B); the ND-chain items stay with #522 and the mac_aliases JOIN decision is documented at the query with #472.
-
WS-Discovery active probe, actually delivered this time (#507): the original PR #519 merged EMPTY (its only commit was an SSDP fix belonging to #506) — review caught that the probe never landed and reopened the issue. The redelivery: a WS-Discovery Probe (SOAP-over-UDP to 239.255.255.250:3702, 2x datagrams, 2s bounded window) eliciting ProbeMatches from ONVIF cameras/encoders and other WS-D speakers — the ACTIVE channel to the stack the passive observer already sniffs. Responses are strictly source-IP filtered (one multicast Probe is answered by every WS-D device on the segment; without the filter a /24 scan smears identities — same discipline as mDNS/SSDP), and the parser unpacks the ONVIF identity: Types, XAddrs, EndpointReference address, and the onvif://www.onvif.org/... scope URIs (percent-decoded: name/hardware become direct corpus keys,
Front%20Door->Front Door). Corpus gains the wsd-onvif-camera rule (NetworkVideoTransmitter or scope identity -> camera @ 0.85); agent-rs gains the byte-parity probe (same datagram, same window, same filter, tag-text XML extraction — no new deps). Probe registered asactive:wsdiscoveryin both registries. Rig-verified on real devices: two ONVIF cameras on the test LAN answered and landed wsdiscovery service rows (0.9775 fused confidence, inferred_type=camera). -
Security fix: the SNMP trap receiver now actually validates the v2c community (#534, review-found regression of #509): gosnmp's TrapListener never checks the community of received packets (its Params only shape sends), so any host able to send UDP to the bind address could land 0.9-confidence evidence and forge coldStart/linkUp sightings into the discovery funnel. The receiver now gates every packet with a constant-time compare BEFORE the throttle (a spoofed packet can no longer consume the real one's 10s window), counts drops in the new
mibee_snmp_trap_community_dropsmetric, and wires a masking slog adapter into gosnmp's own logger (malformed packets were previously swallowed silently; the adapter masks quoted runs so communities never reach logs). The e2e test that passed for the wrong reason (both traps stored, len==1 by throttle luck) is now a true negative-then-positive pair: wrong community → 0 rows, then right community → exactly 1. -
eBPF build hygiene: generation is tag-guarded and build-with-ebpf is self-contained (#537, review-found gap of #512): the bpf2go
go:generatedirective lacked-tags WITH_EBPF, so the generated bindings (embedding the full eBPF ELF) carried only an arch constraint — on any tree that ran generate, they compiled into DEFAULT builds unconditionally, and the "default build needs no kernel artifacts" red line was held up by .gitignore hygiene alone. The directive now passes the tag (generated files gain&& WITH_EBPF),make build-with-ebpfgenerates the artifacts on demand when absent (fresh clones build without the manual "Step 1"; the consumer-lesstc_ingress.opre-build step is dropped from the recipe, the standalone bpf rule stays for C iteration), the stale "runtime needs >=5.8" comment is corrected to the actual 6.6 TCX floor, and the CI optional-tags job asserts the whole contract: the directive keeps the tag, no generated artifact is ever committed, and after generating, the DEFAULT build still passes (no ELF leak) while the tagged build links the loader. -
Flow telemetry: speaks-with edges + asset-anomaly events (#500): the TC observer now accounts traffic — every IPv4 TCP/UDP packet bumps an LRU flow map (
(src,dst,proto,dport) -> bytes/pkts, capacityscanner.ebpf.flows.map_entriesdefault 16384), a userspace exporter drains it everyscanner.ebpf.flows.export_interval(30s) and folds each batch into DEVICE-LEVEL aggregates only (the privacy red line: raw per-port flows never leave memory). Managed-device conversations becomespeaks-withtopology edges (faint dotted, byte totals in tooltips) + a per-device Traffic Profile panel (GET /api/v1/devices/{id}/speaks); the first observation of a managed pair emits aspeaks_with_newchange event for lateral-movement alerting (external first-seen peers stay profile-only — no CDN noise). New listen-watch source (listen_watch.*, default off, no eBPF/no caps needed): diffs/proc/net/tcp{,6}and eventslisten_port_addedon newly opened listening sockets; both event types are selectable in notification rules end to end. Schema v5 (fresh DB across the boundary): newdevice_speaks_withtable, retentiondevice_speaks_days(30d default), OpenAPI + generated clients + bilingual docs updated. -
Rust agent: passive eBPF observer, feature-gated (#498): the center's TC observer now ships in agent-rs behind a default-off
ebpfcargo feature, so every agent vantage can run the passive funnel without the center being on-box. The kernel-side program is shared, not rewritten — the newcrates/mibee-ebpfembeds a byte-identical copy of the center's bpf2go object (thego generatestep now refreshes both copies in one command, and a drift test pins them together; one field-verified verifier artifact, two loaders) — and the userspace loader is aya (pure Rust, no libbpf/BCC, musl-static intact). The shared C program's section was renamed to the canonicalclassifier(both loaders resolve it; thetcalias is cilium-only and aya's parser rejects it — found on the first real-device load). Routing mirrors the center's funnel: ARP presence reports a passive host once per IP and seeds the MAC; signature kinds (SSH/RTSP/HTTP/WS-Discovery/DHCP/TLS-SNI/mDNS/SSDP) becomepassive:ebpf:tcseed evidence riding the host's next scan report — the existing wire, zero protocol change. Kernel floor 5.8 (aya attaches via TCX on >=6.6, classic clsact/netlink below — one notch under the center's TCX-only 6.6); root or CAP_BPF+CAP_NET_ADMIN; BTF optional. Degrade machine ported 1:1 from the center: unsupported host/old kernel/missing caps/load failure log one warn line and leave the source off, active probing unaffected; the capability evaluation is pure Rust unit-tested on every platform, including the off-Linux path. Default builds stay byte-identical (optional, Linux-only dependency — aya never enters them);make build-agent-rs-ebpfbuilds both musl arches with the feature; CI runs the feature-on suite plus an aya object-parse guard on every PR. Field-verified on the armv7 rig (NanoPi NEO, kernel 6.18.44-current-sunxi, root): the aya loader attaches on the LAN interface, real traffic flows (ARP/ND presence, SSDP/HTTP/RTSP banners, WS-Discovery, DHCP from both directions), and an injected DHCP REQUEST with the Android vendor class rides the whole chain (TC -> ringbuf -> drain -> seed -> next scan -> classification) into a dhcp service row on the center's device record; 0.0.0.0 senders drop at the off-network gate. The unprivileged shape degrades with one named-caps warn line (live-tested); the ambient-caps drop-in shape hangs this sunxi kernel's BPF load (the documented center-side quirk family), so that vantage runs the agent as root. Default-build impact measured: +3,744 B (+0.08%, the config surface + self-explaining warn), zero new dependencies in the default graph. -
SNMP trap receiver (#509): devices speaking unprompted - linkDown/linkUp/coldStart/authenticationFailure land as
snmp_trappassive evidence on the source device (gosnmp listener, v2c community-validated + v1; one row per source+trap per 10s so flapping links cannot flood), and coldStart/linkUp additionally feed the discovery funnel. Strictly opt-in (snmp_trap.enabled, default false) - the bind failure path logs once and never blocks the server. ":162" needs CAP_NET_BIND_SERVICE (documented); ":1162" runs unprivileged. Inform ACKs handled by the listener; nothing else is ever sent. v3 traps (USM against the vault) are the designed follow-up - no v3 config keys exist yet. -
agent-rs passive discovery parity (#504): three behavioral gaps between the Go center sources and the Rust agent closed. (1) conntrack LAN endpoints are now reported as new-host sightings (first lifetime appearance, once) instead of only being marked known - and the parser catches the Go semantics the old one missed: the LAN side of a flow is whichever endpoint is inside the CIDR (inbound flows carry it as dst=), LAN-LAN flows contribute both endpoints, and [UNASSURED] entries do not count as liveness. (2) mDNS unicast queries (
scanner.mdns.unicast_queries): each query is also sent directly to the target's 5353, reaching devices that answer unicast but never multicast. (3) dns_log source (scanner.discovery.dns_log): tails dnsmasq --log-queries output with byte-offset resume, rotation reset and a first-sweep EOF skip; every query domain becomes a scan seed and each querying host is reported once. Wire protocol unchanged (report_passive / ReportedHost reused). Rust suite: 144 tests. -
ARP/IPv6-ND passive presence via the eBPF observer (#497): the TC program now recognizes ARP (any op; sender IP+MAC) and IPv6 NS/NA/RS (sender IPv6 + Ethernet MAC), emitting
arp_sighting/nd_sightingevents. These are wire-level presence facts, not service evidence: they route through a new host-sighting callback into the discovery channel (source=passive:ebpf:arp), joining the same dedup/known-host/identify funnel as the other sources - the third capture path for sleeping devices after active scanning and DHCP leases. Throttling lives in the BPF program itself (LRU map, one sighting per sender per ~30s bucket): a 1000-frame gratuitous-ARP storm verified on the rig produces exactly one event and zero ring-buffer drops. DAD probes (sender 0.0.0.0) are filtered in BPF. ND sightings decode the sender IPv6 but wait on the MAC-keyed discovery channel (#522). Field-verified on the arm64 rig (kernel 6.18.44, root): real LAN ARP discovered three live hosts wire-only within the first minutes, and paired identical frames 4s apart produced exactly one discovery event. -
Optional build tags: release matrix, doctor preflight, capability docs (#502): every release now attaches a
-fullcenter binary per arch (WITH_LLDP + WITH_CDP + WITH_ARPSCAN, pure Go, still CGO-free; needs CAP_NET_RAW at runtime) alongside the default unprivileged binary, with flat-name SHA256SUMS.center covering both variants.make build-fullbuilds the same tag set locally; CI gains an optional-tags job that vets, tests, and links the tagged build on every PR.mibee-steward doctorreports per-source state (lldp/cdp listener, arp scan) with the same philosophy as the eBPF check: warn = built or configured but the environment will not deliver, skip = not built/enabled. New bilingual docs page (build-variants.md) with the full tag x privilege x kernel x data-output matrix. Field-verified on the arm64 test rig: the sweep discovered 54 real hosts on its first round, doctor reported every state transition live (skip/warn/ok), and the frame listeners attach and receive - the neighbor-anchor gap the run surfaced is filed as #522.
Fixed
- Rust agent 0.1.7: a 401 from the center no longer silences the reporter (#554, field-found during the 2026-10-12 main-center migration). The reporter treated every 4xx-except-429 as terminal — during the migration's ~3-minute token-restore window both agents received 401s, dropped their batches as "delivered", and one agent stayed silent on scans and reports until manually restarted (systemd still green). But a 401 does not mean the batch is bad; it means the center doesn't know the token right now, which is exactly what a fresh-DB migration with token-preserving restore, or a token rotation, looks like from the outside. Now: a 401 parks the batch in the pending queue (data survives the gap; empty heartbeats are dropped — they carry nothing), ticks go quiet for a 5-minute cool-down, and the first tick after the window re-delivers everything once the token works again — a center rebuild that restores the same token needs zero operator action on the agent side. A permanently revoked token costs one probe request per window. Other 4xx (400/403/409) stay terminal (Go parity: the batch really is undeliverable), and
stop_flushis now bounded on both park paths — shutdown re-parks once instead of spinning forever on a queue that cannot drain. Contract tests pin the whole ladder: park → cooldown no-op → recovery drain (no state hash, gap host survives) → immediate next post; heartbeat-only 401; terminal 400; bounded shutdown against both a 401ing and a down center.
[0.7.2] - 2026-10-10
Fixed
- The LuCI "Open UI" link no longer breaks on firmwares that store the LAN address in CIDR form (field-found on an iStoreOS 24.10 box running 0.7.1, hours after release:
uci get network.lan.ipaddrreturned192.168.60.1/24, so the status page builthttp://192.168.60.1/24:8080— a dead link with a stray/24in the host position). The LuCI helper now strips the/prefixsuffix before reportinglan_ip. The installer had the same unguarded read twice: the closing summary would print the same malformed URL, and — worse — on a firmware that carries the prefix inipaddrwithout a separatenetmaskkey, the first-install LAN-CIDR derivation silently produced an emptynetwork.cidr; the prefix is now used to synthesize the dotted netmask for the common router prefixes (/8, /16, /24–/30) so the generated config gets the right scan range.
[0.7.1] - 2026-10-10
Fixed
- The LuCI passive-discovery toggles no longer report success while changing nothing (field-found on an iStoreOS 24.10.8 rig during the v0.7.0 packaged-install verification, #515):
luci-helper.sh set_sourceonly rewrote an existingKEY:YAML block, so on a config lacking theconntrack/hostapd/dns_logblocks (legacy or hand-minimal configs) the router's Services → MiBee Steward settings page flashed "updated, service restarted and healthy" while the config stayed untouched — the toggles silently did nothing and the service restarted for nothing. A missing block is now appended as a freshKEY:/enabled:pair at the end of the parentdiscovery:block (as a sibling ofdhcp_leases— not right after thediscovery:header, whose ownenabled:must stay its first enabled-like line orread_source(discovery)reads a sibling's value); a block that exists without anenabled:line gets one inserted; with nodiscovery:parent at all the helper fails loudly so the page reports the failure. A failed autostart save also used to show no feedback whatsoever (the flash-message table lacked anenabled_failentry) — it now reports the failure. - The eBPF passive observer never actually worked; it now loads, attaches and degrades gracefully. Three independent breakages meant no WITH_EBPF binary could ever run its observer: the loader used
link.AttachTC, removed in cilium/ebpf v0.22 (the pinned dependency);go generatesilently produced nothing without-tags WITH_EBPF(the generator lives in a tagged file); and the TC program itself could not pass the verifier — the TCP branch read thedoffbitfield container at header offset 12 under an 8-byte bounds check (bounds now cover the full 20-byte header; found on the first-ever live load). The observer now attaches via TCX (kernel ≥6.6), the BPF object is CO-RE-free (self-containedbpf/bpf_standalone.h: UAPI types only, helpers in static-pointer style), so builds need ONLY clang on any host OS — no bpftool, no kernel BTF, no libbpf headers — and load on BTF-less kernels too (#492, #493, #494).
Added
-
eBPF-enabled router packages (#499): the OpenWrt packaging path takes
PKG_TAGS(optional build tags for the staged center binary) andPKG_DEPS(runtime deps into the ipkDepends:/ apkdepend =metadata). The eBPF variant command ships+kmod-sched-bpf +kmod-sched-cls-act +tcdeps - no libbpf (the Go binary carries its loader and the CO-RE-free object), procd root satisfies the caps, and the bilingual OpenWrt docs gain the variant section with the bridge physical-port mounting note and the <6.6 degradation statement. On-router verification (iStoreOS 24.10 / kernel 6.6 class, page-upload channel) is queued for the next release window. -
SSDP device descriptions are now fetched and classified (#506): the UPnP document a SSDP LOCATION points at (friendlyName / manufacturer / modelName / modelNumber / UDN) is the most authoritative structured self-description a UPnP device offers - it was never fetched. The SSDP probe now fetches its target's own LOCATION within the M-SEARCH MX window (listen cut from 3s to the protocol-correct 2s, leaving per-probe budget for the fetch), parses the device node, and merges the identity fields into the ssdp evidence. A new corpus rule (
ssdp-description, presence of model_name, confidence 0.9 fused to about 0.98) carries model/vendor/description into the service identity and the device record. The fetch is SSRF-guarded: only http(s) locations whose host equals the target IP are fetched (no redirects, 64KB cap) - live-proven when a tested router advertised a docker-bridge address and was correctly refused. -
eBPF passive signatures: DHCP, TLS SNI, mDNS, SSDP (#496); DHCP evidence classified (#508): the observer grows from four signatures to eight. DHCP (UDP 67/68) parses the option list for message type (53), vendor class (60) and the parameter request list (55, comma-joined decimal) - all reads helper-based at scalar offsets, so the program stays free of packet-pointer arithmetic. On some kernels the bounded option-walk loop is rejected at load under the ambient-caps drop-in shape with EFAULT while root loads the identical binary (observed on 6.18.44 sunxi); the observer then degrades per the #493 rule and the server keeps running - run that vantage as root if it bites you. TLS ClientHello walks to the SNI extension and captures the hostname; mDNS captures the first query name; SSDP records presence. Event layout v2 (124 bytes) with per-kind confidence: DHCP self-declaration 0.8 (the weight of an active mDNS/SSDP seed), SNI 0.7, presence 0.6. On the identification side (#508): a new corpus file
configs/fingerprints/dhcp.yaml(Android/Windows vendor classes, the distinctive Android 26,28,51,58,59 and Windows 44,46,47 option-55 runs, BusyBox udhcp, presence catch-all) plus a DhcpHandler carrying inferred_brand/type into the device record - the fingerprint channel for devices that answer nothing else (sleeping IoT, pre-sighting phones, static gear). Verified on the arm64 test rig (kernel 6.18.44, root vantage): injected DHCP/mDNS/SSDP frames and real background traffic land as passive evidence with clean field extraction, and the Android vendor-class rule drives dhcp-service and device-brand inference from passive evidence alone. -
WiFi associations now produce topology edges and visible telemetry (#505): the hostapd discovery source already captured STA associations (signal dBm / SSID / connected time) but the data was write-only and wireless clients appeared on the topology graph from nowhere. Each sweep now reports the full association list grouped by AP interface to a neighbor sink that persists AP→STA edges through the #501 MAC-keyed path (protocol
WiFi, local port = the wlan interface,last_seenrefreshed while the association lives).edgeSemanticsmaps WiFi to its ownwirelessedge type at 0.90 - an association is a hard L2 fact from the AP itself. The topology view draws WiFi edges with their own style (amber dashed, distinct from the five existing classes; protocol enum extended in the OpenAPI spec and both generated clients), and the device detail Discovery tab shows the SSID / signal / connected-duration / seen-at fields fromscan_attributes.wifithat the enrich path has been writing all along. The rig verification also exposed and fixed a latent protocol bug: the hostapd ctrl client dialed unixgram without binding a name, and a datagram server can only sendto() the address it received from - the ctrl path was silently deaf against any real hostapd (only the iw fallback ever worked); the client now binds an abstract address, pinned by a Linux-only protocol-level round-trip test. -
The running version is visible in the web UI: the sidebar footer and the login page now show the deployed build's version string (
MiBee Steward vX.Y.Z), sourced from the public/api/v1/healthendpoint — fetched once per browser session (shared store, retryable when the first attempt came back empty) and simply omitted when no version is known. Previously the running version was only visible via the API,mibee-steward -version, or the LuCI status page on router installs (field request, 2026-10-10, filed during the same rig verification). -
Observed subnets are now visible (#503):
GET /api/v1/subnetsexposes the subnets table every scan finalize writes (CIDR, default gateway from the route table, VLAN linkage) - the data existed but had no consumer. Optional?network_id=filter, non-global scopes see only granted networks,{subnets, total}envelope like the VLAN list. The Networks page gained a read-only Observed Subnets card (CIDR / network / gateway / VLAN / last seen). OpenAPI spec, Go client and TS types regenerated. -
Raw-frame LLDP/CDP neighbors now persist into topology (#501): the
WITH_LLDP/WITH_CDPframe listeners used to drop every captured adjacency - the host-event path worked, butneighborSinkwas wired to nil, so frames never reacheddevice_neighbors. A new MAC-keyed repository method (RecordNeighborsByMAC) resolves the listener interface's MAC to the local device (freshest row on duplicates) and upserts with the exact(device_id, neighbor_mac, protocol)merge semantics used by scanned and agent-reported neighbors (empty ports never clobber recorded ones,last_seenrefreshes). Edges materialize intotopology_edgeson the next scan of the network via the existingderiveTopologyEdges(LLDP->l2/0.85, CDP->l2/0.80). The sink runs on the listener goroutine and only writesdevice_neighborsin short transactions, so it cannot interleave with the discovery coordinator's serialized device upserts. Networks without an SNMP management plane now contribute real L2 edges from frames alone. -
eBPF runtime capability detection with graceful degradation (#493): the observer probes kernel version, effective capabilities (naming exactly which of
CAP_BPF/CAP_NET_ADMINis missing) and BTF presence before touching the kernel, and reports a lifecycle state (active/degraded/unsupported/failed/pending/disabled/not-built) with an actionable reason. The red line: any eBPF problem silences the observer only — it never crashes the server nor blocks active scanning. Interface attach is per-interface fault-tolerant (partial attach = degraded); the ring-buffer drain has a consecutive-error breaker so a hot error loop cannot spin;interfaces: []now really attaches to all non-loopback, up interfaces (the old code returned nil and failed to start, contradicting its own doc comment).mibee-steward doctorgains anebpf observercheck that answers "would eBPF work on this host" proactively — kernel version, BTF, caps, with a systemd drop-in fix hint (deploy/mibee-steward-ebpf-dropin.example.conf). -
Verified live on the arm64 rig (kernel 6.18.44) in both privilege shapes: root AND the systemd drop-in shape (non-root user + ambient CAP_BPF/CAP_NET_ADMIN) — the observer attaches, reports active, and real LAN traffic (SSH/HTTP banners, ONVIF WS-Discovery multicast) lands as
passive:ebpf:tcevidence rows (11 passive rows alongside ~90 active rows over two scans of 4 hosts; observer RSS overhead <1 MB vs the comparison instance). The rig also exposed a verifier subtlety, fixed in the same PR: with variable-offset packet-pointer arithmetic the load is rejected for a non-root euid even with ambient CAP_BPF ("pointer arithmetic prohibited for !root", kernel 6.18); the program now reads packets exclusively via bpf_skb_load_bytes into stack buffers (zero packet-pointer arithmetic, IP-option packets skipped), which loads cleanly in that configuration. Unprivileged-without-caps runs degrade tounsupportednaming the missing caps while scans complete unaffected; doctor reports both forms.
[0.7.0] - 2026-10-10
⚠️ Breaking
-
The Go distributed agent (
cmd/agent) is retired and removed; the Rust agent (agent-rs/) is the only agent. The full measured comparison — binary 4.2× smaller, median RSS 4.5× lower (54.1 MB → 11.9 MB on the same ARMv7 board), /24 scans ~1.7× faster, classifier byte-exact via full-corpus difftest, SNMP wire differentials against real net-snmp — lives indocs/{en,zh}/agent-rs.md. Removed together withcmd/agent: theinternal/agentlibrary (its only consumer), themake build-agent/build-agent-linux-*targets, the OpenWrt agent router packages (.ipk/.apk/tarball with the Go-agent init), and the Go agent release artifacts. An existingagent.yamlworks with the Rust agent unchanged (same keys); a Go agent's localagent.dbis not carried over (it was a shadow/ledger — the center's inventory is the record and repopulates on the first scan). Rust-agent router packaging (.ipk/.apk) is a tracked follow-up; the tarball + procd init path (agent-rs/deploy/openwrt/mibee-agent.init) is the documented install. -
Databases from older releases are no longer migrated. v0.7 removes the startup migration chain entirely:
db/schema.sqlis the single DDL source, applied once when a database is first created, and a database whose recorded schema version does not match the build is rejected at startup with instructions to start a new database. Upgrading an existing install to v0.7 means backing up the data directory and beginning with a fresh database (devices repopulate on the next scan). This retires the parallel-DDL bug class for good (#328, #431, #437). The agent's local mini-DB follows the same policy; its local scan history and local SNMPv3 vault are not carried over.
Fixed
- Randomized client MACs no longer force-replace real devices (identity doctrine): a locally-administered (privacy/randomized) MAC reporting at an IP held by a globally-administered (real vendor) device used to walk the same take-over/replacement path as a swapped-in board — a roaming phone grabbing an idle IoT device's DHCP lease would force-overwrite that device's row, mark rows offline, and leave duplicate-MAC rows behind (observed live: one privacy MAC serially replacing three devices on lan-62). Now such a resolution parks the holder (IP claim cleared, identity/history preserved; the real device re-resolves via MAC-primary and roams when it returns) and creates or roams a separate row for the randomized client. Real vendor MACs keep the classic swap doctrine unchanged; randomized/empty-MAC slot holders can still be taken over (vacuum rule). The MAC lookup is also deterministic now (online first, then freshest) instead of rowid order when duplicate rows share a MAC.
Added
-
User guide + agent implementation report:
docs/{en,zh}/user-guide.mdis the complete walkthrough of the web UI (every page, identity rules in one paragraph, troubleshooting quick answers), anddocs/{en,zh}/agent-rs.mdis the Go-vs-Rust agent engineering comparison that backed the retirement, with every number pinned to its measurement source. -
Agent-reported L2 topology (
neighborson the agent report): the agent report payload now carries a per-hostneighborsarray — L2 adjacency edges the agent's LLDP / CDP / Bridge-MIB / Q-BRIDGE-MIB / STP probes observe (neighbor_mac+protocolrequired; optionallocal_port/remote_port/vlan_tag/sys_name/sys_desc/source). Previously those probes' output died inside the agent (the wire payload carries no evidence array and the agent-local DB has nodevice_neighborstable), so the topology view was blind to agent-scanned networks. The center rebuilds each edge intoneighborevidence and records it through the sameRecordNeighborspipeline a local scan uses; rows missing a MAC or protocol are dropped. The Go agent extracts the array fromneighbor-kind evidence with the same(mac, protocol)dedup the center applies. -
Web-managed fingerprint corpus (settings → fingerprints): the admin UI can now upload a corpus (tar.gz/zip envelope, or a single
.yamlreplacing just that file), roll back to the predecessor, check an online upstream for updates (version + added/removed rule diff) and apply it with one click — every path validates through the rule engine's own loader before activation (a broken corpus is rejected with the engine's error, the live one keeps running), activation hot-reloads the engine without a center restart, moves the distribution revision so sync-enabled agents converge automatically, and every mutation is audit-logged. The fleet view shows each agent's running corpus revision (newfingerprint_revin agent fleet meta; schema v4 adds theagent_status.fingerprint_revcolumn). New capabilityfingerprint:manage; managed corpus lives under the database dir (scanner.fingerprint_managed_dirto override);scanner.fingerprint_upstream.urlarms the online-update check against a{corpus_version, tarball, sha256?}JSON manifest. -
Fingerprint corpus distribution channel (
GET /api/v1/agents/fingerprints): agents can now keep their fingerprint corpus in step with the center without touching any binary or package. The center serves its active corpus (thescanner.fingerprint_pathdir when configured — edit/drop YAML there and the fleet picks it up on the next poll, no center restart — else the embedded corpus, so every center upgrade propagates fleet-wide on its own) as a rev-negotiated deterministic tar.gz; agents opt in viacenter.fingerprint_sync.enabled(default off), validate every envelope with the rule engine's own loader before swapping (a broken corpus never displaces a working one), activate it with a rate-limited re-exec (5m window; consecutive changes coalesce), and load with the precedencescanner.fingerprint_path→ synced dir → embedded. This completes the no-recompile fingerprint-update story together withmibee-fingerprints-gov0.1.1 below. -
Lazy fingerprint-rule compilation (deps:
mibee-fingerprints-gov0.1.0 → v0.1.1): regex rules now compile on demand behind provably-required literal gates with a shared LRU cache — behavioral parity is pinned by a full-corpus gated-vs-ungated equivalence test. Measured on the armv7 test agent: corpus load drops from ~50 MB to ~4 MB live heap with zero regexes compiled at startup, and steady RSS drops from ~110 MB to 45–55 MB after real scans. Also removes the old double-compilation ofregex_capturematch patterns at load. -
Model identification pipeline (hostname→model): the iot-identity Mijia hostname rules now extract the MODEL token (the
e13inviomi-waterheater-e13_miap5E55) via the corpus'sregex_captureextractor, and a full pipeline carries it intoscan_attributes.inferred_model, thedevices.modelcolumn (fill-empty only, never clobbering a user edit or SNMP-derived model), the agent-report wire format (inferred_model), and the live-scan API response. Field-verified against 10 real hostnames; the model column goes from 0% coverage to every Mijia host carrying its model token after one rescan. -
Fingerprint corpus refresh (recog + IANA PEN + OUI):
recog-imported.yamlregenerated from upstream Rapid7 Recog (2534 → 2547 rules, net +13 with refreshed matches);snmp-data.yamlgains a selective IANA PEN import of 16 verified enterprise-OID entries (Fortinet, Reolink, Uniview, Epson/Canon/Brother printers, second/renewal PENs for Dahua, QNAP, TP-Link, Huawei, Aruba, Axis); the curated OUI table gains the Xiaomi-ecosystem module OUIs (13 prefixes), common Espressif ESP32 blocks (12 prefixes), NVIDIA Jetson on-board ethernet (2), and a second verified batch of 22 field-found vendor prefixes (Synology, QNAP, Seiko Epson, Vatilon, D-Link, TP-Link, Mercury, GL.iNet, ASUSTek, Hefei Bitland, Hualai, four more Xiaomi/Lumi-United blocks, five more Espressif), all verified against the IEEE registry via TShark's manuf generation — previously the table had zero Xiaomi entries. Module-silicon vendors that would mislead as a device brand (Intel, AMPAK, Fn-Link) and prefixes absent from the registry snapshot are deliberately excluded. -
Speaker / co-brand / SBC hostname fingerprints:
iot-identity.yamlgains rules extracting the model code from Xiaomi smart-speaker hostnames (MiAiSoundbox-LX06→ modelLX06,XiaoAiTongXueX6A→X6A), branding Philips-branded Mijia appliances (philips-light-sread9_mibtXXXX→ brand Philips + model; the generic suffix rule extracted only a model), extracting the board model from Raspberry Pi hostnames (rpi3b-*→3b,rpi400→400), and brandingredmi-*/jetson-*dev-box hostnames.http-tls.yaml's certificate subject-CN keyword map gainsmiwifi→ Xiaomi (stock Xiaomi-router firmware signs withMIWIFI *CNs). -
ESP32/MiBeeCam hostname fingerprints:
iot-identity.yamlgains rules branding ESP32 dev boards (esp32c3-*,espressif.*) and MiBeeCam AI-Thinker modules from their DHCP hostnames. -
Parking multiple randomized-MAC holders no longer fails: the randomized-MAC guard parked a slot holder by clearing its IP to
''— but the unique(ip_address, network_id)index allows only ONE empty-IP row per network, so the second and later parks on a network tripped the constraint, the park failed, and the randomized client's create at the contested IP failed too, retrying every scan cycle (four field holders logged ~340 WARNs/day). Each holder now parks onto a per-row#park:<id>sentinel — unique by construction, matches no IP-based lookup, same re-resolution-by-MAC semantics. -
Orphaned heartbeat configs are reaped: the main DB does not enable SQLite's
foreign_keyspragma, so the ON DELETE CASCADE onheartbeat_configsnever fires — deleting a device row (silent-device sweep, reconcile ghost cleanup) left its heartbeat configs behind, and the still-enabled configs kept probing a vanished IP forever (two field orphans contributed most of the ~2300 ERRORs/day above). The retention maintenance pass now reaps configs whosedevice_idno longer resolves, batched. -
HTTP/ICMP probe failures now drive the #271 streak logger everywhere: the periodic-probe noise reducer (first failures WARN, then sampled DEBUG) was wired into the http request-build and icmp run branches — but NOT the http
client.Dofailure nor icmpNewPingerfailure branches, which stayed on directslog.Error. A field center with five half-dead IoT http services logged ~2300 ERRORs/day from exactly those two branches; both now route throughlogProbeFailure. -
Garbage hostnames never reach the device record (2026-10-15 field batch): probe name-decoders (NBNS/mDNS) can emit mojibake for non-conforming responders, and a binary-garbage hostname (invalid UTF-8 with a control rune) displayed as junk and leaked into scan_attributes on the field rig. Both hostname entry points in the host-fact fold (rDNS/NBNS/mDNS evidence and the TLS-CN fallback) now gate on
plausibleHostname— valid UTF-8, no control runes; legitimate non-ASCII names (CJK marketing suffixes) still pass. -
Recog corpus refresh (2548 → 2550): upstream gained two SNMP sysDescr fingerprints since the 2026-10-10 import. Re-imported via
fpimport recog; zero removals. -
Parked randomized-MAC holders no longer count as reconcile drift: the randomized-MAC guard parks a slot holder onto a
#park:<id>sentinel IP — not empty string — so the network-reconcile mismatch scan flagged every parked row as out-of-network drift on every pass (a field rig logged the WARN ~7×/day with parked rows as every sample IP). The scan now excludes the sentinels exactly like empty-string rows: a parked row holds no IP claim at all. -
GL.iNet router hostnames brand random-MAC units (2026-10-13 field batch): GL.iNet firmware defaults the device name to
GL-MT<model>(GL-MT2500= Opal) — on a randomized-MAC unit there is no OUI to brand it, the hostname is the only vendor signal. Newiot-host-glinet-mtextracts brand GL.iNet + the MT model token. -
SDKjoins the web-server junk-brand denylist (2026-10-12 field batch): fnOS (and other NAS/web SDK front-ends) ship a literalServer: SDKheader — an fnOS box's brand regressed to "SDK" between scans exactly the way nginx/Portable used to. The fold guards skip it and the junk-brand heal can clear it, same family as the existing entries. -
TP-Link TL-XDR router model extraction (2026-10-11 field batch): TP-Link's Chinese-market routers name themselves
TL-XDR<model><营销后缀>(TL-XDR3040易展版— the suffix is CJK and varies by SKU). OUI already yields the brand; the newiot-host-tplink-xdrrule extracts the XDR model token with the CJK suffix tolerated (closes the long-standing "TL-XDR3040易展版-as-brand" normalization observation: the marketing tail no longer leaks into identity at all). -
Recog corpus refresh (2547 → 2548): upstream Rapid7 Recog's xml path thawed (six commits, first since 2026-08-17) — net effect one new http title fingerprint (Sangoma Switchvox). Re-imported via
fpimport recog; zero removals. -
Seeed Studio XIAO ESP32 hostname rule (2026-10-08 field batch): Seeed's XIAO firmware defaults the DHCP name to
Seeed-<module>(Seeed-esp32c6, field-found) — the existing ESP32 rule anchors onesp32…/espressif…and never saw the vendor prefix. Newiot-host-seeed-esp32brands Seeed Studio with the module as model (priority 116 in the shared esp32-host group wins the tie). -
Repeater hostnames type iot (2026-10-07 field batch): a Xiaomi WiFi repeater announcing
XiaoMiRepeater_V2carried a full miot identity (brand Xiaomi, model V2) extracted by the hostname rules, butdevice_types.yamlhad no repeater keyword — the device stayed typed "other" with its identity in hand.repeaterjoins the iot hostname keywords (any vendor's WiFi extender names carry it). -
TLS certificate CNs now feed the hostname rules (2026-10-06 field batch): a router signs its model into the cert CN (
R68S), and the orchestrator's host-fact fold already treated the CN as a node_hostname fallback — but the fold runs AFTER classification, so the corpus's hostname rules (kindhostname) never saw it and the device stayed model-less although the rule matched. The TLS probe now also emits a hostname-kind piece when the leaf CN is a single DNS label (no dots/spaces/wildcards; fallback trust tier 0.7 below rDNS/NBNS 0.8), completing the evidence-channel family alongside the NBNS fix. -
NetBIOS hostnames now feed the hostname rules + router-model rule (2026-10-05 field batch): a NAS-distro box (fnOS/Samba) announces its hostname ONLY via NBNS, and the probe emitted that name as
kind: netbiosevidence — unreachable by the corpus'skind: hostnamerules, so the device stayed unbranded although its name was a perfect rule match. The NBNS probe now also emits a hostname-kind piece (same trust tier as rDNS); the corpus gainsiot-host-r68s(R68SDHCP name → model R68S — the router's own name is the hardware model, SSDP already self-identifies FastRhino). -
SBC / NAS / gateway hostname fingerprints (2026-10-04 field batch):
iot-identity.yamlgains host rules for Orange Pi boards (orangepi-zero3→ brand Orange Pi + board code as model), FriendlyElec NanoPi boards (nanopineo→ model neo; a repurposedR4S-FNOSkeeps its board identity → brand FriendlyElec, model NanoPi R4S — hardware identity survives an aftermarket NAS distro), ZSpace (极空间) NAS boxes (Z4S-2PSE→ model Z4S, SKU suffixes vary), and the Mijia smart-gateway V2 (Mijia_Hub_V2-<hex4>→ model Hub V2; note the underscore separator).device_types.yamladds themijia_keyword (the underscore-spelled Mijia hostname previously fell through themijia-rule and typed "other"), and the curated OUI table gains three IEEE-verified Espressif prefixes (DC:06:75, 14:C1:9F, 54:32:04). -
Host-identity corpus: domain-tolerant matching + six vendor families: the phone/pad/TV hostname rules now accept an optional trailing DNS domain (the 2026-09-30 lazy-segment idiom), and
iot-identity.yamlgains host rules for Huawei retail-code phone hostnames (…-AL00U→ brand + code as model), Xiaomi build-date phone hostnames (7 digits + letters, brand only — the code maps to no stable public model), Xiaomi WiFi repeaters (xiaomi-repeater-v2_miio<serial>, serial kept out of the model), MacBooks (MacBookPro.<domain>→ brand Apple, no model — macOS advertises no model number), Banana Pi boards (bananapim5→ model m5), and chip-variant models for ESP32 hostnames (esp32c6-<suffix>→ model esp32c6, MAC-derived suffix excluded).device_types.yamladds-pad/ipadphone keywords (a tablet hostname previously typed "other") and a domain-boundarypc.keyword.
Fixed
- The e2e smoke suite runs green again (it had been failing since two behavioral changes landed): the #353 forced password-change gate 403'd every authenticated call after the first-boot login (the smoke now changes the password and re-logins), and the #317 reserved-range guard rejected the smoke's own loopback scans (
127.0.0.1— the ephemeral smoke instance now sets the documentedscanner.allow_reserved_targetsescape hatch). Full 13/13 verified on Linux. - Port-0 service identities no longer break rescan persistence: the scoped DELETE in RecordServices keyed only on ports > 0, so the hostname-derived miot rows (port 0) were excluded — a rescan either no-oped entirely (a port-0-only report left the IN-list empty) or re-inserted the same row and tripped UNIQUE(ip, service, port), one warning per host per scan once a network is rescanned on a schedule (field-found the day recurring scans were first enabled for the router-agent LAN). Port 0 now joins the delete scope when portless identities are reported.
- Domain-qualified hostnames never reached the phone/pad/TV rules: those four 2026-10-01 regexes anchored at
$, so the names rDNS/mDNS actually yields (…-pad-6.<domain>) failed the anchor and a field tablet stayed unidentified while its rule existed; all four now tolerate the trailing dot-domain (field-found and pinned with sanitized samples). - Agent-reported hosts lost the SSH-banner OS: the agent wire payload has no top-level OS field, so
hostToReporteddropped the banner-derivedos_type(OpenSSH_for_Windows_9.5→ Windows) and agent-scanned hosts fell through to port-shape typing (field: a Windows box mis-typed nas by smb:445).ReportedHostToReportnow recovers the OS from the ssh service metadata, restoringos_rulestyping andscan_attributes.osfor agent-reported hosts. - The upstream "check for updates" endpoint no longer leaks staging directories:
GET /api/v1/fingerprints/upstreamfetched and validated the upstream corpus into afp-upstream-*temp dir under the data root but dropped the path on success — every check click left one directory behind (field-found: four stale dirs after a setup session). The staging copy is now removed once the diff is computed; the apply path already cleaned up. - No-signal "other" types no longer masquerade as protocol verdicts: the missing-source default stamped an agent report's fallback type "other" (the agent's bridge found nothing type-worthy) as
inferred_type_source: "protocol", and type stickiness then refused every later heuristic upgrade — a legacy "other" row could never heal even after the matching hostname keyword landed indevice_types.yaml(field: a Mijia gateway hostname stayed "other" after themijia_keyword shipped). The default now applies only to real handler-set types, and stickiness exempts "other" rows even when a pre-fix row carries the mis-stamped source, so existing rows heal on the next scan; genuinely protocol-derived types keep their flap protection (pinned by a guard test). - A MacBook acting as an AirPlay receiver typed iot: macOS can announce
_airplay._tcp, and the mDNS protocol verdict ("iot") outranked every hostname signal; protocol-sourced iot verdicts now yield to a strong PC hostname signal (same shape as the port-derived camera exception, which stays authoritative for fingerprint/SNMP verdicts). - Hostname model capture no longer grabs the DNS TLD: the Mijia model-extraction regexes used a greedy
(?:.*[-_.])?prefix anchored at$, so a hostname carrying a DNS suffix (a Tailscale.ts.netname, an mDNS.localname) let the greedy segment cross the dots and the capture group took the top-level label — a field-observed Aqara gateway hostname producedinferred_model="net", persisted intodevices.model. All 11 rules now use a lazy-segment idiom whose segments cannot contain separators or dots ((?:[^-_.]*[-_])*?), with an explicit trailing-domain group ((?:\.[0-9a-z-]+)*$); the full field sample set (bare,_miap/_mibt-suffixed, and domain-carrying hostnames) is pinned in tests. - A swapped-in board with a new MAC no longer drops the whole report: when a device's MAC was never seen before but its IP slot was occupied (board swap, or a fresh DHCP identity at a busy slot), identity resolution returned IsNew, the INSERT hit the
(ip_address, network_id)unique index, and the agent's entire report for that host was lost (field-observed as recurringUNIQUE constraint failedon report ingest). Resolution now returns a TakeOver verdict (the ip-holder is authoritative for its slot): the apply path force-overwrites the MAC on the holder while keeping fill-when-empty identity columns, mirroring the roam/replacement semantics already in the store. - Historic junk brands heal on the next rescan: the identity UPDATE is fill-when-empty, so a web-server banner name (
nginx,Apache,Caddy,MiniDLNA,Portable, …) or a letter-less value ("0,1,2"mDNS capability flags) written before the fold-time junk guards existed stayed the device's brand forever (field: NAS boxes stuck at brandApachewhile their OUI says QNAP). A corrective step now overwrites exactly those two junk classes whenever the scan carries a real brand; curated non-junk brands (including user edits) are never clobbered. - Agent's recurring
database is locked (517)under concurrent scans: the agent's read-then-write enrich transactions ran as DEFERRED SQLite transactions; when the concurrent scan writer committed between the read and the write, the write-lock upgrade failed immediately with SQLITE_BUSY_SNAPSHOT (517) — an errorbusy_timeoutcannot retry — surfacing every scan cycle asenrich device failed. Newdbopen.OpenTxLockappends modernc's_txlock=immediateDSN parameter so agent transactions take the write lock at BEGIN (the interfering writer queues behindbusy_timeoutinstead); both the deferred failure mode and the immediate fix are pinned in concurrent tests. - Multi-homed hosts no longer flap identity on NIC failover (#472, storage semantics): a host with Ethernet + WiFi alternating on ONE IP used to take the take-over/replacement path every report — force-overwriting the slot's MAC, ping-ponging the brand, and marking its own other-NIC row offline each cycle (field: a dev board alternating NICs every ~15 minutes). The slot's previous MAC is now recorded in
scan_attributes.mac_aliasesbefore a force overwrite, and a report whose MAC is a recorded alias of the ip-holder resolves as a plain update (status refresh only). UI-side aggregation of alias rows remains future work. - One MAC holding two live IPs no longer ping-pongs the device row (multi-homed stability): a dual-NIC-bonded box or a device with a stale + current DHCP lease reports the SAME MAC at TWO ips in one report, and MAC-primary resolution read each twin as a "roam to a free ip" — relocating the row every cycle, so it flip-flopped between the ips at full scan cadence (field: 3–4
change_logip moves per hour per device, two devices on the rig). The report ingest now pre-indexes the batch by MAC and tells the bridge which OTHER ips the MAC holds; when the batch itself vouches the row's current ip is alive, the roam is downgraded to an in-place update and the scanned ip is recorded inscan_attributes.extras.ip_aliases(deduped, capped at 8, unchanged values never rewrite — no change-detect churn). A genuine roam (the twin absent from the report) still relocates the row. The one-MAC-many-IPs doctrine is unchanged: one row per MAC; the aliases are informational. - Enrich can no longer stamp a foreign MAC over an occupied slot: the RecordDevice/enrich path filled the report's MAC unconditionally into its ip-matched row; it now fills only while that row's MAC is empty (the documented "newly resolved" contract), so MAC transitions belong exclusively to the identity machinery. Field-motivated by same-MAC shadow rows (self-offlined within hours, pruned by the 7d sweep) observed 2026-10-01.
- Agent rides out the retention sweep's VACUUM:
busy_timeoutraised 5s → 15s so the ~11s VACUUM window (6-hourly sweep on a ~44 MB local DB) no longer makes the scheduler's stale-run cleanup logSQLITE_BUSYtwice a day. - SSH banner version no longer carries binary key-exchange bytes: an SSH server sends its greeting and binary KEX_INIT in one TCP segment; the banner probe stopped reading at the newline but returned the whole buffer, so a dropbear router's SSH "version" was
dropbear\r\n\x00\x00…curve25519-sha256…. The banner is now cut at the first newline. - Web/media-server software no longer masquerades as the device brand: the orchestrator's HTTP-Server evidence fold ran before handler enrichment, so a Xiaomi gateway fronted by nginx was branded "nginx"; SSDP's product token branded a NAS "MiniDLNA" and an fnOS box "Portable". The software-name denylist is extended (nginx/Apache/Caddy/lighttpd/IIS + MiniDLNA/ReadyMedia/Portable), the miot ecosystem brand now OVERRIDES a web-server brand (same rule the TLS fold uses), and SSDP product extraction skips software names entirely.
- mDNS TXT flag lists no longer become the brand: AirPlay receivers publish
txt.md="0,1,2"(capability flags) which became the device's brand verbatim; values with no letters at all are now rejected in the brand fold. - Port 9100 no longer types a node_exporter host as "printer": the JetDirect fallback rule fires on any open 9100, but node_exporter uses the same port (field-found: a GL.iNet router typed "printer"). Port rules gain an
exclude_servicesveto (fires only when the excluded service is CLASSIFIED on the keyed port, a bannerless real printer is unaffected), and the router hostname keywords gaingl-inet. - Agent local mini-DB no longer grows unbounded or keeps dead shadow devices: the agent previously had NO retention sweep (field rig: 95 MB in a week, seven silently-dead MAC-less shadow rows the center had already dropped). A 6-hourly sweep now prunes silent devices (MAC-less after 24h, MAC-bearing after 7d, mirroring the center's retention semantics with the MAC sourced from either
mac_addressorscan_attributes.mac), agedscan_results(72h — a field rig measured ~10k rows/day of already-ingested evidence, so the earlier 14d window meant a ~180 MB steady-state file on a small flash box) /scan_task_runs(30d), and runs aVACUUMafter a substantial prune (SQLite never shrinks a file on DELETE; field: 116.8 → 41.7 MB in one sweep).
Security
- Forward sanitization of the example/test LAN: all tracked files move their example/test LAN ranges to the documentation ranges 192.168.2.x/1.x (the same mapping the screenshot sanitize proxy uses), and personal device names are genericized. Historical commits are immutable; from this change on, a fresh clone contains no identifier tied to any deployment LAN. The proxy still takes its real upstream explicitly at runtime.
[0.6.0] - 2026-09-20
The router-native release: OpenWrt/iStoreOS as a first-class form factor, passive-discovery-powered fingerprinting, and a wire-truth API contract. v0.6.0 completes the distributed-agent story on three fronts. Form factor: one-click OpenWrt packages (tarball/.ipk/.apk) with a LuCI status/settings UI, Tier-1 passive discovery on by default, first-run admin setup entirely in the browser (no SSH, no printed temp password), and configurable password policy / login lockout. Identification: passive observations (DHCP leases, mDNS/SSDP overheard announcements) now seed the fingerprint classifiers, including a Mijia-ecosystem hostname corpus that brands 12+ device families that answer nothing else, and discovery sightings attribute to the right network on dual-homed routers. Contract & durability: the REST API converges on one pagination envelope with an OpenAPI spec that generates BOTH the TS and Go clients (drift-checked in CI), agents keep SNMPv3 credentials in their own local vault with names-only command dispatch, the lease/sweeper model survives device roaming and orphan rows without flap loops, and a CI coverage ratchet locks in an 85%-covered codebase, the campaign behind it surfaced and fixed four real bugs (heartbeat shutdown data loss, a never-enforced identity index, legacy-upgrade column loss, dead SNMP index parsing). A GUI black-box pass hardened the SPA's login and device-detail surfaces.
Added
-
Rust agent router packages (
make package-openwrt-agent-rs{,-ipk,-apk}): the agent ships the same three OpenWrt/iStoreOS install forms as the center — tarball (the field-provenagent-install.shflow, now Rust-adapted),.ipk(opkg),.apk(24.10+ apk). The stage rule builds the musl binary via cargo-zigbuild unlessAGENT_BINpoints at a prebuilt one (the release pipeline reuses its own build);preinstkeeps the uname gate +-versionsmoke,postinstruns the same first-install config generation (uci-derived LAN, center credentials left as placeholders with the service down until filled — upgrades keep the config). Release tags attachmibee-agent-openwrt-arm64-*.tar.gz/mibee-agent_*_arm64.ipk/.apkalongside the binaries. -
Rust agent ships as release artifacts + a CI test gate: tagging
v*now builds the agent's static musl binaries (amd64 / arm64 / armv7, ~4.8MB, version-stamped from the tag viaMIBEE_AGENT_VERSION) alongside the center's, attached to the GitHub Release asmibee-agent-linux-*. CI gains anagent-rsjob running the cargo suite on every PR — until now those 172 tests only ran on dev machines, and the day the job landed it caught a corpus-count assertion that had silently broken on a corpus batch (the pin is now a growth-tolerant floor). -
Release artifacts now include the OpenWrt AGENT packages (#449): the router form B (agent-on-router reporting to a remote center) ships in the same three install forms as the center, tarball (
scp+./agent-install.sh),.ipk(opkg) and.apk(OpenWrt 24.10+), viamake package-openwrt-agent{,-ipk,-apk}. The installer derivesnetwork.name/cidrfrom uci, keeps the router Tier-1 passive sources on, and handles the one thing it can't invent, the center url + agent token, either inline (--center-url/--token) or by generating a placeholder config and keeping the service DOWN until the operator fills it (the closing summary prints the exact steps). mkipk/mkapk grew acenter|agentkind parameter (package name, description, lifecycle wiring). Field-verified end-to-end on R68S/iStoreOS opkg: install → placeholder branch → fill → start →report accepted→ center agent status live → remove. The field pass caught a real generator bug before release: the empty-credential fallback double-wrapped its quotes (url: """"→ YAML crash loop); the generator's sanity guard is now a full-line match that rejects the whole class. -
Agent-side SNMPv3 credential vault (#401, closes #241): agents keep SNMPv3 USM credentials in their OWN local encrypted vault (AES-256-GCM under
security.master_key; CLImibee-agent snmp-credential add/list/remove/test, run on the agent box), scan commands dispatched from the center carry only the credential NAME (credential_namein the command payload), so no secret ever transits the command channel or lands in the center DB; a missing/mismatched name degrades that scan to v1/v2c community with a warn. The center-side vault and redaction guarantees are unchanged. -
Wire-truth API contract, OpenAPI drives both generated clients (#402 + #403): every list endpoint now speaks one pagination envelope (
{items, total, page, page_size}/{results, …}), bare arrays are wrapped, anddocs/openapi.yaml(109 paths / 76 schemas, enriched against handler/domain/sqlc DTO shapes) is now the single source of truth generating BOTH clients, the TS types inweb/src/lib/api/schema.d.ts(npm run gen:api) and the Go client ininternal/apiclient(make gen-api-go), each drift-checked in CI, plus a chi.Walk parity test pinning router paths ↔ spec paths. The frontend's hand-declared wire types are retired in favor of re-exports of the generated schemas (the exact class of mismatch #440 was made of). ⚠️ One-time wire changes: unified pagination keys and wrapped arrays are breaking for hand-rolled API consumers (curl/jq scripts), regenerate or adjust integrations against the spec. -
Passive-discovery network attribution (#394, closes #386): discovery sightings attribute by IP→CIDR longest-prefix at a single SinkAdapter point, driven by the
networkstable, a dual-homed router center no longer stamps foreign-subnet hosts onto its local network, and WAN-arm artifacts are attributable to a real segment or dropped. Per-source outcome countersmibee_discovery_events_total{source,outcome}in/metrics(#393) plus adiscovery_network_mismatchalert rule make residual pollution visible instead of silent. -
Agent-task run statistics backfill (#396, closes #390): scheduler-dispatched agent scan runs now stay
runningat dispatch and close with REAL statistics backfilled from the agent's report (duration, alive counts, field-measured 165s / 30+ alive per 5-min cycle) instead of writing 6ms empty-shell run rows at dispatch time. -
CI coverage ratchet + campaign to 85% (#404, #405–#446): a cross-package coverage gate whose floor only moves UP (pinned at 84.9, CI-measured), frontend coverage thresholds in vitest, and a 40-round test campaign that took CI statement coverage from 79.2% to 85.0%, surfacing three real bugs along the way (fixed below: #412, #428, #431, #437) and adding durable test seams (fake SNMP responders, scripted multicast connections, writable-schema legacy-shape migrations, config-variant router assembly).
-
Multi-vantage probing surfaces in the UI (#277, closes the center-side remainder): the agent-side execution channel landed earlier (#344), probe plans shipped to agents over the command channel, results flowing back through
/agents/probe-report, per-vantage storage andmibee_probe_*{vantage=…}labels, but the SPA knew nothing about it. The probes page now speaks vantage end to end: the target form gains a vantage selector (center / center + all agents / a specific registered agent, options built fromnetworks.agent_id, with an unregisteredagent:{id}value still round-tripping marked so an edit can't silently rewrite the plan, and a hint whenallis picked with zero agents registered); the target list shows the plan as a badge (all/agent:{id}verbatim; the center default stays quiet plain text); agent-only targets disable the manual Probe Now button (the engine 409sErrProbeVantageNotLocal, the button state now matches reality); and the history modal gains a Latest-per-vantage panel, each executor's newest result side by side with latency and sample count, the whole panel highlighted when tracks disagree on success (the "reachable from A, not from B" case multi-vantage exists for). The results table gains a vantage column. First modal-opening tests in the suite also fixed a latent jsdom gap (aElement.animatestub in the shared setup, svelte/transition delegates to WAAPI). -
Agent mini-schema drift guard (#171 safety-net batch): the agent's local SQLite schema mirrors
db/schema.sqlBY HAND (CREATE TABLE IF NOT EXISTSnever updates an existing table), and the agent reuses the sqlc queries generated against the CENTER schema, so a column added on one side only used to surface as "no such column" on a remote agent at runtime (that is exactly how #337 happened). A parity test now compares the column set of every shared table (networks/vlans/scan_tasks/scan_task_runs/scan_results/heartbeat_configs/devices) betweenagentSchemaand the embedded center schema, and a smoke test runs the scheduler/runner's actual query chain (ListEnabledScanTasks→CreateScanTaskRun→UpdateScanTaskRun→BatchInsertScanResults→ListScanResults) against a freshly provisioned mini-DB. cmd/agent coverage 5.2% → 11.7% (the rest ismain()wiring). Frontend: first render tests for the scan-results page, seeded row render, row expansion revealing the parsed SNMP detail, and the run-history tab switch (assertions data-driven, never localized strings). -
Passive-discovery observations now seed the fingerprint classifiers (#377): the discovery service keeps a per-IP cache of overheard facts, DHCP-lease hostnames (refreshed every sweep), and mDNS/SSDP announcements parsed with the SAME parsers the active probes use (newly exported
probe.ParseMDNSResponse/ParseSSDPResponse), and every scan prepends them to the host's gather output via a new orchestrator seed hook. On real networks the passive channel is often the ONLY source of these signals (the R68S field session measured active mDNS queries going 100% unanswered while the listeners overheard rich announcements), so the iot-identity and mdns-ssdp rule corpora now fire on field data: a lease hostname likeviomi-waterheater-…yields the MiBee brand/appliance identity, an overheard_smb+_adiskannouncement types the host nas without a single query sent. -
mDNS/SSDP self-announcements are now fingerprintable (#365): the active mDNS and SSDP probes already produced rich evidence (service lists, TXT records, SSDP SERVER/USN/LOCATION headers) that no classifier consumed, the wire was connected but the last mile missing. New
mdns-ssdp.yamlcorpus rules match those fields and emitmdns/ssdpidentities with type/brand/description/model metadata, folded into device records by new Mdns/Ssdp handlers (protocol-grade per the device-bridge contract, no?badge, but never overriding stronger in-protocol evidence). Field-verified rule samples from the R68S PoC: the NAS avahi set (_smb+_adisk→ nas), the router's SSDP SERVER self-identification (lunzn,fastrhino-r68s→ router + FastRhino), MiniDLNA (→ nas), plus a data-driven table for_onvif→camera,_ipp→printer,_googlecast/_airplay/_hap/_esphomelib(TXT model passthrough)/_miio→iot, and Hikvision/Dahua/Synology vendor signatures. (Scope note: Mijia devices announce none of these, their ceiling stays the #361 hostname rules.) -
One-click Tier-1 passive discovery on routers (#360): the config generated by
install.shon first install now enables the three zero-cost router-resident sources by default (dhcp_leases, the authoritative hostname/MAC/IP map,conntrack, the "who is talking right now" view,hostapd, the WiFi STA list), with the generated-config sanity check asserting the flips; the LuCI Settings page gains a Passive-discovery section with all four sources as checkboxes (save = config rewrite + restart + health check via a newluci-helper.sh set-passive).dns_logstays off, it needs dnsmasq query logging, and both the page and the installer print the one UCI line instead of mutating DHCP logging silently. Upgrades keep existing settings and print a hint. -
Release artifacts now include the OpenWrt router packages (#359):
release.ymlgains anopenwrtjob that builds all three install forms onv*tags, tarball (scp +./install.sh),.ipk(opkg) and.apk(OpenWrt 24.10+ apk-tools), arm64, through the exact pipeline CI smokes (#358), plus aSHA256SUMS.openwrt; the Release is only published when binaries, container image AND router packages all succeed. 32-bit ARM routers build locally viamake build-linux-arm. -
CI gate for the OpenWrt/LuCI packaging sources (#358): a new
openwrtCI job runsmake check-openwrt,luac -pon the LuCI controller (OpenWrt 24.10's Lua runtime is 5.1), a CR-byte scan andsh -nover the COMMITTED router sources (git-index based, so a CRLF Windows checkout can't false-positive), plus a full packaging smoke viamake package-openwrt-ipk(arm64 build → openwrt-stage CR staging guard → mkipk.sh assembly). The R68S field session (#355) proved this bug class ships "local-green, on-router-dead": a template CR byte white-screens LuCI with "unfinished string" and go test never sees it. -
Mijia ecosystem hostname fingerprints, brand & appliance identification for IoT that answers nothing else (#361): new
iot-identity.yamlfingerprint corpus file matches the DHCP/rDNS hostnames Xiaomi-ecosystem WiFi modules announce (viomi-waterheater-e13_miap5E55,yeelink-light-lamp22_mibt63AA,chuangmi_camera_039a01, …) and emits amiotservice identity carryinginferred_brand(Viomi/Yeelight/Chuangmi/Chunmi/Smartmi/Aqara/Roborock/Xiaomi),appliance(water heater / range hood / air conditioner / IP camera / …) andecosystemmetadata, anexclusive_groupkeeps exactly one identity per hostname (vendor-specific rules beat the generic_miap/_mibtsuffix fallback). A newMiotHandlerfolds that metadata into device fields (vendor, human description) WITHOUT claiming a device type, the?badge on hostname-guessed types stays, honestly. Field-verified against 12 real Mijia devices on an iStoreOS R68S install (where the hostname is provably the only identity channel: 0/12 mDNS/miIO/TCP responses).device_types.yamlgains the missing ecosystem keywords (yeelink/lumi/aqara/roborock/dreame/smartmi/…). -
Schedule presets for scan tasks (no cron knowledge required): the scan-task form's raw cron field is now a dropdown of friendly presets (every 30min / hourly / 6h / 12h / daily 02:00 & 04:00 / weekly Monday / monthly 1st) with the generated expression shown alongside; 自定义 keeps the raw-expression input for power users and round-trips arbitrary existing expressions losslessly. The task list shows the preset label with the raw expression in small type. Backend unchanged (still a 5-field cron string).
-
LuCI integration on OpenWrt/iStoreOS (router-native entry): the ipk/apk/tarball now ship a classic Lua controller + templates (no luci-compat/CBI dependency, inert without LuCI),LuCI's 服务 → MiBee Steward gains a Status page (service/health/autostart/version/port/DB size + open-UI button) and a Settings page (change the web port with auto-restart + health check,80/443 refused, set the admin password per the effective policy, autostart toggle, restart). All privileged ops funnel through the single audited
/usr/lib/mibee/luci-helper.sh, callable standalone; passwords are handed over via a 0600 tmpfs file andMIBEE_RESET_PASSWORD, never a command line. -
First-run setup with NO temp password (empty-credential bootstrap):
auth.initial_admin_passwordmay now be EMPTY (the OpenWrt/iStoreOS installer default), the admin is seeded password-less and the login page itself detects the state (publicGET /auth/setup-status) and renders a create-admin-password form instead of the login form;POST /auth/setup(public, under the strict login rate limiter, policy-checked, one-shot, 409s forever once any password exists) sets the credential and returns a full session (token + cookie, no second login). Login attempts against the pending account return a distinct 409setup_requiredand, importantly, do NOT tick the failure counter. The installer no longer generates/prints any temporary password. -
First-run web password setup + settings center (no-SSH configuration, step 1): the admin bootstrap credential (
auth.initial_admin_password, incl. installer-generated random ones) is now seeded as a TEMPORARY password that deliberately bypasses the password policy, and the first login forces a change IN THE BROWSER (the SPA modal) backed by a server-side gate: tokens minted while the flag is set carry anmcpclaim andAuthenticator403s every authenticated call except the change-survival allowlist (force-password / profile GET / 2FA). Previously a policy-violatinginitial_admin_passwordfailed seeding with only a warn, fresh installs could come up with NO admin at all, recoverable only via CLI.PUT /auth/force-passwordnow returns a fresh ungated token + rotated cookie. New settings-center overlay (system_settingstable,SettingsService: DB overlay > YAML > defaults, in-memory snapshot + change subscribers) withGET/PUT /api/v1/settings/auth(admin, audit-logged) andGET /api/v1/system(read-only instance facts), plus an SPA page at Settings → Security (password policy form with live rule preview, lockout tuning, system info). Password-policy and lockout edits apply on the next validation/login, no restart. Default password policy relaxed: special characters no longer required (min 8 + upper + lower + digit); re-enable via the UI or YAML. -
OpenWrt/iStoreOS no-Docker installers:
make package-openwrt(tarball + on-routerinstall.sh, generates config with a randomjwt_secret+cookie_secure: falseand a password-less bootstrap admin, fixesping_group_range, enables + starts + health-checks),make package-openwrt-ipk(hand-rolled opkg package in the modern gzip-tar feed format, the legacy ar container is rejected by current opkg as "Malformed package file"; preinst arch gate, postinst = the same configure logic,/etc/mibeesurvives removal), andmake package-openwrt-apk(apk-tools v2 format for OpenWrt 24.10+ firmware)..gitattributeskeeps shell/unit files LF on Windows checkouts; release packaging normalizes too. -
OpenWrt form C field verification + v6 bind fix (#288 / #37): the router-center form is verified end-to-end on real hardware (GL.iNet MT2500 / Brume 2, mt7981, aarch64): full engine registry + embedded fingerprint corpus, all 4 Tier-1 router sources producing live data (a DHCP lease became a device carrying its lease hostname; conntrack + dns_log events flowing; hostapd a clean no-op), /24 scan in 74s with the router self-identifying as GL.iNet, SPA browser-verified, ~113MB RSS.
server.host: "::"(the documented GL-firmware v4 workaround) now actually works, the old address concatenation produced the unparseable:::8090and a startup crash loop; bind addresses now go throughnet.JoinHostPort. -
Agent-network scan tasks (#336):
scan_taskswhose targets resolve to an agent-managed network now dispatch a scan command to that agent on every cron tick, no external timer or password-bearing scripts. Dispatch results land in the task's run history (a rejected dispatch, e.g. out-of-CIDR targets, is recorded as a failed run with the reason). Local-network tasks are unchanged. -
Configurable password policy (#332):
auth.password_policy(min_length + four character-class toggles). Defaults reproduce the previous hardcoded rules exactly; partial blocks override only the keys they name. -
Configurable login lockout (#338):
auth.lockout(max_failed_attempts / lock_minutes). An expired lock now resets the failure counter, a stray retry after expiry no longer re-locks instantly (previously, a periodic client with a stale password could keep an account locked indefinitely). Account-lock responses moved from 429 to 423 with a retry-after hint, and the UI now distinguishes "account locked" from "too many attempts". -
Markdown upload & preview for device documents (#324):
.mdupload (MIME normalization + binary-content rejection), GFM preview in a sanitized (DOMPurify) dialog, soft-delete with working undo (restore endpoint), per-device document listing fix,?inline=1PDF preview, typed upload errors (413/415/400). -
Synthetic load harness (#313):
cmd/loadgenserves a 127/8 synthetic device plane (kernel ICMP + SNMP/HTTP/SSH/RTSP responders) and drives full-stack benchmarks through the real API;scanner.allow_reserved_targetsis the escape hatch for that plane. -
Demo mode (#315 / #285):
server.demo_mode(or-demo) seeds a fictional TEST-NET inventory on an empty database. -
Multi-vantage probing data model (#328, step 1 of #277):
probe_targets.vantageexecution plans + per-vantage result tracks. -
Vantage probing execution channel (#344, step 2 of #277): agent-local probe execution is live end-to-end, the AgentDispatcher diffs per-agent plan fingerprints (sha256 over a canonical form) every 10s and dispatches a probe command ONLY on change (zero steady-state command traffic; clearing targets ships one empty plan that stops the agent-side scan); agents schedule probes fully locally (first-seen targets probe immediately, then per-target intervals; a 10s tick re-reads the plan so CRUD lands within one tick, and probing continues through center outages); results flow back via
POST /api/v1/agents/probe-report(agent-token auth, 10s/32-row batches; the reporter's identity overrides the payload's claimed vantage, an agent can only write its own track; dropped batches lose samples rather than buffering forever, probing is observation, not a ledger);mibee_probe_*metrics gained avantagelabel (legacy label-less selectors still match). -
Agent fleet management (#309 / #278): agent version reporting / clock offset / remote ops command whitelist + the fleet management view.
-
Fingerprint coverage reporting (#308 / #282): coverage report + the "this device wasn't recognized" contribution loop.
-
Ecosystem integration pack (#307 / #284): official Grafana dashboards; Feishu/WeCom/Telegram notification channels; webhook templates.
-
SSE change-stream in the UI (#306 / #272): the devices/changes pages subscribe to
/changes/watchfor quasi-realtime portrait refresh. -
Synthetic-probing UX batch (#305 / #276): multi-target batch operations + certificate-expiry timeline view.
-
VLAN name collection (#304 / #273): VLAN names/descriptions via dot1qVlanStaticTable, feeding the topology view.
-
doctordiagnostic subcommand (#303 / #281): one-shot health check (ICMP capabilities, DB state, config sanity) + hardened official systemd units. -
OpenWrt operator docs (#329 / #316) and a documentation governance batch (#326).
-
Website content: feature overview / playbooks / comparison articles, zh+en (#320).
Security
- Password changes now revoke every outstanding session (#357): users gain a
token_versionepoch column; every minted JWT records it as thetvclaim and the Authenticator rejects any token whose claim lags the current value, a self-service change, an admin reset, a forced first-login change or a CLIreset-admin-passwordeach bump the epoch, so potentially-leaked tokens stop working on their next request instead of living out the 24h expiry (field-observed: after a LuCI password reset the old browser session kept full API access). Deleted users' tokens die with the row; the epoch is persisted, so unlike the in-memory JTI blacklist a restart no longer resurrects revoked sessions. The per-request cost is one primary-key lookup.
Fixed
-
GUI black-box round 1, four UI bugs (#447, fixes #427/#429/#430/#440): the device-detail heartbeat trend chart read a hand-declared wire field that does not exist (chart showed "no data" for every window despite the API returning rows, now typed by the generated
HeartbeatResultList); asset-info tags rendered array indices (0: iot, now values only, both JSON-array and CSV wire shapes); an empty login submit gave no feedback at all (the nativerequiredbubble is silent in several contexts, the form now runs its zod path and shows in-DOM localized field errors); and an authenticated visit to/loginrendered the login form mixed into the logged-in sidebar layout (now redirected to/dashboard, sidebar gated off on/login). -
(ip_address, network_id)UNIQUE index never enforced on fresh installs (#431):schema.sqldeclared a plain INDEX shadowing the migration'sCREATE UNIQUE INDEX, post-#312 fresh installs silently accepted duplicate (ip, network) rows, breaking roam/upsert identity semantics (found when coverage tests seeded the constraint and it wasn't there). UNIQUE at both layers now; a migration-fingerprint self-heal replays the chain on already-stamped DBs (dedup sweep + index rebuild), with the usual pre-migrationVACUUM INTObackup. -
Legacy-upgrade devices-table rebuild dropped
device_uuid/offline_since(#437): thedevices_newCREATE TABLE DDL in two migration rebuilds (type-CHECK widening, duplicate-MAC merge) had drifted from the live schema, upgrading a legacy database silently lost the uuid/offline columns, breaking satellite-table keying (heartbeat targets, configs, documents). Both rebuild DDLs now matchschema.sqlexactly; writable-schema-narrowed regression tests reconstruct every legacy CHECK shape and pin all five table rebuilds. -
Heartbeat final-drain data loss + goroutine leaks + 2 races (#428): the final drain at shutdown used the already-canceled context, the last buffered verdict batch was dropped on every stop; the flush/sync loops leaked goroutines on never-started and immediate-stop orderings; and the verdict maps had unlock-path races. Fixed with a started/stopped lifecycle state machine and copy-then-act lock discipline (two lock scopes simplified away, a full lock audit found no nesting/deadlock issues elsewhere).
-
SNMP
gosnmpToIntreturned 0 for every index string (#412), the STP probe was effectively dead and bridge port names came back broken since the SNMP connection refactor; found by the coverage campaign's fake-responder tests and fixed in the same batch. (Two smaller campaign finds:UpstreamErrornow classifies viaerrors.Is, and demo-mode seeding no longer runs a dead activity query.) -
Dashboard skeleton freeze on healthy networks (#385, the #302-era symptom resurfaced): Go marshals nil slices as JSON
null, and{#if overview?.abnormal.length}readnull.length, the TypeError killed Svelte 5's effect scheduler, freezing the loading skeleton on screen together with the banner (a HEALTHY network with 0 offline devices, or a fresh install with 0 runs, triggered it). Optional-chains audited against null JSON fields; red/green regression test added. (This fix had sat unmerged in an open PR while later builds were cut from main, silently regressing both field centers; all three servers were redeployed.) -
Roaming-device lease remnant killed a live device / infinite flap loop (#400, fixes #399): LeaseSweeper now recognizes a stale pre-roam lease beside a FRESHER same-uuid same-network lease as a remnant to dissociate, not a device to kill; plus per-device-per-pass expiry dedupe and quiet-period flap decay (
flap_counthalves every 30min stable window). Killed a live ~900-transition/15h flap loop on roamer .145/.172 instantly; the 913/911 counters clear within hours instead of never. -
Agent-network orphan devices stuck online forever (#398, fixes #397): LeaseSweeper third direction,
scanner_v2rows on agent-managed networks with NO lease-snapshot reference and last_seen past TTL now flip offline (previously only devices the lease table knew about could expire). The first sweep auto-expired the two remaining legacy orphans; steady state orphans = 0. -
Lease identity resolution raced on IP reassignment (#395, fixes #389): resolution now keys on the MAC (the upsert primary) with recency as tiebreaker, instead of letting a reassigned IP's stale lease win; the anti-entropy fast path (state-hash match) also no longer leaves
devices.last_seenstale, skipping the per-host bridge used to skip the touch too. -
viomi-dishwasher-*hostnames mis-typed as washing machines: the appliance keyword map matched thewashersubstring insidedishwasherfirst; the specific entry now precedes the generic one (found during the #377 full-network verification on R68S, 19 Mijia devices enriched with brand + appliance in one sweep). -
Zero-config deployments silently lacked the new fingerprint corpora (found live while verifying #377): the engine's no-
fingerprint_pathfallback loaded the STANDALONE fingerprint library's own embedded rules (v0.1.0, noiot-identity.yaml, nomdns-ssdp.yaml), so every default deployment classified with a stale corpus and the Mijia/mDNS/SSDP rules never fired, field-observed on R68S where a seeded lease hostname produced the type but no brand. The fallback now loads the corpus embedded in theclassifypackage (themake sync-fingerprintscopy, a strict superset of the library's rules), via a temp-dir materialization aroundLoadFromDir. An engine-level regression test drives a seeded lease hostname through gather/classify/dispatch and asserts themiotidentity with brand Viomi lands on the report. -
LuCI apply actions dead on the ucode bridge - helper_call rewired through a command-file wrapper (field-found while verifying #360 on R68S): on LuCI 24.10's luci-lua-runtime bridge the exec family available to classic Lua controllers does NOT POSIX-split command strings - luci-helper.sh received the ENTIRE command line as a single argument and fell into its usage fallback, so every Settings-page action (restart/port/password/passive) reported *_fail (a standalone
luaoutside the bridge splits the same string fine; template-sideluci.sys.execalso works - only the controller context mangles). helper_call now writes the validated argument line to a cmd file and invokes the new single-word/usr/lib/mibee/luci-apply.shwrapper, which re-splits and runs the helper; the exit code returns via an rc file. Also fixes the passive branch passing the helper path twice. Verified end-to-end on iStoreOS 24.10.8/R68S: passive_ok with all four sources landing in the config and the service restarting healthy. -
go test ./internal/service/scannerv2/probeno longer dials the real network (#364): the timeout-semantics test dialed a TEST-NET address expecting silence, on dev machines behind TUN proxies (Clash Verge etc.) the proxy fake-answers SYN packets to unroutable targets, turning "timeout" into a phantom "open" and failing the suite locally (CI unaffected). The TCP dial behind the port probe is now an injectable function; the test stubs deadline-exceeded semantics and additionally pins the exact one-retry contract. -
LuCI settings page no longer hardcodes the default password policy (#356): after an admin relaxes the policy via the settings center (DB overlay), the LuCI page kept describing the shipped default (min 8 + upper + lower + digit),misleading router admins whose chosen passwords actually passed. Both the form hint and the
pw_failbanner now point at 管理 → 设置 → 安全 as the single source of truth instead of restating rules. -
SPA never sent
Authorization: Bearer, total breakage on plain-HTTP deployments withcookie_secure: true: the api client's documented "cookie-first, Bearer fallback" contract had no fallback implemented, requests relied entirely on the auth cookie. Browsers silently DROP Secure cookies on plain HTTP, so on a fresh router install (generated config carriedcookie_secure: true) login "succeeded" but every subsequent authenticated call 401'd: the forced-password modal could never complete (surfaced as a generic session-expired error), the dashboard bounced straight back to /login.request/download/uploadnow attach the Bearer header from the stored session, and the OpenWrt installer additionally forcescookie_secure: falsein the generated config (router form factor = plain HTTP on the LAN). -
Heartbeat Start/Stop lifecycle race (shutdown hang):
NewRouterlaunchesgo heartbeatSvc.Start(...), so an immediateStop()(a test, or a fast shutdown) could run before the delayed Start,HeartbeatStore.Close()then read a nil cancel, skipped it, and blocked on<-doneforever while the late Start launched a flush loop nobody could cancel (field-observed as a 15-minute full-suite hang ininternal/api/routes; goroutine leak of the flush + sync loops). Both the store and the service now run a started/stopped lifecycle state machine: Close-on-never-started returns without waiting, Start-after-Close/Start-after-Stop are no-ops, and double-Start can't spawn duplicate loops. Regression tests pin all three orderings. -
Admin seeding robustness (first-run experience):
seedAdminUsercompared the wrappedErrUserExistswith==, so the "already exists, skip" branch never matched, every restart of an initialized instance logged a seed failure; startup seeding failures were only warns (now ERROR with areset-admin-passwordremedy hint); the two-step seed (Register + SetMustChangePassword on hardcoded id 1) is now one atomic CreateUser with the flag set; self-service password changes now stamppassword_changed_at(previously only the force/admin paths did); the declared-but-never-implementedErrSamePasswordcheck (new password must differ from current) is now actually enforced on change/force-change paths; the 2FA-verify cookie no longer hardcodes 24h and followsauth.cookie_max_age/token_expirylike the login cookie. -
Reserved-range scan targets rejected (#318 / #317): loopback / unspecified / link-local / multicast / broadcast / 240-4 targets are refused at every scan entry point (task create/update, sync scan, agent command dispatch); CIDR expansion drops network/broadcast addresses (nmap semantics, also closes the .255 phantom-device class of #254). Target expansion consolidated into
internal/cidrutil. -
MIBEE_*env overrides for underscore keys (#334 / #331): exact env-name→key mapping derived from the Config struct; underscore-bearing keys (initial_admin_password,allow_reserved_targets, …) were previously silently unreachable from the environment. -
Device gauges refresh periodically (#335 / #333):
mibee_devices_totalno longer freezes at the process-start snapshot. -
-demowith a broken config no longer segfaults (#330 / #327). -
Agent mini-DB startup migrations (#339 / #337): the agent's local schema now ships the full column set (offline_since / device_uuid / ssh_credential_id / scan_tasks.network_id+credential_id) and upgrades legacy DBs in place, previously every device-identity roam/replace silently degraded with "no such column".
-
Data-integrity / parity hardening batch: sqlite BUSY write-path governance + retry metrics (#311 / #267); schema version gating + backup retention (#312 / #268); scannerv2 store migrated to sqlc (#314 / #269); Windows build/test parity restored (#325 / #321); dashboard layout freeze (#302). (Feature batches that shipped in the same window were promoted to Added above.)
[0.5.0] - 2026-08-19
SNMPv3 + multi-role RBAC + device config backup + built-in notifier + synthetic probing + liveness time series. v0.5.0 clears the enterprise-adoption hard gates: SNMPv3 (USM authNoPriv/authPriv with an encrypted credential vault), a role/capability RBAC model with object-level network scoping (admin / operator / viewer + per-user network grants), device config backup (Oxidized/RANCID-style: scheduled show running-config pulls over SSH, versioned storage, two-version diffs, change-detection integration), a minimal built-in notifier (device events → webhook/email without running Alertmanager), and synthetic probing of external endpoints. Under the hood, device liveness becomes a time series (killing a change-log noise storm), device identity is keyed by device_uuid across satellite tables, and the release is rounded out by OUI longest-prefix vendor inference, a topology-visualization polish pass, observability wiring fixes, and a large frontend UX/a11y/correctness batch.
RBAC: multi-role capability model + object-level network scoping (issue #138)
The 2-role model (admin / user with a one-size-fits-all RequireAdmin) is replaced by a capability graph + per-network object scoping, unlocking team and MSP scenarios:
- Roles & capabilities:
users.roleCHECK widened toadmin/operator/viewer(userremains as a legacy alias for viewer). Every route is gated by a capability (CapDeviceRead,CapScanTrigger,CapDeviceWrite, …) via a newRequireCapabilitymiddleware; roles map to capability sets and admin inherits everything. AllRequireAdmincall sites were remapped, and shared read surfaces uniformly require theirCapXxxReadcapability. - Network grants: new
user_network_grantstable + admin management API (/api/v1/users/{id}/network-grants+/api/v1/networks/{id}/grants) + a users-page UI for assigning which networks a non-admin can see. - Scope modes (
rbac.scope_default, defaultopen): inopenmode non-admins see every network (single-team behavior preserved); inclosedmode a non-admin sees ONLY granted networks, enforced across the whole read surface (device lists/detail, scanner tasks/runs/results, changes, topology), with unauthorized details returning404. Admin always bypasses scope; unknown config values fall back toopen(fail-safe against lockout). - Scanner object scoping:
scan_tasks.network_idstamps each task's owning network; in closed mode non-admins only see/trigger tasks within their granted networks, and the scan-target network-boundary check carries over. - Migration is zero-drama for existing installs: admins stay admins,
userrows keep working as viewers, andopenmode preserves the previous visibility exactly.
SNMPv3 (authNoPriv / authPriv), issue #135
The last hard enterprise gate: hardened environments increasingly disable v2c community strings, and every serious competitor supports v3.
- Credential vault: new
snmp_credentialstable stores USM credentials (user, auth passphrase + protocol, priv passphrase + protocol, security level) encrypted at rest with AES-256-GCM, keyed bysecurity.master_key(exactly 32 bytes,MIBEE_SECURITY_MASTER_KEYoverride). The key is optional until the first v3 credential exists, existing v1/v2c deployments keep working unchanged. - Probe support: the SNMP probe's version loop gains
Version3; authNoPriv (MD5/SHA/SHA-2) and authPriv (+ AES/DES) credentials are tried per target, and ALL OID paths work under v3, the 8-OID identity collection and the LLDP-MIB / CDP-MIB / Bridge-MIB / Q-BRIDGE-MIB / STP-MIB / IF-MIB topology walks. - API + UI: credential CRUD with write-time encryption and read-time redaction (passphrases never echo back); scan forms and device pages carry v3 options with a security-level dropdown.
- Agent-side v3 is intentionally deferred (issue #241, needs a distributed credential design); agents keep v1/v2c.
Device config backup, Oxidized/RANCID-style (issue #137)
Network-ops staple: periodically pull each router/switch/firewall's running-config, version it, diff it, and wire config changes into change detection. Ships end-to-end (browser-verified); opt-in via scanner.config_backup.enabled (default off, requires security.master_key + an SSH credential bound to a device).
- Storage:
device_configs(versioned perdevice_uuid: fetched_at, config_hash, config_text, protocol, diff vs previous) andssh_credentials(encrypted with the same AES-256-GCM master-key cipher as SNMPv3; CRUD API encrypts on write and redacts on read). - SSH probe engine (
scannerv2/configbackup):golang.org/x/crypto/sshwith a vendor command matrix (Juniper JunOSshow configuration | display set; HP / Aruba / H3C / Comwaredisplay current-configuration; Cisco IOS/NX-OS, Arista, Huawei VRP, Mikrotik and unknowns fall back toshow running-config) and host-key TOFU (trust-on-first-use) recording. - Service: scheduled sweep selects router/switch/firewall devices with bound credentials, fetches, diffs, and records a new version only on change, a change emits a
device_config_changedevent intochange_log+ the in-process Watcher (so it feeds the changes page, SSE watch, and notification rules). - Read API + UI:
GET /devices/{id}/configs(list),/{configId}(detail),/diff?a=&b=(two-version compare); device detail gains a Config History tab with version list, detail modal, and hand-colored unified-diff rendering. - Real-router end-to-end smoke (GL-MT3000) is deferred to the next release, the code path is complete and browser-verified against the API.
Built-in notifier: device events → webhook/email (issue #139)
SOHO/branch users no longer need a Prometheus+Alertmanager stack just to get "device lost" emails. A rule engine subscribes to the change-detection Watcher and routes matched events through the existing notification dispatcher (webhook/email channels, 3 workers, per-user read state), a thin rule→channel hop, deliberately NOT an alerting engine:
- New
notification_rulestable: event type (device_lost/device_recovered/device_added/device_changed), scope (all / network / device-by-uuid), target channel,cooldown_minutes(default 30) per (rule × device) anti-flap window, enable toggle. - The engine layers per-(rule, device) cooldowns on top of the change-detector's existing liveness cooldown, flapping devices don't spam channels.
Device liveness time series + identity hardening (issues #114 / #115 / #116 / #117 / #120 / #129)
Fixes a change-detection noise storm at the root: liveness (online/offline) was modeled as discrete device_changed events, so every status flip fired a row (70k+ burying real changes on the test network).
device_livenesstime series (in the heartbeat store): one online/offline verdict sample per device per tick, batched through the existing buffered-write/WAL infrastructure. Queries:OnlineRatio(window jitter-vs-transition signal),OfflineDuration,LivenessHistory. Disposable,devices.statusstays the source of truth.- Tiered change events: status flips are consumed by the liveness tier instead of spamming
device_changed; real adds/changes/losses stay crisp. device_uuidas the satellite key: heartbeat targets and the satellite tables key by the stable device UUID (not IP), so address changes don't fork history. Fixes the empty-sentinel regression where a device's second scan showed stale data (#129).- Lease sweeper flap decay: agent-network flap counts decay instead of hard-resetting, so a flapping device trends toward lost instead of ping-ponging.
- Silent-device retention: scanner-discovered devices with no heartbeat are auto-pruned, MAC-bearing devices after
retention.silent_device_days_mac(default 7d), MAC-less identities afterretention.silent_device_hours_no_mac(default 24h). Manual devices are never auto-deleted; coming back online resets the clock. - Liveness in the UI: device detail exposes last-seen / offline-since / last-online.
Topology visualization polish (issue #136)
The L2 data (LLDP/CDP/Bridge/Q-BRIDGE/STP edges) was already the richest among OSS peers, now the rendering catches up:
- Layered force-directed layout: core/distribution/access layers with distinct node colors; the legend doubles as a per-layer visibility filter.
- Search + focus: typing dims non-matching nodes; clicking a node highlights its neighbors and opens a detail card (IP/MAC/type/degree).
- Port drill-down: edges expose local/remote port, VLAN tag, and STP role from
topology_edges. - Performance: option rebuilds are incremental; large graphs stay interactive.
Handler/service charter debt cleared: the 4 grandfathered handlers migrated (issue #240)
The last four mutating handlers that wrote to the DB directly (documented as charter debt since #166) now go through service layers, the charter has no remaining debt rows:
service.NetworkService: network CRUD; the raw-SQL UPDATE workaround (sqlc truncation) moved out of the handler into the service.service.AgentTokenService: agent-token create/revoke/delete, including thenetworks.agent_idstamp-on-create / conditional-clear-on-revoke wiring. Token MINTING stays in the HTTP layer (one-time credential display) and is injected as aTokenMinterfunc, keeps the service free of api-layer imports.service.AgentCommandService: enqueue (with the scan-target network-boundary check, now returning a typedBoundaryErrorthat carries the offending IPs verbatim), ack, complete.service.ScannerResultService:BulkDeleteResults(before-date validation + delete).
Read-only passthroughs (List/Poll/ListAll/export) stay on *db.Queries per the
charter's sanctioned exception. Behavior is unchanged at the HTTP surface (one
message nuance: a revoke of an already-revoked token now returns "agent token
not found" instead of "...or already revoked"). internal/api/AGENTS.md debt
table cleared.
Metrics: dead collectors wired up + metrics_path honored (issues #238 / #239)
HeartbeatFailures was a dead alert, mibee_heartbeat_checks_total (and five
siblings) were registered at /metrics but never incremented in production
code, so the alert's expression was permanently 0. Fixed by moving the
collectors to a new neutral package and wiring the producers:
internal/metrics(new): the 7mibee_*collectors moved out ofinternal/api/handlerso the service layer can increment them without an handler→service→handler import cycle.handler.MetricsHandler/UpdateDeviceMetricsunchanged in behavior.- Heartbeat:
probeAndRecordnow incrementsmibee_heartbeat_checks_total{status}per recorded outcome and observesmibee_heartbeat_latency_seconds{method}, theHeartbeatFailuresalert rule evaluates against real data. - Scanner: run completion/failure increments
mibee_scanner_runs_total{status}, observesmibee_scanner_duration_seconds, and adds alive hosts tomibee_scanner_hosts_discovered;mibee_scanner_tasks_total{status}is refreshed at scheduler start and after task CRUD (metrics.RefreshScannerTaskGauges). prometheus.metrics_pathnow actually configures the mount point (previously defined in config but hard-coded to/metrics; empty or non-absolute values fall back to/metrics).
sqlc: generated code back in sync with schema.sql + CI drift guard (issue #237)
The committed internal/db had been stale since #233 (scan_tasks.network_id
landed in schema + migrations without sqlc generate), so any full regenerate
emitted per-query Row structs that broke ~10 call sites, PR #235 had to
surgically merge around it. Fixed at the root:
db/queries/devices.sqlfull-row lists now selectssh_credential_id(6 lists) anddb/queries/scan_tasks.sqlselectsnetwork_id(7 lists), the column sets match the tables again, so sqlc restores model reuse and NO call sites needed changes. TheCreateScanTaskINSERT still does not setnetwork_id(stamped post-insert by raw SQL, as before).- Full
sqlc generateis now idempotent against the committed tree (fresh generate produces an empty diff). - CI drift guard: the
sqlc-verifyjob installs sqlc v1.31.1 (matching the committed generator) and fails whensqlc generateproduces a diff ininternal/db/, schema/query changes must ship with regenerated code. - Tests with hand-rolled inline
devicesschemas gained thessh_credential_idcolumn.
Synthetic Probing (Phase 1)
Blackbox-style probing of EXPLICIT external endpoints (PR #235), user-configured
probe targets (typically internet resources: a public HTTPS site, a hosted mail
TLS port) probed on fixed intervals, managed via DB/API/UI. The scanner's
internal-network TLS certificate collection (CollectCertChain) is reused
directly against external hostnames (SNI auto-derived), extending cert-chain
inventory beyond the LAN.
- Three tables:
probe_targets(name UNIQUE, module CHECK http/tls/tcp/icmp, interval 10–86400s, timeout 1–60s, denormalized last_* outcome),probe_results(append-only history with per-run cert summary; RFC3339 string timestamps),probe_tls_certs(each target's CURRENT chain, delete-then-insert; a transient handshake failure keeps the last known-good chain, unlike the scanner's current-state semantics). - Engine (
internal/service/probetarget/): 10s tick re-reads enabled targets so CRUD applies without restart; next-due times resume fromlast_run_aton restart (no startup storm); 8-probe concurrency bound; in-flight guard makes scheduled and manual runs of one target mutually exclusive;POST /{id}/triggerprobes synchronously and returns the recorded result. - Modules: http/tcp/icmp reuse the shared heartbeat probers
(
probe.ResultgainsStatusCode); tls, and https-flavored http, callCollectCertChainfor the full chain (leaf + issuers + trust verdict + TLS version/cipher). - API
/api/v1/probe-targets: CRUD + trigger +/{id}/results+/{id}/certificates(the cert response reuses the device endpoint'stlsPortCertsshape, so the frontendCertificateModalworks unmodified). RBAC:probe:read(viewer+),probe:manage(operator+). - Prometheus:
mibee_probe_up(mirrorsprobe_success),mibee_probe_duration_seconds,mibee_probe_cert_expiry_timestamp_seconds(mirrorsprobe_ssl_earliest_cert_expiry),mibee_probe_checks_total; two example alert rules (ProbeTargetDown,ProbeCertExpiringSoon) indeploy/prometheus/alert_rules.yml. - Retention:
retention.probe_results_days(default 30d) swept by the existing cleanup service. - Frontend:
/probesmanagement page (status/latency/cert-days badges, enable toggle, history modal, certificate chain modal), zh/en i18n, nav entry. - sqlc note: query-file comments must NOT contain apostrophes, sqlc's
SQLite lexer swallows them and silently truncates the generated statement
(documented in
db/AGENTS.md).
MAC bit flags: locally-administered / multicast (neutralized from Phase 1)
Correction of #118 Phase 1 (PR #121), Phase 1 treated the
locally-administered (U/L) bit as a "randomized MAC" verdict and downgraded such
devices to (ip, network_id) identity. That was a semantic overreach: per IEEE
802 / RFC 7042 the U/L bit only means "locally administered", and it cannot
distinguish privacy randomization (iOS/Android, unstable) from a locally fixed
setting (soft-router / hypervisor / manual, stable). On the test network this
mislabelled 7 stable soft-routers/NASes and split one (R68s) across networks
because of the identity downgrade. This change reverts the wrong behavior while
keeping the bit as a neutral observability flag.
- Identity downgrade reverted (
resolveDeviceIdentityindevice_bridge.go): the LAA-bit gate that forced(ip, network_id)identity is removed; device identity is pure MAC-primary again (with the existing(ip, network_id)fallback only when no MAC is known). - Neutral naming: the U/L bit is reported as "locally administered", not
"randomized". Renamed:
scan_attributes.mac_is_randomized→mac_is_locally_administered; helperstore.IsLocalMAC→IsLocallyAdministeredMAC; UI badge label "Randomized" → "Locally Admin." with a neutral tooltip stating the bit cannot tell random from fixed.mac_is_multicast/IsMulticastMACunchanged (multicast bit is unambiguous). - The flag is observability-only, it does NOT change device identity. See issue #118 research comment for the full rationale (RFC 7042, license boundary for IEEE data, etc.).
OUI vendor inference: MA-S / MA-M / MA-L longest-prefix match
Deterministic MAC enrichment, the OUI lookup now resolves a MAC to its
IEEE-registered vendor via longest-prefix-match across the three registries:
MA-S (/36, 9 hex, formerly IAB) → MA-M (/28, 7 hex) → MA-L (/24, 6 hex). This is
mandatory because MA-S/MA-M sub-blocks are carved out of /24 OUIs owned by IEEE
or another vendor, without longest-prefix, a MAC starting 8C1F64B14.. would
be mislabelled "IEEE Registration Authority" instead of "Murata" (the MA-S
sub-assignee).
vendor/oui.go:Lookupnow does longest-prefix match; newLookupFullreturns(vendor, prefix)so callers can record which block matched. The loader indexes prefixes of all three lengths (the 6-hex cap inNormalizeMACPrefixis lifted via a newnormalizeHexPrefix).- New
scan_attributesfields:oui_prefix(the matched 6/7/9-hex block) andoui_vendor(the IEEE organization name, the NIC silicon vendor). Kept SEPARATE from the existingvendor(the device's self-declared brand via SNMP/HTTP/TLS); the two differ in OEM/rebrand/virtualization cases. - Out-of-box coverage: the engine now auto-seeds from an EMBEDDED curated
CC-BY-SA table (
vendor/oui_curated.txt, via//go:embed) whenscanner.oui_pathis empty, a fresh install gets vendor inference for common devices without any setup. A user-configured full IEEE file still overrides it. scripts/fetch-oui.shrewritten: fetches all three IEEE CSVs (MA-L/MA-M/ MA-S), merges into one<prefix>\t<vendor>file with Python CSV parsing (vendor names contain commas/quotes). Also fixes a pre-existing typo in the download URL (standardeee.org→standards-oui.ieee.org), the old script downloaded from a non-canonical mirror and would have failed.- License boundary preserved: the IEEE registries are "All rights reserved"
factual data, they are NOT folded into the CC-BY-SA fingerprint corpus (see
docs/fingerprint-spec.md§8 "Data vs code distinction"). The embedded curated table is a hand-authored CC-BY-SA subset, not an IEEE reproduction; the full IEEE set stays an optional runtime download.
UI: OUI vendor (NIC silicon) surfaced in device views
Follow-up to the OUI vendor inference above, the new oui_vendor /
oui_prefix fields (Phase 2) are now visible in the UI, kept distinct from the
device's self-declared vendor brand.
- Device detail Discovery panel: a new "OUI Vendor (NIC)" row after Vendor,
showing
oui_vendorwith the matched IEEE block (oui_prefix) as a tooltip. - Expand-row device summary: the same field after Vendor.
- Extras-leak fix: the store's
RecordDevice/buildStoreScanAttributespath was lettingoui_prefix/oui_vendor(andmac) fall through intoscan_attributes.extras(visible as rawOUI_PREFIX/OUI_VENDORkeys in the Extras panel). They're now mapped to the typed fields and kept out of Extras.
HTTP surface hardening (issues #133 / #164 / #165 / #177)
- Trusted-proxy-aware RealIP: the deprecated
chimw.RealIP(which unconditionally trustedX-Forwarded-For) is replaced by middleware that only honors forwarded headers from configuredserver.trusted_proxies; client IPs can no longer be spoofed via the header. - Sentinel errors → proper 400s: service-layer validation errors are typed
sentinels; handlers map them with
errors.Isinstead of returning 500s for user mistakes. - credential.go error leak: internal error details no longer leak to API
clients; plain
http.Errorresponses became JSON; sentinel mapping added.
Frontend UX / a11y / correctness batch (issues #150–#176)
A consolidation pass across the SPA:
- Destructive-action gates: batch device-status flips require confirmation; five create/edit modals gain a confirm-on-dirty-discard guard.
- DataTable a11y refactor: event-delegation rows become properly interactive (keyboard-handled, focusable), no more click-only rows.
- Scanner cancel: long scans can be aborted from the scan page (AbortController), with the same validation pattern applied to scan tasks and agent targets; login password gains a Zod schema.
- 2FA type safety: the login 2FA path drops its
as anyassertions; forced password-change after 2FA reuses the same modal. - Mutation feedback consistency: users-page toasts, documents-page quiet-success, scanner-page merged error handling.
- Locale-aware formatting:
toLocaleStringcalls follow the paraglide UI locale (dates/numbers match the chosen language). - Empty-state honesty: search-with-no-results no longer shows a misleading create CTA; error states stay distinct from empty states.
- Fixes:
/changes/watchSSE no longer reports "disconnected" forever (#195); the changes page shows display names/IPs with structured summaries instead of raw JSON (#196); the dashboard offline-device fallback resolves the current IP when the name degenerates to it (#197); device-list sorting by IP/network/vendor/hostname with numeric IP ordering is server-side (#122).
Performance & concurrency (issues #162 / #163)
- Scanner perf: UUID lookup cache,
PRAGMA temp_store=MEMORY, and batched miss-count increments on the DetectLost path. - Concurrency hygiene: scheduler runs IO outside its lock,
LeaseSweeperowns a WaitGroup, the rate limiter and eBPF observer stop cleanly on shutdown.
Code health (issues #132 / #141 / #157 / #158 / #160 / #161)
internal/repository/dissolved, repository types moved intointernal/service/next to their consumers (one less layer to jump).- Handler stub collapse: server/TLS handler families register data-driven, ~68 handwritten stubs deleted.
- God-file splits:
main.gomigration logic →migrations.go; scanner config types →scanner_config.go. - Dead-code cleanup: v1 scanner stub, misplaced test helpers,
var _placeholders.
Test coverage net (issues #134 / #171)
A characterization-and-regression series over the previously untested core:
runMigrations idempotency + fresh-DB, device-bridge identity merges,
router-ARP config parsing, retention sweeps, scheduler-coupled scan-task
trigger/cancel, auth/CSRF/RBAC middleware, network CRUD, 2FA-TOTP (incl. a
bypass guard), user-management security paths, SNMP-credential handler
(incl. a passphrase-leak guard), scanner-task + audit handlers, and the first
.svelte page render tests (login / devices / scanner / probes).
Documentation
- Website manuals migrated into the repo (
docs/{zh,en}/, 14 bilingual files): introduction, quick-start, architecture, API, configuration, deployment, development, discovery, distributed, eBPF, OpenWrt, fingerprint-spec, product-scope, changelog, the repo is now the single source of truth the website syncs from (issue #234). - Probe/synthetic-probing docs + config samples completed (issue #236);
config.example.yamlregained 9 config blocks that code used but the sample lacked (agent/rdns/mdns/arp_scan/reconcile/retention, issue #131).
Deferred
- Agent-side SNMPv3 credentials (issue #241, needs a distributed credential/key-distribution design; agents stay on v1/v2c).
- Config-backup real-router end-to-end smoke (GL-MT3000), code complete, hardware-gated verification.
[0.4.0] - 2026-07-29
Router-resident discovery + OpenWrt deployment + device-persistence rewrite. v0.4.0's headline is a new router form factor: when the center or agent runs ON the gateway, it gains four Tier-1 passive discovery sources (DHCP leases, conntrack, hostapd, dnsmasq query log) that see hosts active probing can't; sleeping IoT, firewalled hosts, WiFi-only clients. This ships with first-class OpenWrt deployment (procd init scripts for both binaries) and a single-writer device-persistence rewrite that eliminates a long-standing dual-write fissure. Rounded out by a frontend IA restructure, server-side search/sort that survives pagination, per-user notification read state, Zod form validation, and a DataTable XSS hardening pass.
Router-resident discovery sources (Phase A/B)
The discovery engine (internal/service/scannerv2/discovery/) gains four
Tier-1 sources that only work when the host IS the LAN's gateway/AP, the NAT
choke point that sees every flow. All are opt-in (default off) and no-op where
their backing file/socket is absent, so a host-based deployment degrades
gracefully.
dhcp_leases: reads the local DHCP server's lease table (dnsmasq/tmp/dhcp.leaseson OpenWrt,/var/lib/misc/dnsmasq.leaseson Debian), the authoritative hostname↔MAC↔IP map, covering devices that never answer SNMP/ICMP/rDNS.conntrack: reads/proc/net/nf_conntrackand emits the LAN-side endpoint of every ESTABLISHED/ASSURED flow, the "who is talking RIGHT NOW" view. Liveness + discovery for hosts that don't answer active probes but maintain outbound flows. Filters tonetwork.cidr.hostapd: enumerates WiFi STAs via the hostapd control socket (/var/run/hostapd/<phy>), falling back toiw station dump. Captures signal dBm / connect time / SSID, unavailable to a wired host.interfaceslists wlan names; empty = autodetect.dns_log: tails the dnsmasq query log (--log-queriesoutput) and emits each querying host + the domain, a powerful passive fingerprint (devices that block inbound probes still do outbound DNS). Operator must enable query logging (UCI:uci set dhcp.@dnsmasq[0].logqueries=1).arp_scanactive source (discovery/arp_scan_*): active ARP-sweep source (CAP_NET_RAW, build-tag stub when unavailable), complements the existing passivearp_cache/multicast/router_arpsources.- Passive-source wiring on the agent (Phase A): the agent binary now runs the discovery engine, so a router-form agent reports its LAN's passive discoveries into the center alongside scan results.
- Multicast /
router_arpsilent-failure fix: these sources no longer fail silently, they disable themselves with a logged reason when their socket / SNMP walk is unavailable, instead of appearing healthy while emitting nothing. A new warning fires whenrouter_arpis redundant to a router-resident source already covering the same hosts.
OpenWrt deployment (Form C router-center)
First-class support for running the center or agent directly on an OpenWrt router, the natural home for the router-resident sources above.
- procd init scripts:
deploy/openwrt/mibee-steward.initandmibee-agent.init, UCI-configured services that start on boot, restart on crash, and run as an unprivileged user. README documents install, config, and the CAP_NET_RAW story. - ARMv7 build target + init-script dedup: the release matrix and OpenWrt packaging were polished for the common low-power-router target (ARMv7), and the two init scripts were de-duplicated.
Device persistence: single-writer funnel + device replacement
Architecture fix, eliminates the dual-write fissure where the devices row
was written by two independent paths (store.RecordDevice and
runner.applyDeviceBridge) with inconsistent field semantics. The most visible
symptom was that a synchronous POST /scanner/scan left the row status= 'unknown' (only the store wrote it), while a scheduled scan flipped it to
online (the runner's write). A device-replacement case (router swap) exposed a
worse failure: the new device's data landed on a stale IP while the live gateway
row kept showing the dead old device, because the two writers disagreed on
identity + which fields to overwrite.
- Single device writer:
runner.applyDeviceBridgeis now the sole authority for thedevicesrow lifecycle (identity creation, display name,status, heartbeat seeding, change-detection, device-replacement detection). The sync scan API (scanner.goScan) now persists alive hosts throughrunner.ApplyReport, the SAME path async scan tasks use, so a sync scan and a scheduled scan leave identical rows. store.RecordDevicereduced to enrichment-only: it no longer INSERTs identities, setsname/status, or detects replacement. It only enriches an already-existing matched row (mac/type/brand/scan_attributes) as a best-effort pre-write inside the orchestrator; it cannot conflict with the runner.- Device replacement detection (
resolveDeviceIdentityindevice_bridge.go): when a scan's MAC matches a device on a different IP and that IP is held by a different-MAC device (router/asset swap), the IP-holder wins, its identity fields are force-overwritten with the new device's, and the prior MAC-matched row is marked offline. The before/after change-detection diff records the old→new identity inchange_log.
Network reconciliation (drift detection)
internal/service/scannerv2/reconcile/: a background job that finds devices whose IP has drifted outside their stampednetworks.cidr(e.g. a roaming laptop that picked up a new subnet's DHCP) and surfaces them for operator correction. Detect-and-surface, not auto-fix, automatically re-homing a device is destructive (changes identity, breaks historical linkage, can flap on overlapping IP space), so correction stays a human decision. Findings are exposed via structuredslogwarnings (rate-limited), amibee_network_mismatchesPrometheus gauge per network, and theReconcile()return value (a future admin endpoint). Backed by the newinternal/cidrutilpackage.
Configurability
- Detection thresholds + heartbeat cadence now configurable (were
hard-coded):
scanner.lost_threshold(consecutive-scan absence count before "lost", default 2),heartbeat.tick_interval_seconds(probe-loop cadence, default 30),heartbeat.offline_threshold(probe failures before offline, default 5),heartbeat.offline_backoff_ticks(probe an already-offline host once every N ticks, default 10 → ~5min on a 30s ticker). All carryMIBEE_*env overrides;0means "use default". Seeinternal/config/defaults.go. - Rate limit raised
rate_limit.global_per_minute100 → 600, with SPA static assets (/_app/*) exempted anddata:fonts allowed in CSP, the old 100/min starved multi-tab + background-polling sessions. - Shared constants extracted (
config.SysUpTimeOID,config.DefaultScanPortSpec): the sysUpTime OID (copied across 6 sites) and the curated scan port set are now single-source constants, killing the duplication that invited drift.
Domain: device types
phoneandprinterdevice types added to the type union (internal/domain/device.go) and thedevices.typeCHECK constraint, both the schema and the Go enum are the single source of truth, guarded by a schema-sync drift test. The hostname/brand/port → type inference table (configs/fingerprints/device-types/device_types.yaml) is fully data-driven (adding a signature = one YAML entry, not a Gocase).
Management UI restructure
- Information architecture overhaul: sidebar regrouped, scan entry points consolidated, topology merged into the Devices page as a view toggle (radial graph ↔ table), and a dashboard attention banner with a primary action surfacing what needs an operator's eye.
- Device-detail restructure: health banner + 5-tab navigation (overview / services / TLS certs / neighbors / changes).
- Device edit/delete via a shared
DeviceEditModal.sveltereachable from both the list and detail pages. - Shared primitives:
PageHeader/PageShell/LoadingButtonextracted and adopted across pages for consistent loading + layout.
Server-side search, sort, and pagination
A batch of correctness fixes where client-side filtering silently lost results once a list grew past one page, search/sort now runs on the server so it spans the full dataset:
- Server-side search on users / audit / changes / documents / scan-tasks /
scan-results (
fix(web,api)#54, #55, #64, #86). - Scan-results sort server-side so ordering holds across pages (#55).
- Dedicated
PATCH /channels/{id}for the channel enabled-toggle (#53); writes onlyenabled, avoiding a GET-then-write race. - CSV import reads the backend
{added, errors}result instead of the preview count, so the post-import tally matches reality (#58).
Notifications
- Per-user unread tracking (
notification_read_statestable): the header bell now shows a per-user unread count and clears on dropdown open. Previously the bell was system-wide (no recipient concept). - NotificationBell pauses polling in background tabs and backs off on failure, stops hammering the API from idle tabs (#67).
Frontend hardening
- DataTable XSS fix (
lib/utils/html.ts): a tagged-templatehtml()helper that escapes interpolated values, with all rich-text callers migrated off string concatenation (#50, #87). - Zod schema validation added to 7 forms (login, register, device edit, network, channel, scan, CSV import), client-side validation now mirrors the backend rules (#66, #106).
- Error-state honesty: pages no longer disguise server errors as empty states, a failed fetch shows an error + retry UI instead of a blank "no data" panel (#65); device-detail shows error + skeleton states instead of blank (#56).
- API client hardening: GET retry on transient 5xx, env-based base URL, and a unified 401 handler that routes session-expiry to re-login (#73, #109).
- i18n completeness: localized scattered hardcoded English across 9+ pages, the discovery funnel, topology tooltips, ChangeDiff labels, and layout/a11y labels; API error messages + form-validation messages now go through the i18n boundary (#40–#63, #101–#105).
- a11y + component cleanup: ARIA ids, focus management, Escape-to-close on click-toggle menus, chart resize handling, scanner alive-hosts table pagination for large (/22+) ranges with the bar hidden when results fit one page (#74, #100, #108, #110, #112).
- Misc P2/P3 batches: lib/components, agents/settings/networks/documents, and devices subtrees got consolidated correctness / type-safety / a11y passes.
Operations
change_lognoise reduction: service-evidence dedup + offline-backoff cut the steady write of timeout rows for dead hosts.agentrace fixes:TestCommandPoller_ScanPayload_StringQuotedandTestReporter_SendsStateHashHeaderdata/logic races fixed (CI runs-race).- Fingerprint corpus sync from
mibee-fingerprints-go(http-tls + ports rules), with golden tests covering the synced http-server-* + smb-version rules.
License
- AGPLv3 + commercial dual-licensing applied project-wide (supersedes the
earlier PolyForm NC): full AGPL-3.0
LICENSE,LICENSE-COMMERCIAL.md,NOTICEthird-party attributions,CLA.md+.github/DCO.md+ DCO CI check, andSPDX-License-Identifier: AGPL-3.0-or-laterheaders on all.go/.ts/.svelte/.c/.sqlsource; fingerprint YAMLs carry CC-BY-SA 4.0 headers.
[0.3.0] - 2026-07-18
Full L2 topology + TLS certificate inventory + container images, v0.3.0 completes the topology story started in v0.2.0 (CDP/Q-BRIDGE/STP probes, radial visualization, neighbor identity inference), adds a TLS certificate inventory that collects the full cert chain from every TLS-wrapped service on each device, and introduces official multi-arch container images on GHCR.
TLS certificate inventory
- TLS cert collection (
probe/cert_collector.go): single source of truth;CollectCertChain(ctx, ip, port, timeout)performs a TLS handshake (InsecureSkipVerify for inventory) and extracts the full peer chain. Per-cert: Subject/Issuer/SAN (DNS/IP/email)/serial/validity/sig algorithm/key algorithm- bits (RSA/ECDSA/Ed25519)/is_ca/self_signed/SHA-256 fingerprint/PEM; per-handshake: TLS version, cipher suite, best-effort trust verdict. Failure path returns an error record (still persisted) so the UI can show "we tried this port".
- TLS-wrapped service handlers (
handler/tls_collect.go): 8 handlers (https,ldaps,smtps,imaps,pop3s,ftps,ircs,telnets) sharing onetlsCollectHandlercore, eachCollect()callsprobe.CollectCertChainand returns aTLSCertCollectedpayload. Handler count 21 → 29. - Extended MiscClassifier: TLS-wrapped service ports (465/989/990/992/993/994/995) now asserted as service identities so the cert-collect handler runs for them.
- Extended TLSProbe: default port set expanded from 4 to 12 (+ 465/636/989/
990/992/993/994/995). Refactored to emit richer evidence fields (
not_before/not_after/sig_algorithm/key_algorithm/fingerprint_sha256/san_email). host_tls_certstable: one row per cert in each port's chain (cert_index 0 = leaf, 1..N = issuers); PEM + typed columns; indexed on(ip, port)andnot_after(for expiry sweeps).- Read API
GET /api/v1/devices/{id}/certificates: per-port grouping with leaf + chain; status-coloring metadata (TLS version, cipher suite, trust verdict, error). - Frontend TLS sub-panel: new "TLS Certificates" panel under Scan Discovery, one clickable row per port with status-colored left border (green=valid / amber= expiring <15d / red=expired), day-count badge, self-signed/trusted tags.
CertificateModal.svelte: full-chain viewer, status header, summary field grid (Subject/Issuer/Validity/SAN/algorithms/fingerprint), collapsible chain entries, PEM block with copy-to-clipboard.- Retention
retention.host_tls_certs_days(default 30). - i18n: new
certificatessection (34 keys, EN + ZH).
Topology probe breadth
- CDP-MIB probe (
active:cdp_mib): walks CISCO-CDP-MIBcdpCacheTableon Cisco/CDP-speaking switches. Uses device id as the neighbor merge key. Emitsprotocol:"CDP"neighbor edges. - Q-BRIDGE-MIB probe (
active:q_bridge_mib): walks IEEE 802.1Qdot1qTpFdbPortfor VLAN-aware MAC→port forwarding entries. Recovers L2 adjacency on tagged/inter-VLAN topologies. Emitsprotocol:"Q-BRIDGE"edges with ifName-resolved port names. - STP-MIB probe (
active:stp_mib): walks BRIDGE-MIBdot1dStpfor Spanning Tree facts (root bridge, designated port, port role/state). Emitsprotocol:"STP"evidence. - IF-MIB ifName resolution (
probe.ResolvePortNames): shared helper that turns numeric ifIndex/port values into human-readable interface names (e.g.GigabitEthernet0/1). Used by CDP/Q-BRIDGE probes.
Topology visualization
- Network topology page (
/topology): a full-network radial tree view (EChartstreeseries, newly tree-shaken in) of devices as nodes anddevice_neighborsas edges. Node color by device type; edge color by protocol (LLDP blue / Bridge-MIB green); dashed edges point at unidentified neighbors. Network filter + 60s auto-refresh; click a node to open its detail page. - Device-detail Neighbors panel: a table of a device's L2 neighbors with the
neighbor's name/IP/type (via a device JOIN,
neighbor_device_idwas always NULL in v0.2.0; now resolved at query time) and a link to its detail page.
LLDP discovery (two paths)
- SNMP LLDP-MIB probe (
active:lldp_mib, default ON): walkslldpRemTableon SNMP-speaking switches/APs that run LLDP, the cross-vendor standard. Emitsprotocol:"LLDP"neighbor edges through the existing neighbor pipeline (zero new wiring). Unprivileged (UDP/161); no new dependencies. - Raw-frame LLDPDU listener (
WITH_LLDPbuild-tag, default OFF): captures ethertype 0x88cc frames via AF_PACKET (needs CAP_NET_RAW) to see LLDP-broadcasting endpoints (IP phones, APs, NAS) that don't run SNMP LLDP-MIB. Mirrors the eBPF observer's build-tag pattern, the default build ships a no-op stub so it stays unprivileged (make build-with-lldpto enable).
Neighbor identity inference
- Orchestrator gains pluggable
NeighborIdentityInfercallback wired to the RuleClassifier, CDP/LLDP neighbors get vendor/model/type inferred from their platform string. EnrichDeviceByMAC: enriches a device's vendor/model/type/hostname by MAC (the neighbor merge key), preserving existing non-empty values.
Container images & deployment profiles
- GHCR publishing: every
v*tag now builds a multi-arch (linux/amd64 + linux/arm64) image atghcr.io/mi-bee-studio/mibeesteward, tagged:latest/:<version>/:<major>.<minor>/:sha-<short>. The release workflow'spublishjob waits on[release, docker]so a GitHub Release is only created when both binaries and image succeed. Image is the unprivileged variant (LLDP/CDP/eBPF compiled as stubs). - Docker network-mode profiles: three compose profiles so the deployment
shape matches the intent,
bridge(default, NAT'd, MAC/ARP degraded),host(recommended, ≈ bare-metal probe fidelity),macvlan(own LAN IP). Measured on the test LAN: the default docker bridge found 0/26 device MACs vs 30/31 with host networking (the container's/proc/net/arponly sees the bridge gateway). Seedocs/{en,zh}/deployment.md§ "Docker network mode". - Dockerfile:
BUILD_TAGSarg (WITH_LLDP/CDP/EBPF opt-in), opt-inSETCAP(file caps break exec() when the cap isn't in the bounding set, so default off),NPM_REGISTRY/GOPROXYargs for restricted-network builds,NODE_OPTIONSfor the vite heap,/datapre-owned by the non-root user. - Makefile:
docker-build/-priv/-up/-up-bridge/-up-macvlan/-down/-logstargets. configs/config.docker.yaml: container template (network.cidr, /data paths, bridge-mode router_arp guidance).
CI
docker-buildsmoke-test job (ci.yml): on every PR, builds the image (amd64 only, no push) and boots it with a minimal config, waiting up to 30s for/health, catches Dockerfile/compose regressions before a tag.- Node.js 20 deprecation: actions still target Node 20; GitHub is forcing Node 24 (warning, not failure). Upgrade pending.
Retention hardening
device_neighborsandhost_servicesnow have retention sweepers (they grew unbounded in v0.2.0, a latent bloat bug). Defaults: 90d neighbors (topology history value), 30d host_services. Per-tableretention.*config keys +days<=0safety guard.- Also fixes a latent sqlc v1.27.0 bug: a non-ASCII char in a query comment corrupted sibling-query codegen (silently emitted broken SQL, runtime query failure, not a build error).
Test coverage
- taskservice (scan-task state machine): was zero-tested. Now covers CRUD, validation, pagination clamping, not-found mapping, and nil-scheduler behavior.
- Fingerprint golden test: a quality regression guard (real-world evidence samples → expected service/metadata), distinct from the existing count test; so a rule edit that breaks identification fails even if the count is unchanged.
Fingerprint library
- Extended
snmp-data.yamlwith consumer/SMB networking sysObjectID prefixes underrepresented vs the enterprise-heavy table (ASUS, D-Link, Zyxel, Tenda, DrayTek, alternate TP-Link/Mikrotik subtypes). Each is one YAML entry. - New
lldp-cdp.yamlrules for CDP/LLDP device identification.
Fixes
- Removed deprecated
tls.VersionSSL30(staticcheck SA1019). - gofmt + golangci-lint cleanup (QF1008, unused params, embedded selectors).
[0.2.0] - 2026-07-13
Distributed multi-network discovery, topology-aware probing, a change-detection
engine, and a data-driven fingerprint rule library. The release ships two
binaries: the center (mibee-steward, the existing SPA-embedded server) and
the new discovery agent (mibee-agent) for remote LANs.
Distributed discovery (center + agent)
- Agent binary (
cmd/agent): runs the scannerv2 engine against the LAN it sits on and reports results to the center viaPOST /api/v1/agents/report. Pull model, the agent initiates all connections (report + poll commands), so it works behind NAT. CGO-free, runs as a regular user. - Center ingestion: agent reports are converted to local device portraits via the device bridge; agent-managed networks are excluded from the center's own cross-subnet probing (the agent's reports ARE the liveness signal).
- Anti-entropy fast path: agents send an
X-Network-State-Hashheader (SHA-256 of the alive set's identity+classification fields); on a match the center skips the per-host device bridge and only refreshes leases, the steady-state path for stable networks. - Lease model: agent reports refresh per-device leases; lost detection for
agent networks is TTL-based (
LeaseSweeper, default 5m TTL), distinct from the center's own consecutive-scanDetectLost. - Command channel: center enqueues scan commands; the agent polls, acks, and completes them (~60s cycle).
- Agent token auth: machine-to-machine bearer tokens bound to a
network_id+agent_id(admin CRUD at/api/v1/agents/tokens). - Watch SSE + agent disconnect backfill:
GET /changes/watchfoundation; agents reconnect by re-sending their last hash.
Topology & probing
- Bridge-MIB neighbor probe: walks
BRIDGE-MIBto discover L2 neighbors and persistsdevice_neighbors(Phase 4 topology layer). - SMB2 Negotiate probe + FTP banner reliability: richer service evidence.
- TLS cert CN brand override: recognizes OpenWrt / GL.iNet / iStoreOS from certificate subject/issuer fields.
- Router ARP walk for cross-subnet MAC resolution.
Change-detection engine
- Records
device_added/device_changed/device_losttochange_log+ an in-processWatcher(center only).device_losthas two paths: consecutive-scanmiss_count(center's own network) and TTL-based lease expiry (agent networks). Query viaGET /api/v1/changes; history page in the UI.
Fingerprint rule library (data-driven)
- Identification rules are now data (YAML), not hand-written Go. A
RuleClassifierloads rules at startup from a configured path or the rules embedded in the binary. Adding a device signature = one YAML entry. - Imported corpora (license-clean): Rapid7 Recog (~1174 rules, Apache-2.0)
and SNMP/Recog data tables (~2554 rules total after scoping). nmap's NPSL is
excluded (never imported). See
cmd/fpimport/for the converter. - The standalone engine lives at github.com/Mi-Bee-Studio/mibee-fingerprints-go.
- Logic that can't be a single declarative rule (SNMP bitmask heuristic, camera cross-evidence fusion) stays as Go code.
Management UI
- Networks admin page: create / edit / delete logical networks
(POST/PUT/DELETE
/api/v1/networks), the network registry the agents bind to. - Discovery status page: passive host-discovery runtime counters + recent
discoveries (
GET /api/v1/discovery/status). - Devices page: user-toggleable optional columns (persisted to localStorage); device name links to the detail page; the type union now mirrors all device categories.
- Change history page with structured before/after diffs.
- CSRF-safe exports: CSV/JSON downloads now route through the API client
(previously bypassed it via raw
fetch, dropping the CSRF header).
Operational
- Server bind-retry prevents restart storms from lingering sockets.
- Agent HTTP-transport keep-alive deadlock fix + scan deadline enforcement.
- Anti-entropy + lease model + heartbeat scope governance.
Known limitations
- The center is single-instance (SQLite). Multi-center clustering is not in scope.
- No built-in alerting, integrate with Alertmanager / Uptime Kuma.
- eBPF passive observer requires a special build (
make build-with-ebpf) and runtime privileges.
[0.1.0] - 2026-07-07
First public release. MiBee Steward is a device management & network-layer auto-discovery system with an embedded SvelteKit SPA, packaged as a single binary.
Core capabilities
- Network discovery: plugin-based scanner v2 (ICMP, TCP portscan, SNMP, RTSP, ONVIF, HTTP, ARP, UDP-discovery) with 5-layer pipeline (probe → classify → handler → persist).
- Identity inference: device type/vendor/OS/hostname inferred from scan evidence (cameras, servers, switches, routers, NAS, etc.).
- Device registry: full CRUD, batch operations, CSV export, custom attributes, document linking, device-systems grouping.
- Heartbeat monitoring: asset-freshness probing (ICMP/TCP/HTTP/SNMP) with dedicated time-series store, in-memory status cache, WAL-isolation-safe sync.
- Authentication: JWT (cookie + Bearer), 2FA (TOTP), login lockout, token blacklist, RBAC (admin/user).
- Dashboard: configurable widgets, Prometheus-backed time-series charts.
- Audit logging: all admin actions recorded.
- Prometheus integration:
/metrics+/sd(HTTP service discovery). - Notification channels: webhook/email channel management with test dispatch.
- i18n: Chinese and English, fully translated.
Deployment
- Single binary (CGO-free, SQLite via modernc.org/sqlite), embedded SPA.
- Docker (multi-stage, non-root), systemd unit, nginx reverse-proxy config.
- Configurable data retention sweeper for all high-volume tables.
- CLI:
mibee-steward -version,mibee-steward reset-admin-password.
Known limitations
- Single-instance (SQLite). Distributed/multi-network mode is future work.
- No built-in alerting engine, alerting is intentionally out of scope (integrate with Alertmanager/Uptime Kuma).
- eBPF passive observer requires a special build (
make build-with-ebpf) and runtime privileges.