mirror of
https://github.com/garrytan/gbrain.git
synced 2026-07-27 22:15:33 +00:00
fix(doctor): treat disabled retrieval reflex as intentional (#2459)
This commit is contained in:
@@ -4096,8 +4096,8 @@ export function buildRetrievalReflexCheck(skillsDir: string | null): Check {
|
||||
if (!enabled) {
|
||||
return {
|
||||
name,
|
||||
status: 'warn',
|
||||
message: 'retrieval reflex disabled (config/env) — entity pointer layer off',
|
||||
status: 'ok',
|
||||
message: 'retrieval reflex intentionally disabled (config/env) — entity pointer layer off',
|
||||
details: { enabled: false, engine: engineKind, policy_skill_installed: skillInstalled },
|
||||
};
|
||||
}
|
||||
|
||||
@@ -9,12 +9,12 @@ import { buildRetrievalReflexCheck } from '../src/commands/doctor.ts';
|
||||
import { withEnv } from './helpers/with-env.ts';
|
||||
|
||||
describe('buildRetrievalReflexCheck', () => {
|
||||
test('disabled via env → warn, names the right check', async () => {
|
||||
test('disabled via env → ok intentional-off, names the right check', async () => {
|
||||
await withEnv({ GBRAIN_RETRIEVAL_REFLEX: 'false' }, async () => {
|
||||
const c = buildRetrievalReflexCheck(null);
|
||||
expect(c.name).toBe('retrieval_reflex_health');
|
||||
expect(c.status).toBe('warn');
|
||||
expect(c.message).toContain('disabled');
|
||||
expect(c.status).toBe('ok');
|
||||
expect(c.message).toContain('intentionally disabled');
|
||||
expect((c.details as any)?.enabled).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user