Repository navigation
chore(agnostic): drop bgfx examples + android job; external test uses nullfixture - #422
Conversation
… 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.
📝 WalkthroughWalkthroughRemoves the Changesbgfx example removal and external-null CI migration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (1)
examples/bgfx-android/assets/icon.tgais excluded by!**/*.tga
📒 Files selected for processing (17)
.github/workflows/ci.ymlexamples/bgfx-android/.gitignoreexamples/bgfx-android/README.mdexamples/bgfx-android/android/AndroidManifest.xmlexamples/bgfx-android/assets/icon.jsonexamples/bgfx-android/package_apk.shexamples/bgfx-android/project.labelleexamples/bgfx-android/scenes/main.jsoncexamples/bgfx-external/scripts/.gitkeepexamples/bgfx/.gitignoreexamples/bgfx/project.labelleexamples/bgfx/scenes/main.jsoncexamples/bgfx/scripts/.gitkeepexamples/external-null/.gitignoreexamples/external-null/project.labelleexamples/external-null/scenes/main.jsoncexamples/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
| - 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" |
There was a problem hiding this comment.
📐 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.
| cd .labelle/nullfixture_desktop | ||
| zig build |
There was a problem hiding this comment.
🎯 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.
| 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.
…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).
The assembler no longer carries anything bgfx-specific
Completes bgfx's exit from the assembler (after the backend slim in #420):
examples/bgfx,examples/bgfx-android) — they now live in labelle-bgfx with their own CI (labelle-bgfx#2, incl. the android.socross-build).bgfx-android-buildCI job — its coverage moved with the example.examples/external-nulluses the headlessnullfixtureout-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 testgreen; external-null verified locally (fetch → generate → headless build → runnable binary).Summary by CodeRabbit