Skip to content

chore(agnostic): drop bgfx examples + android job; external test uses nullfixture - #422

Merged
apotema merged 1 commit into
mainfrom
chore/386-assembler-drop-bgfx-examples
Jun 30, 2026
Merged

apotema merged 1 commit into
mainfrom
chore/386-assembler-drop-bgfx-examples

Conversation

@apotema

@apotema apotema commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

The assembler no longer carries anything bgfx-specific

Completes bgfx's exit from the assembler (after the backend slim in #420):

  • Remove the bgfx demo examples (examples/bgfx, examples/bgfx-android) — they now live in labelle-bgfx with their own CI (labelle-bgfx#2, incl. the android .so cross-build).
  • Remove the bgfx-android-build CI job — its coverage moved with the example.
  • Replace the bgfx-specific external-backend test with a backend-agnostic one: examples/external-null uses the headless nullfixture out-of-tree backend (a real remote package, zero native deps) to exercise remote-fetch → stage → codegen → build end-to-end. Cheaper than the bgfx variant (no C++) and proves the assembler wires any external backend, not just bgfx.

Net: the assembler has no bgfx backend, no bgfx examples, no bgfx CI. External-backend resolution stays covered (unit tests + the agnostic nullfixture integration step).

zig build test green; external-null verified locally (fetch → generate → headless build → runnable binary).

Summary by CodeRabbit

  • New Features
    • Added a new external example configuration that targets a lightweight null backend.
  • Bug Fixes
    • Improved continuous integration checks by validating the external example with a real build and confirming the expected output is produced.
  • Chores
    • Removed the Android example packaging and related assets/configuration from the repository.

… nullfixture

bgfx's demo examples (desktop + android) now live in labelle-bgfx with their own
CI (labelle-bgfx#2), so remove them here along with the bgfx-android-build job
(its .so cross-build coverage moved with them).

Replace the bgfx-specific external-backend examples-integration step with a
backend-AGNOSTIC one: examples/external-null uses the headless `nullfixture`
out-of-tree backend (real remote package, zero native deps) to exercise the
remote-fetch → stage → codegen → build pipeline cheaply. The assembler now
carries no bgfx-specific example or CI — it resolves any external backend the
same way.
@coderabbitai

coderabbitai Bot commented Jun 30, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Removes the bgfx-android example entirely (all source, config, and assets) and clears the bgfx example content. Reconfigures examples/external-null/project.labelle to use the nullfixture backend. CI removes the bgfx-android-build job and replaces the bgfx-external out-of-tree verification step with an external-null build-and-assert step.

Changes

bgfx example removal and external-null CI migration

Layer / File(s) Summary
external-null project reconfigured to nullfixture backend
examples/external-null/project.labelle, examples/bgfx/.gitignore, examples/bgfx-android/..., examples/bgfx/...
project.labelle name, title, and backend_package switched from bgfx to nullfixture (v0.2.0); .labelle/ removed from bgfx gitignore; all bgfx and bgfx-android example files deleted.
CI: remove bgfx-android job, replace bgfx-external step with external-null
.github/workflows/ci.yml
bgfx-android-build job removed; external out-of-tree verification step replaced with external-null flow that installs, verifies manifests, runs zig build, and asserts zig-out/bin/example_external_null exists.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐇 Hop hop, the bgfx files are gone,
No Android APK to build upon!
The null fixture takes the stage,
A cleaner build on every page.
The rabbit cheers with carrot in paw— ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: removing bgfx examples and the Android job, and updating the external integration test to use nullfixture.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/386-assembler-drop-bgfx-examples

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request removes the bgfx-on-Android example, including its documentation, Android manifest, packaging scripts, and scene configurations. Additionally, it renames and updates the external-null example configuration to use the nullfixture backend instead of bgfx. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 296-317: The step description still mentions bgfx/zbgfx even
though this job now verifies the external-null backend, so update the
surrounding comment in the workflow to match the actual nullfixture end-to-end
check. Keep the explanation focused on the current step’s purpose and reference
the existing “Verify an external (out-of-tree) backend wires up end-to-end”
block so the stale bgfx-specific wording is removed.
- Around line 314-315: The CI step for the nullfixture_desktop example builds
with zig build after labelle-assembler generate, but it is missing the generated
build.zig.zon fingerprint fix that the other direct-assembler examples apply.
Update this workflow step to restore the labelle-cli-equivalent fingerprint
patch before invoking zig build, using the same pre-build sequence already used
in the neighboring assembler example steps so the generated fingerprint is
valid.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7a14955b-35bf-4585-9fa7-18e081135eaf

📥 Commits

Reviewing files that changed from the base of the PR and between 55b2abd and 0455eb7.

⛔ Files ignored due to path filters (1)
  • examples/bgfx-android/assets/icon.tga is excluded by !**/*.tga
📒 Files selected for processing (17)
  • .github/workflows/ci.yml
  • examples/bgfx-android/.gitignore
  • examples/bgfx-android/README.md
  • examples/bgfx-android/android/AndroidManifest.xml
  • examples/bgfx-android/assets/icon.json
  • examples/bgfx-android/package_apk.sh
  • examples/bgfx-android/project.labelle
  • examples/bgfx-android/scenes/main.jsonc
  • examples/bgfx-external/scripts/.gitkeep
  • examples/bgfx/.gitignore
  • examples/bgfx/project.labelle
  • examples/bgfx/scenes/main.jsonc
  • examples/bgfx/scripts/.gitkeep
  • examples/external-null/.gitignore
  • examples/external-null/project.labelle
  • examples/external-null/scenes/main.jsonc
  • examples/external-null/scripts/.gitkeep
💤 Files with no reviewable changes (10)
  • examples/bgfx-android/README.md
  • examples/bgfx-android/assets/icon.json
  • examples/bgfx-android/scenes/main.jsonc
  • examples/bgfx-android/package_apk.sh
  • examples/bgfx/project.labelle
  • examples/bgfx/.gitignore
  • examples/bgfx-android/project.labelle
  • examples/bgfx-android/.gitignore
  • examples/bgfx/scenes/main.jsonc
  • examples/bgfx-android/android/AndroidManifest.xml

Comment thread .github/workflows/ci.yml
Comment on lines +296 to +317
- name: Verify an external (out-of-tree) backend wires up end-to-end
run: |
ASM=$GITHUB_WORKSPACE/labelle-assembler/zig-out/bin/labelle-assembler
cd labelle-assembler/examples/bgfx-external
# `install` fetches the github backend_package into the cache;
# `generate` stages it + codegens (the assembler handles backend_package).
# Backend-AGNOSTIC fetch test: the assembler resolves ANY external
# backend_package the same way (Phase 6a). bgfx now lives + is tested in
# its own repo (labelle-bgfx); here we use the headless `nullfixture`
# backend — a real out-of-tree package with zero native deps, so it
# exercises the full remote-fetch → stage → codegen → BUILD pipeline cheaply.
cd labelle-assembler/examples/external-null
$ASM install --project-root .
$ASM generate --project-root .

# The fetched package staged with its manifest, codegen wired the
# labelle_bgfx dependency, and (v0.2.0+) the shared gamepad sources are
# url+hash PACKAGES — the backend no longer vendors them, so its staged
# build.zig.zon references them by url rather than carrying subdirs.
test -f .labelle/deps/labelle-bgfx/backend.manifest.zon
grep -qF 'b.dependency("labelle_bgfx"' .labelle/bgfx_desktop/build.zig
# The gamepad sources are url+hash PACKAGE deps now (not vendored): match
# the actual `.url = "...labelle-*-gamepad...tar.gz"` lines, not a bare
# slug that could appear in a comment.
grep -qE '\.url = ".*labelle-sdl-gamepad.*\.tar\.gz"' .labelle/deps/labelle-bgfx/build.zig.zon
grep -qE '\.url = ".*labelle-android-gamepad.*\.tar\.gz"' .labelle/deps/labelle-bgfx/build.zig.zon
! test -d .labelle/deps/labelle-bgfx/sdl_gamepad # de-vendored
! test -d .labelle/deps/labelle-bgfx/android_gamepad

cd .labelle/bgfx_desktop
# Resolve the whole dep graph without the heavy C++ build. Patch the
# placeholder fingerprint the same way labelle-cli's runner does
# (mirrors the null step).
set +e
ERR=$(zig build --help 2>&1)
set -e
BAD=$(printf '%s\n' "$ERR" | grep -oE 'invalid fingerprint: 0x[0-9a-f]+' | head -1 | awk '{print $3}')
GOOD=$(printf '%s\n' "$ERR" | grep -oE 'use this value: 0x[0-9a-f]+' | head -1 | awk '{print $4}')
if [ -n "$BAD" ] && [ -n "$GOOD" ]; then
echo "labelle-cli-equivalent fixFingerprint: ${BAD} -> ${GOOD}"
sed -i "s/${BAD}/${GOOD}/" build.zig.zon
fi
zig build --help >/dev/null
echo "PASS: external bgfx fetched + staged self-contained + codegen + graph resolve OK"
# The fetched package staged with its manifest, and codegen wired the dep.
test -f .labelle/deps/labelle-nullfixture/backend.manifest.zon
grep -qF 'b.dependency("labelle_nullfixture"' .labelle/nullfixture_desktop/build.zig

# Headless backend → a full build is cheap (no native C++), so build the
# binary outright rather than only resolving the graph.
cd .labelle/nullfixture_desktop
zig build
test -x zig-out/bin/example_external_null
echo "PASS: external backend fetched + staged self-contained + codegen + build OK"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Update the stale bgfx preamble for the nullfixture step.

The comment immediately above this new step still describes bgfx, zbgfx, and removed bgfx CI coverage, so the workflow retains bgfx-specific CI documentation despite this step now verifying external-null.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 296 - 317, The step description still
mentions bgfx/zbgfx even though this job now verifies the external-null backend,
so update the surrounding comment in the workflow to match the actual
nullfixture end-to-end check. Keep the explanation focused on the current step’s
purpose and reference the existing “Verify an external (out-of-tree) backend
wires up end-to-end” block so the stale bgfx-specific wording is removed.

Comment thread .github/workflows/ci.yml
Comment on lines +314 to +315
cd .labelle/nullfixture_desktop
zig build

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Restore the generated build.zig.zon fingerprint patch before building.

This step invokes labelle-assembler generate directly, but unlike the other direct-assembler examples below, it runs zig build without first applying the labelle-cli-equivalent fingerprint fix. That can make this new CI check fail on Zig’s generated invalid fingerprint diagnostic.

Proposed fix
           # Headless backend → a full build is cheap (no native C++), so build the
           # binary outright rather than only resolving the graph.
           cd .labelle/nullfixture_desktop
+          set +e
+          ERR=$(zig build 2>&1)
+          set -e
+          BAD=$(printf '%s\n' "$ERR" | grep -oE 'invalid fingerprint: 0x[0-9a-f]+' | head -1 | awk '{print $3}')
+          GOOD=$(printf '%s\n' "$ERR" | grep -oE 'use this value: 0x[0-9a-f]+' | head -1 | awk '{print $4}')
+          if [ -n "$BAD" ] && [ -n "$GOOD" ]; then
+            echo "labelle-cli-equivalent fixFingerprint: ${BAD} -> ${GOOD}"
+            sed -i "s/${BAD}/${GOOD}/" build.zig.zon
+          fi
           zig build
           test -x zig-out/bin/example_external_null
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
cd .labelle/nullfixture_desktop
zig build
cd .labelle/nullfixture_desktop
set +e
ERR=$(zig build 2>&1)
set -e
BAD=$(printf '%s\n' "$ERR" | grep -oE 'invalid fingerprint: 0x[0-9a-f]+' | head -1 | awk '{print $3}')
GOOD=$(printf '%s\n' "$ERR" | grep -oE 'use this value: 0x[0-9a-f]+' | head -1 | awk '{print $4}')
if [ -n "$BAD" ] && [ -n "$GOOD" ]; then
echo "labelle-cli-equivalent fixFingerprint: ${BAD} -> ${GOOD}"
sed -i "s/${BAD}/${GOOD}/" build.zig.zon
fi
zig build
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 314 - 315, The CI step for the
nullfixture_desktop example builds with zig build after labelle-assembler
generate, but it is missing the generated build.zig.zon fingerprint fix that the
other direct-assembler examples apply. Update this workflow step to restore the
labelle-cli-equivalent fingerprint patch before invoking zig build, using the
same pre-build sequence already used in the neighboring assembler example steps
so the generated fingerprint is valid.

@apotema
apotema merged commit 6bd20aa into main Jun 30, 2026
4 checks passed
@apotema
apotema deleted the chore/386-assembler-drop-bgfx-examples branch June 30, 2026 15:31
apotema added a commit that referenced this pull request Jun 30, 2026
…le-bgfx) (#423)

The examples-integration preambles still described the removed bgfx-build /
bgfx-android-build jobs + the old bgfx external-fetch step. Point them at
labelle-bgfx (which owns bgfx's build/test now) and describe the agnostic
nullfixture external step. (CodeRabbit on #422.)
apotema added a commit that referenced this pull request Jun 30, 2026
…raction step 1) (#424)

* docs(ci): refresh stale bgfx comments (jobs removed; bgfx is in labelle-bgfx)

The examples-integration preambles still described the removed bgfx-build /
bgfx-android-build jobs + the old bgfx external-fetch step. Point them at
labelle-bgfx (which owns bgfx's build/test now) and describe the agnostic
nullfixture external step. (CodeRabbit on #422.)

* feat(wgpu): conform window to the canonical contract (width/height/frameDuration/requestQuit)

First step of extracting wgpu out-of-tree (#386), mirroring the in-tree
raylib/null conformance (#411): the wgpu window now satisfies labelle-core's
`assertWindow` contract. Adds canonical `width()`/`height()` (physical
framebuffer px), `frameDuration()` (GLFW monotonic clock, first-call baseline),
`requestQuit()` (latches a flag OR'd into windowShouldClose), and the
loop-style `shouldQuit()` alias.

Additive — the desktop template still calls the legacy names + a fixed 0.016 dt,
so generated output is byte-identical; these exist for the contract guard + the
manifest-driven template the extraction will use. initWindow's width/height
params renamed to `*_px` to avoid shadowing the new module-level decls (same
fix #411 made for raylib).
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