LCORE-3370: apply enrichment after the native_override merge - #2449
LCORE-3370: apply enrichment after the native_override merge#2449max-svistunov wants to merge 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 41 minutes Limit details: You’ve used all 1 included review currently available under your plan. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Dumb migration lifts the entire legacy run.yaml into llama_stack.config.native_override, and synthesis applied enrichment to the baseline BEFORE deep-merging the override with list-replacement semantics — so for any migrated config whose original run.yaml carried the usual list-shaped sections, the merge replaced the enriched lists wholesale: BYOK and Solr/OKP vector_io providers, registered embedding models, and the Azure model_validation tweak were silently dropped, contradicting migrate_config_dumb's enrichment-keeps-working promise and R7-after-migration. Reorder the synthesis pipeline so enrichment is the last content step: baseline -> high-level inference expansion -> ensure MCP (non-empty baselines) -> native_override merge -> enrichment -> dedupe. This is exactly legacy mode's semantics — enrichment always post-processes the operator's final run.yaml and the run.yaml never beats it — so R5 keeps meaning "the override wins over the baseline and the high-level expansion" while R7 parity now also holds for migrated configs. The reorder incidentally fixes a latent same-family bug: azure enrichment used to run before apply_high_level_inference, so a high-level 'azure' provider entry replaced the enriched provider and dropped model_validation=false even without migration involved. The strict xfail documenting the defect flips to a plain assertion, and the test's azure_entra_id fixture moves to the current model schema (client_secret; client_secret_path no longer exists post-rename — the xfail had been failing partly for that stale reason). Spec R5 wording and the changelog record the ordering change. The migrate round-trip (T7) is unaffected: with no enrichment inputs the pipeline is order-insensitive, and test_migrate_then_synthesize_reproduces_run_yaml still passes along with the full unit suite (3138) and the synthesis integration module (63).
b2954ff to
47544b3
Compare
Description
Fixes LCORE-3370: after
--migrate-config, synthesis silently lost enrichment whenever the original legacy run.yaml carried list-shaped sections. Dumb migration lifts the whole run.yaml intollama_stack.config.native_override, and the synthesis pipeline applied enrichment to the baseline before deep-merging the override with list-replacement semantics — so the merge replaced the enriched lists wholesale: BYOK and Solr/OKPvector_ioproviders, registered embedding models, and the Azuremodel_validation=falsetweak were all dropped, contradictingmigrate_config_dumb's documented "enrichment keeps working" promise and R7-after-migration.The fix reorders
synthesize_configurationso enrichment is the last content step: baseline → high-levelinference.providersexpansion → MCP ensure (non-empty baselines) →native_overridemerge → enrichment → dedupe. This is exactly legacy mode's semantics — enrichment always post-processes the operator's final run.yaml, which never beats it — so R5 keeps meaning "the override wins over the baseline and the high-level expansion" while R7 parity now also holds for migrated configs. The dumb-migration round-trip (T7, no enrichment inputs) is order-insensitive and unaffected.Bonus: the reorder fixes a latent same-family bug — azure enrichment used to run before
apply_high_level_inference, so a high-levelazureprovider entry replaced the enriched provider and silently droppedmodel_validation=falseeven without migration involved.Also included: the strict xfail that documented the defect (added in LCORE-2747, PR #2318 — now merged) flips to a plain assertion; the test's
azure_entra_idfixture moves to the current model schema (client_secret—client_secret_pathno longer exists post-OGX-rename, and the xfail had been failing partly for that stale reason); spec R5 wording + changelog record the ordering change.Type of change
Tools used to create PR
Identify any AI code assistants used in this PR (for transparency and review context)
Related Tickets & Documents
Checklist before requesting a review
Testing
Rebased onto current main (PR #2318 merged, so this is a one-commit diff); all results below are from the rebased head:
uv run pytest tests/integration/test_unified_synthesis.py::test_migrate_then_synthesize_preserves_enrichment_parity -vExpected: migrate-then-synthesize over a legacy pair with BYOK + Solr/OKP + Azure enrichment equals the legacy enrichment output exactly (dict equality).
Actual: passes.
uv run pytest tests/integration/test_unified_synthesis.py tests/unit/test_llama_stack_synthesize.pyActual: 64 passed — including the T7 round-trip, R7 profile-parity for all enrichment kinds, native_override replacement semantics, and every ordering-sensitive unit case, unchanged.
uv run pytest tests/unitActual: 3212 passed, 1 skipped.
uv run make format— clean. Fullmake verifydeferred to CI (local machine constraint).