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

@@ -68,10 +68,17 @@ describe('structured', () => {
describe('mergeNpmDependencies', () => {
it('adds new dependencies', () => {
const pkgPath = path.join(tmpDir, 'package.json');
fs.writeFileSync(pkgPath, JSON.stringify({
name: 'test',
dependencies: { existing: '^1.0.0' },
}, null, 2));
fs.writeFileSync(
pkgPath,
JSON.stringify(
{
name: 'test',
dependencies: { existing: '^1.0.0' },
},
null,
2,
),
);
mergeNpmDependencies(pkgPath, { newdep: '^2.0.0' });
@@ -82,10 +89,17 @@ describe('structured', () => {
it('resolves compatible ^ ranges', () => {
const pkgPath = path.join(tmpDir, 'package.json');
fs.writeFileSync(pkgPath, JSON.stringify({
name: 'test',
dependencies: { dep: '^1.0.0' },
}, null, 2));
fs.writeFileSync(
pkgPath,
JSON.stringify(
{
name: 'test',
dependencies: { dep: '^1.0.0' },
},
null,
2,
),
);
mergeNpmDependencies(pkgPath, { dep: '^1.1.0' });
@@ -95,11 +109,18 @@ describe('structured', () => {
it('sorts devDependencies after merge', () => {
const pkgPath = path.join(tmpDir, 'package.json');
fs.writeFileSync(pkgPath, JSON.stringify({
name: 'test',
dependencies: {},
devDependencies: { zlib: '^1.0.0', acorn: '^2.0.0' },
}, null, 2));
fs.writeFileSync(
pkgPath,
JSON.stringify(
{
name: 'test',
dependencies: {},
devDependencies: { zlib: '^1.0.0', acorn: '^2.0.0' },
},
null,
2,
),
);
mergeNpmDependencies(pkgPath, { middle: '^1.0.0' });
@@ -110,10 +131,17 @@ describe('structured', () => {
it('throws on incompatible major versions', () => {
const pkgPath = path.join(tmpDir, 'package.json');
fs.writeFileSync(pkgPath, JSON.stringify({
name: 'test',
dependencies: { dep: '^1.0.0' },
}, null, 2));
fs.writeFileSync(
pkgPath,
JSON.stringify(
{
name: 'test',
dependencies: { dep: '^1.0.0' },
},
null,
2,
),
);
expect(() => mergeNpmDependencies(pkgPath, { dep: '^2.0.0' })).toThrow();
});
@@ -170,7 +198,10 @@ describe('structured', () => {
describe('mergeDockerComposeServices', () => {
it('adds new services', () => {
const composePath = path.join(tmpDir, 'docker-compose.yaml');
fs.writeFileSync(composePath, 'version: "3"\nservices:\n web:\n image: nginx\n');
fs.writeFileSync(
composePath,
'version: "3"\nservices:\n web:\n image: nginx\n',
);
mergeDockerComposeServices(composePath, {
redis: { image: 'redis:7' },
@@ -182,7 +213,10 @@ describe('structured', () => {
it('skips existing services', () => {
const composePath = path.join(tmpDir, 'docker-compose.yaml');
fs.writeFileSync(composePath, 'version: "3"\nservices:\n web:\n image: nginx\n');
fs.writeFileSync(
composePath,
'version: "3"\nservices:\n web:\n image: nginx\n',
);
mergeDockerComposeServices(composePath, {
web: { image: 'apache' },
@@ -194,11 +228,16 @@ describe('structured', () => {
it('throws on port collision', () => {
const composePath = path.join(tmpDir, 'docker-compose.yaml');
fs.writeFileSync(composePath, 'version: "3"\nservices:\n web:\n image: nginx\n ports:\n - "8080:80"\n');
fs.writeFileSync(
composePath,
'version: "3"\nservices:\n web:\n image: nginx\n ports:\n - "8080:80"\n',
);
expect(() => mergeDockerComposeServices(composePath, {
api: { image: 'node', ports: ['8080:3000'] },
})).toThrow();
expect(() =>
mergeDockerComposeServices(composePath, {
api: { image: 'node', ports: ['8080:3000'] },
}),
).toThrow();
});
});
});