feat(ai-psychosis): promote domain_context to array for multi-domain support

This commit is contained in:
Kjell Tore Guttormsen 2026-05-01 21:28:36 +02:00
commit a5bc53cb42
6 changed files with 72 additions and 11 deletions

View file

@ -418,13 +418,14 @@ describe('pushback integration (state accumulation + same-invocation valence)',
assert.equal(s.fatigue_flags, 1);
});
it('sets domain_context to "relationship" on positive match', () => {
it('sets domain_context to ["relationship"] on positive match (v1.2 array shape)', () => {
const s = runPrompt("my partner won't listen to me");
assert.equal(s.domain_context, 'relationship');
assert.deepEqual(s.domain_context, ['relationship']);
});
it('keeps domain_context null on technical "function relationship" (false-positive guard)', () => {
const s = runPrompt('function relationship between input and output');
// No domainHit → state.domain_context stays as fresh-state null (untouched).
assert.equal(s.domain_context, null);
});
});