refactor: remove self-learning and the optimizer package (P1.4)
Self-learning is excluded from the community edition (ADR-0004); the project owner reworks it separately. Cost tracking stays. - agent: delete behaviour evolution (evolve-schema, iterative GEPA, compose-evolution, evolution gates, orchestrator and deploy), improvement and correction detection, AgentLearning, the eval-dataset builder, optimization-capture and the agent_insights tool. Secret detection moves from eval-dataset to secret-patterns. The LLM wiring keeps only the Haiku adapter and judge call used by skill audit and hygiene, so @ax-llm/ax is now declared by agent instead of server. - server: delete /api/evolution/*, the evolution and optimizer services, GEPA expansion of the first chat message, the prompt_optimization and monthly_assessment jobs, the idle-session reviewer and its session-reviewer persona, prompt injection of past corrections and thumbs-down recorded as correction signals. Existing job rows of the removed types are ignored, not deleted. - core: delete OptimizationLogStore; stop re-exporting the improvement signal and evolution run stores. - web: delete the Evolution screen and the two job types in the automation editor. - delete packages/optimizer. Also logs UF-027 (self-learning loops read data nothing collects) and UF-028 (the Settings prompt-shape choice is ignored by chat).
This commit is contained in:
@@ -40,7 +40,6 @@ describe('Automations alias routes (Phase 3)', () => {
|
||||
let server: ReturnType<typeof Fastify>;
|
||||
let includeViewerWorkspace: boolean;
|
||||
let literalGlobalIsViewer: boolean;
|
||||
let viewerOptimizationEnabled: boolean;
|
||||
|
||||
beforeEach(async () => {
|
||||
db = new MindDB(':memory:');
|
||||
@@ -49,7 +48,6 @@ describe('Automations alias routes (Phase 3)', () => {
|
||||
failNext = false;
|
||||
includeViewerWorkspace = false;
|
||||
literalGlobalIsViewer = false;
|
||||
viewerOptimizationEnabled = 1 as unknown as boolean;
|
||||
scheduler = new LocalScheduler(
|
||||
cronStore,
|
||||
async (schedule) => {
|
||||
@@ -79,7 +77,6 @@ describe('Automations alias routes (Phase 3)', () => {
|
||||
name: 'Viewer WS',
|
||||
teamId: 'team-1',
|
||||
teamRole: 'viewer',
|
||||
optimizationEnabled: viewerOptimizationEnabled,
|
||||
};
|
||||
}
|
||||
if (id === 'global' && literalGlobalIsViewer) {
|
||||
@@ -96,7 +93,6 @@ describe('Automations alias routes (Phase 3)', () => {
|
||||
name: 'Viewer WS',
|
||||
teamId: 'team-1',
|
||||
teamRole: 'viewer',
|
||||
optimizationEnabled: viewerOptimizationEnabled,
|
||||
}]
|
||||
: []),
|
||||
],
|
||||
@@ -460,13 +456,6 @@ describe('Automations alias routes (Phase 3)', () => {
|
||||
workspaceId: undefined,
|
||||
request: (id: number) => ({ method: 'POST' as const, url: `/api/cron/${id}/trigger` }),
|
||||
},
|
||||
{
|
||||
label: 'prompt optimization through automation run',
|
||||
jobType: 'prompt_optimization' as const,
|
||||
jobConfig: {},
|
||||
workspaceId: undefined,
|
||||
request: (id: number) => ({ method: 'POST' as const, url: `/api/automations/${id}/run` }),
|
||||
},
|
||||
{
|
||||
label: 'memory compaction through cron trigger',
|
||||
jobType: 'memory_consolidation' as const,
|
||||
@@ -506,25 +495,6 @@ describe('Automations alias routes (Phase 3)', () => {
|
||||
expect(executed).toHaveLength(0);
|
||||
});
|
||||
|
||||
it('prompt optimization ignores a listed viewer workspace without optimization opt-in', async () => {
|
||||
includeViewerWorkspace = true;
|
||||
viewerOptimizationEnabled = false;
|
||||
const row = cronStore.create({
|
||||
name: 'Prompt optimization',
|
||||
cronExpr: '0 2 * * *',
|
||||
jobType: 'prompt_optimization',
|
||||
enabled: false,
|
||||
});
|
||||
|
||||
const res = await server.inject({
|
||||
method: 'POST',
|
||||
url: `/api/cron/${row.id}/trigger`,
|
||||
});
|
||||
|
||||
expect(res.statusCode).toBe(200);
|
||||
expect(executed).toHaveLength(1);
|
||||
});
|
||||
|
||||
it.each([
|
||||
{
|
||||
label: 'cron',
|
||||
@@ -625,12 +595,6 @@ describe('Automations alias routes (Phase 3)', () => {
|
||||
jobConfig: { action: 'morning_briefing' },
|
||||
workspaceId: undefined,
|
||||
},
|
||||
{
|
||||
label: 'personal monthly assessment',
|
||||
jobType: 'monthly_assessment' as const,
|
||||
jobConfig: {},
|
||||
workspaceId: undefined,
|
||||
},
|
||||
{
|
||||
label: 'non-matching spaced memory action',
|
||||
jobType: 'memory_consolidation' as const,
|
||||
|
||||
Reference in New Issue
Block a user