From d54350b9026162cd819f74492b6acc6bdce49739 Mon Sep 17 00:00:00 2001 From: Michael Coelho Date: Sat, 22 Aug 2026 18:03:51 -0400 Subject: [PATCH 1/4] docs(agents): sweep stale repository state --- .agents/decisions.md | 6 - .agents/docs/history/state-archive.md | 66 +++++++++ .agents/machines.md | 91 +++++-------- .agents/state.md | 188 ++++++-------------------- 4 files changed, 144 insertions(+), 207 deletions(-) create mode 100644 .agents/docs/history/state-archive.md diff --git a/.agents/decisions.md b/.agents/decisions.md index 058e25bf..b113cbea 100644 --- a/.agents/decisions.md +++ b/.agents/decisions.md @@ -92,8 +92,6 @@ release slice that ships the packaged-TLS-trust fix. provider is reachable over HTTPS from them on machines without the build machine's certificate path. Signing claims and install copy are unchanged from 0.1.67. -- Publication of `0.1.68` — push, tag, builds, qualification — is separately - gated and has not happened. ## 2026-08-07 — The current product/release version is 0.1.67 @@ -114,8 +112,6 @@ for the first platform-signed public release. and an Azure Trusted Signing-signed Windows installer, and no longer teach the macOS Privacy & Security approval detour. The Linux AppImage is still unsigned and its copy is unchanged. -- Publication of `0.1.67` — tag, builds, qualification, announcement — is - separately gated and has not happened. ## 2026-08-07 — Installers are platform-signed @@ -159,8 +155,6 @@ bump after the macro editor rework and README screenshot recapture. `am_configurator/_version.py` is the canonical source, every artifact reports that exact version, and a version changes only through a deliberate source edit for a new public product release. -- Publication of `0.1.66` — tag, builds, qualification, release notes, - announcement — is separately gated and has not happened. - Announcement and release-note copy stays flat: changes are listed evenly and no feature is framed as a headline (owner ruling while correcting the `0.1.66` Reddit draft, 2026-08-03). Copy says literally what the software diff --git a/.agents/docs/history/state-archive.md b/.agents/docs/history/state-archive.md new file mode 100644 index 00000000..eadcef2b --- /dev/null +++ b/.agents/docs/history/state-archive.md @@ -0,0 +1,66 @@ +# Repository State Archive + +Superseded entries rotated verbatim from `.agents/state.md`. + +## 2026-08-22 drift sweep + +- **The 2026-08-03 copy ruling binds the release-note body, not just the + announcement.** Its first sentence names release-note copy; the + no-dialog-mechanics sentence that `4c60d3c` added names announcement copy. + 0.1.67 first shipped a `## First launch` section carrying SmartScreen button + steps; `267f3ce` removed it and folded the trust facts into Downloads, which + is how 0.1.64, 0.1.65, and 0.1.66 all did it. The per-OS button-level steps + stay in `docs/installing.md`, which the notes link, and the 0.1.67 notes test + now refuses those button phrases in the release body. If the owner reads the + ruling as announcement-only, the section can come back — nothing else + depends on its absence. + +- **The only functional change since `v0.1.66` is the About panel's Sponsors and + Ko-fi links** (`am_configurator/web/index.html`). Everything else in + `v0.1.66..HEAD` was signing/CI, docs, tests, or README images — no keymap, + macro, lighting, Library, protocol, or AI behaviour moved. The 0.1.67 notes + say so rather than implying new behaviour. + +- **0.1.66 is published** (2026-08-04): GitHub Release + , normal/latest, + tag `v0.1.66` at `f19a806`. All five assets verified by hash, attestation, + and anonymous download. Local macOS qualification passed. + +- The withdrawn `v0.1.65` draft was deleted on 2026-08-04 by owner ruling; + the `v0.1.65` tag is retained at `ebd0d04` and must not be moved or + republished. + +- **The signed release lane is PROVEN GREEN on all three platforms** (run + 31228842806, 2026-08-07; `.github/workflows/release.yml`, landed the same + day): `workflow_dispatch` or a `v*` tag, hard-requiring its signing + secrets. macOS signs with a Developer ID in a disposable keychain, + codesigns the dmg itself, notarizes, staples — all verification + assertions passed. Windows signs the frozen executable and then the Inno + installer through Azure Trusted Signing — both `Get-AuthenticodeSignature` + assertions passed. Linux rides along unsigned. Two defects were found and + fixed by the first exercise (`b1d34fa`): the dmg had no primary signature + of its own (spctl --type open rejected it; notarization attaches a ticket + but signs nothing), and `Invoke-TrustedSigning -Files` refuses non-rooted + paths. One repo-secret correction rode along: `AZURE_SIGNING_ACCOUNT` is + `roethlar-app-signing` (the Artifact Signing account name; the app + registration's name 403s). `packaging/macos/build_dmg.sh` takes its + identity from a non-empty `APPLE_SIGNING_IDENTITY` and otherwise ad-hoc + signs as before. Bundled Windows DLLs and `.pyd` files stay unsigned; + only the launched executable and the installer are signed. + +- The stale-copy block on the next tag is **cleared**: 0.1.67's notes, README, + and `docs/installing.md` describe the signatures that exist. `0.1.66.md` keeps + its own now-false signing sentences as published history and must not be + edited. + +- **Signing conflict RESOLVED by owner override (2026-08-07).** The + 2026-07-28 "permanently platform-unsigned" decision is superseded — see + `.agents/decisions.md` "2026-08-07 — Installers are platform-signed" for + the ruling and which of the old clauses survive. The signed lane is now + legitimate; the README/`docs/installing.md` unsigned copy that entry named as + outstanding was corrected with 0.1.67 (see the top of Now). Still relevant: the + 2026-07-28 public-release plan removed the `push.tags: ["v*"]` trigger + from Desktop installers so a tag could not rebuild a candidate; + `tests/test_packaging.py` still guards that for `desktop.yml`, and the new + lane reintroduces a tag trigger deliberately, because a signed asset + cannot come from the unsigned candidate lane. diff --git a/.agents/machines.md b/.agents/machines.md index 0e1dc185..91dfb22d 100644 --- a/.agents/machines.md +++ b/.agents/machines.md @@ -4,8 +4,8 @@ Per-machine facts that do not belong in the portable `state.md`. ## netwatch-01 (Windows 11, x86-64) -_Last verified locally: 2026-07-31; SSH reachability and suite timing were -last verified 2026-07-29._ +_Last verified locally: 2026-07-31. SSH reachability recheck as `4cf4d13` +on 2026-08-22 timed out; the host may simply be off._ - Reachable as `michael@netwatch-01` over SSH with key auth from `nagatha`. Resolution is not always available; it failed until the owner brought the host @@ -23,9 +23,6 @@ last verified 2026-07-29._ - Windows verification must build the environment the way CI does, `uv sync --locked -p 3.12` with no extras. Adding `--extra desktop` hides the optional-dependency failures this host is used to catch. -- A fresh Python 3.12 base environment passed 639 tests (5 skipped) in 97.061 - seconds on 2026-07-30. A separate fresh desktop/build environment resolved all - locked Windows packages and passed the canonical installer build. - Winget-installed Inno Setup 6.7.3 is at `C:\Users\michael\AppData\Local\Programs\Inno Setup 6\ISCC.exe`; its Authenticode signature is valid. The Windows packager accepts both official @@ -46,9 +43,8 @@ last verified 2026-07-29._ ## win-arm-vm (Windows 11, ARM64) -_Key auth from nagatha verified 2026-08-03 (ed25519, no passphrase prompt -needed; earlier denials were the Windows OpenSSH administrators_authorized_keys -rule, fixed by the owner). Earlier full verification: 2026-07-31._ +_Key auth last verified 2026-08-03. SSH recheck as `4cf4d13` on +2026-08-22 reported “Host is down”; no machine facts were revalidated._ - Reachable as `michael@10.1.10.211`; hostname `WIN-RRRKRP63HA6`, Windows 11 Pro 24H2 build 26100, ARM64. The clean VM has no SmartScreen-disabling user, @@ -82,58 +78,41 @@ rule, fixed by the owner). Earlier full verification: 2026-07-31._ ## nagatha (macOS arm64) -_Last verified locally on the host: 2026-08-02. SSH reachability and the owner's -console/RDP session were last verified 2026-08-01._ +_Last verified locally as `4cf4d13` on 2026-08-22._ -- This is the owner's Mac, formerly recorded here as `michael-mac`; older - records and plans that name `michael-mac` mean this host (owner confirmed - 2026-08-02). The former `/Users/michael/Dev/am` checkout and its Python 3.13 - venv no longer exist. -- Reachable as `michael@10.1.10.247`; hostname `nagatha.local`, macOS 26.6, - Darwin 25.6.0, arm64. Its Ed25519 host key matches the trusted former - `10.1.10.41` entry; `HostKeyAlias=10.1.10.41` verifies that identity without - accepting a different key. Gatekeeper assessments are enabled. +- This is the owner’s Mac, formerly recorded as `michael-mac`; older records + and plans using that name mean this host. +- Current hostname is `q.lan`; the machine is macOS 27.0, Darwin 27.0.0, + arm64. Gatekeeper assessments are enabled. - Exact-artifact qualification tools are available: `hdiutil`, `codesign`, - `spctl`, `xattr`, `shasum`, `curl`, `file`, `open`, and `ditto`. The temporary - directory is writable and the data volume had about 204 GB free on 2026-08-02. -- Homebrew now supplies GitHub CLI 2.96.0, `uv` 0.11.32, and Node 26.5.0 on - `PATH`, so attestation and Node checks no longer have to be delegated to - `netwatch-01` and rebound by SHA-256. -- This host now carries the active working checkout at - `/Users/michael/Dev/AMKB-GUI` (case-insensitive, same directory as the - lowercase `dev` path recorded earlier). It has both the canonical `origin` - and the `gitea` remote and a project venv on Python 3.14.6. Confirm its head - against the canonical remote before treating it as current-source evidence. - Exact downloaded-artifact checks do not depend on that checkout. -- The owner may either operate the GUI directly or permit SSH-driven command - checks. Availability does not authorize macOS Open Anyway or a keyboard - write. -- A local macOS arm64 PyInstaller bundle built here and its frozen - `--smoke-test` passed (last verified 2026-07-21, on the former checkout and - venv; recheck on the current checkout before relying on it). -- Ollama is installed at `/usr/local/bin/ollama` (binary re-verified - 2026-08-02). On 2026-07-21, `ornith:latest` produced a strict - procedural-animation recipe while `gemma4:12b-mlx` ignored the requested JSON - schema. Current production generation makes one request without automatic - correction retries, so model availability and conformance must be rechecked - rather than inferred from that historical run. + `spctl`, `xattr`, `shasum`, `curl`, `file`, `open`, and `ditto`. + The writable data volume had about 23 GiB free. +- GitHub CLI 2.98.0, `uv` 0.12.5, and Node 26.7.0 are on `PATH`. + `/usr/local/bin/ollama` is installed. Neither `flatpak` nor + `flatpak-builder` is installed. +- The active checkout is `/Users/michael/Dev/AMKB-GUI`; `origin` is the + local Gitea remote and `github` is the public GitHub remote. The checkout + currently has no `.venv`; exact downloaded-artifact checks do not depend on + a project environment. +- The owner may operate the GUI directly or permit SSH-driven command checks. + Availability never authorizes an Open Anyway interaction or hardware write. ## gabrielle (Linux x86-64) -_Last verified over SSH: 2026-08-01._ +_Last verified over SSH as `4cf4d13` on 2026-08-22._ -- Reachable as `michael@gabrielle`; Arch Linux, kernel 7.1.5-arch1-1, x86-64. - The home filesystem had about 1.7 TB free and the temporary directory is - writable. -- Available qualification tools include Git 2.55.0, Python 3.14.6, Node - 26.5.0, GitHub CLI 2.96.0, `curl`, `file`, `sha256sum`, FUSE, and - `fusermount3` 3.18.2. `uv` is not installed and is not needed for the planned - exact-AppImage inspection. +- Reachable as `michael@gabrielle`; Arch Linux, kernel 7.1.8-arch1-3, + x86-64. The home filesystem had about 1.7 TiB free. +- Qualification tools include Git 2.55.0, Python 3.14.7, Node 26.7.0, GitHub + CLI 2.98.0, `uv` 0.12.5, `curl`, `file`, `sha256sum`, FUSE, + `flatpak`, and `flatpak-builder`. +- The Flatpak `io.github.roethlar.AMConfigurator` is installed from the + checkout at `d5c7f4e`; `flatpak run io.github.roethlar.AMConfigurator + --smoke-test` passed again on 2026-08-22. - An ordinary SSH shell has no `DISPLAY` or `WAYLAND_DISPLAY`. Unprivileged - user namespaces, subordinate IDs, `unshare`, and `bwrap` are available; a - disposable Ubuntu 24.04 rootfs can run Xvfb and the exact AppImage without - changing host packages. This path passed the real GTK/WebKit native-policy - smoke and exposed helper executable origins for inspection. -- Qualification checkouts and Ubuntu rootfs paths are transient and are not - durable machine facts. Exact downloaded-artifact checks must create or - verify their own isolated working root; no physical-keyboard test is needed. + user namespaces, subordinate IDs, `unshare`, and `bwrap` are available; + a disposable Ubuntu 24.04 rootfs can run Xvfb for exact AppImage inspection + without changing host packages. +- Qualification checkouts and Ubuntu-rootfs paths are transient, not durable + machine facts. Exact downloaded-artifact checks must create their own + isolated working root; no physical-keyboard test is needed. diff --git a/.agents/state.md b/.agents/state.md index ce41eef8..b0ade30e 100644 --- a/.agents/state.md +++ b/.agents/state.md @@ -2,155 +2,53 @@ ## Now -- **0.1.68 is published** (2026-08-08): tag `v0.1.68` at `cdcf841`, signed - release run 31240024617 fully green (Release identity, signed Windows - installer, signed macOS installer, Linux AppImage, Publish), GitHub Release - "AM Configurator 0.1.68" normal/latest published 04:43Z with all five - assets. It ships the packaged-TLS-trust fix, and — via the new - `AM_SMOKE_NET=1` workflow env — every frozen smoke test in that run proved - the packaged CA trust with a real HTTPS connection. This is the first - release whose installed builds can reach AI providers over HTTPS on - ordinary user machines. Owner authorized push, tag, and publication via - the 2026-08-08 goal directive ("do not stop until there is a signed - download for all possible platforms on github"); "all possible platforms" - reads as macOS and Windows signed, Linux unsigned by standing decision - (no publisher-signing equivalent). - `028e73b` (fix) and `328a738` (CI guard). Root cause: frozen builds bundle - an OpenSSL whose default CA path is baked to the build machine - (`/Library/Frameworks/Python.framework/.../etc/openssl/cert.pem`), so every - installed build to date — 0.1.66 and the installed 0.1.67 artifact included — - had zero trusted roots and every HTTPS provider call failed - `CERTIFICATE_VERIFY_FAILED`, surfaced as the offline "AI service could not - be reached" error for all API providers. Proven on the installed 0.1.67 via - `AM_SMOKE_NET=1 --smoke-test` (fails) and on a fresh local build after the - fix (passes; `certifi/cacert.pem` rides in the bundle). The fix anchors - `llm.default_tls_context()` to certifi and both workflows now export - `AM_SMOKE_NET=1` so the packaged-CA reach check gates every frozen smoke. - **Reviewed clean** (2026-08-08): codereview codex (gpt-5.6-sol @ xhigh, - standard — codex defaults per owner dispatch) over `6c1d652..328a738`, no - material issue; record in `.agents/review/outcomes.md`. Release - consequence: **v0.1.67 was tagged and published at `6c1d652`, before these - commits** (observed 2026-08-08: `git ls-remote` shows the tag and - `origin/main` at `6c1d652`; the GitHub Release published 02:42Z), so the - shipped 0.1.67 still carries the broken TLS trust and AI providers fail in - it on machines without the build-machine cert path. Shipping the fix needs - a new owner-gated release (push, version bump, tag); the 0.1.67 release - notes do not mention the fix (owner-ruled copy — not edited). -- **Separate, environmental:** the owner's Anthropic API account answered - HTTP 400 "credit balance is too low" (2026-08-08) — Anthropic generation - needs credits regardless of the TLS fix. Known cosmetic gap, unrecorded as - work: the app classifies that billing 400 as `bad_response`, whose UI copy - ("model sent back lighting this app could not use") misleads; reclassifying - it is unscoped and owner-gated. -- **0.1.67 is published** (2026-08-08): the owner pushed the prepared commits - and cut `v0.1.67` at `6c1d652`; the GitHub Release "AM Configurator 0.1.67" - published 2026-08-08T02:42Z, normal/latest. It predates the TLS-trust fix - above, so its installed builds cannot reach any AI provider over HTTPS on - machines without the build-machine cert path. -- **The 2026-08-03 copy ruling binds the release-note body, not just the - announcement.** Its first sentence names release-note copy; the - no-dialog-mechanics sentence that `4c60d3c` added names announcement copy. - 0.1.67 first shipped a `## First launch` section carrying SmartScreen button - steps; `267f3ce` removed it and folded the trust facts into Downloads, which - is how 0.1.64, 0.1.65, and 0.1.66 all did it. The per-OS button-level steps - stay in `docs/installing.md`, which the notes link, and the 0.1.67 notes test - now refuses those button phrases in the release body. If the owner reads the - ruling as announcement-only, the section can come back — nothing else - depends on its absence. -- **The only functional change since `v0.1.66` is the About panel's Sponsors and - Ko-fi links** (`am_configurator/web/index.html`). Everything else in - `v0.1.66..HEAD` was signing/CI, docs, tests, or README images — no keymap, - macro, lighting, Library, protocol, or AI behaviour moved. The 0.1.67 notes - say so rather than implying new behaviour. -- **Release-lane assets carry no build attestation, and the docs now say that - instead of pointing users at it.** `desktop.yml`'s `provenance` job is - `main`-push-only, so `gh attestation verify` finds nothing for a file built by - `release.yml`. `docs/installing.md` scopes attestation to candidate builds and - 0.1.67's notes tell users to verify digest plus publisher signature. Adding an - attest step to `release.yml` remains an open option, not a decision. -- **Visible first-launch trust behaviour on a signed package has never been - observed.** The 2026-08-03 change-triggered qualification decision names - signing as a trigger, and signing changed, so the unsigned baseline no longer - carries. CI asserts signature state, notarization ticket, and Gatekeeper - primary-signature assessment; nobody has downloaded a signed dmg or installer - through a browser and opened it. Owner call whether that gates publication. -- **0.1.66 is published** (2026-08-04): GitHub Release - , normal/latest, - tag `v0.1.66` at `f19a806`. All five assets verified by hash, attestation, - and anonymous download. Local macOS qualification passed. -- The withdrawn `v0.1.65` draft was deleted on 2026-08-04 by owner ruling; - the `v0.1.65` tag is retained at `ebd0d04` and must not be moved or - republished. -- The Reddit announcement was stopped by the owner and never posted. The - Reddit draft has uncommitted working-tree edits; its fate is undecided — - do not commit it. -- **The signed release lane is PROVEN GREEN on all three platforms** (run - 31228842806, 2026-08-07; `.github/workflows/release.yml`, landed the same - day): `workflow_dispatch` or a `v*` tag, hard-requiring its signing - secrets. macOS signs with a Developer ID in a disposable keychain, - codesigns the dmg itself, notarizes, staples — all verification - assertions passed. Windows signs the frozen executable and then the Inno - installer through Azure Trusted Signing — both `Get-AuthenticodeSignature` - assertions passed. Linux rides along unsigned. Two defects were found and - fixed by the first exercise (`b1d34fa`): the dmg had no primary signature - of its own (spctl --type open rejected it; notarization attaches a ticket - but signs nothing), and `Invoke-TrustedSigning -Files` refuses non-rooted - paths. One repo-secret correction rode along: `AZURE_SIGNING_ACCOUNT` is - `roethlar-app-signing` (the Artifact Signing account name; the app - registration's name 403s). `packaging/macos/build_dmg.sh` takes its - identity from a non-empty `APPLE_SIGNING_IDENTITY` and otherwise ad-hoc - signs as before. Bundled Windows DLLs and `.pyd` files stay unsigned; - only the launched executable and the installer are signed. -- **The signed lane now publishes** (`1f096dc`, pushed; `origin/main` was at - `c0c489e` on 2026-08-07): - a `publish` job needs `[macos, windows, linux]`, downloads the three signed - artifacts into one directory, regenerates `release-manifest.json` and - `SHA256SUMS.txt` through `build_tools/release_manifest.py`, and makes one - `softprops/action-gh-release@v2` upload of the five files. It is the only - job with `contents: write` and runs only on a `v*` tag push — a - `workflow_dispatch` still stops at the uploaded artifacts, because it has - no tag to attach assets to. Release title, body, and flags follow the - hand-published convention: `AM Configurator `, the committed - `docs/releases/.md` as the body, normal/latest, never draft or - prerelease, no generated changelog; `release-identity` fails a tag push in - seconds when that notes file is missing. Nothing about the publish path is - provable without a real tag run. -- The stale-copy block on the next tag is **cleared**: 0.1.67's notes, README, - and `docs/installing.md` describe the signatures that exist. `0.1.66.md` keeps - its own now-false signing sentences as published history and must not be - edited. -- **Signing conflict RESOLVED by owner override (2026-08-07).** The - 2026-07-28 "permanently platform-unsigned" decision is superseded — see - `.agents/decisions.md` "2026-08-07 — Installers are platform-signed" for - the ruling and which of the old clauses survive. The signed lane is now - legitimate; the README/`docs/installing.md` unsigned copy that entry named as - outstanding was corrected with 0.1.67 (see the top of Now). Still relevant: the - 2026-07-28 public-release plan removed the `push.tags: ["v*"]` trigger - from Desktop installers so a tag could not rebuild a candidate; - `tests/test_packaging.py` still guards that for `desktop.yml`, and the new - lane reintroduces a tag trigger deliberately, because a signed asset - cannot come from the unsigned candidate lane. -- The UI redesign is parked until after release and now unblocked to plan: - element-level, not restyle. Two rejected mockup rounds: - `/tmp/style-v1..v9*.png`; capture tooling in `/tmp`. Setup rulings (pilot - screen, prototype form, arrangements per round) still open. +- **0.1.68 is the latest published release** (re-verified as `4cf4d13` on + 2026-08-22): tag `v0.1.68` is at `cdcf841`; GitHub reports “AM + Configurator 0.1.68” as the normal, latest, non-draft release, published + 2026-08-08T04:43:51Z. It is the first release whose installed builds carry + usable packaged CA trust for AI-provider HTTPS. The fix is `028e73b`, its + frozen-network guard is `328a738`, and the clean review is recorded in + `.agents/review/outcomes.md`. +- **Separate, environmental:** the owner’s Anthropic account answered HTTP 400 + “credit balance is too low” on 2026-08-08. That account needs credits + independently of the TLS fix. The app still classifies that billing response + as `bad_response` and shows misleading generic model-output copy; changing + that behavior remains unscoped and owner-gated. +- **Signed release assets carry no GitHub build attestation** (repo evidence + re-verified as `4cf4d13` on 2026-08-22): `release.yml` signs and publishes + them but has no attestation step. Candidate assets from `desktop.yml` are + different files and remain attested. README, `docs/installing.md`, and the + 0.1.68 notes state this distinction. +- **Visible first-launch trust behavior for a signed package has not been + observed.** CI proves signature state, notarization ticket, and Gatekeeper + primary-signature assessment, but no recorded qualification downloaded the + signed DMG or installer through a browser and opened it. ## Next -- **Package-manager distribution (Linux-first):** AUR **parked** (Arch AUR - lock). **Flatpak active:** `./build_tools/release_flatpak.sh prepare|build`, - `packaging/flatpak/PROCESS.md`, app id - `io.github.roethlar.AMConfigurator` (extra-data AppImage from Releases). - Prepare for 0.1.68 works. Build/install proof needs `flatpak-builder`. - No user-facing README Flatpak line until installable (Flathub or owner go). +- **Package-manager distribution (Linux-first):** the Flatpak + `io.github.roethlar.AMConfigurator` now has a repeatable one-shot + prepare/build/install/smoke path. A live Linux Flatpak smoke passed again on + `gabrielle` as `4cf4d13` on 2026-08-22; machine-specific evidence lives in + `.agents/machines.md`. No Flathub listing exists yet, so README and install + docs must not advertise a public Flatpak command. AUR remains blocked below. Plan: `docs/superpowers/plans/2026-08-08-package-manager-distribution.md`. +- **UI redesign is unblocked but not specified.** It remains an element-level + redesign, not a restyle. Owner rulings on the pilot screen, prototype form, + and review-round arrangement are still open. ## Blockers -- Whether the published 0.1.67 listing should carry a known-issue note about - its unreachable AI providers, now that 0.1.68 supersedes it, is the owner's - call. -- Two things for the owner to rule on before or with that tag: whether the - unobserved first-launch trust behaviour on a signed package gates publication, - and whether `release.yml` should attest its assets (the docs currently state - plainly that it does not). +- **AUR publication is blocked on owner SSH authorization, not an AUR + maintenance lock** (re-verified as `4cf4d13` on 2026-08-22): + `ssh -T aur@aur.archlinux.org` now reaches AUR but returns + `Permission denied (publickey)`, and + `https://aur.archlinux.org/packages/am-configurator-bin` returns 404. The + owner must associate an available public key with the AUR account before the + prepared package can be published. +- Whether the superseded 0.1.67 GitHub listing should carry a known-issue note + about its unusable packaged TLS trust remains an owner call. +- The old “before tag” basis for first-launch observation and release-asset + attestation is falsified: 0.1.68 was published without either. The owner must + decide whether either becomes a requirement for a future release; current + docs accurately state that signed release assets have no attestation. From d2e0be35781caac3c574e139e26fd21e62ecef8d Mon Sep 17 00:00:00 2001 From: Michael Coelho Date: Sat, 22 Aug 2026 18:20:05 -0400 Subject: [PATCH 2/4] feat: surface unsupported keyboards safely --- am_configurator/server.py | 6 +- am_configurator/web/app.js | 113 ++++++++++++++++++++++++++++++++- am_configurator/web/index.html | 2 +- am_configurator/web/style.css | 4 ++ tests/test_app.py | 41 ++++++++++++ tests/web/app_shell.test.js | 41 ++++++++++++ 6 files changed, 202 insertions(+), 5 deletions(-) diff --git a/am_configurator/server.py b/am_configurator/server.py index ef9ece8d..ebf177d0 100644 --- a/am_configurator/server.py +++ b/am_configurator/server.py @@ -1564,12 +1564,16 @@ def _device_payload( macro_count: int | None = None, macro_buffer_bytes: int | None = None, ) -> dict[str, Any]: - return _decorate_device_descriptor( + payload = _decorate_device_descriptor( transport.device_json(handle, info), layer_count=layer_count, macro_count=macro_count, macro_buffer_bytes=macro_buffer_bytes, ) + payload["supported"] = device_report.is_supported_product( + payload.get("product_id") + ) + return payload def _remember_device_layout(payload: Mapping[str, Any]) -> dict[str, Any] | None: diff --git a/am_configurator/web/app.js b/am_configurator/web/app.js index de2f6eeb..b243a914 100644 --- a/am_configurator/web/app.js +++ b/am_configurator/web/app.js @@ -122,6 +122,7 @@ const state = { undo: [], redo: [], devices: [], + deviceSupportReport: null, selectedDevice: null, loadedDevice: null, deviceDocuments: new Map(), @@ -5879,6 +5880,104 @@ function updateDeviceActions() { write.title=wrongWorkspace?"Load this keyboard before writing its configuration.":""; } +function deviceSupportGroups(devices=state.devices) { + const groups={supported:[],unsupported:[],other:[]}; + for(const device of devices){ + if(device?.is_keyboard&&device.supported===true)groups.supported.push(device); + else if(device?.is_keyboard)groups.unsupported.push(device); + else groups.other.push(device); + } + return groups; +} + +function supportReportJson(report) { + return `${JSON.stringify(report,null,2)}\n`; +} + +async function loadDeviceSupportReport() { + if(state.deviceSupportReport)return state.deviceSupportReport; + const report=await api('/api/devices/support-report'); + if( + !report + ||report.schema_version!==1 + ||!report.counts + ||!report.devices + )throw new Error('The device support report was not valid.'); + state.deviceSupportReport=report; + return report; +} + +async function copyPlainText(value) { + if(navigator.clipboard?.writeText){ + await navigator.clipboard.writeText(value); + return; + } + const field=document.createElement('textarea'); + field.value=value; + field.readOnly=true; + field.style.position='fixed'; + field.style.opacity='0'; + document.body.append(field); + field.select(); + const copied=document.execCommand?.('copy'); + field.remove(); + if(!copied)throw new Error('Clipboard access is unavailable. Save the report instead.'); +} + +function setDeviceSupportReportBusy(busy) { + for(const id of ['copy-device-support-report','save-device-support-report']){ + const button=$(`#${id}`); + if(button)button.disabled=busy; + } +} + +async function copyDeviceSupportReport() { + setDeviceSupportReportBusy(true); + try{ + const report=await loadDeviceSupportReport(); + await copyPlainText(supportReportJson(report)); + toast('Support report copied','Paste it into a GitHub issue. Host paths and device serial numbers were removed.','success'); + }catch(error){toast('Could not copy report',error.message||String(error),'error');} + finally{setDeviceSupportReportBusy(false);} +} + +async function saveDeviceSupportReport() { + setDeviceSupportReportBusy(true); + try{ + const report=await loadDeviceSupportReport(); + const blob=new Blob([supportReportJson(report)],{type:'application/json'}); + const url=URL.createObjectURL(blob); + const link=document.createElement('a'); + link.href=url; + link.download='AM-Configurator-device-support-report.json'; + link.click(); + setTimeout(()=>URL.revokeObjectURL(url),1000); + toast('Support report saved',link.download,'success'); + }catch(error){toast('Could not save report',error.message||String(error),'error');} + finally{setDeviceSupportReportBusy(false);} +} + +function deviceSupportNotice(unsupported, other, hasSupported) { + if(unsupported.length){ + const models=[...new Set(unsupported.map(device=>String( + device.product_id||device.product_string||'Unknown model' + )))]; + return `
New keyboard model detected

${esc(models.join(', '))} is connected, but this build does not support it yet. Create a read-only report to help add it.

The report removes host paths and device serial numbers. Nothing is posted automatically.
`; + } + if(!hasSupported&&other.length){ + return '
USB device found, but no supported keyboard

Connect the keyboard directly by USB, not through its dongle, then scan again.

'; + } + if(!hasSupported){ + return '
No keyboard detected.
Connect it directly by USB, not through its dongle.
'; + } + return ''; +} + +function wireDeviceSupportReportActions() { + $('#copy-device-support-report')?.addEventListener('click',copyDeviceSupportReport); + $('#save-device-support-report')?.addEventListener('click',saveDeviceSupportReport); +} + async function scanDevices() { const priorDisplayGeometry=projectVialKeyLayout(displayGeometryDevice()); const refreshDisplayGeometry=()=>{ @@ -5887,17 +5986,24 @@ async function scanDevices() { }; $("#device-list").innerHTML='
'; $("#device-actions").hidden=true; + state.deviceSupportReport=null; try { const result=await api('/api/devices'); const previous=new Map(state.devices.map(device=>[deviceKey(device),device])); state.devices=(result.devices||[]).map(device=>( mergeScannedDeviceDetails(device,previous.get(deviceKey(device))) )); - const keyboards=state.devices.filter(device=>device.is_keyboard); + const groups=deviceSupportGroups(); + const keyboards=groups.supported; $(".status-light").classList.toggle("online",Boolean(keyboards.length)); if(!keyboards.length){ state.selectedDevice=null; - $("#device-list").innerHTML='
No supported keyboard found.
Connect it by USB, not through the dongle.
'; + $("#device-list").innerHTML=deviceSupportNotice( + groups.unsupported, + groups.other, + false, + ); + wireDeviceSupportReportActions(); updateDeviceActions(); refreshDisplayGeometry(); return; @@ -5905,8 +6011,9 @@ async function scanDevices() { if(!keyboards.some(device=>deviceKey(device)===state.selectedDevice)){ state.selectedDevice=keyboards.some(device=>deviceKey(device)===state.loadedDevice)?state.loadedDevice:null; } - $("#device-list").innerHTML=keyboards.map(device=>{const active=deviceKey(device)===state.loadedDevice;return ``;}).join(''); + $("#device-list").innerHTML=keyboards.map(device=>{const active=deviceKey(device)===state.loadedDevice;return ``;}).join('')+deviceSupportNotice(groups.unsupported,groups.other,true); $$('.device-card').forEach(card=>card.addEventListener('click',()=>{state.selectedDevice=card.dataset.device;$$('.device-card').forEach(node=>node.classList.toggle('selected',node===card));updateDeviceActions();})); + wireDeviceSupportReportActions(); $("#device-actions").hidden=false; updateDeviceActions(); refreshDisplayGeometry(); diff --git a/am_configurator/web/index.html b/am_configurator/web/index.html index 554da929..195da159 100644 --- a/am_configurator/web/index.html +++ b/am_configurator/web/index.html @@ -260,7 +260,7 @@

Lighting

USB serial

Connected keyboards

-
+
diff --git a/am_configurator/web/style.css b/am_configurator/web/style.css index 259ffeb6..faf7e3f5 100644 --- a/am_configurator/web/style.css +++ b/am_configurator/web/style.css @@ -668,6 +668,10 @@ button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus- .device-card.active-device .pill { color: var(--green); border-color: rgba(83,223,157,.38); background: rgba(83,223,157,.08); } .device-card strong { display: block; } .device-card small { color: var(--muted); display: block; margin-top: 4px; } +.device-support-notice { border: 1px solid rgba(255,189,89,.34); background: rgba(255,189,89,.07); border-radius: 11px; padding: 14px; } +.device-support-notice strong { color: #ffd58f; display: block; } +.device-support-notice p, .device-support-notice small { color: var(--muted); display: block; font-size: 13px; line-height: 1.5; margin: 5px 0 0; } +.device-support-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; } .device-actions { margin-top: 14px; display: flex; justify-content: flex-end; gap: 8px; } .dialog-note { color: var(--muted); line-height: 1.5; font-size: 13px; margin: 18px 0 0; } .incompatible-dialog { width: min(650px, calc(100vw - 40px)); } diff --git a/tests/test_app.py b/tests/test_app.py index 826f9d52..6f31939b 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -2438,6 +2438,47 @@ def offline_discovery(): self.assertEqual(1, len(workers)) self.assertTrue(workers[0].startswith("am-device-io")) + def test_device_scan_marks_supported_and_unknown_keyboards(self) -> None: + from am_configurator.transport import DeviceHandle + + def fake_discovery(): + return [ + ( + DeviceHandle("serial", "/dev/known"), + {"product_id": "CB04", "is_keyboard": True}, + ), + ( + DeviceHandle("serial", "/dev/future"), + {"product_id": "FUTURE80", "is_keyboard": True}, + ), + ] + + isolated_server, url = create_server(device_discovery=fake_discovery) + isolated_thread = threading.Thread( + target=isolated_server.serve_forever, + daemon=True, + ) + isolated_thread.start() + try: + token = parse_qs(urlparse(url).query)["token"][0] + request = Request( + f"http://127.0.0.1:{isolated_server.server_port}/api/devices", + headers={"X-AM-Token": token}, + ) + with urlopen(request, timeout=5) as response: + payload = json.loads(response.read()) + self.assertEqual(200, response.status) + finally: + isolated_server.shutdown() + isolated_server.server_close() + isolated_thread.join(timeout=2) + + support = { + device["product_id"]: device["supported"] + for device in payload["devices"] + } + self.assertEqual({"CB04": True, "FUTURE80": False}, support) + def test_support_report_route_is_read_only_and_sanitized(self) -> None: from am_configurator.transport import DeviceHandle diff --git a/tests/web/app_shell.test.js b/tests/web/app_shell.test.js index ee11e8a2..0d76e8bc 100644 --- a/tests/web/app_shell.test.js +++ b/tests/web/app_shell.test.js @@ -40,6 +40,47 @@ test("empty state offers connect and open as primary tasks with no merge concept assert.doesNotMatch(html, /Local keyboard studio/); }); +test("unsupported keyboards stay reportable but outside supported device actions", () => { + const groupsStart = js.indexOf("function deviceSupportGroups"); + const groupsEnd = js.indexOf("\nfunction supportReportJson", groupsStart); + assert.ok(groupsStart >= 0 && groupsEnd > groupsStart); + const deviceSupportGroups = new Function( + `${js.slice(groupsStart, groupsEnd)}; return deviceSupportGroups;` + )(); + const supported = {product_id:"CB04",is_keyboard:true,supported:true}; + const unknown = {product_id:"FUTURE80",is_keyboard:true,supported:false}; + const dongle = {product_id:"DONGLE",is_keyboard:false,supported:false}; + assert.deepEqual(deviceSupportGroups([supported,unknown,dongle]), { + supported:[supported], + unsupported:[unknown], + other:[dongle], + }); + + const scanStart = js.indexOf("async function scanDevices"); + const scanEnd = js.indexOf("\nasync function readDevice", scanStart); + const scan = js.slice(scanStart, scanEnd); + assert.match(scan, /const groups=deviceSupportGroups\(\)/); + assert.match(scan, /const keyboards=groups\.supported/); + assert.match(scan, /deviceSupportNotice\(groups\.unsupported,groups\.other,true\)/); + assert.match(scan, /wireDeviceSupportReportActions\(\)/); +}); + +test("unsupported keyboard report UI is read-only, explicit, and local", () => { + const helpersStart = js.indexOf("function supportReportJson"); + const helpersEnd = js.indexOf("\nasync function scanDevices", helpersStart); + const helpers = js.slice(helpersStart, helpersEnd); + assert.match(helpers, /api\('\/api\/devices\/support-report'\)/); + assert.match(helpers, /Copy support report/); + assert.match(helpers, /Save report/); + assert.match(helpers, /Nothing is posted automatically/); + assert.match(helpers, /navigator\.clipboard\?\.writeText/); + assert.match(helpers, /document\.execCommand\?\.\('copy'\)/); + assert.match(helpers, /AM-Configurator-device-support-report\.json/); + assert.doesNotMatch(helpers, /method\s*:\s*['"]POST['"]/); + assert.match(html, /id="device-list"[^>]*aria-live="polite"/); + assert.match(css, /\.device-support-notice/); +}); + test("merge is contextual: absent without a document, offered for key-only exports", () => { assert.match(html, /