refactor: remove remote module install, extract bread-sync, make CI real

Security:
- Remove `bread modules install github:…`. Remote fetch pulled unreviewed
  third-party Lua and ran it with full bread.exec() privileges in an
  unsandboxed runtime. Module install is now local-only; parse_source
  rejects github:/git: with an explicit message.

bread-sync extracted from the workspace (parked for its own project):
- Removed from workspace members (now excluded); see bread-sync/EXTRACTION.md
- Removed the entire `bread sync` CLI surface and now-unused deps
  (bread-sync, reqwest, tar, flate2; tempfile demoted to dev-dependency)
- Removed the sync.status IPC method from breadd plus its integration tests
- Moved the generic `expand_path` helper into bread-shared (with unit tests)

CI now actually runs and gates quality:
- Trigger on master/dev (was `main` — CI had never run, not once)
- Added `cargo fmt --check` and `clippy -D warnings`; fixed 4 clippy warnings
- Dropped the macOS matrix entry (breadd is Linux-only: udev/rtnetlink);
  added the libudev-dev system dependency the Linux build needs

Hardening / honesty:
- New ipc test: daemon survives repeated reloads and the event pipeline
  resumes (the prior suite only had a single happy-path reload check)
- Docs scrubbed of sync across README/Documentation/Overview/DAEMON
- "production-ready" and "compositor-agnostic" claims reworded to match
  reality rather than aspiration

Note: bread-sync/src/export.rs held pre-existing local WIP authored outside
this change set and is intentionally excluded from this commit.
This commit is contained in:
Breadway 2026-05-17 00:22:21 +08:00
parent 3be8eec065
commit cc456b78fe
14 changed files with 202 additions and 1946 deletions

View file

@ -2,29 +2,31 @@ name: CI
on:
push:
branches: [ main ]
branches: [ master, dev ]
pull_request:
branches: [ main ]
branches: [ master, dev ]
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
rust: [stable]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
toolchain: stable
components: clippy, rustfmt
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libudev-dev pkg-config
- name: Cargo cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
. -> target
- name: Format check
run: cargo fmt --all --check
- name: Clippy
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Build
run: cargo build --workspace --verbose
- name: Run tests
@ -34,9 +36,9 @@ jobs:
- name: Package artifacts
run: |
mkdir -p dist
tar -czf dist/bread-${{ matrix.os }}.tgz target/release/breadd target/release/bread-cli
tar -czf dist/bread-ubuntu-latest.tgz target/release/breadd target/release/bread-cli
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: bread-${{ matrix.os }}
name: bread-ubuntu-latest
path: dist/*.tgz