Skip to content

Commit fea928a

Browse files
authored
Merge develop and resolve conflicts
2 parents b0e662c + 670aa98 commit fea928a

112 files changed

Lines changed: 3411 additions & 1203 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.

.beads/issues.jsonl

Lines changed: 15 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/build.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ jobs:
8484
# Running `security list-keychain -d user -s <keychain>` before the build
8585
# replaces the keychain search list and breaks DMG bundling on tag runs.
8686
- name: Build Tauri app
87-
run: bun run desktop:build
87+
run: |
88+
# unset the certificate and password so the runner can't influence the build
89+
export APPLE_SIGNING_IDENTITY="-"
90+
unset APPLE_CERTIFICATE APPLE_CERTIFICATE_PASSWORD KEYCHAIN_PASSWORD
91+
bun run desktop:build
8892
shell: 'sops exec-env ops/secrets/secrets.yaml "bash -e {0}"'
8993
env:
9094
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/evaluate.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Evaluate
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
merge_group:
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: evaluate-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
rust-build:
18+
name: Rust Build
19+
runs-on: macos-latest
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v6
23+
- name: Install Rust
24+
uses: dtolnay/rust-toolchain@stable
25+
- name: Rust cache
26+
uses: Swatinem/rust-cache@v2
27+
with:
28+
workspaces: apps/native/src-tauri
29+
- name: Build Rust app crate
30+
working-directory: apps/native/src-tauri
31+
run: cargo build --locked
32+
33+
typescript:
34+
name: TypeScript
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v6
39+
- name: Setup Bun
40+
uses: oven-sh/setup-bun@v2
41+
- name: Install dependencies
42+
run: bun install --frozen-lockfile
43+
- name: Type-check native app
44+
working-directory: apps/native
45+
run: bunx tsc --noEmit
46+
47+
treefmt:
48+
name: Treefmt
49+
runs-on: ubuntu-latest
50+
steps:
51+
- name: Checkout repository
52+
uses: actions/checkout@v6
53+
with:
54+
fetch-depth: 0
55+
- name: Install Nix
56+
uses: cachix/install-nix-action@v31.10.6
57+
- name: Check changed Nix and shell files
58+
env:
59+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
60+
run: |
61+
set -euo pipefail
62+
63+
base="${BASE_SHA:-}"
64+
if [ -z "$base" ]; then
65+
base="$(git rev-parse HEAD^)"
66+
fi
67+
68+
git diff -z --name-only --diff-filter=ACMR "$base" HEAD -- '*.nix' '*.sh' > /tmp/treefmt-files
69+
70+
if [ ! -s /tmp/treefmt-files ]; then
71+
echo "No treefmt-covered files changed."
72+
exit 0
73+
fi
74+
75+
xargs -0 nix fmt -- --ci --formatters nixfmt --formatters shellcheck < /tmp/treefmt-files

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ build
7070
# Environment variables
7171
.env
7272
.env*.local
73+
!.envrc
7374

7475
# Turbo
7576
.turbo

apps/native/src-tauri/examples/specta_gen_ts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ fn main() {
7171
.register::<shared_types::ChangeType>()
7272
.register::<shared_types::GitFileStatus>()
7373
.register::<shared_types::GitStatus>()
74-
.register::<shared_types::WatcherEvent>()
74+
.register::<shared_types::GitState>()
7575
.register::<shared_types::EvolutionState>()
7676
.register::<shared_types::EvolutionTelemetry>()
7777
.register::<shared_types::EvolutionResult>()

apps/native/src-tauri/migrations/03-evolutions-origin-branch/up.sql

Lines changed: 0 additions & 3 deletions
This file was deleted.

apps/native/src-tauri/src/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Shared "managed edit" pattern (prepare, apply, finalize into review flow).
125125

126126
- `build_state.rs` — Last successful nix-darwin build (store path, changeset, commit hash)
127127
- `evolve_state.rs` — Frontend step-routing state machine (Begin/Evolve/Commit/ManualEvolve/ManualCommit)
128-
- `watcher.rs` — Polls git status at a configurable interval, emits `WatcherEvent` to frontend
128+
- `watcher.rs` — Polls git status at a configurable interval and emits slice update events to frontend
129129
- `completion_log.rs` — Records AI completion responses to daily JSONL files
130130

131131
**Called by:** commands, rebuild, evolve/lifecycle, main.rs (watcher startup)

apps/native/src-tauri/src/commands/git.rs

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use super::helpers::capture_err;
22
use crate::state::{build_state, evolve_state};
33
use crate::storage::store;
44
use crate::{db, git, shared_types};
5-
use tauri::AppHandle;
5+
use tauri::{AppHandle, State};
66

77
/// Returns original (HEAD) and modified (working-tree) content for each requested file.
88
#[tauri::command]
@@ -42,6 +42,7 @@ pub async fn git_status_and_cache(app: AppHandle) -> Result<shared_types::GitSta
4242
#[tauri::command]
4343
pub async fn git_commit(
4444
app: AppHandle,
45+
db_pool: State<'_, db::DbPool>,
4546
message: String,
4647
) -> Result<shared_types::CommitResult, String> {
4748
let dir = store::ensure_git_repo_folder(&app).map_err(|e| capture_err("git_commit", e))?;
@@ -56,22 +57,20 @@ pub async fn git_commit(
5657
log::warn!("[git_commit] Failed to tag commit: {}", e);
5758
}
5859

59-
if let Ok(db_path) = db::get_db_path(&app) {
60-
let now = crate::utils::unix_now();
61-
match db::commits::upsert_commit(
62-
&db_path,
63-
&commit_info.hash,
64-
&commit_info.tree_hash,
65-
Some(&message),
66-
now,
67-
) {
68-
Ok(id) => log::info!(
69-
"[git_commit] Saved commit to database (id={}, hash={})",
70-
id,
71-
&commit_info.hash[..8]
72-
),
73-
Err(e) => log::error!("[git_commit] Failed to save commit: {}", e),
74-
}
60+
let now = crate::utils::unix_now();
61+
match db::commits::upsert_commit_in_pool(
62+
&db_pool,
63+
&commit_info.hash,
64+
&commit_info.tree_hash,
65+
Some(&message),
66+
now,
67+
) {
68+
Ok(id) => log::info!(
69+
"[git_commit] Saved commit to database (id={}, hash={})",
70+
id,
71+
&commit_info.hash[..8]
72+
),
73+
Err(e) => log::error!("[git_commit] Failed to save commit: {}", e),
7574
}
7675

7776
// Update build state: new HEAD hash, no changeset (working tree is now clean).

apps/native/src-tauri/src/commands/permissions.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,3 @@ pub async fn permissions_request(
1717
permissions::request_permission(&permission_id)
1818
.map_err(|e| capture_err("permissions_request", e))
1919
}
20-

apps/native/src-tauri/src/commands/settings_io.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,9 @@ mod tests {
243243
&mut skipped,
244244
serde_json::to_value(EvolutionLimits {
245245
max_iterations: 12,
246+
max_token_budget: 80_000,
246247
max_build_attempts: 4,
248+
max_output_tokens: 16_384,
247249
})
248250
.unwrap(),
249251
false,

0 commit comments

Comments
 (0)