mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-10 08:05:14 +02:00
The auto_commit:false path (stageSquashMergeIntoMain) leaves main staged, but the shared squash helper assumed a clean target. A later ingest/memory run merging into that dirty index would 'git commit' the prior run's staged files under the new run's commit (contamination), and conflict cleanup's 'reset --hard HEAD' would discard them (data loss). Guard applySquashToIndex: if the target worktree has uncommitted tracked changes, refuse before merging and return a 'dirty' result (untracked/gitignored files are ignored — the squash never commits them). Callers surface it cleanly: the bundle runner fails the run with an actionable message; the memory agent rolls back its eager DB writes (like a conflict) so the DB never gets ahead of main. Main is left untouched in every case. |
||
|---|---|---|
| .. | ||
| connections | ||
| core | ||
| daemon | ||
| index-sync | ||
| ingest | ||
| llm | ||
| mcp | ||
| memory | ||
| project | ||
| prompts | ||
| scan | ||
| search | ||
| skills | ||
| sl | ||
| sql-analysis | ||
| test | ||
| tools | ||
| wiki | ||