feat(retrieval): use_type_aware_compression flips to default-on (#769) [stacked on #879] - #880
Conversation
There was a problem hiding this comment.
Sorry @robotrocketscience, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
PR-size soft capThis PR is over the advisory size threshold:
Bigger PRs collide with more open work, which under the parallel-session workflow tends to produce repeated This is advisory only — nothing is blocked. If the size is intentional (large refactor, module removal, generated code), apply the |
Substrate landed v2.1 (#434 phase 2 pack-loop rewrite) and the bench gates (A2 recall@k uplift, A4 rebuilder continuation-fidelity in docs/design/feature-type-aware-compression.md) have now cleared on the lab-side compression_a* corpora: A2 mean recall@k uplift = +0.3267 over n=25 (15 positive, 10 zero, 0 regressions; all-fact rows are no-op by spec) A4 mean fidelity delta = +0.0085 over n=15 (2 positive in the rows with headroom, 13 zero — 9 of those at OFF=1.0 proxy ceiling, 0 regressions) Per the resolve_use_type_aware_compression() docstring contract, the default is unblocked. Compose-compatibility with the (already default-on) use_intentional_clustering flag was the structural prerequisite; that shipped in the preceding #878 commit via the pack_with_clusters cost_fn seam. Precedence (env > kwarg > TOML > default) is unchanged; only the default value flips False -> True. Reversible via [retrieval] use_type_aware_compression = false in .aelfrice.toml or AELFRICE_TYPE_AWARE_COMPRESSION=0 for v2.x parity. Tests updated, mirroring the #436 default-flip precedent: - test_default_is_off -> test_default_is_on - test_pack_byte_identical_when_flag_off -> test_pack_byte_identical_when_flag_on - test_retrieve_pack_byte_identical_when_flag_off -> test_retrieve_pack_byte_identical_when_flag_on - test_retrieve_env_var_enables_compression -> test_retrieve_env_var_disables_compression (the env-var path now tests rollback to OFF rather than activation; matches the post-flip precedence semantics) - test_default_call_leaves_compressed_empty -> test_default_call_populates_compressed - test_env_garbage_falls_through default-arm assertion flipped Closes #769. Stacked on #878 (compose-reconciliation).
…#769) Three surfaces still asserted the v2.1-era default-OFF posture. Sync them with the #769 default-on flip: - docs/design/feature-type-aware-compression.md: status banner now records the A2 + A4 bench-gate clear and the #878 compose- reconciliation link. - docs/user/CONFIG.md: TOML example flips to true; flag-doc section reframes the default + precedence narrative; tier-table summary line updated. - docs/concepts/ROADMAP.md v3.0 row: amend the A2-bench-gate bullet to note A4 also cleared and the default-on flip landed in #769. Mirror of the #436 docs-correction commit (301a411 / d001adc) that scrubbed stale Default-OFF block-comments after the intentional-clustering flip.
Records the bench-evidence basis (A2 +0.3267 / A4 +0.0085, 0 regressions, per-class non-regression rider held), the structural prerequisite (#878 compose-reconciliation), the unchanged precedence chain, the rollback path (env / TOML), and the test renames mirroring the #436 precedent. Lands in the Changed section since this is a default flip, not a new surface.
c622ccb to
1de5543
Compare
…flip Missed in the initial #769 test sweep: test_context_rebuilder.py also carries an OFF-byte-identical-when-default test (test_rebuild_v14_compression_off_byte_identical_default) whose assertion shape is the same as the test_compression_integration.py ones already flipped. Post-#769 default-on, default rebuild_v14 output equals explicit-ON output, not explicit-OFF. Renamed to test_rebuild_v14_compression_on_byte_identical_default and flipped the explicit arm. The #139 / #288 / #798 regression contract still holds in shape (default-call output is deterministic and equals the explicit-arm-of-the-default value); only the value of the default changed. Caught by local full-suite run on the rebased branch; GitHub CI on the pre-rebase commit didn't exercise this because the conflict only materialised after the rebase landed on the post-#878 main tip.
|
merge-train: merged 884ca5a → |
Closes #769.
Stacked on #879 (which closes #878 / compose-reconciliation). Set base to
feat/issue-878-compress-cluster-composeuntil #879 lands, then this rebases tomain.Summary
Flips
resolve_use_type_aware_compression()defaultFalse → True. The bench evidence cleared empirically against the post-#815 lab-sidecompression_a*corpora — see #769 bench-results comment:> 0aggregate, per-class non-regression rider≥ −0.005bandPer-class non-regression rider (
drop/summarise/verbatimcohorts each non-regressing) holds; all-factcohort delta is exactly 0.0000 per the spec's stated degenerate case.Why this is the right shape
resolve_use_type_aware_compression()docstring contract: "the bench gate flips the default after lab-side benchmark evidence clears." That precondition is now met. Compose-compatibility with the (already default-on)use_intentional_clusteringflag — the structural prerequisite that almost blocked an earlier flip-attempt mid-session — ships in #879 / #878 right before this.Mechanism
src/aelfrice/retrieval.py:1726—return False → return True. Docstring's "Default: False" → "Default: True" with bench-evidence callout + feat(retrieval): use_intentional_clustering × use_type_aware_compression compose-reconciliation (blocks #769) #878 compose-link.[retrieval] use_type_aware_compression = falsein.aelfrice.toml, orAELFRICE_TYPE_AWARE_COMPRESSION=0env var.Tests
Mirrors the #436 default-flip precedent (
ab4462d7):test_default_is_off → test_default_is_ontest_pack_byte_identical_when_flag_off → test_pack_byte_identical_when_flag_on— ON-byte-identity invariant supersedes the prior OFF-byte-identity invariant; the assertion that default == explicit is preserved, only the explicit-arm flips.test_retrieve_pack_byte_identical_when_flag_off → test_retrieve_pack_byte_identical_when_flag_on— same shape on the bareretrieve()path.test_retrieve_env_var_enables_compression → test_retrieve_env_var_disables_compression— the env-var path now tests rollback to OFF (env="0") rather than activation (env="1"), matching the post-flip precedence semantics. The bench-harness path that originally motivated this test still works —AELFRICE_TYPE_AWARE_COMPRESSION=1is the no-op default now.test_default_call_leaves_compressed_empty → test_default_call_populates_compressed— assertion flipped to match the new default.test_env_garbage_falls_through— default-arm assertion flipped.Full suite green locally on stacked HEAD (4656 passed, 64 skipped, 75 xfailed).
Doc surfaces
Three places still asserted v2.1-era default-OFF posture — all corrected in a separate atomic commit:
docs/design/feature-type-aware-compression.mdstatus banner.docs/user/CONFIG.md— TOML example flips totrue, flag-doc section reframes default + precedence narrative, tier-table summary line.docs/concepts/ROADMAP.mdv3.0 row — A2 bullet amended to note A4 also cleared and the flip landed in Flip default: use_type_aware_compression on by default — gated on A2 + A4 bench run #769.Determinism (#605)
Precedence chain unchanged; only the default value flipped. Replay with same inputs reproduces same output (now compression-ON unless explicit override). The compression render itself is pure over
(belief content, lock state, retention class)— no wall-clock, no random sampling.Discretion
Diff against
mainis clean against the pre-push deny-list.What this closes
Three R&D rounds (R7–R18 in 2026-05-14/15) + the @Ilya0527 statistical-power exchange (2026-05-18) + the 2026-05-20 operator verdict to flip — see #769 thread. The campaign's verdict-without-numbers state finally collides with numbers: A2 cleared, A4 cleared, no regressions, compose-reconciliation in place.