Skip to content

Commit bc0645c

Browse files
committed
Bump version to 0.2.25: SQLite-first persistence, skip JSON file writes for tasks/requirements
- Persist tasks/requirements to SQLite before clearing dirty flags - Remove redundant per-file writes (tasks/requirements now SQLite-only) - Skip serializing tasks/requirements in JSON state file - Remove unused db_path method from state_manager
1 parent ea4cf03 commit bc0645c

5 files changed

Lines changed: 10 additions & 25 deletions

File tree

.claude/settings.local.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@
144144
"Bash(for d:*)",
145145
"Bash(npm run:*)",
146146
"Bash(gh api:*)",
147-
"Bash(bash /Users/samishukri/.local/bin/ao-fleet-monitor.sh 2>&1)"
147+
"Bash(bash /Users/samishukri/.local/bin/ao-fleet-monitor.sh 2>&1)",
148+
"Bash(sqlite3 ~/.ao/ao-cli-1222ef9c4f94/workflow.db \"SELECT COUNT\\(*\\) as tasks FROM tasks; SELECT COUNT\\(*\\) as reqs FROM requirements;\")"
148149
]
149150
},
150151
"enableAllProjectMcpServers": true,

crates/orchestrator-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "orchestrator-cli"
3-
version = "0.2.24"
3+
version = "0.2.25"
44
edition = "2021"
55

66
[[bin]]

crates/orchestrator-core/src/services.rs

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,12 @@ impl FileServiceHub {
342342
} else {
343343
state.dirty_requirements.iter().cloned().collect()
344344
};
345-
Self::persist_and_clear_dirty(&self.state_file, &mut state)?;
346345
Self::persist_dirty_to_sqlite(&self.project_root, &state, &dirty_task_ids, &dirty_req_ids);
346+
state.dirty_tasks.clear();
347+
state.dirty_requirements.clear();
348+
state.all_tasks_dirty = false;
349+
state.all_requirements_dirty = false;
350+
Self::persist_and_clear_dirty(&self.state_file, &mut state)?;
347351
Ok((output, state.clone()))
348352
}
349353

@@ -612,9 +616,6 @@ impl FileServiceHub {
612616
let architecture_json_path = docs_dir.join("architecture.json");
613617
std::fs::write(&architecture_json_path, serde_json::to_string_pretty(&snapshot.architecture)?)?;
614618

615-
Self::write_requirement_files(path, snapshot, None)?;
616-
Self::write_task_files(path, snapshot, None)?;
617-
618619
Ok(())
619620
}
620621

@@ -640,21 +641,7 @@ impl FileServiceHub {
640641
let architecture_json_path = docs_dir.join("architecture.json");
641642
std::fs::write(&architecture_json_path, serde_json::to_string_pretty(&state.architecture)?)?;
642643

643-
if state.all_tasks_dirty || !state.dirty_tasks.is_empty() {
644-
let only = if state.all_tasks_dirty { None } else { Some(&state.dirty_tasks) };
645-
Self::write_task_files(path, state, only)?;
646-
}
647-
648-
if state.all_requirements_dirty || !state.dirty_requirements.is_empty() {
649-
let only = if state.all_requirements_dirty { None } else { Some(&state.dirty_requirements) };
650-
Self::write_requirement_files(path, state, only)?;
651-
}
652644
}
653-
654-
state.dirty_tasks.clear();
655-
state.dirty_requirements.clear();
656-
state.all_tasks_dirty = false;
657-
state.all_requirements_dirty = false;
658645
Ok(())
659646
}
660647

crates/orchestrator-core/src/services/state_store.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ pub(super) struct CoreState {
1111
pub(super) logs: Vec<LogEntry>,
1212
pub(super) active_project_id: Option<String>,
1313
pub(super) projects: HashMap<String, OrchestratorProject>,
14+
#[serde(default, skip_serializing)]
1415
pub(super) tasks: HashMap<String, OrchestratorTask>,
1516
#[serde(skip)]
1617
pub(super) workflows: HashMap<String, OrchestratorWorkflow>,
1718
#[serde(default)]
1819
pub(super) vision: Option<VisionDocument>,
19-
#[serde(default)]
20+
#[serde(default, skip_serializing)]
2021
pub(super) requirements: HashMap<String, RequirementItem>,
2122
#[serde(default)]
2223
pub(super) architecture: ArchitectureGraph,

crates/orchestrator-core/src/workflow/state_manager.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,6 @@ impl WorkflowStateManager {
326326
Ok(serde_json::from_str(&json)?)
327327
}
328328

329-
fn db_path(&self) -> PathBuf {
330-
db_path_for_project(&self.project_root)
331-
}
332-
333329
fn open_db(&self) -> Result<Connection> {
334330
open_project_db(&self.project_root)
335331
}

0 commit comments

Comments
 (0)