Files
Affaan Mustafa a352ed4c87 fix(install): reject target roots inside the ECC source repo
Running the installer from inside the source repo without a separate
project root made managed writes land in the source tree. A v2.1.0-era
self-run did exactly this, mirroring 457 files into the repo's own
.kimi/ (compat-docs-only directory) which later got committed.

planInstallTargetScaffold now resolves the target root before planning
operations and raises a blocking 'target-root-inside-repo-root'
validation error when it falls inside repoRoot, across all adapters
and scopes. The existing exemptValidationCodes channel remains as an
explicit escape hatch, with the issue still recorded in the plan.

Tests: self-install default (projectRoot omitted), nested projectRoot,
and the exemption path. Verified end-to-end via resolveInstallPlan
with target kimi against the repo root: guard fires; exemption plans
61 ops as before.
2026-08-30 23:24:05 -04:00
..