fix: resolve issue cluster (#2295,#2298,#2303,#2304,#2305,#2306,#2340) + createdTime fallback bug

- session-manager: fix createdTime birthtime||ctime fallback that never fired
  (a Date is always truthy); use birthtimeMs>0 check via resolveCreatedTime()
- installer: rewrite source-relative rules/skills links for the injected
  ecc/ namespace so installed skills resolve correctly (#2340)
- continuous-learning-v2: drop unused mock import (#2305); standardize bash
  shebangs (#2303); poll for PID file instead of fixed sleep (#2295);
  rename _ecc_* -> _clv2_* (#2304); align promotion confidence docs (#2298);
  de-brittle Scope Decision Guide cross-reference (#2306)

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
affaan
2026-06-30 21:45:33 +00:00
parent 81af407619
commit 9a70d61a0e
16 changed files with 260 additions and 43 deletions
+33
View File
@@ -5,6 +5,29 @@ const path = require('path');
const { writeInstallState } = require('../install-state');
const { filterMcpConfig, parseDisabledMcpServers } = require('../mcp-config');
const { rewriteNamespaceLinks } = require('./rewrite-namespace-links');
const CLAUDE_ECC_NAMESPACE = 'ecc';
// Claude home/project installs inject `skills/ecc/` and `rules/ecc/`. Markdown
// copied under those namespaced roots may carry source-relative links to a
// sibling top-level dir that break post-install; rewrite them on copy.
function getNamespaceLinkRewrite(plan, destinationPath) {
if (!plan.adapter || (plan.adapter.target !== 'claude' && plan.adapter.target !== 'claude-project')) {
return null;
}
if (!plan.targetRoot || !destinationPath.toLowerCase().endsWith('.md')) {
return null;
}
const namespacedRoots = [
path.join(plan.targetRoot, 'skills', CLAUDE_ECC_NAMESPACE) + path.sep,
path.join(plan.targetRoot, 'rules', CLAUDE_ECC_NAMESPACE) + path.sep,
];
if (!namespacedRoots.some(root => destinationPath.startsWith(root))) {
return null;
}
return CLAUDE_ECC_NAMESPACE;
}
function readJsonObject(filePath, label) {
let parsed;
@@ -149,6 +172,16 @@ function applyInstallPlan(plan) {
continue;
}
const namespace = operation.kind === 'copy-file'
? getNamespaceLinkRewrite(plan, operation.destinationPath)
: null;
if (namespace) {
const original = fs.readFileSync(operation.sourcePath, 'utf8');
const rewritten = rewriteNamespaceLinks(original, namespace);
fs.writeFileSync(operation.destinationPath, rewritten, 'utf8');
continue;
}
fs.copyFileSync(operation.sourcePath, operation.destinationPath);
}