ktx/packages/cli
Andrey Avtomonov f446d207ba fix(git): refuse squash-merge into a dirty main working tree
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.
2026-06-09 14:27:53 +02:00
..
assets/demo/orbit Polish documentation copy (#98) 2026-05-14 12:43:14 -04:00
scripts chore(workspace): gate dead-code with knip production mode (#196) 2026-05-21 15:28:58 +02:00
src fix(git): refuse squash-merge into a dirty main working tree 2026-06-09 14:27:53 +02:00
test fix(git): refuse squash-merge into a dirty main working tree 2026-06-09 14:27:53 +02:00
package.json chore(release): 0.10.0 [skip ci] 2026-06-08 14:47:15 +00:00
tsconfig.json chore(workspace): gate dead-code with knip production mode (#196) 2026-05-21 15:28:58 +02:00
tsconfig.test.json test: split cli tests from source tree (#216) 2026-05-26 08:49:05 +02:00
vitest.config.ts test: split cli tests from source tree (#216) 2026-05-26 08:49:05 +02:00