From 517bee9b9ebeaa5f3eed234a32c1dd146ababd03 Mon Sep 17 00:00:00 2001 From: Noah <2+noah@noreply.gitea.bluefla.re> Date: Tue, 3 Nov 2026 10:57:37 -0600 Subject: [PATCH] Take internal working notes and bench details out of the public repo AGENTS.md, HANDOFF.md, code-review-report.md, the implementation plan and the aftermarket parity roadmap described the internal bench, its addresses and in-house firmware; they now live in the private miner-firmware workspace and are git-ignored here. The remaining docs and the fixture header no longer point at them or at local infrastructure. Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/bench-pages.yml | 35 --------- .gitignore | 5 ++ README.md | 28 +++---- ci/compute-version.sh | 2 +- ci/publish-bench-pages.py | 121 ------------------------------ crates/alkane-gui/src/fixtures.rs | 6 +- docs/windows.md | 3 +- 7 files changed, 24 insertions(+), 176 deletions(-) delete mode 100644 .gitea/workflows/bench-pages.yml delete mode 100644 ci/publish-bench-pages.py diff --git a/.gitea/workflows/bench-pages.yml b/.gitea/workflows/bench-pages.yml deleted file mode 100644 index 86a31154..00000000 --- a/.gitea/workflows/bench-pages.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: public-benchmark-pages - -on: - workflow_run: - workflows: [build-test-release] - types: [completed] - workflow_dispatch: - -concurrency: - group: alkane-toolkit-public-benchmark-pages - cancel-in-progress: false - -jobs: - publish: - runs-on: alkane-verify - container: - image: gitea.bluefla.re/blueflare/alkane-ci@sha256:4929b2979851f1f12fb8f92ef74236ae4c2ea735a41ead94a16af416a4f0a1a5 - permissions: - contents: read - steps: - - uses: actions/checkout@v4 - - name: Install SSH client - run: bash ci/ensure-build-deps.sh ssh - - name: Render measured benchmark history - env: - GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} - run: python3 ci/bench_history.py render - - name: Publish public benchmark page - env: - GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} - BENCH_PAGES_DEPLOY_KEY: ${{ secrets.BENCH_PAGES_DEPLOY_KEY }} - run: python3 ci/publish-bench-pages.py toolkit - - name: Clean generated page - if: always() - run: python3 ci/cleanup-generated.py diff --git a/.gitignore b/.gitignore index 6b41dc3c..5dbf7a62 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,8 @@ **/target .claude/ __pycache__/ +# Internal working notes live outside this public repository. +/AGENTS.md +/HANDOFF.md +/CLAUDE.md +code-review-report*.md diff --git a/README.md b/README.md index 7b3d7e79..6395e402 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,18 @@ # Alkane Toolkit [![CI](https://gitea.bluefla.re/blueflare/alkane-toolkit/raw/branch/ci-badges/main.svg)](https://gitea.bluefla.re/blueflare/alkane-toolkit/actions) -![tests](https://gitea.bluefla.re/blueflare/alkane-toolkit/raw/branch/ci-badges/badges/tests.svg) -![coverage](https://gitea.bluefla.re/blueflare/alkane-toolkit/raw/branch/ci-badges/badges/coverage.svg) -![bench](https://gitea.bluefla.re/blueflare/alkane-toolkit/raw/branch/ci-badges/badges/bench.svg) -![bench coverage](https://gitea.bluefla.re/blueflare/alkane-toolkit/raw/branch/ci-badges/badges/bench-coverage.svg) -![lines of code](https://gitea.bluefla.re/blueflare/alkane-toolkit/raw/branch/ci-badges/badges/loc.svg) -![code quality](https://gitea.bluefla.re/blueflare/alkane-toolkit/raw/branch/ci-badges/badges/quality.svg) -![dependencies](https://gitea.bluefla.re/blueflare/alkane-toolkit/raw/branch/ci-badges/badges/dependencies.svg) -![license](https://gitea.bluefla.re/blueflare/alkane-toolkit/raw/branch/ci-badges/badges/license.svg) +[![tests](https://gitea.bluefla.re/blueflare/alkane-toolkit/raw/branch/ci-badges/badges/tests.svg)](https://blueflare.gitea.bluefla.re/alkane-toolkit/quality/) +[![coverage](https://gitea.bluefla.re/blueflare/alkane-toolkit/raw/branch/ci-badges/badges/coverage.svg)](https://blueflare.gitea.bluefla.re/alkane-toolkit/quality/#coverage) +[![bench](https://gitea.bluefla.re/blueflare/alkane-toolkit/raw/branch/ci-badges/badges/bench.svg)](https://blueflare.gitea.bluefla.re/alkane-toolkit/bench/) +[![bench coverage](https://gitea.bluefla.re/blueflare/alkane-toolkit/raw/branch/ci-badges/badges/bench-coverage.svg)](https://blueflare.gitea.bluefla.re/alkane-toolkit/quality/) +[![lines of code](https://gitea.bluefla.re/blueflare/alkane-toolkit/raw/branch/ci-badges/badges/loc.svg)](https://blueflare.gitea.bluefla.re/alkane-toolkit/quality/#coverage) +[![code quality](https://gitea.bluefla.re/blueflare/alkane-toolkit/raw/branch/ci-badges/badges/quality.svg)](https://blueflare.gitea.bluefla.re/alkane-toolkit/quality/) +[![dependencies](https://gitea.bluefla.re/blueflare/alkane-toolkit/raw/branch/ci-badges/badges/dependencies.svg)](https://blueflare.gitea.bluefla.re/alkane-toolkit/quality/) +[![license](https://gitea.bluefla.re/blueflare/alkane-toolkit/raw/branch/ci-badges/badges/license.svg)](LICENSE) -The code quality grade reports GUI Clippy and first-party Rust formatting checks -from the last successful main build. Test coverage has a separate badge. +The badges link to the [project site](https://blueflare.gitea.bluefla.re/alkane-toolkit/): the [manual](https://blueflare.gitea.bluefla.re/alkane-toolkit/manual/), +the [code-quality dashboard](https://blueflare.gitea.bluefla.re/alkane-toolkit/quality/) (how the grade is set, coverage by +crate and file) and the [benchmark history](https://blueflare.gitea.bluefla.re/alkane-toolkit/bench/). Desktop miner discovery and monitoring. The Rust GUI uses wxWidgets through a patched [wx-rs bridge](thirdparty/wx-rs). In-app image flashing is disabled @@ -42,8 +43,7 @@ macOS is not built. aftermarket firmware to stock. Discovery is read-only. Control and restore actions change miners. Check the -selected devices before applying them. See the [implementation plan](docs/IMPLEMENTATION-PLAN.md) -and [firmware matrix](docs/aftermarket-parity-roadmap.md) for planned coverage. +selected devices before applying them. ## Development @@ -55,8 +55,8 @@ WX_RS_WXCONFIG="$HOME/.cache/wx-3.3.3-linux/bin/wx-config" \ Keep build output off the source share. `main` runs full CI and publishes qualifying releases; `next` builds `-rc` candidates. Badges measure host -code, not installation support. See the public -[benchmark history](https://blueflare.gitea.bluefla.re/alkane-benchmarks/toolkit/). +code, not installation support. See the +[benchmark history](https://blueflare.gitea.bluefla.re/alkane-toolkit/bench/). ## Firmware safety diff --git a/ci/compute-version.sh b/ci/compute-version.sh index 302a2434..76c475f5 100755 --- a/ci/compute-version.sh +++ b/ci/compute-version.sh @@ -46,7 +46,7 @@ vendor/*|thirdparty/asic-rs/*) # resources, embedded assets). ui.rs/fixtures.rs/bin # match the UI arm above first, so they still bump Z, not Y. backend=true ;; - *) : ;; # docs, HANDOFF, README, thirdparty/wxwidgets tree: no bump + *) : ;; # docs, README, thirdparty/wxwidgets tree: no bump esac done <<< "$changed" diff --git a/ci/publish-bench-pages.py b/ci/publish-bench-pages.py deleted file mode 100644 index 5adff3bd..00000000 --- a/ci/publish-bench-pages.py +++ /dev/null @@ -1,121 +0,0 @@ -#!/usr/bin/env python3 -# SPDX-License-Identifier: MIT -"""Publish a measured benchmark page to the public, data-only Pages repo.""" - -import argparse -import json -import os -from pathlib import Path -import shlex -import subprocess -import tempfile -from urllib.request import Request, urlopen - -PAGES_REPO = "ssh://git@gitea.bluefla.re:2222/blueflare/alkane-benchmarks.git" -GUARD_REPO = "https://gitea.bluefla.re/blueflare/alkane-benchmarks.git" -GUARD_COMMIT = "ea160545c49bc419a245692deda8dd7db7a611eb" -PAGES_HOST = "gitea.bluefla.re" -PAGES_HOST_FINGERPRINT = "SHA256:lqB5cmC9E5HNeg/lkzdOwQ++I8A70Wx7lnNs6liN24g" -PAGES_HOST_KEY = "[gitea.bluefla.re]:2222 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1II6NkmRW+QAd+Wj+7qbNrA8Oo+/N/WRog4hELskn/" - - -def run(*args: str, env: dict[str, str] | None = None, - cwd: Path | None = None) -> subprocess.CompletedProcess[str]: - return subprocess.run(args, env=env, cwd=cwd, text=True, - capture_output=True, check=True) - - -def current_main_sha() -> str: - api = os.environ["GITHUB_API_URL"].rstrip("/") - repo = os.environ["GITHUB_REPOSITORY"] - token = os.environ["GITEA_TOKEN"] - request = Request(f"{api}/repos/{repo}/branches/main", - headers={"Authorization": f"token {token}"}) - with urlopen(request, timeout=20) as response: - branch = json.load(response) - return branch["commit"]["id"] - - -def publish(site: str) -> None: - if os.environ.get("GITHUB_REF") != "refs/heads/main": - raise ValueError("benchmark Pages publication requires main") - sha = os.environ["GITHUB_SHA"] - if current_main_sha() != sha: - print("Skipping benchmark page from a superseded main commit") - return - page = Path("bench-site/index.html").read_bytes() - if not page.startswith(b"") or len(page) > 1_048_576: - raise ValueError("invalid benchmark page") - with tempfile.TemporaryDirectory(prefix="alkane-pages-") as directory: - temporary = Path(directory) - guard_checkout = temporary / "guard" - run("git", "clone", "--quiet", "--single-branch", "--branch", "next", - GUARD_REPO, str(guard_checkout)) - guard_source = run("git", "show", f"{GUARD_COMMIT}:ci/validate_site.py", - cwd=guard_checkout).stdout - guard_script = temporary / "validate_site.py" - guard_script.write_text(guard_source) - run("python3", str(guard_script), "--page", site, - str(Path("bench-site/index.html").resolve())) - key = os.environ["BENCH_PAGES_DEPLOY_KEY"] - if not key.startswith("-----BEGIN OPENSSH PRIVATE KEY-----"): - raise ValueError("missing benchmark Pages deploy key") - key_path = temporary / "deploy_key" - key_path.write_text(key.rstrip("\n") + "\n") - key_path.chmod(0o600) - known_hosts = temporary / "known_hosts" - known_hosts.write_text(PAGES_HOST_KEY + "\n") - fingerprint = run("ssh-keygen", "-lf", str(known_hosts)).stdout.split()[1] - if fingerprint != PAGES_HOST_FINGERPRINT: - raise ValueError("benchmark Pages SSH host key changed") - git_env = os.environ.copy() - ssh_command = (f"ssh -i {shlex.quote(str(key_path))} -o IdentitiesOnly=yes " - f"-o UserKnownHostsFile={shlex.quote(str(known_hosts))} " - "-o StrictHostKeyChecking=yes -o ConnectTimeout=10") - git_env["GIT_SSH_COMMAND"] = ssh_command - git_env["GIT_TERMINAL_PROMPT"] = "0" - checkout = temporary / "site" - run("git", "clone", "--quiet", "--single-branch", "--branch", "gh-pages", - PAGES_REPO, str(checkout), env=git_env) - run("git", "config", "user.name", "Alkane CI", cwd=checkout) - run("git", "config", "user.email", "ci@bluefla.re", cwd=checkout) - for attempt in range(3): - if current_main_sha() != sha: - print("Skipping benchmark page from a superseded main commit") - return - run("git", "fetch", "--quiet", "origin", "gh-pages", env=git_env, - cwd=checkout) - run("git", "checkout", "-q", "-B", "bench-publish", "origin/gh-pages", - cwd=checkout) - destination = checkout / site / "index.html" - destination.parent.mkdir(exist_ok=True) - destination.write_bytes(page) - run("git", "add", f"{site}/index.html", cwd=checkout) - changed = subprocess.run(("git", "diff", "--cached", "--quiet"), - cwd=checkout, check=False) - if changed.returncode == 0: - print(f"{site} benchmark page is already current") - return - if changed.returncode != 1: - raise RuntimeError("cannot compare benchmark page") - run("git", "commit", "-q", "-m", - f"Update {site} benchmarks for {sha[:10]} [skip ci]", cwd=checkout) - pushed = subprocess.run(("git", "push", "--quiet", "origin", - "HEAD:gh-pages"), env=git_env, cwd=checkout, - text=True, capture_output=True, check=False) - if pushed.returncode == 0: - print(f"Published {site} benchmark page for {sha[:10]}") - return - if attempt == 2: - raise RuntimeError(f"benchmark Pages push failed: {pushed.stderr.strip()}") - raise RuntimeError("benchmark Pages publication did not complete") - - -def main() -> None: - parser = argparse.ArgumentParser() - parser.add_argument("site", choices=("sdk", "os", "toolkit")) - publish(parser.parse_args().site) - - -if __name__ == "__main__": - main() diff --git a/crates/alkane-gui/src/fixtures.rs b/crates/alkane-gui/src/fixtures.rs index 4ed68adc..a01e792f 100644 --- a/crates/alkane-gui/src/fixtures.rs +++ b/crates/alkane-gui/src/fixtures.rs @@ -1,6 +1,6 @@ -//! 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]). These are the reference values the workflow tests compare +//! Fixture fleet: the expected hardware output of nine representative miners +//! (one per control-board family / firmware). 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. Only miners that respond become rows, //! so there is no synthetic "offline" fixture. diff --git a/docs/windows.md b/docs/windows.md index 8d6404e5..ddc88d67 100644 --- a/docs/windows.md +++ b/docs/windows.md @@ -99,8 +99,7 @@ AZURE_SIGNING_TOKEN=$(az account get-access-token --resource https://codesigning ## Native Windows runner `windows-native.yml` runs on the self-hosted runner `win11-test-vm` -(label `alkane-windows`, host mode) inside the Windows 11 test VM -(a local test VM). It downloads the +(label `alkane-windows`, host mode) inside a Windows 11 test VM. It downloads the `alkane-toolkit-windows-tests` artifact of the triggering main run, runs every test executable and the UI self-test natively, and never blocks a release: while the VM is off, the job waits for the runner.