This commit is contained in:
team 1
2026-05-07 15:29:05 +02:00
parent d3ae51c551
commit 987b15d4ff
4 changed files with 204 additions and 44 deletions

View File

@@ -7,8 +7,9 @@
# #
# p54 introduced `adaptation_surface` as the migration inventory. p55 adds # p54 introduced `adaptation_surface` as the migration inventory. p55 adds
# `configuration_values` as the central value surface. p59B keeps the # `configuration_values` as the central value surface. p59B keeps the
# adaptation surface focused on native genre value paths plus explicitly # adaptation surface focused on native genre value paths. p59C adds
# reviewable non-empty technical/frozen legacy paths. # review_path_groups so every remaining non-empty/runtime-resolved legacy
# source path is visible with its cleanup classification.
parameters: parameters:
retriex.genre.config: retriex.genre.config:
id: water_analysis id: water_analysis
@@ -25,7 +26,10 @@ parameters:
- configuration_values.product_roles.shop_views - configuration_values.product_roles.shop_views
- configuration_values.product_roles.prompt_views - configuration_values.product_roles.prompt_views
- configuration_values.product_roles.no_llm_fallback_terms - configuration_values.product_roles.no_llm_fallback_terms
review_paths: review_path_groups:
frozen_compatibility_views:
description: Legacy no-LLM product-role vocabulary views. Keep frozen until the fallback reads only from genre.configuration_values.product_roles.
paths:
- agent.no_llm_fallback.product_roles.vocabulary_views.main_device_request_keywords - agent.no_llm_fallback.product_roles.vocabulary_views.main_device_request_keywords
- agent.no_llm_fallback.product_roles.vocabulary_views.accessory_product_keywords - agent.no_llm_fallback.product_roles.vocabulary_views.accessory_product_keywords
product_attributes: product_attributes:
@@ -34,7 +38,17 @@ parameters:
- configuration_values.product_attributes.direct_attribute_cleanup - configuration_values.product_attributes.direct_attribute_cleanup
- configuration_values.product_attributes.size_and_color_terms - configuration_values.product_attributes.size_and_color_terms
- configuration_values.product_attributes.numeric_length_constraints - configuration_values.product_attributes.numeric_length_constraints
review_paths: review_path_groups:
frozen_runtime_views:
description: Legacy shop-runtime attribute and length helpers mirrored by genre values. Rewire candidates, not user-facing maintenance paths.
paths:
- agent.shop_runtime.attribute_cleanup.vocabulary_views.product_type_terms
- agent.shop_runtime.attribute_cleanup.vocabulary_views.stop_terms
- agent.shop_runtime.answer_constraints.length_sort
- agent.shop_runtime.answer_constraints.length_filter
regex_templates:
description: Intent regex templates that still belong to the technical matcher layer and should remain frozen while genre terms live in configuration_values.
paths:
- intent.commerce.patterns.size_extraction_template - intent.commerce.patterns.size_extraction_template
- intent.commerce.patterns.size_value_template - intent.commerce.patterns.size_value_template
- intent.commerce.patterns.size_token_value_template - intent.commerce.patterns.size_token_value_template
@@ -53,8 +67,18 @@ parameters:
- configuration_values.intent_and_routing.fuzzy_routing_terms - configuration_values.intent_and_routing.fuzzy_routing_terms
- configuration_values.intent_and_routing.commerce_intent - configuration_values.intent_and_routing.commerce_intent
- configuration_values.intent_and_routing.sales_intent - configuration_values.intent_and_routing.sales_intent
review_paths: review_path_groups:
frozen_runtime_views:
description: Legacy fuzzy-routing vocabulary view kept only as frozen compatibility metadata until routing uses the genre value directly.
paths:
- agent.input_normalization.fuzzy_routing.vocabulary_views.terms
regex_templates:
description: Commerce intent regex template for model-like product terms; technical matcher fallback, not a genre maintenance list.
paths:
- intent.commerce.patterns.model_like_product - intent.commerce.patterns.model_like_product
sales_signal_fallbacks:
description: Sales/advisory signal lists mirrored by genre values and frozen to prevent drift outside genre.yaml.
paths:
- intent.sales.sales_signals - intent.sales.sales_signals
- intent.sales.comparison_signals - intent.sales.comparison_signals
- intent.sales.objection_signals - intent.sales.objection_signals
@@ -68,7 +92,14 @@ parameters:
- configuration_values.context_resolution.history_anchor_enrichment - configuration_values.context_resolution.history_anchor_enrichment
- configuration_values.context_resolution.meta_query_guard - configuration_values.context_resolution.meta_query_guard
- configuration_values.context_resolution.rag_anchor_enrichment - configuration_values.context_resolution.rag_anchor_enrichment
review_paths: review_path_groups:
frozen_runtime_views:
description: Legacy history-anchor trigger view mirrored by genre values. Candidate for later runtime accessor cleanup.
paths:
- agent.shop_runtime.context_resolution.history_anchor_enrichment.vocabulary_views.trigger_terms
commercial_follow_up_fallbacks:
description: Commercial follow-up anchor patterns and query templates kept frozen while the follow-up resolver is migrated fully to genre values.
paths:
- agent.follow_up_context.commercial_table_follow_up.history_anchor_patterns - agent.follow_up_context.commercial_table_follow_up.history_anchor_patterns
- agent.follow_up_context.commercial_table_follow_up.indicator_marker_patterns - agent.follow_up_context.commercial_table_follow_up.indicator_marker_patterns
- agent.follow_up_context.commercial_table_follow_up.query_template_with_model - agent.follow_up_context.commercial_table_follow_up.query_template_with_model
@@ -82,6 +113,11 @@ parameters:
- configuration_values.shop_query_runtime.primary_identity_repair - configuration_values.shop_query_runtime.primary_identity_repair
- configuration_values.shop_query_runtime.semantic_shop_search_tokens - configuration_values.shop_query_runtime.semantic_shop_search_tokens
- configuration_values.shop_query_runtime.direct_answer - configuration_values.shop_query_runtime.direct_answer
review_path_groups:
frozen_runtime_views:
description: Legacy current-input preservation vocabulary view mirrored by genre values and kept frozen until the query optimizer reads only from genre.yaml.
paths:
- agent.shop_runtime.query_cleanup.current_input_preservation.vocabulary_views.terms
result_identity_and_answer_policy: result_identity_and_answer_policy:
description: Grounding, role separation and atomicity rules that must match the active product genre. description: Grounding, role separation and atomicity rules that must match the active product genre.
value_paths: value_paths:
@@ -96,7 +132,10 @@ parameters:
- configuration_values.search_repair.requested_accessory_code_terms - configuration_values.search_repair.requested_accessory_code_terms
- configuration_values.search_repair.candidate_patterns - configuration_values.search_repair.candidate_patterns
- configuration_values.search_repair.candidate_terms - configuration_values.search_repair.candidate_terms
review_paths: review_path_groups:
regex_templates:
description: Search-repair regex templates still owned by the technical matcher layer. Frozen source paths prevent silent divergence from genre values.
paths:
- search_repair.patterns.model_candidate - search_repair.patterns.model_candidate
- search_repair.patterns.accessory_candidate_template - search_repair.patterns.accessory_candidate_template
- search_repair.patterns.requested_accessory_code - search_repair.patterns.requested_accessory_code
@@ -110,7 +149,10 @@ parameters:
- configuration_values.retrieval_and_language.cleanup_profiles - configuration_values.retrieval_and_language.cleanup_profiles
- configuration_values.retrieval_and_language.retrieval_vocabulary_views - configuration_values.retrieval_and_language.retrieval_vocabulary_views
- configuration_values.retrieval_and_language.exact_selection - configuration_values.retrieval_and_language.exact_selection
review_paths: review_path_groups:
technical_cleanup_profiles:
description: Shared language cleanup profiles with runtime structure beyond simple genre vocabulary. Keep as technical review paths until a dedicated cleanup-profile migration removes the legacy copies.
paths:
- language.cleanup_profiles.commerce_query - language.cleanup_profiles.commerce_query
- language.cleanup_profiles.rag_evidence - language.cleanup_profiles.rag_evidence
- language.cleanup_profiles.shop_context_fallback - language.cleanup_profiles.shop_context_fallback
@@ -121,11 +163,17 @@ parameters:
- configuration_values.shop_data_mapping.text - configuration_values.shop_data_mapping.text
- configuration_values.shop_data_mapping.role_guard - configuration_values.shop_data_mapping.role_guard
- configuration_values.shop_data_mapping.commerce_connection - configuration_values.shop_data_mapping.commerce_connection
review_paths: review_path_groups:
technical_shop_mapping:
description: Shop matching field and role-guard configuration. Installation-specific, but still technical runtime mapping rather than simple genre vocabulary.
paths:
- shop_matching.custom_fields - shop_matching.custom_fields
- shop_matching.text.custom_field_join_separator - shop_matching.text.custom_field_join_separator
- shop_matching.text.primary_secondary_separator - shop_matching.text.primary_secondary_separator
- shop_matching.role_guard - shop_matching.role_guard
runtime_resolved_connection:
description: Runtime environment values intentionally allowed by governance as resolved outside genre.yaml.
paths:
- commerce.store_api_base_url - commerce.store_api_base_url
- commerce.max_shop_results - commerce.max_shop_results
governance_and_regression: governance_and_regression:
@@ -134,7 +182,10 @@ parameters:
- configuration_values.governance_and_regression.regression_baseline - configuration_values.governance_and_regression.regression_baseline
- configuration_values.governance_and_regression.vocabulary_guardrails - configuration_values.governance_and_regression.vocabulary_guardrails
- configuration_values.governance_and_regression.core_pattern_audit - configuration_values.governance_and_regression.core_pattern_audit
review_paths: review_path_groups:
governance_guardrails:
description: Technical audit policy for core-pattern checks. Keep outside genre values but visible in the adaptation surface.
paths:
- governance.core_pattern_audit - governance.core_pattern_audit
configuration_values: configuration_values:
product_roles: product_roles:

View File

@@ -0,0 +1,72 @@
# RetrieX Patch 59C - Genre Review Path Classification
## Ziel
p59C räumt die nach p59A/p59B verbliebene Genre-Migrationsoberfläche weiter auf, ohne Runtime-, Retrieval-, Prompt-, Shop- oder Scoring-Logik zu ändern.
Der Patch ersetzt die flachen `adaptation_surface.*.review_paths` in `config/retriex/genre.yaml` durch klassifizierte `review_path_groups`.
## Warum
Nach p59B waren 32 alte technische/frozen Pfade als `review_paths` sichtbar. Zusätzlich existierten noch 7 deklarierte `configuration_values.*.source_paths`, die nicht in der `adaptation_surface` sichtbar klassifiziert waren.
p59C macht alle verbliebenen 39 Legacy-/Runtime-Source-Pfade sichtbar und ordnet sie nach Cleanup-Bedeutung:
- `frozen_compatibility_views`
- `frozen_runtime_views`
- `regex_templates`
- `sales_signal_fallbacks`
- `commercial_follow_up_fallbacks`
- `technical_cleanup_profiles`
- `technical_shop_mapping`
- `runtime_resolved_connection`
- `governance_guardrails`
Damit ist klarer erkennbar, welche Pfade technische Runtime-Fallbacks, Regex-Templates, Runtime-resolved Werte oder spätere Rewire-Kandidaten sind.
## Geänderte Dateien
- `config/retriex/genre.yaml`
- `src/Config/RetriexEffectiveConfigProvider.php`
## Technische Änderung
`validateGenre()` akzeptiert zusätzlich zu den alten flachen `review_paths` jetzt strukturierte `review_path_groups`:
```yaml
review_path_groups:
frozen_runtime_views:
description: ...
paths:
- agent.shop_runtime....
```
Das alte Feld `review_paths` bleibt validatorseitig rückwärtskompatibel, wird in `genre.yaml` aber nicht mehr verwendet.
## Nicht geändert
- keine Runtime-Logik
- keine Query-Logik
- keine Retrieval-Logik
- keine Prompt-Logik
- keine Shop-Logik
- keine Scoring-Logik
- keine Hash-/Governance-Werte
## Lokale Checks
In der entpackten ZIP ohne `vendor/` lokal geprüft:
- YAML parsebar
- PHP-Lint für `RetriexEffectiveConfigProvider.php` grün
- alle 39 `configuration_values.*.source_paths` sind in `adaptation_surface.*.review_path_groups.*.paths` klassifiziert
- keine zusätzlichen oder fehlenden klassifizierten Source-Pfade
Die Symfony-Checks müssen im Projekt mit installiertem `vendor/` laufen:
```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
```

View File

@@ -487,8 +487,7 @@ span.think {
} }
.retriex-chat-options { .retriex-chat-options {
display: flex display: flex;
;
flex-wrap: wrap; flex-wrap: wrap;
gap: 0.5rem; gap: 0.5rem;
margin: 1rem 0 0.25rem; margin: 1rem 0 0.25rem;

View File

@@ -1238,6 +1238,44 @@ final readonly class RetriexEffectiveConfigProvider
} }
} }
} }
$reviewPathGroups = $definition['review_path_groups'] ?? null;
if (array_key_exists('review_path_groups', $definition)) {
if (!is_array($reviewPathGroups) || $reviewPathGroups === []) {
$errors[] = sprintf('genre.adaptation_surface.%s.review_path_groups must be a non-empty map when declared.', $group);
continue;
}
foreach ($reviewPathGroups as $reviewGroup => $reviewDefinition) {
if (!is_string($reviewGroup) || trim($reviewGroup) === '') {
$errors[] = sprintf('genre.adaptation_surface.%s.review_path_groups keys must be non-empty strings.', $group);
continue;
}
if (!is_array($reviewDefinition)) {
$errors[] = sprintf('genre.adaptation_surface.%s.review_path_groups.%s must be a map.', $group, $reviewGroup);
continue;
}
$paths = $reviewDefinition['paths'] ?? null;
if (!is_array($paths) || $paths === []) {
$errors[] = sprintf('genre.adaptation_surface.%s.review_path_groups.%s.paths must be a non-empty list.', $group, $reviewGroup);
continue;
}
foreach ($paths as $path) {
if (!is_string($path) || trim($path) === '') {
$errors[] = sprintf('genre.adaptation_surface.%s.review_path_groups.%s.paths must contain non-empty strings.', $group, $reviewGroup);
continue;
}
$path = trim($path);
if (!isset($flattened[$path])) {
$warnings[] = sprintf('genre.adaptation_surface.%s.review_path_groups.%s references unknown review path: %s.', $group, $reviewGroup, $path);
}
}
}
}
} }
foreach ($this->collectGenreConfigurationValueSourcePaths($configurationValues) as $valuePath => $sourcePaths) { foreach ($this->collectGenreConfigurationValueSourcePaths($configurationValues) as $valuePath => $sourcePaths) {