feat(consolidation): enable observation dedup by default (0.97), skip on Oracle - #2000
Merged
Merged
Conversation
… on Oracle The create+update semantic dedup added in #1977 shipped opt-in (threshold 1.0). Enable it by default at 0.97 so observations are deduplicated out of the box. The merge path uses Postgres-only SQL, so consolidation skips dedup entirely on Oracle (via _dedup_active) — it behaves exactly as before there, regardless of the configured threshold. This is what lets the default flip without breaking Oracle deployments. Also fix MockLLM to return a valid keep-decision for the consolidation_dedup scope, so mock-LLM consolidation tests (which now exercise the enabled-by-default path) don't crash on the structured response and never spuriously merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #1977, which shipped create+update semantic observation dedup opt-in (threshold
1.0= disabled).Change
DEFAULT_CONSOLIDATION_DEDUP_THRESHOLD1.0→0.97, so observations are deduplicated out of the box.unnest/array_agg,UPDATE … FROM). A new_dedup_active(config)gate returns false whendatabase_backend == "oracle", so consolidation behaves exactly as before there regardless of the threshold. This is what makes flipping the default safe._DedupDecision(action="keep")for theconsolidation_dedupscope. With dedup now on by default, mock-LLM consolidation tests exercise the path; previously MockLLM returned{"mock": True}anddecision.actioncrashed. "keep" also means mock consolidation never spuriously merges, preserving existing deterministic test expectations.0.97), Oracle skips.Tests
test_consolidation_dedup.pyadds gate coverage: enabled on Postgres, disabled at1.0, skipped on Oracle, andNone-config. Existing MockLLM consolidation integration tests pass with dedup now active.Supersedes #1998 (which enabled it only in the benchmark job) — with the default on, the obs benchmark picks it up automatically.