Skip to content
This repository was archived by the owner on Apr 11, 2026. It is now read-only.

Commit 5963005

Browse files
z23ccclaude
andcommitted
feat(flowctl-rust): complete platform rewrite — all 29 tasks implemented
6-crate Cargo workspace (core, db, scheduler, cli, daemon, tui) with: - 65+ CLI commands ported from Python with identical JSON output - Markdown canonical + SQLite cache data architecture - YAML frontmatter parser (serde-saphyr) with round-trip safety - petgraph DAG with Kahn's algorithm, cycle detection, critical path - Daemon with PID lock, Unix socket, graceful shutdown (CancellationToken) - TUI dashboard (4 tabs: Tasks, DAG, Logs, Stats) with ratatui - Event bus (broadcast + mpsc), HTTP API (axum), WebSocket streaming - DAG scheduler with bounded parallelism (Semaphore), heartbeat watchdog - File watcher (notify) with debouncing, circuit breaker - Stats dashboard with DORA metrics, token tracking, auto-cleanup - upstream_failed propagation, retry logic, shell completions - miette diagnostics for rich error display - Python shim dispatch (FLOWCTL_RUST=1) - Integration tests (Rust vs Python parity), 224 unit tests - cargo-dist config, install.sh, release workflow Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7c9d43e commit 5963005

116 files changed

Lines changed: 26352 additions & 63 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Rust CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "flowctl/**"
8+
- ".github/workflows/ci.yml"
9+
pull_request:
10+
paths:
11+
- "flowctl/**"
12+
- ".github/workflows/ci.yml"
13+
14+
env:
15+
CARGO_TERM_COLOR: always
16+
17+
defaults:
18+
run:
19+
working-directory: flowctl
20+
21+
jobs:
22+
check:
23+
name: Check / Test / Lint
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- name: Install Rust toolchain
29+
uses: dtolnay/rust-toolchain@stable
30+
with:
31+
components: clippy, rustfmt
32+
33+
- name: Cache cargo registry & build
34+
uses: actions/cache@v4
35+
with:
36+
path: |
37+
~/.cargo/registry
38+
~/.cargo/git
39+
flowctl/target
40+
key: ${{ runner.os }}-cargo-${{ hashFiles('flowctl/Cargo.lock') }}
41+
restore-keys: ${{ runner.os }}-cargo-
42+
43+
- name: cargo fmt --check
44+
run: cargo fmt --all -- --check
45+
46+
- name: cargo clippy
47+
run: cargo clippy --all-targets -- -D warnings
48+
49+
- name: cargo build
50+
run: cargo build --all-targets
51+
52+
- name: cargo test
53+
run: cargo test --all-targets

.github/workflows/release.yml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
14+
defaults:
15+
run:
16+
working-directory: flowctl
17+
18+
jobs:
19+
build:
20+
name: Build ${{ matrix.target }}
21+
runs-on: ${{ matrix.os }}
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
include:
26+
- target: x86_64-unknown-linux-gnu
27+
os: ubuntu-latest
28+
- target: aarch64-unknown-linux-gnu
29+
os: ubuntu-latest
30+
- target: x86_64-apple-darwin
31+
os: macos-latest
32+
- target: aarch64-apple-darwin
33+
os: macos-latest
34+
- target: x86_64-pc-windows-msvc
35+
os: windows-latest
36+
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- name: Install Rust toolchain
41+
uses: dtolnay/rust-toolchain@stable
42+
with:
43+
targets: ${{ matrix.target }}
44+
45+
- name: Install cross-compilation tools (Linux aarch64)
46+
if: matrix.target == 'aarch64-unknown-linux-gnu'
47+
run: |
48+
sudo apt-get update
49+
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
50+
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> "$GITHUB_ENV"
51+
52+
- name: Cache cargo registry & build
53+
uses: actions/cache@v4
54+
with:
55+
path: |
56+
~/.cargo/registry
57+
~/.cargo/git
58+
flowctl/target
59+
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('flowctl/Cargo.lock') }}
60+
restore-keys: ${{ runner.os }}-${{ matrix.target }}-cargo-
61+
62+
- name: Build release binary
63+
run: cargo build --release --target ${{ matrix.target }} -p flowctl-cli
64+
65+
- name: Determine binary name
66+
id: bin
67+
shell: bash
68+
run: |
69+
if [[ "${{ matrix.target }}" == *windows* ]]; then
70+
echo "name=flowctl.exe" >> "$GITHUB_OUTPUT"
71+
echo "archive=flowctl-${{ github.ref_name }}-${{ matrix.target }}.zip" >> "$GITHUB_OUTPUT"
72+
else
73+
echo "name=flowctl" >> "$GITHUB_OUTPUT"
74+
echo "archive=flowctl-${{ github.ref_name }}-${{ matrix.target }}.tar.gz" >> "$GITHUB_OUTPUT"
75+
fi
76+
77+
- name: Package (Unix)
78+
if: "!contains(matrix.target, 'windows')"
79+
run: |
80+
cd target/${{ matrix.target }}/release
81+
tar czf "../../../${{ steps.bin.outputs.archive }}" ${{ steps.bin.outputs.name }}
82+
83+
- name: Package (Windows)
84+
if: contains(matrix.target, 'windows')
85+
shell: bash
86+
run: |
87+
cd target/${{ matrix.target }}/release
88+
7z a "../../../${{ steps.bin.outputs.archive }}" ${{ steps.bin.outputs.name }}
89+
90+
- name: Generate SHA256
91+
shell: bash
92+
run: |
93+
if [[ "$RUNNER_OS" == "macOS" ]]; then
94+
shasum -a 256 "${{ steps.bin.outputs.archive }}" > "${{ steps.bin.outputs.archive }}.sha256"
95+
else
96+
sha256sum "${{ steps.bin.outputs.archive }}" > "${{ steps.bin.outputs.archive }}.sha256"
97+
fi
98+
99+
- name: Upload artifacts
100+
uses: actions/upload-artifact@v4
101+
with:
102+
name: ${{ matrix.target }}
103+
path: |
104+
flowctl/${{ steps.bin.outputs.archive }}
105+
flowctl/${{ steps.bin.outputs.archive }}.sha256
106+
107+
release:
108+
name: Create GitHub Release
109+
needs: build
110+
runs-on: ubuntu-latest
111+
steps:
112+
- uses: actions/checkout@v4
113+
114+
- name: Download all artifacts
115+
uses: actions/download-artifact@v4
116+
with:
117+
path: artifacts
118+
merge-multiple: true
119+
120+
- name: Create release
121+
uses: softprops/action-gh-release@v2
122+
with:
123+
generate_release_notes: true
124+
files: |
125+
artifacts/*

0 commit comments

Comments
 (0)