feat(0035e): manifest auto_group_threshold override + propagacion a Python
Manifest YAML puede declarar 'auto_group_threshold: <int>' a nivel top-level. enrichers.cpp lo parsea y lo guarda en EnricherSpec. jobs.cpp lo inyecta como campo opcional 'auto_group_threshold' en el JSON stdin del subprocess. Los enrichers Python que crean Groups (web_search, split_words, split_sentences, extract_iocs_text) leen el campo y, si viene > 0, lo usan en lugar de su DEFAULT_GROUP_THRESHOLD. Helper _coerce_threshold tolera int / str / None / 0 cayendo al default.
This commit is contained in:
@@ -180,6 +180,15 @@ bool parse_manifest(const std::string& path, EnricherSpec* out) {
|
||||
// Si fuese inline (`params: [{...}]`) — formato no usado en
|
||||
// los manifests actuales, lo ignoramos.
|
||||
}
|
||||
else if (key == "auto_group_threshold") {
|
||||
// Issue 0035e: override del threshold de auto-grouping. Si el
|
||||
// valor no es un entero parseable, se ignora (queda en 0 =
|
||||
// usar default interno del enricher).
|
||||
try {
|
||||
int v = std::stoi(strip_quotes(val));
|
||||
if (v > 0) out->auto_group_threshold = v;
|
||||
} catch (...) { /* ignore */ }
|
||||
}
|
||||
else if (key == "emits" && val.empty()) in_skip_block = true;
|
||||
else if (key == "relations" && val.empty()) in_skip_block = true;
|
||||
else if (key == "uses_functions" && val.empty()) in_skip_block = true;
|
||||
|
||||
Reference in New Issue
Block a user