]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Test] neural: cover providers_digest rotation carryover 6041/head
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 16 May 2026 20:13:29 +0000 (21:13 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 16 May 2026 20:13:29 +0000 (21:13 +0100)
commit7a84ee0da7672c1020a45f3d32bc0c99f8e9c690
treef641fba991b499b2d17dc8ab8aaa43255a6fcc13
parent24933a9aaf1df58f46cb3bd4b46a69e28f684d83
[Test] neural: cover providers_digest rotation carryover

Regression test for the symcache-driven profile rotation fix.

Drives a live rspamd + Redis through: train ANN with providers-only
input (metatokens, disable_symbols_input=true) -> verify NEURAL_SPAM /
NEURAL_HAM fire -> mutate set.symbols/set.digest in the scanner worker
(simulates a symcache shift) -> verify inference still fires after the
next check_anns poll.

Pre-fix the mutation pushes the symbol-list Levenshtein distance well
past the 30% tolerance, the worker rejects the trained profile, and
NEURAL_SPAM stops firing.  Post-fix the providers_digest stays
constant and is recognised as the authoritative schema fingerprint, so
the trained ANN is reloaded.

max_trains=1 because metatokens-only scans produce an identical
vector per message and Redis SADD deduplicates — one spam + one ham
scan are enough to fire training.
test/functional/cases/330_neural/003_carryover.robot [new file with mode: 0644]
test/functional/configs/neural_rotation.conf [new file with mode: 0644]
test/functional/lua/neural_rotation.lua [new file with mode: 0644]