ktx/packages/cli/test/context/core
Andrey Avtomonov 852ac8a836 fix(git): scope the dirty-main squash guard to staged changes only
The previous guard rejected any uncommitted tracked change (git status
--untracked-files=no), which also caught unstaged edits like a ktx.yaml that
setup writes during the flow and commits only after the context build — so the
guard wrongly blocked setup context builds and ingest (8 local-bundle-ingest
cases failed with 'uncommitted changes (ktx.yaml)').

The actual hazard is the index, not the working tree: 'git commit' captures only
staged changes, and the auto_commit:false residue is staged by 'git merge
--squash'. Narrow the check to 'git diff --cached' so only pre-existing staged
changes are refused; unstaged working-tree edits proceed untouched (never
committed by the squash). Adds a regression test that an unstaged tracked change
does not block the merge and is neither committed nor discarded.
2026-06-09 14:55:08 +02:00
..
abort.test.ts feat(cli): add ingest LLM rate-limit governor with paced retries (#261) 2026-06-05 12:10:27 +02:00
config-reference.test.ts test: split cli tests from source tree (#216) 2026-05-26 08:49:05 +02:00
git.service.assert-worktree-clean.test.ts test: split cli tests from source tree (#216) 2026-05-26 08:49:05 +02:00
git.service.delete-directories.test.ts test: split cli tests from source tree (#216) 2026-05-26 08:49:05 +02:00
git.service.patch.test.ts test: split cli tests from source tree (#216) 2026-05-26 08:49:05 +02:00
git.service.reset-hard.test.ts test: split cli tests from source tree (#216) 2026-05-26 08:49:05 +02:00
git.service.test.ts fix(git): scope the dirty-main squash guard to staged changes only 2026-06-09 14:55:08 +02:00
session-worktree.service.test.ts test: split cli tests from source tree (#216) 2026-05-26 08:49:05 +02:00