Skip to content

fix(server): guard status.html post-build on dflash_server target (unblock CI)#351

Merged
davide221 merged 1 commit into
mainfrom
fix/status-html-target-guard
Jun 7, 2026
Merged

fix(server): guard status.html post-build on dflash_server target (unblock CI)#351
davide221 merged 1 commit into
mainfrom
fix/status-html-target-guard

Conversation

@davide221

Copy link
Copy Markdown
Contributor

Problem

main fails the CI Build (cmake + uv sync --extra megakernel) → Build dflash (smoke + server) step at configure time:

CMake Warning at CMakeLists.txt:723:  CURL not found — skipping dflash_server (passthrough proxy disabled)
CMake Error   at CMakeLists.txt:748 (add_custom_command):
  No TARGET 'dflash_server' has been created in this directory.

(e.g. run 27104177622, surfaced on #322's CI.)

Root cause — interaction of two already-merged PRs

The CI "Build dflash" job runs without libcurl-dev by design (ci.yml: "Server unit tests require libcurl-dev; skipped when CURL is absent").

Neither change is wrong alone. Combined on main, when CURL is absent the target is skipped but the post-build copy still references it → hard configure error.

Fix

Wrap the post-build copy + install in if(TARGET dflash_server) so they are only emitted when the target exists. This matches #294's intent (a no-CURL build simply skips the server and its post-build steps).

Verification (clean main checkout, lucebox2, CUDA 12.6)

Reproduced the exact CI error with -DCMAKE_DISABLE_FIND_PACKAGE_CURL=ON on pristine main, then confirmed this patch fixes it:

Scenario Before After
CURL disabled (= CI) No TARGET 'dflash_server'Configuring incomplete target skipped → Configuring done
CURL present (= dev) (unchanged) dflash_server target created, status.html copied

🧙 Built with WOZCODE

PR #322 added an unconditional add_custom_command(TARGET dflash_server)
plus install() to copy status.html next to the binary. PR #294 had made
dflash_server conditional on find_package(CURL) so the build still
succeeds without libcurl-dev (the CI "Build dflash" job runs without it).
When CURL is absent the target is skipped, but the post-build copy still
references it, producing a hard configure error:

  No TARGET 'dflash_server' has been created in this directory.

Wrap the add_custom_command + install in if(TARGET dflash_server) so the
status.html wiring is only emitted when the target actually exists.

Verified on a clean main checkout (lucebox2, CUDA 12.6):
- configure with CURL force-disabled: was "Configuring incomplete" with the
  missing-target error; now "Configuring done", target cleanly skipped.
- configure with CURL present: dflash_server target still created and
  status.html copy wired up.

Co-Authored-By: WOZCODE <contact@withwoz.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

@davide221 davide221 merged commit 613b778 into main Jun 7, 2026
5 checks passed
@davide221 davide221 deleted the fix/status-html-target-guard branch June 8, 2026 22:21
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