Skip to content

impl(039): Bedrock rank swap test repeats under version 3 - #428

Merged
bartekus merged 1 commit into
mainfrom
impl/039-swap-v3
Oct 31, 2026
Merged

bartekus merged 1 commit into
mainfrom
impl/039-swap-v3

Conversation

@bartekus

Copy link
Copy Markdown
Contributor

Follow-up to #424 now that #425 has merged: spec 039's swap test drops its version 2 workaround.

  • integrations/rustev-bedrock/tests/rank_swap.rs: the config_v2 copy and the config-v2.json choice in eval() are gone; rustev eval --repeat-config runs under the same version 3 configuration as the single-run reports.
  • For both backends, each repeated run's report (run-{0,1}.report.json) names that configuration's digest and carries the same ranking/chosen/* measures (precision@2, ndcg@2, mrr, backfill@p1) as the single-run report; repeat.json names the same configuration and includes the ranking metrics.
  • Spec 039's implementation record gains a dated paragraph lifting part b's caveat. Derived shards refreshed.

No network or paid call; fixtures are SYNTHETIC and loopback only.

Verification (local): cargo test -p rustev-bedrock --locked (all suites), clippy -D warnings on rustev-bedrock (all targets), cargo fmt --all --check, make gate, scripts/check-authored-content.sh, spec-spine couple.

Follow-up to #424 now that #425 has merged: spec 039's swap test drops its version 2 workaround.

- `integrations/rustev-bedrock/tests/rank_swap.rs`: the `config_v2` copy and the `config-v2.json` choice in `eval()` are gone; `rustev eval --repeat-config` runs under the same version 3 configuration as the single-run reports.
- For both backends, each repeated run's report (`run-{0,1}.report.json`) names that configuration's digest and carries the same `ranking/chosen/*` measures (`precision@2`, `ndcg@2`, `mrr`, `backfill@p1`) as the single-run report; `repeat.json` names the same configuration and includes the ranking metrics.
- Spec 039's implementation record gains a dated paragraph lifting part b's caveat. Derived shards refreshed.

No network or paid call; fixtures are SYNTHETIC and loopback only.

Verification (local): `cargo test -p rustev-bedrock --locked` (all suites), clippy `-D warnings` on rustev-bedrock (all targets), `cargo fmt --all --check`, `make gate`, `scripts/check-authored-content.sh`, `spec-spine couple`.
@github-actions

Copy link
Copy Markdown

AI review (no-findings)

Reviewing the two changed files.

integrations/rustev-bedrock/tests/rank_swap.rs

The removal of the config-v2 workaround is consistent with the stated goal: rustev eval --repeat-config now evaluates with the adapter's measures, so the version 2 downgrade path is no longer needed. The new assertions are coherent -- they check run_report["evaluator_config"] against report["config"] (differing field names are expected given the different schemas of the per-run repeat report vs. the main eval report), and they verify the ranking metrics are present and equal.

The assert!(repeat.to_string().contains("ranking/chosen/ndcg@2"), ...) is a string-search check on serialized JSON rather than a typed accessor. This is fragile (could pass spuriously if the string appears in an error message or comment in the JSON), but it is a test-quality concern rather than a correctness bug.

The hardcoded for run in 0..2 loop assumes the repeat evaluation produces exactly 2 run reports. Nothing in the visible diff confirms or contradicts the expected run count; this is a pre-existing property of the test harness, not introduced by this PR. I cannot flag it as a defect without evidence.

specs/039-model-backed-rank/spec.md

The follow-up note is correctly placed in the existing acceptance history section, accurately describes the change (version 2 copy no longer needed, repeat runs under version 3), and cross-references the test file and spec 041. The constitution permits in-place edits to this document. The spec's lifecycle status (frontmatter) is unchanged and not visible in the diff, so I cannot flag anything there.

No concrete bugs, security problems, or inconsistencies are found.

{"head": "8f57ba87aba8671c3c522b92ddf6bfd3f71a1a8d", "verdict": "no-findings", "findings": []}

Subject: 7a9625f...8f57ba8, diff digest 6f185f0eb1524447f9a49cc5ae95f32c7b9f2d8e827a187b1e6fba10361e2439, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus added this pull request to the merge queue Oct 31, 2026
Merged via the queue into main with commit 1553fbe Oct 31, 2026
30 checks passed
@bartekus
bartekus deleted the impl/039-swap-v3 branch October 31, 2026 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant