Compare commits

..
17 Commits
Author SHA1 Message Date
noahandClaude Opus 4.8 86e4761316 GUI round 7: code-review remediation (flash safety, unknown-actual colour, credentials, coverage)
Fixes the Critical/High findings from the round-6 review (6 parallel dimension
reviewers + adversarial verify), plus the cheap high-value non-blocking ones.
Full write-up in code-review-report.md.

Firmware-flash safety (the one irreversible, hardware-destroying action):
- Critical: re-triggering an action no longer races the previous one. A flash
  now takes an exclusive lock (new App.flashing): it will not start while any
  scan / refresh / config action is running, and none of those (nor another
  flash) start while it runs. begin_scan, start_action, start_refresh and
  apply_flash_confirm all gate on it, and the context menu offers only the
  read-only "Open in browser" while flashing. This removes the two overlapping-
  network-operation paths that could interrupt/corrupt an upload and brick a
  miner (old.stop() never joined the in-flight upload).
- High: the flash confirm dialog now lists every target IP + model and warns
  loudly when the batch spans more than one model (a single image is rarely
  valid for all), instead of showing only a bare count.

Correctness:
- High: combined columns no longer paint the "-" placeholder solid red when the
  actual is unknown but the expected is known (an idle/paused/booting miner of a
  recognised model looked like a 0% catastrophic failure). fill_rows now gates
  the ratio on the actual being known; unknown-actual falls to the plain,
  uncoloured segment. Was masked by the all-zero-expected fixtures.
- compute_kpis buckets by status() instead of re-deriving the precedence from
  raw flags (KPI header can no longer disagree with a row's status; offline
  folds into not_hashing).

Security:
- credentials file is created at 0600 up front (OpenOptions::mode) and
  re-tightened while still empty, so the plaintext password is never on disk
  under a looser mode (was create-0644 then chmod-0600).
- the "Set scan credentials" dialog no longer pre-fills the saved password in
  plaintext; a blank Password field keeps the stored one.

Robustness / API:
- the fake-scan branches of the config-action / refresh / flash background
  threads now honour the cancel flag (were ignored, so stop() was a no-op).
- MinerRow.online -> offline (default false = online), removing the footgun
  where a struct-update literal that forgot `online: true` read back offline.

Tests (the review's primary focus -- these paths had zero coverage):
- scan.rs fake_mode_background_actions: start_scan offline-row emission,
  start_refresh (Row/Failed/Done), start_firmware_flash_action, and that a
  cancelled run still terminates with Done rather than hanging.
- model.rs: flash_confirmed (exact/case/prefix/whitespace), compute_kpis vs
  status() consistency, Default-is-online.
- new ui::tests: ratio_color/fan_color/tint_toward stops+clamping+blends, and
  the combined-cell unknown-actual and cooling-cell encodings.
- credentials.rs: configured_factory smoke (both branches) + pre-existing-0644
  re-tighten.
- self-test: offline row (.199) spot-check, KPI quick-filter toggle on/off, and
  a numeric (not lexical) IP-sort assertion via model::ip_to_u32.

Deferred (non-blocking, tracked in code-review-report.md): start_* boilerplate
extraction; per-model firmware image-compatibility check; scoping saved
credentials to a chosen backend; a masked password field (needs a wx-rs
TE_PASSWORD binding); flash-specific status text; a segment-encode microbench.

Verified: cargo check --release --tests is clean; unit tests + benches + the
headless self-test run in CI (local release link is OOM-blocked on this
desktop).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
2026-09-17 14:06:03 -06:00
noahandClaude Opus 4.8 c1234f6df7 GUI round 6 self-test fix: decode combined-column cells in spot-checks
The round-6 combined columns (Hashrate/Hashboards/TotalChips/Cooling) now
store colour-segment-encoded strings in the data view, so the headless
self-test's per-IP spot-checks read raw encoded bytes instead of plain text.
Two checks failed in CI as a result:
- S21 Pro (.149) hashrate read "B95E18<US>60.0 TH/s / 200 TH/s" (colour hex
  prefix + encoded combined text) rather than the plain value.
- S17 (.112) blank-hashrate read an encoded empty cell (invisible control
  chars), so is_empty() was false.

Fix: the spot-check `cell` closure now runs dvlc_get_cell output through
decode_segments_plain (a no-op for plain cells), and the S21 hashrate check
expects the combined "60.0 TH/s / 200 TH/s" form. The "every cell matches the
model" loop already decoded, so it was unaffected.

Verified: cargo check --release --tests is clean; the self-test itself is a
CI gate (local release link is OOM-blocked on this desktop).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
2026-09-17 13:27:54 -06:00
noahandClaude Opus 4.8 b6afe08a5f GUI round 6: offline detection, combined columns, per-cell colours, paused status, credentials, refresh, firmware flash
Large round implemented via a research workflow (6 parallel readers) then a
file-partitioned implementation workflow (model/scan/bridge/ui/fixtures), all to
one shared contract.

Table / model:
- Offline recognition fix: the scan loop now emits a row for EVERY probed IP -
  non-responders become an "offline" row (new MinerRow.online flag +
  MinerRow::offline()), so unreachable miners show up (offline, red) instead of
  vanishing. Previously only responders got a row.
- Not-hashing rows are now RED (were grey); offline also red.
- New "paused" status (operating_state contains "pause" while not mining):
  its own blue row colour, a blue "Paused" KPI card, and a Kpis.paused count.
- Combined actual/expected columns: Hashrate, Hashboards and TotalChips fold
  their separate Expected* columns into one "actual / expected" cell; the actual
  is drawn on a smooth red->amber->green scale by ratio (100% = green), the
  expected in plain text, the slash black. num_value is carved out so a numeric
  filter never matches a row that only has an expected value.
- Fan column shows every fan's RPM as "rpm/rpm/rpm" (max 3 sig digits, SI-style),
  each fan coloured on its own grey->blue speed scale, slashes black.
- These four columns render via a new wxDataViewCustomRenderer (SegmentRenderer)
  that draws colour runs from a \x1f/\x1e-encoded value; every other column keeps
  the stock renderer and per-row status colour.

Interaction:
- KPI quick-filter: clicking the Hashing / Slow / Not hashing / Paused card
  filters the table to that status (composed with any column filters) and
  highlights the active card; clicking again clears it.
- Removed "Select all" / "Clear selection" from the right-click menu.
- Right-click "Refresh": re-polls the selected miners (asic-rs scan_miner) on a
  background thread and upserts the rows, without a full network scan.
- "Set scan credentials..." button (top-right): stores a username/password
  (~/.config/alkane-toolkit/scan-credentials.txt, 0600) that is fanned out to
  every asic-rs firmware backend via with_firmware_discovery_auth, so scans and
  all right-click actions authenticate. Applied through a new
  credentials::configured_factory() used everywhere MinerFactory::new() was.
- "Flash firmware..." (right-click): asic-rs UpgradeFirmware for the backends
  that support it (stock Antminer + EPIC; every other backend declines and is
  reported as unsupported). File picker (new wxFileDialog binding) + a typed
  "FLASH" confirmation; one miner at a time; cancel only between miners.
- Responsive layout: the KPI and controls rows use wxWrapSizer so they reflow
  when narrow; the min window size drops from 1200x720 to 640x480.

Bridge (wx-rs): SegmentRenderer + dvlc_append_colored_col, wrap_sizer,
bind_click (clickable KPI cards), file_dialog; dropped a vestigial gtk.h include.
Patches 0002/0003 regenerated + round-trip validated.

Portability note: every widget is a stock, natively-backed wxWidgets control
(ports to wxMSW/wxOSX); wxDataViewCtrl is native on Linux/macOS and wx's own
generic (still-correct) drawing on Windows.

Verified: cargo check --release --tests is clean; the release build + tests +
headless self-test run in CI. (Local release link is OOM-blocked on this
desktop; CI is the authoritative build.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
2026-09-17 13:09:16 -06:00
noahandClaude Opus 4.8 eb08a9ef97 GUI: per-miner capabilities + live config write path (right-click actions)
Completes the right-click config menu (round-2 item 11): the menu now offers
real actions computed from the intersection of what every selected miner
supports, and applies them to the fleet over the network.

- Capability detection: to_row probes each miner's asic-rs supports_* methods
  (fault light, restart, pause, resume, power limit, tuning) at scan time and
  stores them in MinerRow.caps -- no extra network round-trip.
- Intersection: MinerCaps::intersect_all yields the actions common to the whole
  selection; the context menu offers only those (a mixed mining + idle selection
  shows just fault light + restart; an all-mining selection shows everything).
- Write path: scan::start_config_action runs on a background thread -- it
  re-discovers each selected miner with asic-rs scan_miner(ip), applies the
  setter, and reports per-IP results that drain into the status bar (running
  progress while applying, a pass/fail summary when done). Cancellable, and a
  new action cancels any in-flight one so two never overlap. In fake-scan mode
  it simulates success so the flow is exercisable offline.
- Actions: fault light on/off, pause, resume, restart apply immediately; set
  power limit and set tuning % open a small value-prompt dialog first. Factory
  reset, change password, and firmware upgrade are deliberately not exposed in a
  casual right-click.

Adds the `measurements` dependency (already in the lock, transitive via asic-rs)
for Power::from_watts.

Review fixes (one review pass):
- Restart / pause / resume now require a confirmation dialog (naming the count)
  so a misclick can't stop a producing fleet; fault light stays instant, and
  power/tuning are confirmed by their value entry.
- The action result is held on the status bar for a few ticks so a fleet
  action's outcome (including failures) isn't clobbered by the next timer tick.
- The action loop uses a current-thread tokio runtime (it applies to one miner
  at a time; a worker pool was wasted).
- The value prompt validates before closing: a bad value keeps the dialog and
  the captured selection so it can be corrected.
- The menu's "(N)" counts use the rows-backed selection, matching what is
  actually acted on.

Verified off-screen: capability intersection (mixed vs all-mining selections),
the value-prompt and confirmation nested modals (menu -> dialog) with no crash,
the end-to-end apply flow, 46 unit tests (incl. a caps-intersection test), and
the headless self-test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
2026-09-17 11:05:15 -06:00
noahandClaude Opus 4.8 297e21a519 GUI round 3: Excel-style filters, status row colours, icon controls, context menu, live theme
Addresses the round-3 feedback batch:

- Right-click now works: a context menu (open selected in browser, select all,
  clear) pops up from the table. It was never wired before. (The live-config
  intersection over the selection remains a follow-up; no dead menu items.)
- Selection is readable again in both themes: the alt-row/zebra CSS hack (which
  painted row backgrounds over the native highlight, leaving white-on-white) is
  gone; the native selection highlight shows through.
- Row text is coloured by status (green = hashing, amber = slow, grey = not
  hashing), which also separates rows without fragile GTK zebra striping.
- Dark mode: KPI cards and rows follow the system theme (no more white boxes in
  dark mode); a system-colour-changed event repaints them live if the OS toggles
  light/dark while the app is open.
- Play / Pause / Stop are coloured media icons (green triangle / amber bars /
  red square) instead of text buttons.
- Filter panel redesigned Excel-style: a column dropdown at the top selects the
  column; controls adapt to its type. Text columns: a value checklist ("is any
  of") or a predicate (contains / does not contain / begins with / ends with /
  equals). Numeric columns: between / = / != / > / >= / < / <=. Filters AND
  across columns; edits held in a working copy, committed on Apply.
- Auto-rescan label shortened to "Rescan (s):" so the value field has room.

Table: replaced wxDataViewListCtrl with a raw wxDataViewCtrl + a custom
AttrListStore (per-row foreground via GetAttrByRow), which keeps in-table column
drag while enabling status row colours. New wx-rs bridge primitives: wxChoice
dropdown, coloured media buttons (drawn on a transparent bitmap via
wxGraphicsContext), a wxEVT_SYS_COLOUR_CHANGED event, destroy_children, and
call_after (deferred rebuilds). Patches 0002/0003 regenerated + round-trip
validated.

Model: ColFilter { Values, Text{op}, Num{op} } with TextOp/NumOp and
passes_filters -> ColFilter::matches; Column::num_value for numeric filtering.

Review fixes (one review pass):
- Deferred the two rebuilds that destroyed a control from inside its own event
  (filter op-dropdown change; column drag-reorder) via call_after, avoiding a
  use-after-free.
- num_value returns None for a blank-displaying value-type cell (Hashrate,
  Power, ChipTemp, ...), so "ChipTemp <= 50" no longer matches a miner with no
  temperature reading.
- Value checklist maps a checked entry back to its real value by index, so a
  literal "(blank)" value is not confused with an empty cell.

Verified off-screen: 45 unit tests, headless self-test (14 checks), and
interaction screenshots of selection, right-click, the text/numeric filter, the
comparator swap, and dark mode.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
2026-09-17 09:19:38 -06:00
noahandClaude Opus 4.8 7fac0ce726 CI: make the headless UI self-test a hard gate
The self-test was continue-on-error while the container display path was
unproven. Run 529 confirmed it launches and passes (SELFTEST PASS) once xauth
was installed, so remove continue-on-error: a future regression that breaks GUI
init now fails the build instead of releasing silently.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
2026-09-16 19:30:17 -06:00
noahandClaude Opus 4.8 8e9c5e7105 GUI + CI: code-review-harness fixes, expanded tests, version-logic tests
Ran the code-review-harness (four parallel reviewers: correctness, reliability,
performance, test-coverage) over the GUI crate and fixed every Critical/High
finding, plus grew the test + microbenchmark suite that gates the pipeline.

Correctness / reliability fixes:
- IP column sorted lexically, not numerically. The default view is IP-ascending
  but Column::Ip fell through to the generic lowercase-string sort key, so
  10.255.1.10 sorted before 10.255.1.2 on every launch. Add a numeric IP sort
  key (u32, exact in f64) and switch view() to decorate-sort-undecorate so a
  sort key is computed once per row, not twice per comparison.
- Scans had no cancellation. Stop/Apply/Play only dropped the receiver, leaving
  the background thread probing dead hosts (each waits out an asic-rs timeout),
  and Play could spawn a second concurrent scan + tokio runtime. Add a
  ScanHandle with an Arc<AtomicBool> cancel flag the loop checks each iteration,
  a begin_scan() helper that stops the in-flight scan before starting a new one,
  and Stop now signals cancellation.
- Native column drag never rebuilt the control: column_reordered mutated
  view.order but skipped rebuild_table(), so the store's creation order diverged
  from display_columns() and cells rendered under the wrong headers on the next
  scan tick. Rebuild after applying the reorder.
- format_si rounding rolled a mantissa up to "1000" without advancing the SI
  prefix (999.9 W -> "1000 W", a 4-digit result). Round first, then roll over;
  [99.95,100) drops its decimal.
- start_scan used .expect() on thread spawn, which would panic across the wx FFI
  boundary; it now sends ScanMsg::Failed and returns the handle.

Tests / benchmarks (the pipeline's regression gate):
- Unit tests 24 -> 41: format_si/format_uptime boundaries, numeric IP sort,
  upsert-new-IP, Light three-state + pool-slot-out-of-range cells, filter
  AND/OR, reorder non-permutation guard; scan.rs parse_cidr/prefix_mask,
  single-host /32, empty/whitespace, short-range single/reversed, parse_targets
  aggregate cap + error propagation, validate_ranges, targets_to_cidrs
  non-contiguous, auto-rescan-secs round-trip.
- Microbenchmarks 2 -> 9: view default-sort, sort-by-each-column, filtered view,
  upsert cold-start, parse_line near MAX_ADDRS, parse_targets many ranges,
  targets_to_cidrs large range. Floors are 5-10x above local numbers.
- New ci/test-compute-version.sh: 9 cases for the X.Y.Z logic (first release,
  pre-bumped X, backend/UI bumps, docs-only no-op, major-wins-over-UI,
  backend-wins-over-UI, nested ci/ and thirdparty/wx-rs paths). Wired in as a
  fast-fail CI step.

CI: install libssl-dev + pkg-config (openssl-sys); add xauth so the headless
self-test actually launches under xvfb (was aborting on "xauth not found").

Deferred (documented in code-review-report.md, guarded by benches): Cow cells,
an ip->index map for upsert. Local: 41 tests + 9 benches + 9 shell tests green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
2026-09-16 19:22:49 -06:00
noahandClaude Opus 4.8 e5fb63ad52 CI: install libssl-dev + pkg-config for openssl-sys
Run 2 got past the wx build (the bash fix worked) but cargo build --release
failed in openssl-sys 0.9.117: the debian:trixie-slim CI image has no OpenSSL
dev headers, which a transitive asic-rs dependency links. Add an install step
(libssl-dev, pkg-config, ca-certificates) before the build. actions/cache only
saves the wx prefix on job success, so this is the minimal change to get a
green run and persist the ~10-min wx build for subsequent iterations.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
2026-09-16 19:00:55 -06:00
noahandClaude Opus 4.8 8e65162b07 CI: invoke build-wx via bash; mark shell scripts executable
Run 1 of the release pipeline failed at the "Build wxWidgets" step with
"scripts/build-wx-linux.sh: Permission denied" - the checked-out scripts
carry mode 100644 (no exec bit), so a bare shebang invocation fails. The
compute-version step worked only because it was already called as
"bash ci/compute-version.sh".

- Call the wx build as "bash scripts/build-wx-linux.sh" (interpreter
  explicit; no dependency on the exec bit).
- Set the exec bit in git on all ci/ and scripts/ shell scripts so they
  also run directly for humans and future steps.
- Make the headless UI self-test non-fatal for now (continue-on-error)
  and install dbus-x11 + fonts-dejavu-core alongside xvfb, so a container
  display quirk cannot discard an otherwise-good 10-minute build. The
  gate is re-tightened once it is confirmed green in-container.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
2026-09-16 18:41:31 -06:00
noahandClaude Opus 4.8 a1de684635 CI: build-test-release pipeline on merge to main
Gitea Actions workflow (.gitea/workflows/release.yml) triggered on push to
main: build the GUI against the cached vendored wx, run the 22 unit tests and
two microbenchmarks (view pipeline + cell render, with perf-regression floors),
run the headless UI self-test under xvfb, then package the binary and cut a
release when the change warrants one.

Auto-versioning X.Y.Z (ci/compute-version.sh):
  X - manual (ci/version-x.txt); a bump resets Y.Z
  Y - backend-logic changes (core/discovery/access/flash/artifacts/cli, the
      GUI crate's scan/model/main, build + CI config); resets Z
  Z - UI changes (GUI view, fixtures, the wx-rs widget bridge)
Backend beats UI when both change; docs-only changes cut no release.

Runner: a dedicated act_runner (label alkane-ci) on bfe-mpc-0640 (the Gitea
host) runs jobs in a Debian-trixie image with Rust + GTK3/pcre2 + node.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
2026-09-16 18:27:48 -06:00
noahandClaude Opus 4.8 6955b1e3e3 GUI round 2: selection, scan loop, column management, dark-mode fix
- Fixed "Scan ranges" button label (no longer grows with the range list).
- Dark-mode KPI cards: derive colours from the live system theme luminance
  instead of is_dark(), which mis-detected some GTK dark themes.
- Removed the checkbox column; the table is multi-select (wxDV_MULTIPLE,
  ctrl/shift-click), with the selection tracked by IP so it survives refreshes.
- Replaced Rescan with Play / Pause / Stop; added an editable auto-rescan
  interval (scan-ranges dialog; ~/.config/alkane-toolkit/auto-rescan-secs.txt)
  with a timer-driven countdown scheduler.
- Status bar shows the last-probed IP during a scan and a countdown to the next
  scan when idle (dropped the "scan complete" text).
- Default sort is IP-ascending with a header chevron; IP is column 0, sortable.
- Choose-columns dialog is a wxRearrangeCtrl (check to show; up/down or drag to
  reorder) exposing every metric, including Pool 1/2/3 URL + worker.
- Column drag-reorder moves the whole column with its data on drop.
- Row separator lines (wxDV_ROW_LINES). GTK3 native has no zebra striping; a
  GTK4-forward zebra-CSS hook and pkg-config gtk cflags are in place.

Scan engine: parse each configured pool's (url, worker); Progress carries the
last-probed IP. Model: Column::Sel removed; Pool1/2/3 columns; default IP sort.

wx-rs bridge: multi-select + selection/context-menu events + get_selections,
alternating-row + zebra-CSS hooks, in-place column title, rearrangeable list,
and popup-menu primitives (for the upcoming right-click config menu). Patches
0001-0003 regenerated and round-trip validated.

Review fixes: scan loop no longer sticks "scanning" if a thread ends without
Done (channel-disconnect handling + Stop force-reset); Play no longer starts a
second scan; stale selections pruned on rescan; column apply order/visibility
applied atomically.

Verified: 22 unit tests, a 14-check headless UI self-test, and interaction
checks (multi-select, column rearrange/drag, play/pause/stop, dark mode).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
2026-09-16 17:27:20 -06:00
noahandClaude Opus 4.8 d88df603ba Fix GUI layout/crash bugs; add operator features, tests, and dev loop
Round 1 (bug fixes + test harness):
- Fix table rendering in the top-left corner: the dvlc was never added to the
  sizer; add it (proportion 1) and re-run layout; drop the space-eating stretch.
- Fix abort on dialog buttons: the dialog root sizers passed ALIGN_CENTRE_VERTICAL
  to a vertical sizer, tripping a wx consistency assert whose handler pumps a
  nested event loop, re-entering dispatch while it held the App RefCell borrow.
  Remove the invalid flags; split dispatch into two phases with try_borrow_mut.
- Fix header-click sort mapping when columns are hidden (use display_columns);
  drag-reorder splices back into the full order without dropping hidden columns.
- Add offline fixtures + ALKANE_FAKE_SCAN and ALKANE_SELFTEST modes; scripts
  ui-selftest.sh and ui-screenshot.sh; AGENTS.md documents the dev loop.

Round 2 (operator requests):
- Redesigned color-coded KPI cards; light/dark mode follows the system theme.
- SI-formatted hashrate/power on the KPIs and columns (685 TH/s, 21.3 kW).
- Scan ranges accept CIDR, single IP, and A.B.C.D-E.F.G.H / A.B.C.D-N ranges;
  oversized ranges (> 1,000,000 addresses) are rejected.
- Scan progress bar over the table + status-bar text; out-of-range miners are
  dropped when a scan starts.
- Columns panel exposes every scannable MinerData metric (All / None / Defaults).
- Excel-style filter panel: per-category value checklists, per-column All/None,
  Apply / Reset / Cancel, blank handling.
- Sort direction marker in the header (updated in place); double-click a row
  opens the miner in the default browser.

wx-rs: extend the widget bridge (gauge, in-place column title, sort indicator,
browser launch, system appearance/colours, widget colours, item-activated);
patches 0002/0003 regenerated and round-trip validated.

Verified: 22 unit tests + a 13-check headless UI self-test, plus a live scan
against the bench fleet.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
2026-09-16 16:24:05 -06:00
noah fcc70c04f6 M1 primary view: wx-rs patched+extended (Linux/GTK3 build, widget bridge), vendored wx 3.3.3 + asic-rs in thirdparty/, UI-SPEC table+KPIs+dialogs, build scripts 2026-09-15 13:59:55 -06:00
noah a2b65bb47f Vendor asic-rs 0.8.1 (280 crates, offline builds) + wxWidgets 3.3.3 (pristine + patch queue); UI spec + ADR-0003; M1 on asic-rs 2026-09-15 10:41:00 -06:00
noah 6dc77e8eb0 Plan: bench-validated pathway matrix, artifact registry seed (14 sha256s), inventory integration 2026-09-15 09:16:55 -06:00
noah 4fdc49aaca ADRs: recipes-as-data, GUI binding decision; cli as bin target 2026-09-15 09:08:36 -06:00
noah 302c8b6e49 Scaffold: workspace crates + implementation plan draft 2026-09-15 09:06:29 -06:00
30329 changed files with 11911880 additions and 2856 deletions
+7
View File
@@ -0,0 +1,7 @@
# Vendored dependencies (see docs/adr/0003-vendoring-policy.md).
# Builds never touch the network: all crates resolve from ./vendor.
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
+126
View File
@@ -0,0 +1,126 @@
name: build-test-release
# Runs on every merge/push to main: build the GUI, run tests + a microbenchmark,
# and (when the change warrants it) cut an X.Y.Z release with the binary attached.
on:
push:
branches: [main]
jobs:
release:
runs-on: alkane-ci
env:
WX_PREFIX: /root/.cache/wx-3.3.3-linux
steps:
- name: Checkout (full history for tags)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Compute version
id: ver
run: bash ci/compute-version.sh | tee -a "$GITHUB_OUTPUT"
- name: Test version logic
if: steps.ver.outputs.release == 'true'
run: bash ci/test-compute-version.sh
- name: Install build dependencies
if: steps.ver.outputs.release == 'true'
run: |
apt-get update -qq
apt-get install -y -qq --no-install-recommends \
libssl-dev pkg-config ca-certificates >/dev/null
echo "libssl-dev + pkg-config installed (openssl-sys needs them)"
- name: Cache vendored wxWidgets build
if: steps.ver.outputs.release == 'true'
uses: actions/cache@v4
with:
path: /root/.cache/wx-3.3.3-linux
key: wx-3.3.3-${{ runner.os }}-${{ hashFiles('thirdparty/wx-rs/VERSION') }}
- name: Build wxWidgets (once, then cached)
if: steps.ver.outputs.release == 'true'
run: |
if [ ! -x "$WX_PREFIX/bin/wx-config" ]; then
bash scripts/build-wx-linux.sh
else
echo "wx prefix restored from cache"
fi
- name: Set crate version to ${{ steps.ver.outputs.version }}
if: steps.ver.outputs.release == 'true'
run: |
sed -i "0,/^version = \".*\"/s//version = \"${{ steps.ver.outputs.version }}\"/" Cargo.toml
grep -m1 '^version' Cargo.toml
- name: Build release
if: steps.ver.outputs.release == 'true'
run: |
export WX_RS_WXCONFIG="$WX_PREFIX/bin/wx-config"
cargo build --release -p alkane-gui --offline
- name: Unit tests
if: steps.ver.outputs.release == 'true'
run: |
export WX_RS_WXCONFIG="$WX_PREFIX/bin/wx-config"
cargo test -p alkane-gui --offline
- name: Microbenchmarks
if: steps.ver.outputs.release == 'true'
run: |
export WX_RS_WXCONFIG="$WX_PREFIX/bin/wx-config"
cargo test -p alkane-gui --release --offline -- --ignored --nocapture bench_
- name: Headless UI self-test
if: steps.ver.outputs.release == 'true'
run: |
apt-get update -qq && apt-get install -y -qq --no-install-recommends \
xvfb xauth dbus-x11 fonts-dejavu-core >/dev/null
BIN=target/release/alkane-toolkit
xvfb-run -a env GDK_BACKEND=x11 ALKANE_SELFTEST=1 "$BIN"
- name: Package artifact
if: steps.ver.outputs.release == 'true'
id: pkg
run: |
V="${{ steps.ver.outputs.version }}"
NAME="alkane-toolkit-v${V}-linux-x86_64"
mkdir -p "dist/$NAME"
cp target/release/alkane-toolkit "dist/$NAME/"
cat > "dist/$NAME/README.txt" <<EOF
alkane-toolkit v${V} (linux x86_64)
Bump type: ${{ steps.ver.outputs.bump }}
Commit: ${GITHUB_SHA}
Run: ./alkane-toolkit
Requires GTK 3 at runtime: sudo apt install libgtk-3-0
Offline demo: ALKANE_FAKE_SCAN=1 ./alkane-toolkit
EOF
tar -C dist -czf "dist/${NAME}.tar.gz" "$NAME"
echo "asset=dist/${NAME}.tar.gz" >> "$GITHUB_OUTPUT"
echo "assetname=${NAME}.tar.gz" >> "$GITHUB_OUTPUT"
- name: Create Gitea release + upload artifact
if: steps.ver.outputs.release == 'true'
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="${{ steps.ver.outputs.tag }}"
API="${GITHUB_API_URL:-https://gitea.bluefla.re/api/v1}"
REPO="${GITHUB_REPOSITORY}"
body="Automated ${{ steps.ver.outputs.bump }} release from ${GITHUB_SHA}."
rel=$(curl -sS -X POST -H "Authorization: token ${TOKEN}" -H "Content-Type: application/json" \
"${API}/repos/${REPO}/releases" \
-d "{\"tag_name\":\"${TAG}\",\"target_commitish\":\"${GITHUB_SHA}\",\"name\":\"${TAG}\",\"body\":\"${body}\"}")
id=$(echo "$rel" | grep -oE '"id":[0-9]+' | head -1 | cut -d: -f2)
if [ -z "$id" ]; then echo "release create failed: $rel"; exit 1; fi
curl -sS -X POST -H "Authorization: token ${TOKEN}" -H "Content-Type: application/gzip" \
"${API}/repos/${REPO}/releases/${id}/assets?name=${{ steps.pkg.outputs.assetname }}" \
--data-binary @"${{ steps.pkg.outputs.asset }}" | grep -oE '"browser_download_url":"[^"]+"' || true
echo "Released ${TAG}"
- name: No release needed
if: steps.ver.outputs.release != 'true'
run: echo "No backend/UI change since ${{ steps.ver.outputs.last_tag }} - skipping release."
+3
View File
@@ -0,0 +1,3 @@
/target
**/target
.claude/
Generated
+3669
View File
File diff suppressed because it is too large Load Diff
+21
View File
@@ -0,0 +1,21 @@
[workspace]
resolver = "2"
members = [
"crates/alkane-core",
"crates/alkane-discovery",
"crates/alkane-access",
"crates/alkane-flash",
"crates/alkane-artifacts",
"crates/alkane-cli",
"crates/alkane-gui",
]
[workspace.package]
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
[workspace.dependencies]
thiserror = "2"
serde = { version = "1", features = ["derive"] }
sha2 = "0.10"
+37 -2
View File
@@ -1,3 +1,38 @@
# CI badges
# alkane-toolkit
Machine-maintained status for the last completed main and next workflow attempts.
Cross-platform desktop toolkit (Rust core, native GUI) to install **stock** or
**alkaneOS** firmware on ASIC miner control boards, whatever they currently run
(stock, Vnish/AnthillOS, Braiins OS+, LuxOS, ePIC, BixBit, WardenOS).
Sibling to [alkane-sdk](https://gitea.bluefla.re/blueflare/alkane-sdk): the SDK
owns board knowledge and build outputs; this toolkit is the orchestration
engine and operator UI that executes its install recipes safely.
## Status
M1 primary view ships: discovery (vendored asic-rs 0.8.1) + the UI-SPEC
table (6 KPIs, sortable/drag-reorderable columns, row checkboxes, scan-range
editor, Excel-style filter, columns panel). Pure-Rust GUI on wxWidgets via
vendored + patched wx-rs (docs/adr/0002, 0003).
## Build + run (Debian)
```sh
scripts/build-wx-linux.sh # once: builds vendored wx 3.3.3 to ~/.cache
scripts/build-gui-linux.sh # cargo build --release -p alkane-gui
~/.cache/alkane-tk-target/release/alkane-toolkit
```
Windows/macOS: `scripts/build-gui-windows.sh` (needs a Windows/msys2
toolchain) and `scripts/build-gui-macos.sh` (needs a Mac) - the GUI code is
shared; only the C++ bridge + wx differ per platform.
See `docs/IMPLEMENTATION-PLAN.md` for the roadmap.
## Hard rules (from alkane-sdk `docs/install-methods.md`, encoded in code)
1. Never write the bootloader/secure region.
2. Verify on a channel the installer does not control.
3. Reboot is root-only; a dropped SSH connection can be success.
4. A packer is per board; never reuse across boards.
5. Boot-switch handling is an explicit, verified step.
-19
View File
@@ -1,19 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="128.0" height="20" role="img" aria-label="bench coverage: 6%">
<title>bench coverage: 6%</title>
<linearGradient id="s" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<clipPath id="r"><rect width="128.0" height="20" rx="3" fill="#fff"/></clipPath>
<g clip-path="url(#r)">
<rect width="103.0" height="20" fill="#555"/>
<rect x="103.0" width="25.0" height="20" fill="#e05d44"/>
<rect width="128.0" height="20" fill="url(#s)"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11">
<text x="51.5" y="15" fill="#010101" fill-opacity=".3">bench coverage</text>
<text x="51.5" y="14">bench coverage</text>
<text x="115.5" y="15" fill="#010101" fill-opacity=".3">6%</text>
<text x="115.5" y="14">6%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 946 B

-19
View File
@@ -1,19 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="147.5" height="20" role="img" aria-label="bench: -22.8% vs prev">
<title>bench: -22.8% vs prev</title>
<linearGradient id="s" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<clipPath id="r"><rect width="147.5" height="20" rx="3" fill="#fff"/></clipPath>
<g clip-path="url(#r)">
<rect width="44.5" height="20" fill="#555"/>
<rect x="44.5" width="103.0" height="20" fill="#fe7d37"/>
<rect width="147.5" height="20" fill="url(#s)"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11">
<text x="22.2" y="15" fill="#010101" fill-opacity=".3">bench</text>
<text x="22.2" y="14">bench</text>
<text x="96.0" y="15" fill="#010101" fill-opacity=".3">-22.8% vs prev</text>
<text x="96.0" y="14">-22.8% vs prev</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 955 B

-19
View File
@@ -1,19 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="95.5" height="20" role="img" aria-label="coverage: 45%">
<title>coverage: 45%</title>
<linearGradient id="s" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<clipPath id="r"><rect width="95.5" height="20" rx="3" fill="#fff"/></clipPath>
<g clip-path="url(#r)">
<rect width="64.0" height="20" fill="#555"/>
<rect x="64.0" width="31.5" height="20" fill="#dfb317"/>
<rect width="95.5" height="20" fill="url(#s)"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11">
<text x="32.0" y="15" fill="#010101" fill-opacity=".3">coverage</text>
<text x="32.0" y="14">coverage</text>
<text x="79.8" y="15" fill="#010101" fill-opacity=".3">45%</text>
<text x="79.8" y="14">45%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 919 B

-19
View File
@@ -1,19 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="121.5" height="20" role="img" aria-label="dependencies: 349">
<title>dependencies: 349</title>
<linearGradient id="s" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<clipPath id="r"><rect width="121.5" height="20" rx="3" fill="#fff"/></clipPath>
<g clip-path="url(#r)">
<rect width="90.0" height="20" fill="#555"/>
<rect x="90.0" width="31.5" height="20" fill="#007ec6"/>
<rect width="121.5" height="20" fill="url(#s)"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11">
<text x="45.0" y="15" fill="#010101" fill-opacity=".3">dependencies</text>
<text x="45.0" y="14">dependencies</text>
<text x="105.8" y="15" fill="#010101" fill-opacity=".3">349</text>
<text x="105.8" y="14">349</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 940 B

-19
View File
@@ -1,19 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="89.0" height="20" role="img" aria-label="license: MIT">
<title>license: MIT</title>
<linearGradient id="s" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<clipPath id="r"><rect width="89.0" height="20" rx="3" fill="#fff"/></clipPath>
<g clip-path="url(#r)">
<rect width="57.5" height="20" fill="#555"/>
<rect x="57.5" width="31.5" height="20" fill="#007ec6"/>
<rect width="89.0" height="20" fill="url(#s)"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11">
<text x="28.8" y="15" fill="#010101" fill-opacity=".3">license</text>
<text x="28.8" y="14">license</text>
<text x="73.2" y="15" fill="#010101" fill-opacity=".3">MIT</text>
<text x="73.2" y="14">MIT</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 915 B

-19
View File
@@ -1,19 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="141.0" height="20" role="img" aria-label="lines of code: 36.1K">
<title>lines of code: 36.1K</title>
<linearGradient id="s" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<clipPath id="r"><rect width="141.0" height="20" rx="3" fill="#fff"/></clipPath>
<g clip-path="url(#r)">
<rect width="96.5" height="20" fill="#555"/>
<rect x="96.5" width="44.5" height="20" fill="#007ec6"/>
<rect width="141.0" height="20" fill="url(#s)"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11">
<text x="48.2" y="15" fill="#010101" fill-opacity=".3">lines of code</text>
<text x="48.2" y="14">lines of code</text>
<text x="118.8" y="15" fill="#010101" fill-opacity=".3">36.1K</text>
<text x="118.8" y="14">36.1K</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 952 B

-275
View File
@@ -1,275 +0,0 @@
{
"bench_coverage_pct": 6.49,
"bench_delta_pct": -22.8,
"bench_same_inputs": false,
"clippy": "clean",
"coverage_by_crate": {
"alkane-access": {
"lines": 143,
"missed": 48
},
"alkane-artifacts": {
"lines": 1416,
"missed": 433
},
"alkane-cli": {
"lines": 1195,
"missed": 1195
},
"alkane-core": {
"lines": 55,
"missed": 6
},
"alkane-flash": {
"lines": 8956,
"missed": 4416
},
"alkane-gui": {
"lines": 11996,
"missed": 6853
}
},
"coverage_by_file": [
{
"file": "crates/alkane-access/src/lib.rs",
"lines": 143,
"missed": 48
},
{
"file": "crates/alkane-artifacts/src/afw.rs",
"lines": 906,
"missed": 281
},
{
"file": "crates/alkane-artifacts/src/fetch.rs",
"lines": 330,
"missed": 117
},
{
"file": "crates/alkane-artifacts/src/lib.rs",
"lines": 180,
"missed": 35
},
{
"file": "crates/alkane-cli/src/main.rs",
"lines": 1195,
"missed": 1195
},
{
"file": "crates/alkane-core/src/platform.rs",
"lines": 55,
"missed": 6
},
{
"file": "crates/alkane-flash/src/aml_ubi.rs",
"lines": 427,
"missed": 285
},
{
"file": "crates/alkane-flash/src/boards/a113d.rs",
"lines": 546,
"missed": 252
},
{
"file": "crates/alkane-flash/src/boards/am335x.rs",
"lines": 1480,
"missed": 238
},
{
"file": "crates/alkane-flash/src/boards/cv1835.rs",
"lines": 268,
"missed": 9
},
{
"file": "crates/alkane-flash/src/boards/zynq.rs",
"lines": 235,
"missed": 19
},
{
"file": "crates/alkane-flash/src/install.rs",
"lines": 707,
"missed": 277
},
{
"file": "crates/alkane-flash/src/lib.rs",
"lines": 290,
"missed": 14
},
{
"file": "crates/alkane-flash/src/md5.rs",
"lines": 68,
"missed": 0
},
{
"file": "crates/alkane-flash/src/preflight.rs",
"lines": 277,
"missed": 99
},
{
"file": "crates/alkane-flash/src/stock.rs",
"lines": 193,
"missed": 146
},
{
"file": "crates/alkane-flash/src/stock_firmware.rs",
"lines": 194,
"missed": 178
},
{
"file": "crates/alkane-flash/src/stock_method.rs",
"lines": 3150,
"missed": 2056
},
{
"file": "crates/alkane-flash/src/transport.rs",
"lines": 501,
"missed": 421
},
{
"file": "crates/alkane-flash/src/uimage.rs",
"lines": 80,
"missed": 0
},
{
"file": "crates/alkane-flash/src/zynq_nand.rs",
"lines": 540,
"missed": 422
},
{
"file": "crates/alkane-gui/src/access_probe.rs",
"lines": 230,
"missed": 193
},
{
"file": "crates/alkane-gui/src/alkane_detect.rs",
"lines": 219,
"missed": 49
},
{
"file": "crates/alkane-gui/src/askpass.rs",
"lines": 69,
"missed": 16
},
{
"file": "crates/alkane-gui/src/bench_sequence.rs",
"lines": 224,
"missed": 224
},
{
"file": "crates/alkane-gui/src/bug_report.rs",
"lines": 281,
"missed": 76
},
{
"file": "crates/alkane-gui/src/credentials.rs",
"lines": 225,
"missed": 17
},
{
"file": "crates/alkane-gui/src/export.rs",
"lines": 294,
"missed": 55
},
{
"file": "crates/alkane-gui/src/fixtures.rs",
"lines": 309,
"missed": 1
},
{
"file": "crates/alkane-gui/src/i18n.rs",
"lines": 82,
"missed": 68
},
{
"file": "crates/alkane-gui/src/log_scan.rs",
"lines": 44,
"missed": 18
},
{
"file": "crates/alkane-gui/src/logs.rs",
"lines": 28,
"missed": 28
},
{
"file": "crates/alkane-gui/src/main.rs",
"lines": 73,
"missed": 41
},
{
"file": "crates/alkane-gui/src/model.rs",
"lines": 2254,
"missed": 561
},
{
"file": "crates/alkane-gui/src/naming.rs",
"lines": 331,
"missed": 35
},
{
"file": "crates/alkane-gui/src/pool_prefs.rs",
"lines": 98,
"missed": 71
},
{
"file": "crates/alkane-gui/src/presets.rs",
"lines": 93,
"missed": 16
},
{
"file": "crates/alkane-gui/src/restore.rs",
"lines": 368,
"missed": 271
},
{
"file": "crates/alkane-gui/src/scan.rs",
"lines": 1911,
"missed": 1319
},
{
"file": "crates/alkane-gui/src/stock_ops.rs",
"lines": 336,
"missed": 332
},
{
"file": "crates/alkane-gui/src/ui.rs",
"lines": 4527,
"missed": 3462
}
],
"coverage_pct": 45.49,
"dependencies": 349,
"grade": "C",
"grade_bands": [
[
80.0,
"A"
],
[
60.0,
"B"
],
[
40.0,
"C"
],
[
20.0,
"D"
]
],
"license": "MIT",
"loc": 36132,
"loc_by_crate": {
"alkane-access": 219,
"alkane-artifacts": 2052,
"alkane-cli": 1476,
"alkane-core": 151,
"alkane-discovery": 1,
"alkane-flash": 12914,
"alkane-gui": 19319
},
"rustfmt": "clean",
"schema": 1,
"sha": "0873d2c79d3f75a8802c38428c93be6e90ca5c29",
"tests_passed": 237
}
-19
View File
@@ -1,19 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="108.5" height="20" role="img" aria-label="code quality: C (Clippy, rustfmt and line coverage)">
<title>code quality: C (Clippy, rustfmt and line coverage)</title>
<linearGradient id="s" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<clipPath id="r"><rect width="108.5" height="20" rx="3" fill="#fff"/></clipPath>
<g clip-path="url(#r)">
<rect width="90.0" height="20" fill="#555"/>
<rect x="90.0" width="18.5" height="20" fill="#dfb317"/>
<rect width="108.5" height="20" fill="url(#s)"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11">
<text x="45.0" y="15" fill="#010101" fill-opacity=".3">code quality</text>
<text x="45.0" y="14">code quality</text>
<text x="99.2" y="15" fill="#010101" fill-opacity=".3">C</text>
<text x="99.2" y="14">C</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1002 B

-19
View File
@@ -1,19 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="128.0" height="20" role="img" aria-label="tests: 237 passing">
<title>tests: 237 passing</title>
<linearGradient id="s" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<clipPath id="r"><rect width="128.0" height="20" rx="3" fill="#fff"/></clipPath>
<g clip-path="url(#r)">
<rect width="44.5" height="20" fill="#555"/>
<rect x="44.5" width="83.5" height="20" fill="#4c1"/>
<rect width="128.0" height="20" fill="url(#s)"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11">
<text x="22.2" y="15" fill="#010101" fill-opacity=".3">tests</text>
<text x="22.2" y="14">tests</text>
<text x="86.2" y="15" fill="#010101" fill-opacity=".3">237 passing</text>
<text x="86.2" y="14">237 passing</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 939 B

+61
View File
@@ -0,0 +1,61 @@
#!/usr/bin/env bash
# Compute the next release version for alkane-toolkit from the latest release
# tag and the paths changed since it. Version scheme X.Y.Z:
# X - major, bumped manually (ci/version-x.txt); a bump resets Y.Z to 0.0
# Y - backend-logic changes (core/discovery/access/flash/artifacts/cli,
# scan+model+main in the GUI crate, build/CI config); resets Z to 0
# Z - UI changes (the GUI view + fixtures + the wx-rs widget bridge)
# When both backend and UI changed, backend wins (bump Y). Docs-only changes
# produce no release.
#
# Emits KEY=VALUE lines on stdout (suitable for $GITHUB_OUTPUT):
# version, tag, bump, release (true/false), last_tag
set -euo pipefail
x_file="ci/version-x.txt"
X=0
[ -f "$x_file" ] && X=$(tr -dc '0-9' < "$x_file")
X=${X:-0}
last=$(git tag -l 'v*.*.*' | sort -V | tail -1 || true)
if [ -n "$last" ]; then
v=${last#v}; lx=${v%%.*}; rest=${v#*.}; ly=${rest%%.*}; lz=${rest##*.}
changed=$(git diff --name-only "$last"..HEAD)
else
lx=0; ly=0; lz=0
changed=$(git ls-files)
fi
ui=false; backend=false
while IFS= read -r f; do
[ -z "$f" ] && continue
case "$f" in
crates/alkane-gui/src/ui.rs|crates/alkane-gui/src/fixtures.rs|thirdparty/wx-rs/*)
ui=true ;;
crates/alkane-core/*|crates/alkane-discovery/*|crates/alkane-access/*|\
crates/alkane-flash/*|crates/alkane-artifacts/*|crates/alkane-cli/*|\
crates/alkane-gui/src/scan.rs|crates/alkane-gui/src/model.rs|\
crates/alkane-gui/src/main.rs|Cargo.toml|Cargo.lock|.gitea/*|ci/*|scripts/*)
backend=true ;;
*) : ;; # docs, HANDOFF, README, thirdparty/wxwidgets tree: no bump
esac
done <<< "$changed"
if [ -z "$last" ]; then
# First release: X.1.0 (or X.0.0 if X was pre-bumped above 0).
nx=$X; if [ "$X" -gt 0 ]; then ny=0; else ny=1; fi; nz=0; bump=initial; release=true
elif [ "$X" -gt "$lx" ]; then
nx=$X; ny=0; nz=0; bump=major; release=true
elif [ "$backend" = true ]; then
nx=$lx; ny=$((ly + 1)); nz=0; bump=backend; release=true
elif [ "$ui" = true ]; then
nx=$lx; ny=$ly; nz=$((lz + 1)); bump=ui; release=true
else
nx=$lx; ny=$ly; nz=$lz; bump=none; release=false
fi
echo "version=${nx}.${ny}.${nz}"
echo "tag=v${nx}.${ny}.${nz}"
echo "bump=${bump}"
echo "release=${release}"
echo "last_tag=${last:-none}"
+101
View File
@@ -0,0 +1,101 @@
#!/usr/bin/env bash
# Tests for ci/compute-version.sh (the X.Y.Z versioning logic). Each case builds
# a throwaway git repo in a scratch tmp dir (never inside this repo / the Ultron
# mount), lays out a scenario, runs compute-version.sh inside it, and asserts the
# emitted KEY=VALUE lines. Run: bash ci/test-compute-version.sh
set -euo pipefail
SCRIPT="$(cd "$(dirname "$0")" && pwd)/compute-version.sh"
[ -f "$SCRIPT" ] || { echo "cannot find compute-version.sh at $SCRIPT"; exit 2; }
pass=0
fail=0
# new_repo: fresh git repo in a scratch dir, echoes its path.
new_repo() {
local r
r="$(mktemp -d "${TMPDIR:-/tmp}/alkane-cv-XXXXXX")"
git -C "$r" init -q
git -C "$r" config user.email t@t
git -C "$r" config user.name t
echo "$r"
}
commit() { # commit <repo> <msg>
git -C "$1" add -A
git -C "$1" commit -q -m "$2"
}
# run_case: <name> <repo> then key=value expectations as remaining args.
run_case() {
local name="$1" repo="$2"; shift 2
local out get k v ok=1
out="$(cd "$repo" && bash "$SCRIPT")"
get() { echo "$out" | grep "^$1=" | cut -d= -f2-; }
for kv in "$@"; do
k="${kv%%=*}"; v="${kv#*=}"
if [ "$(get "$k")" != "$v" ]; then
echo "FAIL [$name]: expected $k=$v, got $k=$(get "$k")"
ok=0
fi
done
if [ "$ok" = 1 ]; then echo "PASS [$name]"; pass=$((pass + 1)); else fail=$((fail + 1)); fi
rm -rf "$repo"
}
# 1. First release, no tag, X=0 -> 0.1.0
R="$(new_repo)"; mkdir -p "$R/ci"; printf '0' > "$R/ci/version-x.txt"
printf 'x' > "$R/README.md"; commit "$R" init
run_case first_release "$R" version=0.1.0 tag=v0.1.0 bump=initial release=true last_tag=none
# 2. First release with a pre-bumped major (X=2, no tag) -> 2.0.0
R="$(new_repo)"; mkdir -p "$R/ci"; printf '2' > "$R/ci/version-x.txt"
printf 'x' > "$R/README.md"; commit "$R" init
run_case first_release_prebumped_x "$R" version=2.0.0 bump=initial release=true
# 3. Backend path change bumps Y
R="$(new_repo)"; mkdir -p "$R/ci" "$R/crates/alkane-gui/src"; printf '0' > "$R/ci/version-x.txt"
printf 'x' > "$R/README.md"; commit "$R" init; git -C "$R" tag v1.2.3
printf 'fn x(){}' > "$R/crates/alkane-gui/src/scan.rs"; commit "$R" backend
run_case backend_bump "$R" version=1.3.0 tag=v1.3.0 bump=backend release=true last_tag=v1.2.3
# 4. UI path change bumps Z
R="$(new_repo)"; mkdir -p "$R/ci" "$R/crates/alkane-gui/src"; printf '0' > "$R/ci/version-x.txt"
printf 'x' > "$R/README.md"; commit "$R" init; git -C "$R" tag v1.2.3
printf 'fn x(){}' > "$R/crates/alkane-gui/src/fixtures.rs"; commit "$R" ui
run_case ui_bump "$R" version=1.2.4 bump=ui release=true
# 5. Docs-only change -> no release
R="$(new_repo)"; mkdir -p "$R/ci"; printf '0' > "$R/ci/version-x.txt"
printf 'x' > "$R/README.md"; commit "$R" init; git -C "$R" tag v1.2.3
printf 'more docs' > "$R/README.md"; commit "$R" docs
run_case no_release_docs_only "$R" version=1.2.3 bump=none release=false
# 6. Manual major bump wins over a simultaneous UI change
R="$(new_repo)"; mkdir -p "$R/ci" "$R/crates/alkane-gui/src"; printf '0' > "$R/ci/version-x.txt"
printf 'x' > "$R/README.md"; commit "$R" init; git -C "$R" tag v1.2.3
printf '2' > "$R/ci/version-x.txt"; printf 'fn x(){}' > "$R/crates/alkane-gui/src/fixtures.rs"; commit "$R" bumpx
run_case manual_major_wins_over_ui "$R" version=2.0.0 bump=major release=true
# 7. Backend wins over UI when both change in the same diff
R="$(new_repo)"; mkdir -p "$R/ci" "$R/crates/alkane-gui/src"; printf '0' > "$R/ci/version-x.txt"
printf 'x' > "$R/README.md"; commit "$R" init; git -C "$R" tag v1.2.3
printf 'a' > "$R/crates/alkane-gui/src/scan.rs"
printf 'b' > "$R/crates/alkane-gui/src/fixtures.rs"; commit "$R" both
run_case backend_wins_over_ui "$R" version=1.3.0 bump=backend release=true
# 8. Nested ci/ path classified as backend (also covers editing compute-version.sh)
R="$(new_repo)"; mkdir -p "$R/ci"; printf '0' > "$R/ci/version-x.txt"
printf 'x' > "$R/README.md"; commit "$R" init; git -C "$R" tag v1.2.3
printf '# tweak' >> "$R/ci/compute-version.sh"; commit "$R" ci
run_case ci_nested_is_backend "$R" version=1.3.0 bump=backend release=true
# 9. Nested thirdparty/wx-rs path classified as UI
R="$(new_repo)"; mkdir -p "$R/ci" "$R/thirdparty/wx-rs/src/deep"; printf '0' > "$R/ci/version-x.txt"
printf 'x' > "$R/README.md"; commit "$R" init; git -C "$R" tag v1.2.3
printf 'x' > "$R/thirdparty/wx-rs/src/deep/nested.rs"; commit "$R" wx
run_case wx_rs_nested_is_ui "$R" version=1.2.4 bump=ui release=true
echo "----"
echo "compute-version tests: $pass passed, $fail failed"
[ "$fail" -eq 0 ]
+1
View File
@@ -0,0 +1 @@
0
+8
View File
@@ -0,0 +1,8 @@
[package]
name = "alkane-access"
version.workspace = true
edition.workspace = true
license.workspace = true
[dependencies]
alkane-core = { path = "../alkane-core" }
+1
View File
@@ -0,0 +1 @@
// alkane-access
+8
View File
@@ -0,0 +1,8 @@
[package]
name = "alkane-artifacts"
version.workspace = true
edition.workspace = true
license.workspace = true
[dependencies]
alkane-core = { path = "../alkane-core" }
@@ -0,0 +1,15 @@
sha256,size_bytes,path,family,format,applicability
e56393cbc26a5a97f677b22b8fe9abed705afd91854d4c59831777da8b529bd6,71586875,H3 SD card Program-20220422.zip,whatsminer-h3,IMAGEWTY-SD,SD install source; edit_wm_imagewty_h3.py input
12a2367327396c04c14cb2976855f7d98005b63cdce2fcc555c6d7a051ef9e1c,73633572,H6 SD Card Program-20210121.zip,whatsminer-h6,IMAGEWTY-SD,SD install source
be9728390c36698006751761275abfd47d5b1dd435b946b77afc61ca4f24e670,77956225,H6os SD Card Program-20220422.zip,whatsminer-h6os,IMAGEWTY-SD,SD install source
651f70ff184cbf4387066a6edbbc44e36b571f21911aeb1ed02f975ae65ccf27,120146097,Antminer_s21-t21-s19-t19-l7_ANT_Global_0_0.9.9.4.zip,bitmain-stock,update-zip,S21/T21/S19/T19/L7 stock source
f4e7ffb19f2e8917c1323848b8b5716018ddf429e750eeeb9db2410ae88ce1d1,60821504,powerplay-amlogic-epic-antminer-update-v1.22.0-28830069.ubifs,epic-umc-a113d,ubifs,ePIC install source; root:letmein vector
2dfb99bbbf977b9874af547c89fb7f5005e94449050ed43679578fd7f42a6fb3,45143628,Whatsminer-all-20260729.11_1786698699016.bin.bak,whatsminer-ota,bin-AES-container,network-update input only
6f26295b31db31d4c33c07e3c4f746d3d9c4d9c6a2e812e81d6386be98d8f361,64457212,luxos-installer_1.19.0.zip,luxos,zip-installer,bb/xil/aml source-OS route; no cvitek asset
b2e5b64c24808402ecd421ead6d05a3b7319acfc26b8c36a5172f5cc77125073,20679718,firmware-analysis/bixbit-antminer/bixbit-BB-universal.bmu,bixbit-bb,bmu,am335x-bb source/carve
3f8e519fddd8c5f50fe11f1ab3c3efa551b7ade2caf69e4bf61ca39ee1abae7e,22529209,firmware-analysis/bixbit-antminer/bixbit-CV-universal.bmu,bixbit-cv,bmu,cv1835 source/carve
7294c8a3e1be42670ca55bf9bd42fbfa894ffb52d1773f3e1faceaf9090c2ec0,29887071,firmware-analysis/bixbit-antminer/bixbit-XLNX-universal.bmu,bixbit-xlnx,bmu,zynq-7010 source/carve
670980107a0125e16fe01d271c9a6b9ebeee5d82835474d7ac741d1840307484,43838976,firmware-analysis/epic/powerplay-antminer-update-v1.20.4-297ddfd7.swu,epic-umc-am335x,swu,am335x-bb install source
f1ec045497570e794b920c45c5121fb834eae5a2803118d3f0c4a89ef7a4233b,12686696,scratch/wm-install-build/pkgs/20251209_embed0_alg1_t8c790afe.bin,whatsminer-h616-pkg,wm-package-0x9a5ba57c,h616 update-endpoint install (forged)
eaf26b9cf19cce872ea53f39c4d38796df4221f9cee7d0822cd2ec827ad60952,12905720,scratch/wm-install-build/pkgs-h3/m2x_1.6.0.2_alg1_chip0.bin,whatsminer-h3-pkg,wm-package-0x9a5ba57c,h3 update-endpoint install (forged)
628bf53e582e2b31756f7e3ff522d4e8ad9c99b17e4eda4d24045988a2ac25f3,24857600,firmware-analysis/bixbit-antminer/bixbit-AML-universal.bmu,bixbit-aml,bmu,a113d source/carve
1 sha256 size_bytes path family format applicability
2 e56393cbc26a5a97f677b22b8fe9abed705afd91854d4c59831777da8b529bd6 71586875 H3 SD card Program-20220422.zip whatsminer-h3 IMAGEWTY-SD SD install source; edit_wm_imagewty_h3.py input
3 12a2367327396c04c14cb2976855f7d98005b63cdce2fcc555c6d7a051ef9e1c 73633572 H6 SD Card Program-20210121.zip whatsminer-h6 IMAGEWTY-SD SD install source
4 be9728390c36698006751761275abfd47d5b1dd435b946b77afc61ca4f24e670 77956225 H6os SD Card Program-20220422.zip whatsminer-h6os IMAGEWTY-SD SD install source
5 651f70ff184cbf4387066a6edbbc44e36b571f21911aeb1ed02f975ae65ccf27 120146097 Antminer_s21-t21-s19-t19-l7_ANT_Global_0_0.9.9.4.zip bitmain-stock update-zip S21/T21/S19/T19/L7 stock source
6 f4e7ffb19f2e8917c1323848b8b5716018ddf429e750eeeb9db2410ae88ce1d1 60821504 powerplay-amlogic-epic-antminer-update-v1.22.0-28830069.ubifs epic-umc-a113d ubifs ePIC install source; root:letmein vector
7 2dfb99bbbf977b9874af547c89fb7f5005e94449050ed43679578fd7f42a6fb3 45143628 Whatsminer-all-20260729.11_1786698699016.bin.bak whatsminer-ota bin-AES-container network-update input only
8 6f26295b31db31d4c33c07e3c4f746d3d9c4d9c6a2e812e81d6386be98d8f361 64457212 luxos-installer_1.19.0.zip luxos zip-installer bb/xil/aml source-OS route; no cvitek asset
9 b2e5b64c24808402ecd421ead6d05a3b7319acfc26b8c36a5172f5cc77125073 20679718 firmware-analysis/bixbit-antminer/bixbit-BB-universal.bmu bixbit-bb bmu am335x-bb source/carve
10 3f8e519fddd8c5f50fe11f1ab3c3efa551b7ade2caf69e4bf61ca39ee1abae7e 22529209 firmware-analysis/bixbit-antminer/bixbit-CV-universal.bmu bixbit-cv bmu cv1835 source/carve
11 7294c8a3e1be42670ca55bf9bd42fbfa894ffb52d1773f3e1faceaf9090c2ec0 29887071 firmware-analysis/bixbit-antminer/bixbit-XLNX-universal.bmu bixbit-xlnx bmu zynq-7010 source/carve
12 670980107a0125e16fe01d271c9a6b9ebeee5d82835474d7ac741d1840307484 43838976 firmware-analysis/epic/powerplay-antminer-update-v1.20.4-297ddfd7.swu epic-umc-am335x swu am335x-bb install source
13 f1ec045497570e794b920c45c5121fb834eae5a2803118d3f0c4a89ef7a4233b 12686696 scratch/wm-install-build/pkgs/20251209_embed0_alg1_t8c790afe.bin whatsminer-h616-pkg wm-package-0x9a5ba57c h616 update-endpoint install (forged)
14 eaf26b9cf19cce872ea53f39c4d38796df4221f9cee7d0822cd2ec827ad60952 12905720 scratch/wm-install-build/pkgs-h3/m2x_1.6.0.2_alg1_chip0.bin whatsminer-h3-pkg wm-package-0x9a5ba57c h3 update-endpoint install (forged)
15 628bf53e582e2b31756f7e3ff522d4e8ad9c99b17e4eda4d24045988a2ac25f3 24857600 firmware-analysis/bixbit-antminer/bixbit-AML-universal.bmu bixbit-aml bmu a113d source/carve
+1
View File
@@ -0,0 +1 @@
// alkane-artifacts
+8
View File
@@ -0,0 +1,8 @@
[package]
name = "alkane-cli"
version.workspace = true
edition.workspace = true
license.workspace = true
[dependencies]
alkane-core = { path = "../alkane-core" }
+4
View File
@@ -0,0 +1,4 @@
//! Headless driver over the same engine the GUI uses.
fn main() {
println!("alkane-toolkit-cli: scaffold");
}
+9
View File
@@ -0,0 +1,9 @@
[package]
name = "alkane-core"
version.workspace = true
edition.workspace = true
license.workspace = true
[dependencies]
thiserror.workspace = true
serde.workspace = true
+1
View File
@@ -0,0 +1 @@
// alkane-core
+9
View File
@@ -0,0 +1,9 @@
[package]
name = "alkane-discovery"
version.workspace = true
edition.workspace = true
license.workspace = true
[dependencies]
alkane-core = { path = "../alkane-core" }
asic-rs = "0.8.1"
+1
View File
@@ -0,0 +1 @@
// alkane-discovery
+8
View File
@@ -0,0 +1,8 @@
[package]
name = "alkane-flash"
version.workspace = true
edition.workspace = true
license.workspace = true
[dependencies]
alkane-core = { path = "../alkane-core" }
+1
View File
@@ -0,0 +1 @@
// alkane-flash
+19
View File
@@ -0,0 +1,19 @@
[package]
name = "alkane-gui"
version.workspace = true
edition.workspace = true
license.workspace = true
[[bin]]
name = "alkane-toolkit"
path = "src/main.rs"
[dependencies]
alkane-core = { path = "../alkane-core" }
alkane-discovery = { path = "../alkane-discovery" }
# vendored + patched wx-rs (see vendor/wx-rs/patches/)
wx-rs = { path = "../../thirdparty/wx-rs/wx-rs-0.2.0-patched" }
asic-rs = "0.8.1"
measurements = "0.11"
tokio = { version = "1", features = ["rt"] }
futures-util = "0.3"
+127
View File
@@ -0,0 +1,127 @@
//! Optional saved miner credentials, applied to every asic-rs discovery call.
//!
//! asic-rs has no single global credential field on `MinerFactory`: auth is set
//! per firmware backend via `with_firmware_discovery_auth`. `configured_factory`
//! is the one place that fans a saved username/password out across the whole
//! firmware registry, so `scan`'s callers never have to think about it.
use std::io::Write;
use std::os::unix::fs::{OpenOptionsExt, PermissionsExt};
use asic_rs::MinerFactory;
use asic_rs::core::traits::miner::MinerAuth;
use crate::scan::config_path;
pub const CREDENTIALS_FILE: &str = "scan-credentials.txt";
/// Load the saved miner username/password, if any were saved.
pub fn load_credentials() -> Option<(String, String)> {
let s = std::fs::read_to_string(config_path(CREDENTIALS_FILE)).ok()?;
let mut lines = s.lines();
let user = lines.next()?.to_string();
let pass = lines.next().unwrap_or("").to_string();
Some((user, pass))
}
/// Save the miner username/password, restricting the file to owner
/// read/write (credentials are plaintext on disk, so the mode matters).
pub fn save_credentials(user: &str, pass: &str) -> std::io::Result<()> {
let p = config_path(CREDENTIALS_FILE);
if let Some(dir) = p.parent() {
std::fs::create_dir_all(dir)?;
}
// Open (and create) with mode 0600 up front so a freshly created file is
// never world/group-readable, even for the instant before the write. For a
// pre-existing file the create mode is ignored, so also tighten it to 0600
// while it is still empty (post-truncate, pre-write) -- the plaintext is
// never on disk under a looser mode.
let mut f = std::fs::OpenOptions::new()
.write(true)
.create(true)
.truncate(true)
.mode(0o600)
.open(&p)?;
f.set_permissions(std::fs::Permissions::from_mode(0o600))?;
f.write_all(format!("{user}\n{pass}\n").as_bytes())?;
Ok(())
}
/// Remove the saved credentials, if any. Not an error if none were saved.
pub fn clear_credentials() -> std::io::Result<()> {
match std::fs::remove_file(config_path(CREDENTIALS_FILE)) {
Ok(()) => Ok(()),
Err(e) if e.kind() == std::io::ErrorKind::NotFound => Ok(()),
Err(e) => Err(e),
}
}
/// Build a `MinerFactory` with the saved credentials (if any) applied as
/// discovery auth for every firmware backend, so scans, refreshes, config
/// actions, and firmware flashes all authenticate against a non-default
/// login the same way. With no saved credentials this is plain `MinerFactory::new()`
/// and every backend falls back to its own default auth.
pub fn configured_factory() -> MinerFactory {
let mut factory = MinerFactory::new();
if let Some((user, pass)) = load_credentials() {
for fw in asic_rs::factory::default_firmware_registry() {
factory = factory.with_firmware_discovery_auth(fw.as_ref(), MinerAuth::new(user.clone(), pass.clone()));
}
}
factory
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn credentials_round_trip_and_file_perms() {
// config_path() reads $HOME; point it at a private temp dir. HOME is
// process-global, so this stays one test and restores HOME afterward
// (matching the pattern used by scan::tests::auto_secs_round_trip_and_defaults).
let prev = std::env::var_os("HOME");
let dir = std::env::temp_dir().join(format!("alkane-cred-test-{}", std::process::id()));
let _ = std::fs::remove_dir_all(&dir);
std::fs::create_dir_all(&dir).unwrap();
std::env::set_var("HOME", &dir);
assert_eq!(load_credentials(), None, "no file -> None");
save_credentials("admin", "hunter2").unwrap();
assert_eq!(load_credentials(), Some(("admin".to_string(), "hunter2".to_string())));
let meta = std::fs::metadata(config_path(CREDENTIALS_FILE)).unwrap();
assert_eq!(meta.permissions().mode() & 0o777, 0o600, "credentials file must be 0600");
// configured_factory() must construct in both branches without panicking:
// with saved credentials (fans auth across every firmware backend) ...
let _ = configured_factory();
// A pre-existing, world-readable credentials file must be tightened to
// 0600 by save_credentials (the create-mode is ignored for an existing
// file, so the explicit set_permissions is what protects it).
let path = config_path(CREDENTIALS_FILE);
std::fs::set_permissions(&path, std::fs::Permissions::from_mode(0o644)).unwrap();
save_credentials("admin2", "s3cr3t").unwrap();
let meta = std::fs::metadata(&path).unwrap();
assert_eq!(
meta.permissions().mode() & 0o777,
0o600,
"save over a pre-existing 0644 file must re-tighten to 0600"
);
assert_eq!(load_credentials(), Some(("admin2".to_string(), "s3cr3t".to_string())));
clear_credentials().unwrap();
// ... and with no saved credentials (plain MinerFactory::new()).
let _ = configured_factory();
assert_eq!(load_credentials(), None, "cleared -> None");
clear_credentials().unwrap(); // idempotent: clearing an already-clear store is not an error
match prev {
Some(v) => std::env::set_var("HOME", v),
None => std::env::remove_var("HOME"),
}
let _ = std::fs::remove_dir_all(&dir);
}
}
+168
View File
@@ -0,0 +1,168 @@
//! Bench-fleet fixtures: the expected hardware output of the 9 boards on
//! 10.255.1.0/24 (see ../../../HANDOFF.md section 7 and the parent project's
//! [removed]), plus one synthetic unreachable IP rendered via
//! `MinerRow::offline()` so the "offline" status/row shape is exercisable
//! offline too (10 rows total). These are the reference values the workflow
//! tests compare the application's actual output against, and the rows the
//! offline `ALKANE_FAKE_SCAN` demo mode renders.
//!
//! Hashrate/power/temp are representative per-model figures (the bench boards
//! are not always energised); the point of the fixtures is a fixed, known input
//! set so the transforms (formatting, KPI aggregation, sort, filter, the "slow"
//! band) can be checked deterministically. Update these if the bench inventory
//! changes.
use crate::model::{is_slow, MinerRow};
/// One fixture board, pre-transform. `expected` of 0.0 means "band unknown".
struct Board {
ip: &'static str,
model: &'static str,
firmware: &'static str,
hashrate: f64,
expected: f64,
power: f64,
temp: f64,
fan: f64,
worker: &'static str,
mining: bool,
/// True for the bench board deliberately rebucketed into the "paused"
/// status/KPI bucket (not-mining but operator-paused, distinct from a
/// unit that is simply idle/not-hashing).
paused: bool,
}
impl Board {
fn into_row(self) -> MinerRow {
let slow = is_slow(self.mining, self.hashrate, self.expected);
// A few extra metrics so the demo/offline mode shows non-empty values
// for some of the additional columns.
let last_octet: u8 = self.ip.rsplit('.').next().and_then(|s| s.parse().ok()).unwrap_or(0);
let (boards, chips, efficiency) = if self.mining {
(Some(3u32), Some(210u32), if self.hashrate > 0.0 { self.power / self.hashrate } else { 0.0 })
} else {
(None, None, 0.0)
};
let fan_rpms = if self.mining {
vec![self.fan, self.fan * 0.95, self.fan * 1.02]
} else {
vec![]
};
// Firmware-flash capability is modeled on the real Bitmain/Antminer
// upgrade path (S17/S19/S21 family); WhatsMiner boards in this fleet
// don't advertise it, so both true and false show up and the
// firmware menu item is testable.
let firmware_flash = self.model == "Antminer S17"
|| self.model.starts_with("Antminer S19")
|| self.model.starts_with("Antminer S21");
MinerRow {
ip: self.ip.to_string(),
selected: false,
model: self.model.to_string(),
firmware: self.firmware.to_string(),
hashrate_ths: self.hashrate,
expected_ths: self.expected,
efficiency,
power_w: self.power,
chip_temp_c: self.temp,
fan_rpms,
worker: self.worker.to_string(),
is_mining: self.mining,
slow,
paused: self.paused,
// offline defaults to false (online); these bench rows are reachable.
mac: format!("AA:BB:CC:00:{:02X}:{last_octet:02X}", last_octet.wrapping_mul(3)),
hostname: format!("miner-{last_octet}"),
hashboards: boards,
expected_hashboards: Some(3),
total_chips: chips,
psu_fan_rpm: if self.mining { self.fan * 0.9 } else { 0.0 },
uptime_secs: if self.mining { 3600 * 24 * 2 + 3600 * 5 } else { 0 },
light_flashing: Some(false),
pool_url: if self.worker.is_empty() { String::new() } else { "stratum+tcp://pool.blueflare:3333".to_string() },
pools: if self.worker.is_empty() {
Vec::new()
} else {
vec![
("stratum+tcp://pool.blueflare:3333".to_string(), self.worker.to_string()),
("stratum+tcp://backup.blueflare:3333".to_string(), format!("{}_bak", self.worker)),
]
},
operating_state: if self.paused {
"paused".to_string()
} else if self.mining {
"mining".to_string()
} else {
"idle".to_string()
},
// Synthetic capabilities so the right-click config menu is
// exercisable offline: mining units support everything, idle ones
// only the fault light + restart (to show the capability intersection).
caps: crate::model::MinerCaps {
fault_light: true,
restart: true,
pause: self.mining,
resume: self.mining,
power_limit: self.mining,
tuning: self.mining,
firmware_flash,
},
..Default::default()
}
}
}
/// The 9 bench boards plus one synthetic offline entry (10 rows total).
/// One is idle/not-hashing (S17 stock, .112); one is paused (WardenOS dev,
/// .115 - deliberately rebucketed from idle so the "paused" status/KPI
/// bucket is exercisable offline); one is slow (S21 Pro aml stock at ~30%
/// of expected); the other six hash normally; the last row is an
/// unreachable IP rendered via `MinerRow::offline()` (blank fields,
/// `offline: true`).
///
/// Derived totals (used by the workflow tests):
/// total = 10, hashing = 6, slow = 1, not hashing = 1, paused = 1, offline = 1,
/// total hashrate = 685.0 TH/s, total power = 21300 W (offline row is all zero).
///
/// Note: `compute_kpis` has no separate "offline" bucket - an offline row is
/// `!is_mining && !paused && !slow`, so it folds into the "not hashing" KPI
/// alongside the idle S17, giving `Kpis.not_hashing == 2`. The per-row
/// `status()` text still distinguishes them ("not hashing" for .112 vs.
/// "offline" for .199).
pub fn bench_fleet() -> Vec<MinerRow> {
let boards = [
Board { ip: "10.255.1.112", model: "Antminer S17", firmware: "Stock",
hashrate: 0.0, expected: 0.0, power: 0.0, temp: 0.0, fan: 0.0,
worker: "", mining: false, paused: false },
Board { ip: "10.255.1.166", model: "Antminer S19", firmware: "[removed] 1.2",
hashrate: 95.0, expected: 96.0, power: 3250.0, temp: 65.0, fan: 4200.0,
worker: "blueflare.s19", mining: true, paused: false },
Board { ip: "10.255.1.152", model: "Antminer S19j Pro", firmware: "[removed] 1.2",
hashrate: 100.0, expected: 104.0, power: 3100.0, temp: 62.0, fan: 3900.0,
worker: "blueflare.s19jpro", mining: true, paused: false },
Board { ip: "10.255.1.167", model: "Antminer S19k Pro", firmware: "[removed] 1.2",
hashrate: 120.0, expected: 128.0, power: 3300.0, temp: 68.0, fan: 4500.0,
worker: "blueflare.s19kpro", mining: true, paused: false },
Board { ip: "10.255.1.149", model: "Antminer S21 Pro", firmware: "Stock",
hashrate: 60.0, expected: 200.0, power: 1500.0, temp: 55.0, fan: 3000.0,
worker: "blueflare.s21pro", mining: true, paused: false }, // slow: 60/200 = 30%
Board { ip: "10.255.1.126", model: "WhatsMiner M30S", firmware: "WMOS H3",
hashrate: 92.0, expected: 96.0, power: 3400.0, temp: 70.0, fan: 4800.0,
worker: "blueflare.h3", mining: true, paused: false },
Board { ip: "10.255.1.131", model: "WhatsMiner M30S+", firmware: "WMOS H616",
hashrate: 100.0, expected: 100.0, power: 3450.0, temp: 71.0, fan: 4900.0,
worker: "blueflare.h616", mining: true, paused: false },
Board { ip: "10.255.1.148", model: "WhatsMiner M50", firmware: "WMOS CB4",
hashrate: 118.0, expected: 122.0, power: 3300.0, temp: 66.0, fan: 4600.0,
worker: "blueflare.m50", mining: true, paused: false },
// Rebucketed from idle/not-hashing to paused so the "paused"
// status/KPI bucket is exercisable in the fake-scan/offline demo.
Board { ip: "10.255.1.115", model: "Antminer S19", firmware: "WardenOS dev",
hashrate: 0.0, expected: 0.0, power: 0.0, temp: 0.0, fan: 0.0,
worker: "", mining: false, paused: true },
];
let mut rows: Vec<MinerRow> = boards.into_iter().map(Board::into_row).collect();
// Synthetic offline board: unreachable IP, blank/zeroed fields, offline: true.
rows.push(MinerRow::offline("10.255.1.199".into()));
rows
}
+51
View File
@@ -0,0 +1,51 @@
//! alkane-toolkit — primary view (docs/UI-SPEC.md).
//! Pure-Rust wxWidgets app on the vendored, patched wx-rs.
mod credentials;
mod fixtures;
mod model;
mod scan;
mod ui;
use wx_rs;
fn main() {
// Headless workflow self-test: render the bench-fleet fixtures through the
// real widgets and check the table + KPIs against the expected hardware
// output. Run under a virtual display (see scripts/ui-selftest.sh).
if std::env::var_os("ALKANE_SELFTEST").is_some() {
std::process::exit(run_selftest());
}
// Bootstrap the wx app + main frame (upstream bridge).
wx_rs::init_app("alkane-toolkit", 1280, 800);
// Follow the system light/dark appearance.
wx_rs::set_appearance_system();
// Build the UI-SPEC primary view into the frame.
let frame = wx_rs::Widget::main_frame();
let app = ui::build(frame);
ui::install(app);
// All widget events funnel through one dispatcher.
wx_rs::set_event_handler(ui::dispatch);
// Enter the wx event loop; the scan thread streams rows via channel and
// a 1 s timer drains it on the main thread.
wx_rs::run_app();
}
fn run_selftest() -> i32 {
// Force offline: never touch the network during the self-test.
std::env::set_var(scan::FAKE_SCAN_ENV, "1");
wx_rs::init_app("alkane-toolkit", 1280, 800);
let frame = wx_rs::Widget::main_frame();
let mut app = ui::build(frame);
let ok = app.run_fixture_selftest();
println!("SELFTEST {}", if ok { "PASS" } else { "FAIL" });
if ok {
0
} else {
1
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+61
View File
@@ -0,0 +1,61 @@
# UI Spec — primary view
Source: operator description, 2026-09-15. Status: ACCEPTED (v1 scope).
## Header (above the table)
- **KPI block, top left — 6 KPIs:**
1. Total miners
2. Hashing
3. Slow
4. Not hashing
5. Total hashrate (sum over table)
6. Total estimated power consumption (sum over table)
- **Scan-ranges box** (middle): click to edit the IP scanning ranges.
- **Filter button**: opens an Excel-style filter panel (per-column value
filters, multi-select).
- **Columns button**: opens a panel of checkboxes, one per available
statistic; unchecked = column hidden from the table.
## Table
- One miner per row; statistics as columns.
- **Sort:** click a column title to sort by it (toggle asc/desc).
- **Row checkbox** at the left edge selects the miner (bulk actions later).
- **First column is always IP** (not reorderable, not hideable).
- **Other columns drag-to-reorder.**
- **Default column order** after IP:
1. Hashrate
2. Power (estimated)
3. Chip temp
4. Cooling (fan)
5. Firmware
6. Pool worker account name
7. …then the remaining statistics in registry order.
## Data sources
- Rows and statistics come from the vendored `asic-rs` scan engine
(`MinerFactory::scan_stream()` over the configured ranges); the toolkit
adds install-state columns (foothold available, pathway supported) that
asic-rs does not know about.
- The six KPIs are derived client-side from the same row set, so header and
table can never disagree.
- "Slow" = hashing but below the model's expected hashrate band (band data
ships with the board registry; missing band = excluded from Slow, counted
in Hashing).
## Implementation notes
- wxWidgets: the view is a `wxDataViewListCtrl`/`wxDataViewCtrl` (virtual
list — thousands of rows without materializing cells), checkbox column +
IP column fixed via attribute/serializer, drag reorder via `wxReorderable`
column events, sort via column header click events mapped to the model.
- Filter panel: per-column distinct-value checklist with text search,
"select all/none", AND across columns, OR within a column (Excel
semantics).
- Columns panel: persists (order + visibility) per install in a user config
file; "reset to default order" action included.
- Scan-ranges box: opens a small editor with CIDR list, one per line,
validate-on-apply; ranges feed both asic-rs scan and the ARP/ICMP
pre-pass.
+35
View File
@@ -0,0 +1,35 @@
# ADR 0001: Recipes as data, interpreted by one engine
Status: ACCEPTED
Date: 2026-09-14
## Context
alkane-sdk defines per `{board, source-OS}` install recipes as prose with
five facts (foothold, transfer channel, write target, verify, revert) plus
a universal stage pattern. Hardcoding each combination as imperative Rust
would fork control flow per combination and make the recorded false
positives (UBI volume-name trap, "Success: 1" booting stock) easy to
reintroduce.
## Decision
Every recipe is a declarative pipeline (ordered stages + typed parameters,
board/OS-keyed data files in the repo), executed by a single engine. The
five SDK invariants are enforced by the engine and the domain types, not by
individual recipes:
1. secure-partition writes refused unconditionally
2. independent-channel verification + >= 2 power-cycle persist gate
3. reboot timeout = candidate success, re-classified via liveness channel
4. packer formats are board-owned enum values; cross-board misuse is
unrepresentable
5. boot-switch is an explicit stage with its own verification + regression
tests for known traps
## Consequences
- Adding `{board, source-OS}` support = data + tests, no new control flow.
- The audit log is a natural by-product (one entry per stage).
- Resume/rollback operates on the same stage list the log describes.
- The engine is identical for CLI and GUI (D4 in the plan).
+41
View File
@@ -0,0 +1,41 @@
# ADR 0002: GUI bindings — wxWidgets shell in C++ + Rust core, spike to revisit
Status: RESOLVED 2026-09-15 - the operator chose Option B (pure Rust via
wx-rs) with vendoring (ADR-0003). wx-rs 0.2.0 was extended via the patch
queue: Linux/GTK3 wx-config build path plus the widget bridge (panel,
sizers, static text, button, text ctrl, checkbox, checklistbox, dialog,
data view list ctrl, timer). The app ships this way; no C++ shell.
Date: 2026-09-14
## Context
The toolkit must present a native cross-platform GUI (wxWidgets chosen).
Rust bindings to wxWidgets checked on crates.io 2026-09-14:
- `wxRust` 0.0.1-alpha — unmaintained since 2022.
- `wx-rs` 0.2.0 (2023, self-contained) — ~6k downloads, no 1.0.
Betting the GUI on alpha bindings risks weeks of binding-gap debugging
(paste-heavy widgets, worker threads + event loops, GTK/WinCocoa quirks).
## Decision
Default: **thin C++17 wxWidgets shell (`gui/`) + Rust core exposed over a
small stable C ABI** (cdylib from `alkane-core`, header generated with
cbindgen). The shell holds frames, lists, the install wizard, and event
glue only — no business logic, no safety logic. All invariants, engines,
and tests live in Rust where they are testable headlessly.
Gate: M0 runs a time-boxed `wx-rs` spike (window + list/tree + wizard flow
+ worker-thread progress + cancel on Linux and Windows). If the spike is
solid, flip to pure Rust; either way the decision is recorded before M3.
## Consequences
- The repo builds two things: a Rust workspace and a small C++ app linked
against the core cdylib. CMake in `gui/`.
- Core API surface stays small and event-oriented (discover, identify,
plan, execute, cancel, progress events, log tail) — good FFI hygiene and
a natural match for the CLI too (D4).
- If wx-rs wins the spike, the C ABI is kept as an integration boundary for
scripted/HIL use anyway.
+58
View File
@@ -0,0 +1,58 @@
# ADR 0003: Vendoring policy — pristine upstream archives + patch queue
Status: ACCEPTED
Date: 2026-09-15
## Context
The operator directed that ASIC-rs and wxWidgets live vendored in this repo
"so that we can handle merging updates easily". Upstream is not reachable
through our suspended GitHub account, and we want reproducible offline
builds and conflict-free updates.
## Decision
Both dependencies are vendored under `vendor/` as **pristine upstream
archives plus a patch queue**:
```
vendor/ cargo-managed crate sources ONLY (regenerated by
`cargo vendor vendor`; it deletes unmanaged dirs - never
put hand-made trees here; learned the hard way)
thirdparty/
asic-rs lives in vendor/ (pure crates.io dep, cargo-vendored)
wxwidgets/
wxWidgets-3.3.3/ pristine release tree, never edited directly
VERSION upstream version + tarball URL + sha256
patches/ our changes as numbered .patch files (empty today)
wx-rs/
wx-rs-0.2.0-patched/ the used crate (path dep from alkane-gui)
VERSION upstream version + tarball URL + sha256
patches/ 0001 linux build path, 0002 rust widgets binding,
0003 C++ widget bridge, 0004 upstream wx3.3 fixes
```
Rules:
1. Never edit a vendored pristine tree in place — every local change is a
patch in `patches/`, applied by the build in numeric order. This makes
an upstream update: replace pristine archive, `git apply` surviving
patches, rebase the rest.
2. Every vendored tree records its upstream source URL and sha256 in
`VERSION`. Updates are a diff of one version-pinning line plus the
patch-queue rebase.
3. Builds happen out-of-tree (`~/.cache/wxbuild`, `~/.cache/wx-3.3.3-linux`)
because the synced project mount is noexec; scripts/build-wx-linux.sh
automates it.
3. asic-rs is pinned per semver in Cargo.toml and materialized with
`cargo vendor`; the build uses `.cargo/config.toml`'s vendored-sources
replacement, so builds never touch the network.
4. wxWidgets 3.3.3 release tarball is the merge unit (wx upstream supports
it); the C++ shell links the vendored tree via CMake `add_subdirectory`.
## Consequences
- The repo grows by the vendored sources (one-time; git-compressed).
- Offline/reproducible builds on any machine.
- Updating either dependency is mechanical, reviewable, and never
entangles our changes with upstream files.
@@ -1,30 +0,0 @@
{
"sha": "086c883c4ae42f5d3c24fc1fb4d312badcfbc79e",
"timestamp": "2026-11-04T20:50:12+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 231400.0,
"bench_health_diagnostics": 41504.0,
"bench_render_cells": 8263260.000000001,
"bench_sort_by_each_column": 1426938.0,
"bench_upsert_cold_start_population": 14057415.0,
"bench_view_pipeline": 317977.0,
"bench_view_pipeline_default_sort": 512832.99999999994,
"bench_view_pipeline_with_filter": 402369.0,
"bench_naming_transforms": 671.0,
"bench_parse_line_near_max_addrs": 1128579.0,
"bench_parse_targets_many_ranges_near_cap": 110722378.0,
"bench_targets_to_cidrs_large_range": 955996.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
},
"bench_context": {
"schema": 1,
"same_inputs": false,
"baseline_sha": "de5c1a5a150a410d1591e9b5ed664c2ac55157a8"
}
}
}
@@ -1,30 +0,0 @@
{
"sha": "0873d2c79d3f75a8802c38428c93be6e90ca5c29",
"timestamp": "2026-11-17T07:03:05+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 150768.0,
"bench_health_diagnostics": 17390.0,
"bench_render_cells": 3124124.0,
"bench_sort_by_each_column": 480690.0,
"bench_upsert_cold_start_population": 18664809.0,
"bench_view_pipeline": 161447.0,
"bench_view_pipeline_default_sort": 175055.0,
"bench_view_pipeline_with_filter": 133088.0,
"bench_naming_transforms": 252.0,
"bench_parse_line_near_max_addrs": 352516.0,
"bench_parse_targets_many_ranges_near_cap": 76502278.0,
"bench_targets_to_cidrs_large_range": 590427.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 7 8745H w/ Radeon 780M Graphics",
"logical_cpus": 4
},
"bench_context": {
"schema": 1,
"same_inputs": false,
"baseline_sha": "63c603d91987069b615f1927d8383e383bd3a1a5"
}
}
}
@@ -1,30 +0,0 @@
{
"sha": "0949870a147fbc54dbd7a9fe0567cd70315ba1db",
"timestamp": "2026-11-03T16:08:38+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 476269.0,
"bench_health_diagnostics": 80495.0,
"bench_render_cells": 8167535.000000001,
"bench_sort_by_each_column": 863351.0,
"bench_upsert_cold_start_population": 22065597.0,
"bench_view_pipeline": 249205.0,
"bench_view_pipeline_default_sort": 432689.0,
"bench_view_pipeline_with_filter": 360209.0,
"bench_naming_transforms": 712.0,
"bench_parse_line_near_max_addrs": 463750.0,
"bench_parse_targets_many_ranges_near_cap": 109014386.0,
"bench_targets_to_cidrs_large_range": 1258014.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
},
"bench_context": {
"schema": 1,
"same_inputs": false,
"baseline_sha": "abad4879ea89af0c0a6f41157a987114fa5f406f"
}
}
}
@@ -1,25 +0,0 @@
{
"sha": "190a04d740f890df70c15d9336447ec41d07572c",
"timestamp": "2026-10-17T13:10:07+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 145692.0,
"bench_health_diagnostics": 17914.0,
"bench_render_cells": 3089940.0,
"bench_sort_by_each_column": 404616.0,
"bench_upsert_cold_start_population": 6819436.0,
"bench_view_pipeline": 158400.0,
"bench_view_pipeline_default_sort": 173943.0,
"bench_view_pipeline_with_filter": 174073.0,
"bench_naming_transforms": 225.0,
"bench_parse_line_near_max_addrs": 253780.0,
"bench_parse_targets_many_ranges_near_cap": 45754074.0,
"bench_targets_to_cidrs_large_range": 238448.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 7 8745H w/ Radeon 780M Graphics",
"logical_cpus": 4
}
}
}
@@ -1,25 +0,0 @@
{
"sha": "21e3c5fe8597d77f1fa9a5e4826b5a2d48b41b14",
"timestamp": "2026-10-19T13:05:31+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 287697.0,
"bench_health_diagnostics": 64825.0,
"bench_render_cells": 8729316.0,
"bench_sort_by_each_column": 1016929.0,
"bench_upsert_cold_start_population": 19092946.0,
"bench_view_pipeline": 356335.0,
"bench_view_pipeline_default_sort": 822767.0,
"bench_view_pipeline_with_filter": 490965.0,
"bench_naming_transforms": 1259.0,
"bench_parse_line_near_max_addrs": 1010586.9999999999,
"bench_parse_targets_many_ranges_near_cap": 130404975.0,
"bench_targets_to_cidrs_large_range": 849779.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
}
}
}
@@ -1,30 +0,0 @@
{
"sha": "224b3b37e82062edbdd1bcd92f97e4811b836399",
"timestamp": "2026-11-12T23:39:17+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 156621.0,
"bench_health_diagnostics": 17225.0,
"bench_render_cells": 3375293.0,
"bench_sort_by_each_column": 408203.0,
"bench_upsert_cold_start_population": 6338209.0,
"bench_view_pipeline": 169986.0,
"bench_view_pipeline_default_sort": 207867.0,
"bench_view_pipeline_with_filter": 139582.0,
"bench_naming_transforms": 237.0,
"bench_parse_line_near_max_addrs": 446909.0,
"bench_parse_targets_many_ranges_near_cap": 49953456.0,
"bench_targets_to_cidrs_large_range": 346302.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 7 8745H w/ Radeon 780M Graphics",
"logical_cpus": 4
},
"bench_context": {
"schema": 1,
"same_inputs": false,
"baseline_sha": null
}
}
}
@@ -1,24 +0,0 @@
{
"sha": "24fc79025dc7a2631dfc1839cf31ab6478cc85d7",
"timestamp": "2026-10-16T02:19:55+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 367352.0,
"bench_render_cells": 9587436.0,
"bench_sort_by_each_column": 949231.0,
"bench_upsert_cold_start_population": 13731946.0,
"bench_view_pipeline": 372242.0,
"bench_view_pipeline_default_sort": 489146.0,
"bench_view_pipeline_with_filter": 309416.0,
"bench_naming_transforms": 767.0,
"bench_parse_line_near_max_addrs": 1545620.0,
"bench_parse_targets_many_ranges_near_cap": 98663260.0,
"bench_targets_to_cidrs_large_range": 919255.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
}
}
}
@@ -1,18 +0,0 @@
{
"sha": "2b96ba495af7fbaee88f7a3e49ea7690d14d7585",
"timestamp": "2026-10-15T02:59:35+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 384838.0,
"bench_parse_line_near_max_addrs": 4640391.0,
"bench_upsert_cold_start_population": 32144464.0,
"bench_targets_to_cidrs_large_range": 1895524.0,
"bench_view_pipeline": 509809.0,
"bench_view_pipeline_default_sort": 839787.0,
"bench_view_pipeline_with_filter": 868182.0,
"bench_sort_by_each_column": 2381377.0,
"bench_render_cells": 11180890.0,
"bench_parse_targets_many_ranges_near_cap": 125437870.0
}
}
}
@@ -1,23 +0,0 @@
{
"sha": "2f1a65035b172218f4107e2a408d18d490778875",
"timestamp": "2026-10-16T01:34:08+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 346141.0,
"bench_render_cells": 8142103.000000001,
"bench_sort_by_each_column": 1171404.0,
"bench_upsert_cold_start_population": 13963726.0,
"bench_view_pipeline": 288593.0,
"bench_view_pipeline_default_sort": 394582.0,
"bench_view_pipeline_with_filter": 271501.0,
"bench_parse_line_near_max_addrs": 1126873.0,
"bench_parse_targets_many_ranges_near_cap": 91095834.0,
"bench_targets_to_cidrs_large_range": 645368.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
}
}
}
@@ -1,30 +0,0 @@
{
"sha": "35ea1b6e59fff8c12ec4ceafaf453dd1e6da0575",
"timestamp": "2026-11-03T01:49:03+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 216539.0,
"bench_health_diagnostics": 52171.0,
"bench_render_cells": 7567196.0,
"bench_sort_by_each_column": 683139.0,
"bench_upsert_cold_start_population": 15256877.0,
"bench_view_pipeline": 283474.0,
"bench_view_pipeline_default_sort": 604442.0,
"bench_view_pipeline_with_filter": 341919.0,
"bench_naming_transforms": 690.0,
"bench_parse_line_near_max_addrs": 1093951.0,
"bench_parse_targets_many_ranges_near_cap": 96273203.0,
"bench_targets_to_cidrs_large_range": 779068.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
},
"bench_context": {
"schema": 1,
"same_inputs": true,
"baseline_sha": "f2782e7d0363353b1e7de2b530e76dee5812acd4"
}
}
}
@@ -1,30 +0,0 @@
{
"sha": "36f12d6d4eba5c75e2f7734950ed234b83484a9d",
"timestamp": "2026-11-03T18:15:47+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 284328.0,
"bench_health_diagnostics": 43870.0,
"bench_render_cells": 9062725.0,
"bench_sort_by_each_column": 1431571.0,
"bench_upsert_cold_start_population": 14805374.0,
"bench_view_pipeline": 362835.0,
"bench_view_pipeline_default_sort": 670666.0,
"bench_view_pipeline_with_filter": 439213.0,
"bench_naming_transforms": 1182.0,
"bench_parse_line_near_max_addrs": 877061.0,
"bench_parse_targets_many_ranges_near_cap": 106004212.0,
"bench_targets_to_cidrs_large_range": 735187.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
},
"bench_context": {
"schema": 1,
"same_inputs": true,
"baseline_sha": "d925414bc8c517de51d0f821a22d557c6ea7f6d8"
}
}
}
@@ -1,18 +0,0 @@
{
"sha": "3846b12d8c1124fe7b1418e957d45f13aecc1758",
"timestamp": "2026-10-15T03:43:37+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 296251.0,
"bench_parse_line_near_max_addrs": 4739934.0,
"bench_upsert_cold_start_population": 58684370.0,
"bench_targets_to_cidrs_large_range": 2860035.0,
"bench_view_pipeline": 604581.0,
"bench_view_pipeline_default_sort": 741241.0,
"bench_view_pipeline_with_filter": 772467.0,
"bench_sort_by_each_column": 3028466.0,
"bench_render_cells": 11094676.0,
"bench_parse_targets_many_ranges_near_cap": 131662616.00000001
}
}
}
@@ -1,30 +0,0 @@
{
"sha": "3d0cc99936484e0bcd3eb9253b714ef3d39bc3c4",
"timestamp": "2026-10-19T13:42:03+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 149123.0,
"bench_health_diagnostics": 20251.0,
"bench_render_cells": 3315556.0,
"bench_sort_by_each_column": 441505.0,
"bench_upsert_cold_start_population": 6408091.0,
"bench_view_pipeline": 173266.0,
"bench_view_pipeline_default_sort": 210071.0,
"bench_view_pipeline_with_filter": 138017.0,
"bench_naming_transforms": 240.0,
"bench_parse_line_near_max_addrs": 248233.0,
"bench_parse_targets_many_ranges_near_cap": 54797302.0,
"bench_targets_to_cidrs_large_range": 259588.00000000003
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 7 8745H w/ Radeon 780M Graphics",
"logical_cpus": 4
},
"bench_context": {
"schema": 1,
"same_inputs": true,
"baseline_sha": "9367bacc919cece889a2e0bde769ff77a0850796"
}
}
}
@@ -1,30 +0,0 @@
{
"sha": "3d1fd36811a2b0aa0939632eec35e7855fccb7f0",
"timestamp": "2026-11-04T17:39:32+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 220792.0,
"bench_health_diagnostics": 47611.0,
"bench_render_cells": 9858396.0,
"bench_sort_by_each_column": 1071853.0,
"bench_upsert_cold_start_population": 12811287.0,
"bench_view_pipeline": 286772.0,
"bench_view_pipeline_default_sort": 694225.0,
"bench_view_pipeline_with_filter": 339542.0,
"bench_naming_transforms": 988.0,
"bench_parse_line_near_max_addrs": 1108814.0,
"bench_parse_targets_many_ranges_near_cap": 99582545.0,
"bench_targets_to_cidrs_large_range": 830943.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
},
"bench_context": {
"schema": 1,
"same_inputs": false,
"baseline_sha": "d9dc60918c37d25aae75ee9ebdd45748c77dd1c8"
}
}
}
@@ -1,25 +0,0 @@
{
"sha": "4826f4789313932ff3e02d1cf2549b5e72a636b6",
"timestamp": "2026-10-19T07:54:49+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 149297.0,
"bench_health_diagnostics": 18162.0,
"bench_render_cells": 3237480.0,
"bench_sort_by_each_column": 403280.0,
"bench_upsert_cold_start_population": 5761643.0,
"bench_view_pipeline": 167669.0,
"bench_view_pipeline_default_sort": 187230.0,
"bench_view_pipeline_with_filter": 142824.0,
"bench_naming_transforms": 276.0,
"bench_parse_line_near_max_addrs": 270557.0,
"bench_parse_targets_many_ranges_near_cap": 50420544.0,
"bench_targets_to_cidrs_large_range": 262823.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 7 8745H w/ Radeon 780M Graphics",
"logical_cpus": 4
}
}
}
@@ -1,30 +0,0 @@
{
"sha": "50102800a3ce0918182740ad8c4b6736cf163da2",
"timestamp": "2026-11-12T20:38:34+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 345115.0,
"bench_health_diagnostics": 71323.0,
"bench_render_cells": 11520511.0,
"bench_sort_by_each_column": 761691.0,
"bench_upsert_cold_start_population": 15509979.0,
"bench_view_pipeline": 295508.0,
"bench_view_pipeline_default_sort": 521515.0,
"bench_view_pipeline_with_filter": 448970.0,
"bench_naming_transforms": 764.0,
"bench_parse_line_near_max_addrs": 830828.0,
"bench_parse_targets_many_ranges_near_cap": 113494127.0,
"bench_targets_to_cidrs_large_range": 777129.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
},
"bench_context": {
"schema": 1,
"same_inputs": false,
"baseline_sha": "086c883c4ae42f5d3c24fc1fb4d312badcfbc79e"
}
}
}
@@ -1,23 +0,0 @@
{
"sha": "5033c9609de42055a2281309aaed28cf1cd507c9",
"timestamp": "2026-10-15T20:45:20+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 296364.0,
"bench_render_cells": 7871919.0,
"bench_sort_by_each_column": 590320.0,
"bench_upsert_cold_start_population": 10892236.0,
"bench_view_pipeline": 269610.0,
"bench_view_pipeline_default_sort": 378227.0,
"bench_view_pipeline_with_filter": 315949.0,
"bench_parse_line_near_max_addrs": 479187.0,
"bench_parse_targets_many_ranges_near_cap": 92440268.0,
"bench_targets_to_cidrs_large_range": 754162.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
}
}
}
@@ -1,25 +0,0 @@
{
"sha": "589e933391ceece158e55f9fb6914abe47d0e1b3",
"timestamp": "2026-10-17T04:15:42+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 211665.0,
"bench_health_diagnostics": 42443.0,
"bench_render_cells": 7263909.0,
"bench_sort_by_each_column": 997910.0,
"bench_upsert_cold_start_population": 15908355.0,
"bench_view_pipeline": 355129.0,
"bench_view_pipeline_default_sort": 492829.0,
"bench_view_pipeline_with_filter": 330860.0,
"bench_naming_transforms": 562.0,
"bench_parse_line_near_max_addrs": 744600.0,
"bench_parse_targets_many_ranges_near_cap": 100276723.0,
"bench_targets_to_cidrs_large_range": 617330.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
}
}
}
@@ -1,30 +0,0 @@
{
"sha": "63c603d91987069b615f1927d8383e383bd3a1a5",
"timestamp": "2026-11-17T05:38:28+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 159636.0,
"bench_health_diagnostics": 16504.0,
"bench_render_cells": 3292312.0,
"bench_sort_by_each_column": 397849.0,
"bench_upsert_cold_start_population": 6062771.0,
"bench_view_pipeline": 163138.0,
"bench_view_pipeline_default_sort": 199057.0,
"bench_view_pipeline_with_filter": 138058.0,
"bench_naming_transforms": 347.0,
"bench_parse_line_near_max_addrs": 532364.0,
"bench_parse_targets_many_ranges_near_cap": 47043070.0,
"bench_targets_to_cidrs_large_range": 356855.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 7 8745H w/ Radeon 780M Graphics",
"logical_cpus": 4
},
"bench_context": {
"schema": 1,
"same_inputs": false,
"baseline_sha": "224b3b37e82062edbdd1bcd92f97e4811b836399"
}
}
}
@@ -1,25 +0,0 @@
{
"sha": "664be2304fc78b2725935faa8383a525d8afe742",
"timestamp": "2026-10-17T15:22:00+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 151408.0,
"bench_health_diagnostics": 22349.0,
"bench_render_cells": 3243855.0,
"bench_sort_by_each_column": 402489.0,
"bench_upsert_cold_start_population": 6920466.0,
"bench_view_pipeline": 181864.0,
"bench_view_pipeline_default_sort": 227356.0,
"bench_view_pipeline_with_filter": 135183.0,
"bench_naming_transforms": 377.0,
"bench_parse_line_near_max_addrs": 457347.0,
"bench_parse_targets_many_ranges_near_cap": 48664759.0,
"bench_targets_to_cidrs_large_range": 446479.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 7 8745H w/ Radeon 780M Graphics",
"logical_cpus": 4
}
}
}
@@ -1,18 +0,0 @@
{
"sha": "694e2fc7e54ed48fc91ca0238c1b0691ebbf4bcf",
"timestamp": "2026-10-15T04:05:00+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 365426.0,
"bench_parse_line_near_max_addrs": 3076713.0,
"bench_upsert_cold_start_population": 63214191.0,
"bench_targets_to_cidrs_large_range": 2406662.0,
"bench_view_pipeline": 473218.0,
"bench_view_pipeline_default_sort": 923022.0,
"bench_view_pipeline_with_filter": 968899.0,
"bench_sort_by_each_column": 2429822.0,
"bench_render_cells": 11029261.0,
"bench_parse_targets_many_ranges_near_cap": 146216294.0
}
}
}
@@ -1,23 +0,0 @@
{
"sha": "8597ae9f9d4bfebdad96bdf6dbab6a42d2ef5dda",
"timestamp": "2026-10-15T18:57:30+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 292745.0,
"bench_render_cells": 7622204.0,
"bench_sort_by_each_column": 1043665.0000000001,
"bench_upsert_cold_start_population": 18272527.0,
"bench_view_pipeline": 356502.0,
"bench_view_pipeline_default_sort": 567867.0,
"bench_view_pipeline_with_filter": 363892.0,
"bench_parse_line_near_max_addrs": 1247912.0,
"bench_parse_targets_many_ranges_near_cap": 104308299.0,
"bench_targets_to_cidrs_large_range": 527482.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
}
}
}
@@ -1,23 +0,0 @@
{
"sha": "89cf01324e677119b0836df094e63cbe97518cf7",
"timestamp": "2026-10-15T18:01:06+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 242716.0,
"bench_render_cells": 8553437.0,
"bench_sort_by_each_column": 609435.0,
"bench_upsert_cold_start_population": 21969970.0,
"bench_view_pipeline": 247075.0,
"bench_view_pipeline_default_sort": 397949.0,
"bench_view_pipeline_with_filter": 310322.0,
"bench_parse_line_near_max_addrs": 933566.0,
"bench_parse_targets_many_ranges_near_cap": 93079826.0,
"bench_targets_to_cidrs_large_range": 740061.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
}
}
}
@@ -1,25 +0,0 @@
{
"sha": "9367bacc919cece889a2e0bde769ff77a0850796",
"timestamp": "2026-10-19T12:51:45+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 198246.0,
"bench_health_diagnostics": 26489.0,
"bench_render_cells": 4380129.0,
"bench_sort_by_each_column": 444842.0,
"bench_upsert_cold_start_population": 9773220.0,
"bench_view_pipeline": 209086.0,
"bench_view_pipeline_default_sort": 330129.0,
"bench_view_pipeline_with_filter": 156561.0,
"bench_naming_transforms": 399.0,
"bench_parse_line_near_max_addrs": 451749.0,
"bench_parse_targets_many_ranges_near_cap": 59691906.0,
"bench_targets_to_cidrs_large_range": 267781.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 7 8745H w/ Radeon 780M Graphics",
"logical_cpus": 4
}
}
}
@@ -1,18 +0,0 @@
{
"sha": "9d0ebafece9f88a8270dcdee00082c4c1b9496b2",
"timestamp": "2026-10-15T03:14:02+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 219022.0,
"bench_parse_line_near_max_addrs": 3804482.0,
"bench_upsert_cold_start_population": 39237098.0,
"bench_targets_to_cidrs_large_range": 2001242.0,
"bench_view_pipeline": 541949.0,
"bench_view_pipeline_with_filter": 763250.0,
"bench_view_pipeline_default_sort": 837874.0,
"bench_sort_by_each_column": 1613311.0,
"bench_render_cells": 10743266.0,
"bench_parse_targets_many_ranges_near_cap": 129729098.0
}
}
}
@@ -1,17 +0,0 @@
{
"sha": "9d40ff2490e40288c994902e6de738548f1dbb8c",
"timestamp": "2026-10-15T02:45:10+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_parse_line_near_max_addrs": 3827574.0,
"bench_targets_to_cidrs_large_range": 1840735.0,
"bench_upsert_cold_start_population": 53175458.0,
"bench_view_pipeline": 666476.0,
"bench_view_pipeline_with_filter": 794104.0,
"bench_view_pipeline_default_sort": 843599.0,
"bench_sort_by_each_column": 1298114.0,
"bench_render_cells": 11420892.0,
"bench_parse_targets_many_ranges_near_cap": 137639734.0
}
}
}
@@ -1,25 +0,0 @@
{
"sha": "a1f610a393dedb993f5c16b7f51a4ab67ed6c04b",
"timestamp": "2026-10-16T11:21:01+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 376947.0,
"bench_health_diagnostics": 55682.0,
"bench_render_cells": 8362787.000000001,
"bench_sort_by_each_column": 1205811.0,
"bench_upsert_cold_start_population": 13716307.0,
"bench_view_pipeline": 271402.0,
"bench_view_pipeline_default_sort": 435624.0,
"bench_view_pipeline_with_filter": 316096.0,
"bench_naming_transforms": 657.0,
"bench_parse_line_near_max_addrs": 724431.0,
"bench_parse_targets_many_ranges_near_cap": 106269799.0,
"bench_targets_to_cidrs_large_range": 1117471.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
}
}
}
@@ -1,23 +0,0 @@
{
"sha": "a604cbf5b5412ff8d383091198118a0064769a21",
"timestamp": "2026-10-15T21:06:37+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 242202.0,
"bench_render_cells": 7469431.0,
"bench_sort_by_each_column": 1068697.0,
"bench_upsert_cold_start_population": 17376872.0,
"bench_view_pipeline": 262328.0,
"bench_view_pipeline_default_sort": 439350.0,
"bench_view_pipeline_with_filter": 326119.0,
"bench_parse_line_near_max_addrs": 718592.0,
"bench_parse_targets_many_ranges_near_cap": 94324631.0,
"bench_targets_to_cidrs_large_range": 1488755.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
}
}
}
@@ -1,25 +0,0 @@
{
"sha": "aaf18f6d9c6861a95177c0abb9443bc1f6c64b33",
"timestamp": "2026-10-17T10:05:16+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 246734.0,
"bench_health_diagnostics": 38610.0,
"bench_render_cells": 8644429.0,
"bench_sort_by_each_column": 1106075.0,
"bench_upsert_cold_start_population": 18903190.0,
"bench_view_pipeline": 253698.0,
"bench_view_pipeline_default_sort": 443696.0,
"bench_view_pipeline_with_filter": 324631.0,
"bench_naming_transforms": 648.0,
"bench_parse_line_near_max_addrs": 708841.0,
"bench_parse_targets_many_ranges_near_cap": 98195090.0,
"bench_targets_to_cidrs_large_range": 1134955.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
}
}
}
@@ -1,30 +0,0 @@
{
"sha": "abad4879ea89af0c0a6f41157a987114fa5f406f",
"timestamp": "2026-11-03T14:40:08+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 250211.0,
"bench_health_diagnostics": 39323.0,
"bench_render_cells": 6881329.0,
"bench_sort_by_each_column": 738357.0,
"bench_upsert_cold_start_population": 10749899.0,
"bench_view_pipeline": 293535.0,
"bench_view_pipeline_default_sort": 467861.0,
"bench_view_pipeline_with_filter": 305577.0,
"bench_naming_transforms": 1196.0,
"bench_parse_line_near_max_addrs": 695013.0,
"bench_parse_targets_many_ranges_near_cap": 90324476.0,
"bench_targets_to_cidrs_large_range": 714750.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
},
"bench_context": {
"schema": 1,
"same_inputs": true,
"baseline_sha": "c06cff966da25e0ac7739bb28ab97117761c6edb"
}
}
}
@@ -1,30 +0,0 @@
{
"sha": "b1b7a3dbc0d710182119eb0d4faa765c7b576822",
"timestamp": "2026-11-03T19:45:01+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 205141.0,
"bench_health_diagnostics": 35119.0,
"bench_render_cells": 7661409.0,
"bench_sort_by_each_column": 969764.0,
"bench_upsert_cold_start_population": 15386423.0,
"bench_view_pipeline": 282417.0,
"bench_view_pipeline_default_sort": 500004.0,
"bench_view_pipeline_with_filter": 391194.0,
"bench_naming_transforms": 843.0,
"bench_parse_line_near_max_addrs": 529906.0,
"bench_parse_targets_many_ranges_near_cap": 96687131.0,
"bench_targets_to_cidrs_large_range": 712574.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
},
"bench_context": {
"schema": 1,
"same_inputs": false,
"baseline_sha": "36f12d6d4eba5c75e2f7734950ed234b83484a9d"
}
}
}
@@ -1,30 +0,0 @@
{
"sha": "ba0c71665aba139dfb72701b6c08cd72d5ca1f48",
"timestamp": "2026-11-03T17:29:36+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 315507.0,
"bench_health_diagnostics": 53128.0,
"bench_render_cells": 6964676.0,
"bench_sort_by_each_column": 692127.0,
"bench_upsert_cold_start_population": 13608854.0,
"bench_view_pipeline": 295039.0,
"bench_view_pipeline_default_sort": 433913.0,
"bench_view_pipeline_with_filter": 309545.0,
"bench_naming_transforms": 787.0,
"bench_parse_line_near_max_addrs": 1176949.0,
"bench_parse_targets_many_ranges_near_cap": 128753097.0,
"bench_targets_to_cidrs_large_range": 1275395.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
},
"bench_context": {
"schema": 1,
"same_inputs": false,
"baseline_sha": "0949870a147fbc54dbd7a9fe0567cd70315ba1db"
}
}
}
@@ -1,25 +0,0 @@
{
"sha": "ba782e78951518b13f16b52e2e1cee2b980bb1a8",
"timestamp": "2026-10-16T02:42:08+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 273904.0,
"bench_health_diagnostics": 49222.0,
"bench_render_cells": 7494854.0,
"bench_sort_by_each_column": 845325.0,
"bench_upsert_cold_start_population": 10489144.0,
"bench_view_pipeline": 248815.0,
"bench_view_pipeline_default_sort": 543384.0,
"bench_view_pipeline_with_filter": 307910.0,
"bench_naming_transforms": 1040.0,
"bench_parse_line_near_max_addrs": 712150.0,
"bench_parse_targets_many_ranges_near_cap": 98513838.0,
"bench_targets_to_cidrs_large_range": 535509.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
}
}
}
@@ -1,18 +0,0 @@
{
"sha": "bc406af89f70bb2c34b4457581bba72cfc47faec",
"timestamp": "2026-10-15T03:28:41+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 398454.0,
"bench_parse_line_near_max_addrs": 3360049.0,
"bench_upsert_cold_start_population": 27099168.0,
"bench_targets_to_cidrs_large_range": 1380223.0,
"bench_view_pipeline": 529723.0,
"bench_view_pipeline_with_filter": 646081.0,
"bench_view_pipeline_default_sort": 893189.0,
"bench_sort_by_each_column": 2257556.0,
"bench_render_cells": 10075243.0,
"bench_parse_targets_many_ranges_near_cap": 138231252.0
}
}
}
@@ -1,30 +0,0 @@
{
"sha": "c06cff966da25e0ac7739bb28ab97117761c6edb",
"timestamp": "2026-11-03T03:09:59+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 205600.0,
"bench_health_diagnostics": 64043.00000000001,
"bench_render_cells": 8197196.999999999,
"bench_sort_by_each_column": 1098407.0,
"bench_upsert_cold_start_population": 22804580.0,
"bench_view_pipeline": 247352.0,
"bench_view_pipeline_default_sort": 396722.0,
"bench_view_pipeline_with_filter": 336975.0,
"bench_naming_transforms": 620.0,
"bench_parse_line_near_max_addrs": 695879.0,
"bench_parse_targets_many_ranges_near_cap": 98974083.0,
"bench_targets_to_cidrs_large_range": 1243064.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
},
"bench_context": {
"schema": 1,
"same_inputs": false,
"baseline_sha": "35ea1b6e59fff8c12ec4ceafaf453dd1e6da0575"
}
}
}
@@ -1,23 +0,0 @@
{
"sha": "c6ab7510c8702b2e4c60e269d959d6ca0bc541af",
"timestamp": "2026-10-15T10:18:59+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 205681.0,
"bench_render_cells": 7788885.0,
"bench_sort_by_each_column": 967167.0,
"bench_upsert_cold_start_population": 24391329.0,
"bench_view_pipeline": 243287.0,
"bench_view_pipeline_default_sort": 365244.0,
"bench_view_pipeline_with_filter": 323236.0,
"bench_parse_line_near_max_addrs": 1451641.0,
"bench_parse_targets_many_ranges_near_cap": 91555147.0,
"bench_targets_to_cidrs_large_range": 1168169.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
}
}
}
@@ -1,18 +0,0 @@
{
"sha": "cb46adada20120c0b47f0f410faa3b1aff8b80f3",
"timestamp": "2026-10-15T09:43:24+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 264623.0,
"bench_parse_line_near_max_addrs": 3900418.0,
"bench_targets_to_cidrs_large_range": 1370620.0,
"bench_upsert_cold_start_population": 52689889.0,
"bench_view_pipeline": 644508.0,
"bench_view_pipeline_with_filter": 725578.0,
"bench_view_pipeline_default_sort": 977443.0,
"bench_sort_by_each_column": 1488922.0,
"bench_render_cells": 10442975.0,
"bench_parse_targets_many_ranges_near_cap": 132692428.0
}
}
}
@@ -1,30 +0,0 @@
{
"sha": "d07fccd9b104fa4a28c9f12b515bb8bd644f1098",
"timestamp": "2026-10-20T06:38:29+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 287597.0,
"bench_health_diagnostics": 51891.0,
"bench_render_cells": 7771762.0,
"bench_sort_by_each_column": 753638.0,
"bench_upsert_cold_start_population": 15443697.0,
"bench_view_pipeline": 310825.0,
"bench_view_pipeline_default_sort": 436411.0,
"bench_view_pipeline_with_filter": 288077.0,
"bench_naming_transforms": 853.0,
"bench_parse_line_near_max_addrs": 1517012.0,
"bench_parse_targets_many_ranges_near_cap": 114922207.0,
"bench_targets_to_cidrs_large_range": 719502.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
},
"bench_context": {
"schema": 1,
"same_inputs": true,
"baseline_sha": "21e3c5fe8597d77f1fa9a5e4826b5a2d48b41b14"
}
}
}
@@ -1,30 +0,0 @@
{
"sha": "d925414bc8c517de51d0f821a22d557c6ea7f6d8",
"timestamp": "2026-11-03T17:56:16+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 482684.0,
"bench_health_diagnostics": 105969.0,
"bench_render_cells": 16208072.000000002,
"bench_sort_by_each_column": 1479551.0,
"bench_upsert_cold_start_population": 25050809.0,
"bench_view_pipeline": 401020.0,
"bench_view_pipeline_default_sort": 1119743.0,
"bench_view_pipeline_with_filter": 481430.0,
"bench_naming_transforms": 814.0,
"bench_parse_line_near_max_addrs": 1173441.0,
"bench_parse_targets_many_ranges_near_cap": 170423105.0,
"bench_targets_to_cidrs_large_range": 1051465.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
},
"bench_context": {
"schema": 1,
"same_inputs": false,
"baseline_sha": null
}
}
}
@@ -1,30 +0,0 @@
{
"sha": "d9dc60918c37d25aae75ee9ebdd45748c77dd1c8",
"timestamp": "2026-11-03T22:01:13+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 220570.0,
"bench_health_diagnostics": 48450.0,
"bench_render_cells": 8515973.0,
"bench_sort_by_each_column": 1086721.0,
"bench_upsert_cold_start_population": 11484199.0,
"bench_view_pipeline": 267912.0,
"bench_view_pipeline_default_sort": 496484.0,
"bench_view_pipeline_with_filter": 419495.0,
"bench_naming_transforms": 1053.0,
"bench_parse_line_near_max_addrs": 1096792.0,
"bench_parse_targets_many_ranges_near_cap": 124562079.0,
"bench_targets_to_cidrs_large_range": 1157666.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
},
"bench_context": {
"schema": 1,
"same_inputs": false,
"baseline_sha": "b1b7a3dbc0d710182119eb0d4faa765c7b576822"
}
}
}
@@ -1,25 +0,0 @@
{
"sha": "dd0732454e745444609a9f4845a3030f40263332",
"timestamp": "2026-10-16T12:11:57+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 235497.0,
"bench_health_diagnostics": 35749.0,
"bench_render_cells": 8670894.0,
"bench_sort_by_each_column": 677462.0,
"bench_upsert_cold_start_population": 11075293.0,
"bench_view_pipeline": 313264.0,
"bench_view_pipeline_default_sort": 398323.0,
"bench_view_pipeline_with_filter": 261173.99999999997,
"bench_naming_transforms": 557.0,
"bench_parse_line_near_max_addrs": 1326819.0,
"bench_parse_targets_many_ranges_near_cap": 96819591.0,
"bench_targets_to_cidrs_large_range": 937425.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
}
}
}
@@ -1,30 +0,0 @@
{
"sha": "de5c1a5a150a410d1591e9b5ed664c2ac55157a8",
"timestamp": "2026-11-04T20:11:32+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 377984.0,
"bench_health_diagnostics": 40579.0,
"bench_render_cells": 7085153.0,
"bench_sort_by_each_column": 637484.0,
"bench_upsert_cold_start_population": 17188092.0,
"bench_view_pipeline": 288320.0,
"bench_view_pipeline_default_sort": 418440.0,
"bench_view_pipeline_with_filter": 332109.0,
"bench_naming_transforms": 1018.0,
"bench_parse_line_near_max_addrs": 732030.0,
"bench_parse_targets_many_ranges_near_cap": 94466864.0,
"bench_targets_to_cidrs_large_range": 554739.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
},
"bench_context": {
"schema": 1,
"same_inputs": false,
"baseline_sha": "3d1fd36811a2b0aa0939632eec35e7855fccb7f0"
}
}
}
@@ -1,23 +0,0 @@
{
"sha": "e609176c66b601ae574d5e7e5bf1f5c50d330c6d",
"timestamp": "2026-10-16T01:13:04+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 218872.0,
"bench_render_cells": 9530209.0,
"bench_sort_by_each_column": 1315714.0,
"bench_upsert_cold_start_population": 15157985.0,
"bench_view_pipeline": 263511.0,
"bench_view_pipeline_default_sort": 703491.0,
"bench_view_pipeline_with_filter": 392226.0,
"bench_parse_line_near_max_addrs": 1592722.0,
"bench_parse_targets_many_ranges_near_cap": 99469756.0,
"bench_targets_to_cidrs_large_range": 1072855.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
}
}
}
@@ -1,25 +0,0 @@
{
"sha": "e7bb7d13d07666c954fb3cdd5a41c758eac16775",
"timestamp": "2026-10-19T03:48:15+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 151224.0,
"bench_health_diagnostics": 26346.0,
"bench_render_cells": 3605323.0,
"bench_sort_by_each_column": 411789.0,
"bench_upsert_cold_start_population": 5831394.0,
"bench_view_pipeline": 177420.0,
"bench_view_pipeline_default_sort": 194736.0,
"bench_view_pipeline_with_filter": 143243.0,
"bench_naming_transforms": 398.0,
"bench_parse_line_near_max_addrs": 399835.0,
"bench_parse_targets_many_ranges_near_cap": 50695071.0,
"bench_targets_to_cidrs_large_range": 347059.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 7 8745H w/ Radeon 780M Graphics",
"logical_cpus": 4
}
}
}
@@ -1,25 +0,0 @@
{
"sha": "efd5f85eb8823bc0f86c1fa3e095ae0471f28d4e",
"timestamp": "2026-10-19T11:43:33+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 493004.0,
"bench_health_diagnostics": 82637.0,
"bench_render_cells": 16634609.999999998,
"bench_sort_by_each_column": 1871825.0,
"bench_upsert_cold_start_population": 32961717.0,
"bench_view_pipeline": 495008.0,
"bench_view_pipeline_default_sort": 1106422.0,
"bench_view_pipeline_with_filter": 757315.0,
"bench_naming_transforms": 1484.0,
"bench_parse_line_near_max_addrs": 1230688.0,
"bench_parse_targets_many_ranges_near_cap": 210135166.0,
"bench_targets_to_cidrs_large_range": 1157898.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
}
}
}
@@ -1,30 +0,0 @@
{
"sha": "f2782e7d0363353b1e7de2b530e76dee5812acd4",
"timestamp": "2026-11-03T01:19:10+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 389967.0,
"bench_health_diagnostics": 52290.0,
"bench_render_cells": 7779419.0,
"bench_sort_by_each_column": 698896.0,
"bench_upsert_cold_start_population": 14165385.0,
"bench_view_pipeline": 314658.0,
"bench_view_pipeline_default_sort": 456276.0,
"bench_view_pipeline_with_filter": 365940.0,
"bench_naming_transforms": 1313.0,
"bench_parse_line_near_max_addrs": 1026106.0,
"bench_parse_targets_many_ranges_near_cap": 101291737.0,
"bench_targets_to_cidrs_large_range": 607801.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx",
"logical_cpus": 8
},
"bench_context": {
"schema": 1,
"same_inputs": false,
"baseline_sha": "d07fccd9b104fa4a28c9f12b515bb8bd644f1098"
}
}
}
@@ -1,30 +0,0 @@
{
"sha": "f302de1d03554d45ac07913ad067fe2e384ffc72",
"timestamp": "2026-10-21T13:07:57+00:00",
"metrics": {
"bench_ns_per_op": {
"bench_verify_artifact": 1055560.0,
"bench_health_diagnostics": 76337.0,
"bench_render_cells": 7273172.0,
"bench_sort_by_each_column": 806299.0,
"bench_upsert_cold_start_population": 17349863.0,
"bench_view_pipeline": 548227.0,
"bench_view_pipeline_default_sort": 575808.0,
"bench_view_pipeline_with_filter": 540407.0,
"bench_naming_transforms": 670.0,
"bench_parse_line_near_max_addrs": 1396925.0,
"bench_parse_targets_many_ranges_near_cap": 118287353.0,
"bench_targets_to_cidrs_large_range": 1567283.0
},
"bench_host": {
"architecture": "x86_64",
"cpu_model": "Intel(R) Xeon(R) CPU E5-2640 v3 @ 2.60GHz",
"logical_cpus": 4
},
"bench_context": {
"schema": 1,
"same_inputs": false,
"baseline_sha": null
}
}
}
-1215
View File
File diff suppressed because it is too large Load Diff
-1
View File
@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="102" height="20" role="img" aria-label="CI main: last completed attempt pass (run 13352)"><title>CI main: last completed attempt pass (run 13352)</title><rect width="102" height="20" rx="3" fill="#555"/><path d="M39 0h60a3 3 0 0 1 3 3v14a3 3 0 0 1-3 3H39z" fill="#2ea043"/><text x="20" y="14" fill="#fff" text-anchor="middle" font-family="sans-serif" font-size="11">CI</text><text x="70" y="14" fill="#fff" text-anchor="middle" font-family="sans-serif" font-size="11">pass</text></svg>

Before

Width:  |  Height:  |  Size: 533 B

-1
View File
@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="102" height="20" role="img" aria-label="CI next: last completed attempt pass (run 12315)"><title>CI next: last completed attempt pass (run 12315)</title><rect width="102" height="20" rx="3" fill="#555"/><path d="M39 0h60a3 3 0 0 1 3 3v14a3 3 0 0 1-3 3H39z" fill="#2ea043"/><text x="20" y="14" fill="#fff" text-anchor="middle" font-family="sans-serif" font-size="11">CI</text><text x="70" y="14" fill="#fff" text-anchor="middle" font-family="sans-serif" font-size="11">pass</text></svg>

Before

Width:  |  Height:  |  Size: 533 B

+16
View File
@@ -0,0 +1,16 @@
#!/bin/sh
# Build the alkane-toolkit GUI for Linux (GTK3) against the vendored wx 3.3.3.
# Usage: scripts/build-gui-linux.sh [wx-prefix]
# wx-prefix defaults to ~/.cache/wx-3.3.3-linux (see docs/adr/0003 and
# scripts/build-wx-linux.sh to produce it).
set -e
REPO=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
WX_PREFIX="${1:-$HOME/.cache/wx-3.3.3-linux}"
if [ ! -x "$WX_PREFIX/bin/wx-config" ]; then
"$REPO/scripts/build-wx-linux.sh"
fi
export WX_RS_WXCONFIG="$WX_PREFIX/bin/wx-config"
cd "$REPO"
cargo build --release -p alkane-gui --offline
echo
echo "binary: $REPO/target/release/alkane-toolkit (or the target dir set in ~/.cargo/config.toml)"
+9
View File
@@ -0,0 +1,9 @@
#!/bin/sh
# Build the alkane-toolkit GUI on macOS.
# wx-rs upstream supports macOS: its build.rs clones/builds wx 3.2.2.1 into
# ./dist (osx-release-build) on first build. Requires Xcode Command Line
# Tools. Run this ON a Mac - macOS cannot be linked from Linux.
set -e
cd "$(dirname -- "$0")/.."
cargo build --release -p alkane-gui
echo "binary: target/release/alkane-toolkit (app bundle packaging is follow-up)"
+22
View File
@@ -0,0 +1,22 @@
#!/bin/sh
# Build the alkane-toolkit GUI for Windows (x86_64) from Linux, via mingw-w64.
# wx-rs upstream supports MSW (it downloads and builds wx 3.2.2.1 with MSVC
# via nmake, or links an msys2 mingw64 wx). Two supported routes:
#
# A) On Windows: install msys2/mingw64 wx + rust-gnu, run `cargo build
# --release -p alkane-gui` there (wx-rs build.rs handles msys2 paths).
# B) Cross from Linux: not automated yet - wxMSW needs the MSVC or msys2
# toolchain; tracked as follow-up. The Rust side cross-compiles fine;
# only the C++ bridge + wx need the Windows toolchain.
#
# This script documents route A and fails here if run on Linux.
set -e
if [ "$(uname -s)" = "Linux" ]; then
echo "Route B (Linux cross to MSW) is not automated yet."
echo "Run scripts/build-gui-windows.sh on Windows (msys2 mingw64 + rust),"
echo "or use CI with a Windows runner."
exit 1
fi
cd "$(dirname -- "$0")/.."
cargo build --release -p alkane-gui
echo "binary: target/release/alkane-toolkit.exe"
+19
View File
@@ -0,0 +1,19 @@
#!/bin/sh
# Build the vendored wxWidgets 3.3.3 (GTK3, static, monolithic) out-of-tree.
# The repo's vendor tree stays pristine; the build lives in ~/.cache/wxbuild.
set -e
REPO=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
SRC="$REPO/thirdparty/wxwidgets/wxWidgets-3.3.3"
BUILD="$HOME/.cache/wxbuild/wxWidgets-3.3.3"
PREFIX="$HOME/.cache/wx-3.3.3-linux"
[ -d "$BUILD" ] || { mkdir -p "$HOME/.cache/wxbuild"; cp -r "$SRC" "$BUILD"; }
[ -d "$BUILD" ] || { echo "thirdparty wxWidgets tree missing"; exit 1; }
chmod +x "$BUILD/configure" "$BUILD/config.guess" "$BUILD/config.sub" "$BUILD/install-sh" 2>/dev/null || true
cd "$BUILD" 2>/dev/null || exit 1
mkdir -p "$BUILD/build-linux"
cd "$BUILD/build-linux"
sh ../configure --prefix="$PREFIX" --disable-shared --enable-monolithic \
--with-gtk=3 --with-opengl=no --disable-stc --disable-tests
make -j"$(nproc)"
make install
echo "installed: $PREFIX/lib/libwx_gtk3u-3.3.a"
+61
View File
@@ -0,0 +1,61 @@
#!/bin/bash
# Off-screen screenshot of the running UI, for visual review.
#
# Runs alkane-toolkit under a private Xvfb display (never the real desktop),
# waits for its window to map, and captures it to a PNG. By default it renders
# the offline bench-fleet fixtures (ALKANE_FAKE_SCAN) so the shot is
# deterministic and needs no hardware; pass --live to scan the real network.
#
# Usage: scripts/ui-screenshot.sh [out.png] [--live] [binary]
set -u
REPO=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
WX_PREFIX="${WX_PREFIX:-$HOME/.cache/wx-3.3.3-linux}"
export WX_RS_WXCONFIG="${WX_RS_WXCONFIG:-$WX_PREFIX/bin/wx-config}"
OUT="${1:-alkane-toolkit.png}"
LIVE=0; BIN=""
shift 2>/dev/null || true
for a in "$@"; do
case "$a" in
--live) LIVE=1 ;;
*) BIN="$a" ;;
esac
done
if [ -z "$BIN" ]; then
if [ ! -x "$WX_PREFIX/bin/wx-config" ]; then "$REPO/scripts/build-wx-linux.sh"; fi
( cd "$REPO" && cargo build --release -p alkane-gui --offline ) || exit 3
TDIR=$(cd "$REPO" && cargo metadata --no-deps --format-version 1 --offline 2>/dev/null \
| tr ',' '\n' | grep -o '"target_directory":"[^"]*"' | head -1 | cut -d'"' -f4)
[ -n "$TDIR" ] || TDIR="$REPO/target"
BIN="$TDIR/release/alkane-toolkit"
fi
[ -x "$BIN" ] || { echo "binary not found: $BIN" >&2; exit 3; }
DISP=":98"
FAKE_ENV="ALKANE_FAKE_SCAN=1"
[ "$LIVE" = "1" ] && FAKE_ENV=""
Xvfb "$DISP" -screen 0 1280x850x24 -nolisten tcp >/dev/null 2>&1 &
XPID=$!
sleep 1.2
# warm the font/GTK caches so the first window map is not stalled
DISPLAY="$DISP" xclock >/dev/null 2>&1 & WARM=$!; sleep 1.2; kill "$WARM" 2>/dev/null
# shellcheck disable=SC2086
DISPLAY="$DISP" GDK_BACKEND=x11 $FAKE_ENV "$BIN" >/dev/null 2>&1 &
APID=$!
WID=""; t=0
while [ "$t" -lt 25 ]; do
sleep 1; t=$((t+1))
kill -0 "$APID" 2>/dev/null || { echo "app exited early" >&2; break; }
line=$(DISPLAY="$DISP" xwininfo -root -tree 2>/dev/null | grep '"alkane-toolkit"' | grep -E '1[0-9]{3}x[0-9]{3}' | head -1)
[ -n "$line" ] && { WID=$(echo "$line" | awk '{print $1}'); break; }
done
sleep 2 # let it paint and drain a scan tick
if [ -n "$WID" ]; then
DISPLAY="$DISP" import -window "$WID" "$OUT" && echo "wrote $OUT (window $WID, ${t}s)"
else
DISPLAY="$DISP" import -window root "$OUT"; echo "no app window; captured root -> $OUT" >&2
fi
kill "$APID" 2>/dev/null
kill "$XPID" 2>/dev/null
+39
View File
@@ -0,0 +1,39 @@
#!/bin/bash
# Headless UI workflow self-test.
#
# Builds alkane-toolkit, then runs it in ALKANE_SELFTEST mode under a private
# Xvfb display. In that mode the app loads the bench-fleet fixtures (the
# expected hardware output), renders them through the real wxWidgets table and
# KPI header, reads back what the widgets actually display, and compares to the
# expected result. It prints one line per check and exits non-zero on any
# mismatch -- so this is a CI-able, hardware-free check that the app's functions
# produce the intended output.
#
# Usage: scripts/ui-selftest.sh [binary]
# binary defaults to the release build in the cargo target dir.
set -u
REPO=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
WX_PREFIX="${WX_PREFIX:-$HOME/.cache/wx-3.3.3-linux}"
export WX_RS_WXCONFIG="${WX_RS_WXCONFIG:-$WX_PREFIX/bin/wx-config}"
BIN="${1:-}"
if [ -z "$BIN" ]; then
if [ ! -x "$WX_PREFIX/bin/wx-config" ]; then "$REPO/scripts/build-wx-linux.sh"; fi
( cd "$REPO" && cargo build --release -p alkane-gui --offline ) || exit 3
# locate the binary via the machine-local target dir
TDIR=$(cd "$REPO" && cargo metadata --no-deps --format-version 1 --offline 2>/dev/null \
| tr ',' '\n' | grep -o '"target_directory":"[^"]*"' | head -1 | cut -d'"' -f4)
[ -n "$TDIR" ] || TDIR="$REPO/target"
BIN="$TDIR/release/alkane-toolkit"
fi
[ -x "$BIN" ] || { echo "binary not found: $BIN" >&2; exit 3; }
DISP=":98"
Xvfb "$DISP" -screen 0 1280x850x24 -nolisten tcp >/dev/null 2>&1 &
XPID=$!
sleep 1.2
DISPLAY="$DISP" GDK_BACKEND=x11 ALKANE_SELFTEST=1 "$BIN"
RC=$?
kill "$XPID" 2>/dev/null
echo "== ui-selftest exit=$RC =="
exit "$RC"
+8
View File
@@ -0,0 +1,8 @@
upstream: wx-rs (AlexCharlton/wx-rs)
version: 0.2.0 (crates.io tarball, == master d420e30)
source_url: https://static.crates.io/crates/wx-rs/wx-rs-0.2.0.crate
sha256: b70620dba2997db6640794ef43fa130d19b9a2ec1ab93925450a5b8334d99e33
state: patched tree is the used crate (path dep from crates/alkane-gui).
Upstream stubs non-Windows/macOS and has no widget surface; patches add
the Linux/GTK3 wx-config build path and the widget bridge (see patches/).
Update flow: unpack new upstream here, re-apply patches/, resolve, commit.
+113
View File
@@ -0,0 +1,113 @@
--- a/build.rs
+++ b/build.rs
@@ -24,8 +24,14 @@
cfg!(target_os = "macos")
}
+// alkane-toolkit patch: real wxGTK3 support on Linux via wx-config
+// (upstream stubbed every non-Windows/macOS target).
+fn is_linux() -> bool {
+ cfg!(target_os = "linux")
+}
+
fn is_stub() -> bool {
- cfg!(feature = "stub_lib") || (!is_windows() && !is_osx())
+ cfg!(feature = "stub_lib") || (!is_windows() && !is_osx() && !is_linux())
}
fn main() -> Result<(), Box<dyn Error>> {
@@ -35,6 +41,9 @@
if is_stub() {
return Ok(());
}
+ if is_linux() {
+ return Ok(()); // libs are linked inside build_linux()
+ }
let wx_libs = get_libs(&wx_path)?;
@@ -80,7 +89,7 @@
fn download_dist() -> Result<PathBuf, Box<dyn Error>> {
let dist_path = Path::new("./dist/");
let wx_path = PathBuf::from(format!("./dist/{}", WX_PATH));
- if wx_path.exists() || is_stub() {
+ if wx_path.exists() || is_stub() || is_linux() {
return Ok(wx_path);
}
println!("cargo:warning=wx-rs: Downloading source to './dist/");
@@ -107,8 +116,14 @@
return Ok(());
}
println!("cargo:rerun-if-changed=cpp_src/wxbridge.cpp");
+ println!("cargo:rerun-if-changed=cpp_src/widgets_bridge.cpp");
+
+ // alkane-toolkit patch: compile the bridge (upstream + widgets extension)
+ // against the wx shown by $WX_RS_WXCONFIG (default `wx-config`).
+ if is_linux() {
+ return build_linux();
+ }
- //panic!("{}", wx_path.to_str().unwrap());
if is_windows() {
build_msvc(wx_path)?;
} else {
@@ -217,6 +232,59 @@
)?)
}
+fn build_linux() -> Result<(), Box<dyn Error>> {
+ // alkane-toolkit patch: GTK3 build driven entirely by wx-config, so the
+ // same code builds against our vendored static wx 3.3.3 (WX_RS_WXCONFIG
+ // pointing at its prefix) or any system wxGTK3.
+ let wxconfig = env::var("WX_RS_WXCONFIG").unwrap_or_else(|_| String::from("wx-config"));
+ let cxxflags = String::from_utf8(
+ Command::new(&wxconfig).arg("--cxxflags").output()?.stdout,
+ )?;
+ let libs = String::from_utf8(Command::new(&wxconfig).arg("--libs").output()?.stdout)?;
+ // The widget bridge uses GTK directly (zebra-striping CSS), so add GTK's own
+ // include paths. Best-effort: if pkg-config or gtk3-dev is missing the flags
+ // are simply empty and the GTK-only code stays disabled.
+ let gtk_cflags = Command::new("pkg-config")
+ .args(["--cflags", "gtk+-3.0"])
+ .output()
+ .ok()
+ .filter(|o| o.status.success())
+ .and_then(|o| String::from_utf8(o.stdout).ok())
+ .unwrap_or_default();
+
+ let mut build = cc::Build::new();
+ build.cpp(true)
+ .file("cpp_src/wxbridge.cpp")
+ .file("cpp_src/widgets_bridge.cpp");
+ for f in cxxflags.split_whitespace() {
+ build.flag(f);
+ }
+ for f in gtk_cflags.split_whitespace() {
+ build.flag(f);
+ }
+ build.compile("wxbridge");
+
+ for flag in libs.split_whitespace() {
+ if flag.starts_with('/') && flag.ends_with(".a") {
+ // static wx builds: wx-config emits the archive as a full path
+ let file = flag.rsplit('/').next().unwrap_or(flag);
+ let stem = file
+ .strip_prefix("lib")
+ .unwrap_or(file)
+ .strip_suffix(".a")
+ .unwrap_or(file);
+ println!("cargo:rustc-link-lib=static={}", stem);
+ } else if let Some(lib) = flag.strip_prefix("-l") {
+ println!("cargo:rustc-link-lib={}", lib);
+ } else if let Some(path) = flag.strip_prefix("-L") {
+ println!("cargo:rustc-link-search=native={}", path);
+ } else if flag == "-pthread" {
+ println!("cargo:rustc-link-arg=-pthread");
+ }
+ }
+ Ok(())
+}
+
fn embed_resource_file(wx_path: &PathBuf) {
/*
This was cribbed from https://github.com/nabijaczleweli/rust-embed-resource

Some files were not shown because too many files have changed in this diff Show More