refactor: CI optimization, logging improvements, and codebase formatting (#456)

* fix(db): remove unique constraint on folder to support multi-channel agents

* ci: implement automated skill drift detection and self-healing PRs

* fix: align registration logic with Gavriel's feedback and fix build/test issues from Daniel Mi

* style: conform to prettier standards for CI validation

* test: fix branch naming inconsistency in CI (master vs main)

* fix(ci): robust module resolution by removing file extensions in scripts

* refactor(ci): simplify skill validation by removing redundant combination tests

* style: conform skills-engine to prettier, unify logging in index.ts and cleanup unused imports

* refactor: extract multi-channel DB changes to separate branch

Move channel column, folder suffix logic, and related migrations
to feat/multi-channel-db-v2 for independent review. This PR now
contains only CI/CD optimizations, Prettier formatting, and
logging improvements.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Gabi Simons
2026-02-25 23:13:36 +02:00
committed by GitHub
parent bd2e236f73
commit 11c201088b
76 changed files with 2333 additions and 1308 deletions

View File

@@ -229,9 +229,16 @@ export async function applyUpdate(newCorePath: string): Promise<UpdateResult> {
}
// --- Record path remaps from update metadata ---
const remapFile = path.join(newCorePath, '.nanoclaw-meta', 'path_remap.yaml');
const remapFile = path.join(
newCorePath,
'.nanoclaw-meta',
'path_remap.yaml',
);
if (fs.existsSync(remapFile)) {
const remap = parseYaml(fs.readFileSync(remapFile, 'utf-8')) as Record<string, string>;
const remap = parseYaml(fs.readFileSync(remapFile, 'utf-8')) as Record<
string,
string
>;
if (remap && typeof remap === 'object') {
recordPathRemap(remap);
}
@@ -251,11 +258,16 @@ export async function applyUpdate(newCorePath: string): Promise<UpdateResult> {
let hasNpmDeps = false;
for (const skill of state.applied_skills) {
const outcomes = skill.structured_outcomes as Record<string, unknown> | undefined;
const outcomes = skill.structured_outcomes as
| Record<string, unknown>
| undefined;
if (!outcomes) continue;
if (outcomes.npm_dependencies) {
Object.assign(allNpmDeps, outcomes.npm_dependencies as Record<string, string>);
Object.assign(
allNpmDeps,
outcomes.npm_dependencies as Record<string, string>,
);
hasNpmDeps = true;
}
if (outcomes.env_additions) {
@@ -292,7 +304,9 @@ export async function applyUpdate(newCorePath: string): Promise<UpdateResult> {
const skillReapplyResults: Record<string, boolean> = {};
for (const skill of state.applied_skills) {
const outcomes = skill.structured_outcomes as Record<string, unknown> | undefined;
const outcomes = skill.structured_outcomes as
| Record<string, unknown>
| undefined;
if (!outcomes?.test) continue;
const testCmd = outcomes.test as string;
@@ -339,4 +353,3 @@ export async function applyUpdate(newCorePath: string): Promise<UpdateResult> {
releaseLock();
}
}