Per-bot retrieval configuration for multi-bot installs, plus a PHPStan level-7
elevation. No schema migration. Safe drop-in from 0.12.1.
Added
- Per-bot retrieval overrides. A new admin section, Per-bot retrieval
overrides, lists the bots present in the store and lets each one override
the retrieval-quality knobs —hybrid_enabled,hybrid_alpha,
dedup_per_source,query_cache_enabled,query_cache_ttl,slow_query_ms.
A bot with "Override" unticked inherits the global Retrieval settings.
Storage-level settings (backend, table, dimension, metric, HNSW, layout) stay
global — every bot shares one physical store — andtop_kstill comes from
mxchat per request. Resolved byMxChat_DuckDB_Options::get_for_bot($bot_id),
whichVector_Store_Query::run()now consults; overrides are stored in the
bot_overridessub-map of the main option (covered by uninstall already). mxchat_duckdb_bot_configfilter — drive a bot's resolved retrieval
config from code (multi-bot installs that prefer config-as-code). Runs after
the stored UI overrides, so code wins. Only retrieval keys take effect.
See docs/HOOKS.md.
Changed
- PHPStan raised to level 7 (now enforced in CI — the job already blocks the
build). The 8 findings the stricter level surfaced are fixed in code, not
baselined: anarray_chunklower-bound guard onupsert(), awpdb
type-narrowing fix in the compactor sweep (is_object()erased the type), and
an honestarray<int, array<string, mixed>>param onupsert()(rows are
runtime-validated). The two genuinely unstubbable calls on the DuckDB
extension handle (query,bind/bindParam— no PHPStan stub for ext-duckdb /
saturio) get a documentedignoreErrorsentry, mirroring the existing WP-CLI
one. The baseline shrank from 166 to 165 findings.
Maintenance
- Re-verified the optional Option A upstream patch
(patches/mxchat-pre-vector-query.diff) applies cleanly — exact match, no
offset or fuzz — against mxchat-basic 3.2.6 through 3.2.8, and added a
"Submitting upstream" section to patches/README.md (MxChat
ships from WordPress.org with no public repo, so the proposal routes through
their support channel).