Skip to content

core: remove IBackend's four async twins and retire the prose threading contract #571

Description

@Yaraslaut

Re-scoped out of #522, step 5 of 5 — the one that actually closes the finding. Blocked by #568, #569 and #570: every production backend and every consumer must be off the old verbs first.

What to remove

  • The four twins on IBackend: registerModelAsync (backend.hpp:180), registerModelSharedAsync (:222), attachModelAsync (:322), assignPrimaryAsync.
  • The prose threading contract at backend.hpp:131-135 and the explanatory block at :106-115not by deleting the reasoning, but by relocating what remains true. The morph#486 use-after-free those paragraphs describe is real; after this set the guarantee is carried by the type rather than by the reader, and the documentation should say that, in docs/spec/core/backend.md.

Also in scope

Migrate LocalBackend and SimulatedRemoteBackend (core/remote.hpp:1826) and the 11 test doubles across tests/test_async_registration.cpp, tests/test_switch_backend.cpp, tests/test_bridge_lifetime.cpp and tests/test_client_execute_deadline.cpp. None of these overrides the async verbs, so all are candidates for SynchronousBackendAdapter rather than hand-editing — if any needs more than the adapter, that is worth saying in the PR, because it means the adapter's shape is wrong.

Acceptance

  • The four verbs do not exist anywhere in the tree. grep -rn 'registerModelAsync\|registerModelSharedAsync\|attachModelAsync\|assignPrimaryAsync' include src tests examples returns nothing.
  • IBackend's virtual count is recorded before and after in the PR body. core: IBackend has grown a parallel async shadow of four of its own methods #522 observes 18 virtuals with 14 defaulted and predicts the interface "roughly halves" — report what it actually did, including if the prediction was wrong.
  • The full suite passes, and the Bridge lifetime tests in tests/test_bridge_lifetime.cpp still cover the morph#486 teardown race. A test that only compiled because a defaulted virtual existed must not be quietly dropped — if any coverage is lost, name it.
  • docs/spec/core/backend.md describes the single surface, and no doc names a removed verb.

Notes

R core-async lane. Closing this closes #522. Nothing on this board should be marked done for F4 until this merges — the intermediate steps improve the shape but leave the duplication in place, which is the thing #522 is actually about.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreSubsystem: coretriage: validWell-framed; implement as written

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions