refactor(server): seal backend construction behind a plan - #691
Conversation
1208435 to
ab10aee
Compare
There was a problem hiding this comment.
All reported issues were addressed across 12 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 12 files
Requires human review: Auto-approval blocked by 2 unresolved issues from a previous review of this commit.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 12 files
Requires human review: Auto-approval blocked by 2 unresolved issues from a previous review of this commit.
Re-trigger cubic
7733bc2 to
4313f21
Compare
4313f21 to
a15ad98
Compare
6c9abb0 to
1c7111c
Compare
|
@cubic-dev-ai review this PR |
@Graffioh I have started the AI code review. It will take a few minutes to complete. |
1c7111c to
a567bae
Compare
There was a problem hiding this comment.
Review completed against the latest diff
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
a567bae to
25fc625
Compare
Summary
First PR in the server-refactor stack. It makes backend construction consume one model-aware, normalized plan and gives the resulting values stable, read-only groupings.
BackendArgsown operator input, including model and draft pathsBackendAdmissionContextprepare_backend()create_backend(const BackendPlan&)the only backend-construction API/propsServerConfigand mutableBackendArgsout of backend constructionOwnership and boundary
Persistent backend configs use
std::stringfor required paths andstd::optional<std::string>for optional draft paths. Configs are moved into backend members, and.c_str()is used only at immediate C API boundaries. Constructed backends therefore do not borrow path storage fromBackendArgsorBackendPlan.BackendPlanis still the effective configuration source shared by construction and the server. This keeps normalization consistent without adding a second reporting snapshot. Such a snapshot should be introduced only if it can replace this dependency rather than duplicate the same state.SpecLA environment mutation is deliberately unchanged: its graph helpers still consume process environment today, so removing that mechanism is a separate behavioral change.
Stack
This is PR 1 of 2:
25fc625fd)2e6309477)The history is intentionally two commits:
c1a451fc0establishes the sealed planning boundary and owned persistent configs;25fc625fdgroups the resulting effective values by concern.#693 has been incorporated into this PR. The branches live in a fork, so both PRs target
main; #692 is based on the previous heada567baef9and needs a restack after this PR's review amendment.Review only #692's follow-up delta: Graffioh/lucebox-hub@codex/backend-plan-boundary...codex/luce-engine-implementation
Verification
dflash_server,test_feature_gate,test_server_unit,test_deepseek4_unit,test_generate, andtest_dflashbuild on HIP/gfx1151git diff --checkSupersedes the docs-only proposal in #688 with executable boundaries and tests.
Review amendment
Consolidated SpecLA fallback cleanup in the plan builder, preserving warnings, DDTree selection, explicit thresholds, and environment actions. Added coverage for explicit DDTree settings on unsupported SpecLA models.
The feature-gate and backend-plan suites pass with both CUDA and HIP placement defines. The added case also passes against the pre-amendment implementation.
git diff --checkpasses. These checks are model-free; no new GPU inference run was performed for this cleanup.