Commit graph

19 commits

Author SHA1 Message Date
Breadway
d3c1e19ba3 Release v2.1.0: backend test seam, captive-portal detection, JSON status, robustness
Features:
- Introduce a Backend trait + System impl so flow/status/watch can be unit
  tested against a fake; add 11 connect-state-machine tests.
- Captive-portal detection: status::connectivity returns Online/Portal/Offline;
  surfaced in status, JSON, connect notes, and a dedicated watch state.
- `status --json` for bars/scripts; `profile add`/`profile remove`; detect now
  scores by number of in-range markers.

Robustness:
- Pin LC_ALL=C/LANG=C on child processes for locale-independent parsing.
- Atomic config/state writes (temp + rename); 0600 config never world-readable.
- Transient PSK file written to $XDG_RUNTIME_DIR when available.

Fixes (from prior audit):
- Feed Wi-Fi PSK to nmcli via stdin/passwd-file, never argv.
- mask() no longer panics on multi-byte passwords.
- Connectivity check requires HTTP 204 (no captive-portal false positives).
- nmcli NAME,TYPE parsing handles escaped colons.
- Strip CIDR suffix from displayed IP; PKGBUILD/Cargo version aligned (2.1.0).
2026-06-23 12:13:34 +08:00
Breadway
8aceab7857 CI: use /tmp for ecosystem clone; fix rustfmt violations
All checks were successful
Mirror to GitHub / mirror (push) Successful in 2s
2026-06-19 08:38:40 +08:00
Breadway
d177cc8d82 Disable debug package so the main package publishes correctly
Some checks failed
Mirror to GitHub / mirror (push) Successful in 2s
Build and publish package / package (push) Failing after 1m19s
makepkg's debug split produced a -debug pkg; the upload's head -1 could
grab it instead of the main package. !debug yields a single package.
2026-06-13 23:00:51 +08:00
Breadway
6ec21a84aa Use REGISTRY_TOKEN (scoped write:package) for registry publish
Some checks failed
Mirror to GitHub / mirror (push) Successful in 2s
Build and publish package / package (push) Failing after 1m39s
2026-06-13 22:55:42 +08:00
Breadway
d8ddf311e5 Disable LTO in PKGBUILD (vendored ring/mlua static libs vs makepkg -flto) 2026-06-13 17:06:56 +08:00
Breadway
e484fd014a Clone from public URL, not GITHUB_SERVER_URL (resolves to localhost in runner)
The Forgejo runner injects GITHUB_SERVER_URL as http://localhost:3002, which
is unreachable from inside the job container. Use the public URL instead.
2026-06-13 16:14:15 +08:00
Breadway
be53cb6cd6 Rename mirror secret to MIRROR_TOKEN (GITHUB_ prefix is reserved)
Forgejo/gitea rejects user secret names starting with GITHUB_.
2026-06-13 16:10:50 +08:00
Breadway
f5c47a877e Fix Forgejo workflows for the actual server capabilities
- package.yml: correct Arch registry upload (octet-stream + binary body),
  drop --privileged, manual shell clone (archlinux image has no Node),
  built-in Actions token, --nocheck
- mirror.yml: clone --mirror + explicit refs push with --prune
2026-06-13 16:02:23 +08:00
Breadway
076e175672 Add packaging/arch PKGBUILD and Forgejo Actions workflows
- packaging/arch/PKGBUILD: builds and publishes breadcrumbs to [breadway] repo
- .forgejo/workflows/mirror.yml: mirrors every push/tag to GitHub
- .forgejo/workflows/package.yml: builds on tag, publishes to Forgejo registry

Requires FORGEJO_TOKEN and GITHUB_MIRROR_TOKEN secrets in Forgejo.
2026-06-13 12:12:42 +08:00
Breadway
9c963424bd chore: update Cargo.lock for v2.0.1
Some checks failed
release / build (push) Failing after 8s
2026-06-11 14:28:06 +08:00
Breadway
5939362fcc chore: bump version to 2.0.1 2026-06-11 14:21:47 +08:00
Breadway
690bcad697 fix: move tailscale/sudo/xdg-utils to optional_system_deps
Core WiFi management works without Tailscale. tailscale, sudo, and
xdg-utils are only needed for Tailscale login and URL-open features,
so they become optional (warn, don't block) instead of required.
2026-06-11 13:38:06 +08:00
Breadway
ef77a02e77 Fix update looping and nmcli duplicate profiles 2026-06-07 10:14:18 +08:00
Breadway
586bc3a285 fix: use relative symlink for latest to work inside Docker containers 2026-06-07 09:02:38 +08:00
Breadway
af7fc462e1 fix: add contents: write permission for GitHub Release creation
Some checks failed
release / build (push) Failing after 3s
2026-06-07 00:00:50 +08:00
Breadway
294bb4a5d4 fix: create GitHub Release before uploading artifacts 2026-06-06 23:52:49 +08:00
Breadway
7b9553e4cd fix: add missing build deps for hestia (Ubuntu) runner 2026-06-06 23:20:02 +08:00
Breadway
248b97c92f Add bakery.toml and release workflow; improve connect error reporting
- bakery.toml: describes breadcrumbs for bakery install
- release.yml: builds on hestia self-hosted runner, publishes binary to
  dl.breadway.dev and GitHub Releases on v* tags
- flow.rs/nm.rs: connect_and_verify now returns Result<(), String> with
  a descriptive error message instead of a bare bool
2026-06-06 22:31:29 +08:00
Breadway
3422c12379 Initial commit: breadcrumbs — profile-driven Wi-Fi + Tailscale state machine 2026-05-19 11:52:46 +08:00