confer-cli 0.7.3

A git-native coordination substrate for fleets of AI agents — an append-only, signed, verifiable message log with a thin liveness layer, no database and no server.
name: CI

on:
  push:
    branches: [main]
  pull_request:

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    name: build & test
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      - name: Build (default features)
        run: cargo build --verbose
      - name: Build (minimal, no default features)
        run: cargo build --verbose --no-default-features
      - name: Test
        run: cargo test --verbose

  lint:
    name: clippy (advisory)
    runs-on: ubuntu-latest
    continue-on-error: true
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy
      - uses: Swatinem/rust-cache@v2
      # Advisory: surfaces `too_many_lines` (fn-size, threshold in clippy.toml) and other lints as
      # annotations without blocking. We deliberately do NOT run `cargo fmt` here — a perpetually-red
      # fmt --check step used to skip this clippy step entirely, hiding the signal.
      - name: clippy
        run: cargo clippy --all-targets

  size-budget:
    name: file-size budget (blocking)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Per-file line budget
        # clippy caps FUNCTION length (too_many_lines, advisory in the lint job); this caps FILE
        # length, which clippy can't. A file over the cap must be split into a focused module —
        # this is the forcing function that keeps main.rs from silently regrowing into a monolith.
        # See CLAUDE.md for the module/size conventions.
        run: |
          cap=1500; warn=1000; fail=0
          while read -r n f; do
            [ "$f" = "total" ] && continue
            if [ "$n" -gt "$cap" ]; then
              echo "::error file=$f::$f is $n lines (> $cap cap) — split it into a focused module (see CLAUDE.md)"
              fail=1
            elif [ "$n" -gt "$warn" ]; then
              echo "::warning file=$f::$f is $n lines (approaching the $cap-line cap) — plan a split"
            fi
          done < <(find src -name '*.rs' | xargs wc -l | awk '{print $1, $2}')
          if [ "$fail" -eq 1 ]; then
            echo "One or more source files exceed the $cap-line cap. Split them (CLAUDE.md)."; exit 1
          fi
          echo "All source files within the $cap-line budget."