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:
@@ -8,8 +8,8 @@ import { buildLocalServer } from '../../src/local/index.js';
|
||||
/**
|
||||
* Integration test for the pre:memory-write lint handler registered in chat.ts.
|
||||
* Fires the real hook through the server's shared HookRegistry and asserts that
|
||||
* capability-failure symptoms are cancelled (and routed to the improvement-signal
|
||||
* path) while normal memories and dramatic-but-legitimate claims pass through.
|
||||
* capability-failure symptoms are cancelled while normal memories and
|
||||
* dramatic-but-legitimate claims pass through.
|
||||
*/
|
||||
describe('pre:memory-write capability-symptom lint (handler integration)', () => {
|
||||
let server: FastifyInstance;
|
||||
@@ -30,10 +30,8 @@ describe('pre:memory-write capability-symptom lint (handler integration)', () =>
|
||||
}
|
||||
});
|
||||
|
||||
it('cancels a capability-failure symptom write and records an improvement signal', async () => {
|
||||
const { hookRegistry, orchestrator } = server.agentState;
|
||||
const store = orchestrator.getImprovementSignals();
|
||||
const before = store.getByCategory('capability_gap').length;
|
||||
it('cancels a capability-failure symptom write', async () => {
|
||||
const { hookRegistry } = server.agentState;
|
||||
|
||||
const result = await hookRegistry.fire('pre:memory-write', {
|
||||
toolName: 'save_memory',
|
||||
@@ -43,9 +41,6 @@ describe('pre:memory-write capability-symptom lint (handler integration)', () =>
|
||||
expect(result.cancelled).toBe(true);
|
||||
expect(result.reason).toMatch(/capability/i);
|
||||
expect(result.reason).toMatch(/acquire_capability/);
|
||||
|
||||
const after = store.getByCategory('capability_gap');
|
||||
expect(after.length).toBe(before + 1);
|
||||
});
|
||||
|
||||
it('allows a normal memory (tool preference) to pass', async () => {
|
||||
|
||||
Reference in New Issue
Block a user