p43N
This commit is contained in:
@@ -741,78 +741,60 @@ parameters:
|
|||||||
agent:
|
agent:
|
||||||
rag_evidence_guard:
|
rag_evidence_guard:
|
||||||
synonyms:
|
synonyms:
|
||||||
salinität:
|
values:
|
||||||
- salinität
|
salinity_terms:
|
||||||
- salinitaet
|
- salinität
|
||||||
- salinity
|
- salinitaet
|
||||||
- salzgehalt
|
- salinity
|
||||||
- tds
|
- salzgehalt
|
||||||
- leitfähigkeit
|
- tds
|
||||||
- leitfaehigkeit
|
- leitfähigkeit
|
||||||
salinitaet:
|
- leitfaehigkeit
|
||||||
- salinität
|
redox_terms:
|
||||||
- salinitaet
|
- redox
|
||||||
- salinity
|
- orp
|
||||||
- salzgehalt
|
- oxidations-reduktionspotential
|
||||||
- tds
|
- oxidations reduktionspotential
|
||||||
- leitfähigkeit
|
ph_terms:
|
||||||
- leitfaehigkeit
|
- ph
|
||||||
salinity:
|
- ph-wert
|
||||||
- salinität
|
- ph wert
|
||||||
- salinitaet
|
chlorine_terms:
|
||||||
- salinity
|
- chlor
|
||||||
- salzgehalt
|
- freies chlor
|
||||||
- tds
|
- gesamtchlor
|
||||||
- leitfähigkeit
|
- chlorine
|
||||||
- leitfaehigkeit
|
aliases:
|
||||||
redox:
|
salinität: salinity_terms
|
||||||
- redox
|
salinitaet: salinity_terms
|
||||||
- orp
|
salinity: salinity_terms
|
||||||
- oxidations-reduktionspotential
|
redox: redox_terms
|
||||||
- oxidations reduktionspotential
|
orp: redox_terms
|
||||||
orp:
|
ph: ph_terms
|
||||||
- redox
|
chlor: chlorine_terms
|
||||||
- orp
|
|
||||||
- oxidations-reduktionspotential
|
|
||||||
- oxidations reduktionspotential
|
|
||||||
ph:
|
|
||||||
- ph
|
|
||||||
- ph-wert
|
|
||||||
- ph wert
|
|
||||||
chlor:
|
|
||||||
- chlor
|
|
||||||
- freies chlor
|
|
||||||
- gesamtchlor
|
|
||||||
- chlorine
|
|
||||||
shop:
|
shop:
|
||||||
accessory_focus_variants:
|
accessory_focus_variants:
|
||||||
indikator:
|
values:
|
||||||
- indikator
|
indicator_terms:
|
||||||
- indikatoren
|
- indikator
|
||||||
indikatoren:
|
- indikatoren
|
||||||
- indikator
|
reagent_terms:
|
||||||
- indikatoren
|
- reagenz
|
||||||
reagenz:
|
- reagenzien
|
||||||
- reagenz
|
spare_part_terms:
|
||||||
- reagenzien
|
- ersatzteil
|
||||||
reagenzien:
|
- ersatzteile
|
||||||
- reagenz
|
service_set_terms:
|
||||||
- reagenzien
|
- service set
|
||||||
ersatzteil:
|
- serviceset
|
||||||
- ersatzteil
|
- service-set
|
||||||
- ersatzteile
|
aliases:
|
||||||
ersatzteile:
|
indikator: indicator_terms
|
||||||
- ersatzteil
|
indikatoren: indicator_terms
|
||||||
- ersatzteile
|
reagenz: reagent_terms
|
||||||
service set:
|
reagenzien: reagent_terms
|
||||||
- service set
|
ersatzteil: spare_part_terms
|
||||||
- serviceset
|
ersatzteile: spare_part_terms
|
||||||
- service-set
|
service set: service_set_terms
|
||||||
serviceset:
|
serviceset: service_set_terms
|
||||||
- service set
|
service-set: service_set_terms
|
||||||
- serviceset
|
|
||||||
- service-set
|
|
||||||
service-set:
|
|
||||||
- service set
|
|
||||||
- serviceset
|
|
||||||
- service-set
|
|
||||||
|
|||||||
@@ -0,0 +1,64 @@
|
|||||||
|
# RetrieX Patch p43M – Vocabulary Map Alias Dedup
|
||||||
|
|
||||||
|
## Ziel
|
||||||
|
|
||||||
|
Weitere Reduktion doppelter YAML-Maps/Listen ohne fachliche Runtime-Änderung. Der Patch bündelt mehrfach identische Vocabulary-Map-Werte über Alias-Definitionen.
|
||||||
|
|
||||||
|
## Änderungen
|
||||||
|
|
||||||
|
- `DomainVocabularyConfig::map()` unterstützt zusätzlich zum bestehenden einfachen `key: [values]`-Format ein kompaktes Alias-Format:
|
||||||
|
- `values`: benannte Wertelisten
|
||||||
|
- `aliases`: Ausgabe-Schlüssel auf benannte Wertelisten
|
||||||
|
- Bestehendes einfaches Map-Format bleibt vollständig kompatibel.
|
||||||
|
- `vocabulary.yaml` nutzt das Alias-Format für:
|
||||||
|
- `maps.agent.rag_evidence_guard.synonyms`
|
||||||
|
- `maps.shop.accessory_focus_variants`
|
||||||
|
- Doppelte Listen für Salinität-, Redox-, Indikator-, Reagenz-, Ersatzteil- und Service-Set-Aliase wurden entfernt.
|
||||||
|
|
||||||
|
## Nicht geändert
|
||||||
|
|
||||||
|
- Keine neue Fachlogik
|
||||||
|
- Keine Scoringänderung
|
||||||
|
- Keine Prompt-Regeländerung
|
||||||
|
- Keine Retrievaländerung
|
||||||
|
- Keine Admin-UI
|
||||||
|
- Keine neuen fachlichen Listen im PHP-Core
|
||||||
|
|
||||||
|
## Kompatibilität
|
||||||
|
|
||||||
|
Lokale oder bestehende einfache Vocabulary-Maps funktionieren weiterhin. Das Alias-Format wird nur verwendet, wenn sowohl `values` als auch `aliases` vorhanden sind. Andernfalls fällt `DomainVocabularyConfig` auf das bisherige einfache String-List-Map-Format zurück.
|
||||||
|
|
||||||
|
## Lokale Prüfungen
|
||||||
|
|
||||||
|
Ausgeführt:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
php -l src/Config/DomainVocabularyConfig.php
|
||||||
|
php -l src/Config/AgentRunnerConfig.php
|
||||||
|
php -l src/Config/ShopServiceConfig.php
|
||||||
|
php -l src/Config/SearchRepairConfig.php
|
||||||
|
php -l src/Config/PromptBuilderConfig.php
|
||||||
|
php -l src/Config/GovernanceConfig.php
|
||||||
|
python3 YAML parse check for config/retriex/*.yaml
|
||||||
|
python3 effective p43L-vs-p43M vocabulary map comparison
|
||||||
|
```
|
||||||
|
|
||||||
|
Ergebnis der lokalen Prüfungen: grün.
|
||||||
|
|
||||||
|
Die effektiven Maps blieben gegenüber p43L identisch:
|
||||||
|
|
||||||
|
- `agent.rag_evidence_guard.synonyms`: 7 Schlüssel
|
||||||
|
- `shop.accessory_focus_variants`: 9 Schlüssel
|
||||||
|
|
||||||
|
Zusätzlich geprüft: `DomainVocabularyConfig::map()` löst beide neuen Alias-Maps in PHP korrekt auf.
|
||||||
|
|
||||||
|
## Hinweis zu Symfony-Checks
|
||||||
|
|
||||||
|
Die `bin/console`-Checks konnten in der lokalen Patch-Erstellungsumgebung nicht ausgeführt werden, weil der ZIP-Stand kein `vendor/` enthält und `bin/console` mit fehlenden Dependencies abbricht. Bitte im Projekt mit installierten Composer-Abhängigkeiten prüfen:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bin/console mto:agent:config:validate
|
||||||
|
bin/console mto:agent:regression:test
|
||||||
|
bin/console mto:agent:config:audit-source --details
|
||||||
|
bin/console mto:agent:config:audit-patterns --details
|
||||||
|
```
|
||||||
@@ -46,21 +46,31 @@ final class DomainVocabularyConfig
|
|||||||
return $this->uniqueStringListMap($fallback);
|
return $this->uniqueStringListMap($fallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
$out = [];
|
$out = $this->stringListMapWithAliases($value);
|
||||||
foreach ($value as $key => $items) {
|
|
||||||
if (!is_scalar($key)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
$cleanKey = trim((string) $key);
|
|
||||||
$cleanItems = $this->stringListFromValue($items);
|
|
||||||
if ($cleanKey !== '' && $cleanItems !== []) {
|
|
||||||
$out[$cleanKey] = $cleanItems;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $out !== [] ? $out : $this->uniqueStringListMap($fallback);
|
return $out !== [] ? $out : $this->uniqueStringListMap($fallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @return array<string, string[]> */
|
||||||
|
private function stringListMapWithAliases(array $value): array
|
||||||
|
{
|
||||||
|
$values = $this->uniqueStringListMap(is_array($value['values'] ?? null) ? $value['values'] : []);
|
||||||
|
$aliases = $this->uniqueStringMap(is_array($value['aliases'] ?? null) ? $value['aliases'] : []);
|
||||||
|
|
||||||
|
if ($values !== [] && $aliases !== []) {
|
||||||
|
$out = [];
|
||||||
|
foreach ($aliases as $alias => $valueKey) {
|
||||||
|
if (isset($values[$valueKey])) {
|
||||||
|
$out[$alias] = $values[$valueKey];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $out;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->uniqueStringListMap($value);
|
||||||
|
}
|
||||||
|
|
||||||
/** @return array<string, string> */
|
/** @return array<string, string> */
|
||||||
public function stringMap(string $path, array $fallback = []): array
|
public function stringMap(string $path, array $fallback = []): array
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user