Fix: compile the run-drain test against the current WorkspaceManager ABI - #2463
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe drain-result tests update the fake backend to use the workspace manager’s release-outcome interface. Both tests now configure the backend and memory budget separately. Existing drain-result and workspace-state assertions remain unchanged. ChangesDrain result tests
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to This test-only API update preserves the intended drain-result checks and presents no concrete merge-blocking risk. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
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. A rabbit checks the drain result with care, Comment |
`WorkspaceManager::configure` takes the backend alone and `set_limit` carries the byte limit separately, and `Backend::release` reports a `ReleaseOutcome` with the platform code written through an out-parameter. This test still called the two-argument `configure` and gave `release` the old `int (void *, void *)` shape, so `ut` did not compile at all — three errors before any case ran. The fake's behaviour is unchanged: it never fails a release, so it returns `Freed` and leaves `platform_rc` untouched, and the two cases keep the same 1 MiB limit they configured before. The shape matches the fake in test_workspace_manager.cpp, which is the same backend written against the current signatures. Neither side is at fault on its own. The signature change and the test landed five minutes apart in merge order, and `ci.yml` triggers on `pull_request` only, so no run ever saw them together until the next PR branched from a main containing both. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Summary
maindoes not compile theutsuite.test_run_drain_result_separation.cppis written against a
WorkspaceManagerAPI that no longer exists:Three changes bring the fake back in line, and nothing else:
configure(budget, ops)→configure(ops)+set_limit(budget), keepingthe same 1 MiB limit both cases configured before.
Backend::releasetakes(ctx, base, int *platform_rc)and returnsReleaseOutcome.releasereturnsFreedand leavesplatform_rcuntouched,which is what its old
return 0meant — it has no failure path.The shape now matches the
FakeBackendintest_workspace_manager.cpp, whichis the same backend already written against the current signatures.
How this reached main
Neither change is at fault on its own:
8cf4ed4c, merged ~02:36) last touched this test.a1ca296f, merged ~02:41) narrowedconfigureand gavereleaseits three-parameter form, updating its own callers.
#2452 branched before #2455 landed, so its CI never saw this file, and #2455's
CI never saw the new signatures.
ci.ymltriggers onpull_requestonly —there is no post-merge CI on
main— so the collision was invisible until thenext PR branched from a main containing both. The last green
ci.ymlrun ofany branch (
refactor/dfx-tools-runtime-split, 00:37) predates both merges.Found from #2461's red
ut, and reproduced at plainupstream/main(
410502f7) to confirm it is not that PR's.Validation
410502f7+ this change: 263/263 pass(before it, the suite does not build).
clang-formatclean.Test-only; no product code touched.
🤖 Generated with Claude Code