chore(legacy): remove ekb-mcp migration layer, approval db compat shim, and stale daily notes
The ekb-mcp -> hose-use rename migration (LEGACY_* constants, syncLegacyEnterprisesDir/syncLegacyGlobalConfig with 7-day grace cleanup, dual-source enterprises resolution) has completed its job: legacy data self-deleted on active machines years of grace ago. Config resolution now returns the single primary ~/.config/hose-use source; startup no longer scans the legacy dir. - core/config/loader.ts: drop legacy constants, sync functions, and LEGACY path from diagnostics candidates; loader.test.ts drops the three legacy-migration cases - domains/approval/db.ts deleted: pure pass-through over core/db whose consumers (repository.ts) already call core/db directly; the four test files now import getDatabase/closeDatabase from core/db - scripts/dev-hygiene.ts: drop the config.legacy finding and legacyConfig snapshot field - docs/daily/* removed: Python-era (ekb-cli/ekb-mcp) notes describing commands and architecture that no longer exist (preserved in git history) No behavior change on machines without legacy data: tsc clean, 313 tests pass (316 minus the 3 removed legacy cases).
This commit is contained in:
1 parent
70fbbe22df
commit
95eb8ee676
13 files changed
+17
-451
No files matched your search
@@ -39,7 +39,6 @@ describe("dev hygiene tooling", () => {
|
||||
unreachableCommits: ["deadbeef"],
|
||||
skill: {} as any,
|
||||
binaries: [],
|
||||
legacyConfig: {} as any,
|
||||
};
|
||||
const plan = buildCleanupPlan(snapshot, false);
|
||||
expect(plan.map((action) => action.target)).toEqual(["/tmp/merged", "feat/merged"]);
|
||||
|
||||
@@ -90,12 +90,6 @@ interface HygieneSnapshot {
|
||||
matches: boolean;
|
||||
error?: string;
|
||||
}>;
|
||||
legacyConfig: {
|
||||
enterprisesDir: string;
|
||||
configFile: string;
|
||||
enterprisesDirExists: boolean;
|
||||
configFileExists: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface HygieneReport {
|
||||
@@ -304,13 +298,6 @@ function inspectBinary(name: string): HygieneSnapshot["binaries"][number] {
|
||||
}
|
||||
}
|
||||
|
||||
function parseLegacyConfig(): HygieneSnapshot["legacyConfig"] {
|
||||
const home = homedir();
|
||||
const enterprisesDir = join(home, ".cache", "ekb-mcp", "enterprises");
|
||||
const configFile = join(home, ".cache", "ekb-mcp", "config.json");
|
||||
return { enterprisesDir, configFile, enterprisesDirExists: existsSync(enterprisesDir), configFileExists: existsSync(configFile) };
|
||||
}
|
||||
|
||||
function collectSnapshot(): HygieneSnapshot {
|
||||
return {
|
||||
repository: parseRepository(),
|
||||
@@ -319,7 +306,6 @@ function collectSnapshot(): HygieneSnapshot {
|
||||
unreachableCommits: parseUnreachableCommits(),
|
||||
skill: parseSkill(),
|
||||
binaries: [inspectBinary("hose-use"), inspectBinary("hose-aipro")],
|
||||
legacyConfig: parseLegacyConfig(),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -370,10 +356,6 @@ function buildFindings(snapshot: HygieneSnapshot): Finding[] {
|
||||
findings.push({ id: "binary.drift", level: "warning", message: `${binary.name} 全局版本与当前源码不一致`, details: binary, nextAction: "运行 bun run dev:override 同步全局开发版" });
|
||||
}
|
||||
}
|
||||
const legacy = snapshot.legacyConfig;
|
||||
if (legacy.enterprisesDirExists || legacy.configFileExists) {
|
||||
findings.push({ id: "config.legacy", level: "warning", message: "发现旧版 ekb-mcp 配置路径;检查不会删除配置", details: legacy, nextAction: "先确认迁移结果,再按配置迁移策略清理" });
|
||||
}
|
||||
return findings;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user