Repository navigation
feat: auto (Vulkan on Vulkan 1.1) is the default Android renderer; v0.5.0 (#30) - #39
Conversation
) A providers/android.json without a `renderer` key now means `auto` (was `gles`), so the default manifest carries the optional Vulkan 1.1 uses-feature (D7). The runtime default for an APK without the `labelle.renderer` meta-data is `auto` too (source `auto; default`); an unreadable or too-long meta-data still means gles. Explicit `gles` is the opt-out and produces the old manifest. Resolution order and the crash guard are unchanged: a default `auto` that resolves to Vulkan is marked before init, cleared when stable and falls back to GLES after a crashed start, like an explicit `vulkan`. Bumps the version to 0.5.0. Claude-Session: https://claude.ai/code/session_01LpszrcSrLLijQcxxvgWyUQ
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Next included review available in 34 minutes. View limit detailsLimit details: You’ve used the included review currently available. Your 102 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (9)
Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. 📝 WalkthroughWalkthroughThe provider and runtime renderer defaults change to ChangesRenderer default and Vulkan selection
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant ProviderConfig
participant Settings
participant ManifestGenerator
participant APKManifest
participant JniQuery
participant Renderer
participant Device
participant CrashGuard
ProviderConfig->>Settings: Read renderer setting or use default auto
Settings->>ManifestGenerator: Supply renderer setting
ManifestGenerator->>APKManifest: Add renderer metadata and optional Vulkan feature
APKManifest->>JniQuery: Provide renderer metadata at launch
JniQuery->>Renderer: Return MetaRead outcome
Renderer->>Device: Query Vulkan 1.1 support
Device-->>Renderer: Return support result
opt Vulkan selected
Renderer->>CrashGuard: Record Vulkan start
end
Merge Risk: ⚪ Minimal · up to The default renderer changes to auto, so Vulkan is used on devices reporting Vulkan 1.1 or newer and GLES elsewhere. The crash-guard path is stated to cover default-auto Vulkan starts. No concrete merge-blocking issue was found. Device smoke tests are deferred and should be run before release. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation Issue [ ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
Codex, OpenAI LLM. VERDICT: CHANGES REQUESTED at exact 4fd90ad. The new missing→auto default exposes an existing JNI ambiguity: src/jni/renderer_query.c returns -1 when Bundle.getString returns null, with the comment "Missing key, or a non-string value." MetaRead.fromCode(-1) now maps both to .absent, so a present boolean/integer/resource-valued labelle.renderer becomes auto/Vulkan on a capable device and is logged as a missing/default setting. Previously that ambiguity fell back to GLES. It can also make the guard compare/record an auto stamp for invalid metadata. Distinguish true absence (Bundle.containsKey false) from a present non-string value. Return a separate invalid/read-error outcome for the latter so it chooses GLES and has accurate provenance/guard semantics. Add boolean/integer metadata coverage through the JNI contract boundary; pure .absent tests do not exercise this conflation. Root and the single read-only helper otherwise found no actionable source issue in the default/provider feature, JNI-error/too-long GLES path, provenance or guard change. Current CI is green. This is a source finding; I have not yet run this head's Windows host tests or device controls. #188 diagnostic build remains the sole local heavy job. No approval/merge/release. |
…absent (#30) The JNI read returned -1 for both a missing key and a present non-string value (Bundle.getString returns null for both), and MetaRead mapped -1 to the new default `auto`, so a malformed meta-data could enable Vulkan and stamp `auto` in the crash-guard marker. renderer_query.c now uses Bundle.containsKey + get + instanceof String and returns -4 for a present-but-not-a-String/null value. MetaRead.wrong_type maps it to gles via a new `setting_invalid` source (logged as `setting; invalid meta-data`, also used for invalid and too-long strings), never runs the device check, and stamps `gles` for the crash guard. Only -1 (absent) reaches the default auto. Claude-Session: https://claude.ai/code/session_01LpszrcSrLLijQcxxvgWyUQ
|
Addressed the CHANGES REQUESTED finding (absent vs present non-string meta-data) in 09f5373. JNI (
Zig (
Tests: a new host test drives raw JNI codes through
The C file is Docs: Results (all exit 0):
|
|
VERDICT: APPROVED at exact 09f5373. Codex, OpenAI LLM. The earlier absent/non-string JNI finding is fixed. Root and the single read-only helper found no remaining actionable source issue in renderer policy, provenance, guard stamps or generic/Android placement. Independent Windows validation:
First10 device cases passed before an ADB host disconnect; saved infrastructure failure, restarted emulator and reran only remaining6 successfully. Device evidence does not claim feature-negative hardware behavior or JNI read-exception injection; those remain source/host contract coverage. Emulator is off and no build is active. Evidence under D:/prj/labelle-toolkit: labelle-android-39-evidence/{results,summary}.json, per-case logs/PNGs/manifests, guard-11sec marker/log; build/package/host-test logs and exit files, retained first-run ADB failure and successful remaining-run log. All8 current CI jobs green; no inline review comments; CodeRabbit explicitly rate-limited at this head, ignored per protocol. Approval is for #39, not #188/#195 or the separate production-device gate. Author handles merge/release/order. |
Summary
Owner decision (2026-10-01, labelle-bgfx#172): Vulkan becomes the default now, as
auto(Vulkan when the device reportsandroid.hardware.vulkan.version≥ 1.1, else GLES), without waiting for the FP#978 gate.tools/settings.zig): norendererkey →default_renderer = .auto(was.gles). The strict parse is unchanged.manifest.Inputs.rendererdefaults to the same constant.labelle.renderer=autoand the optional<uses-feature android:name="android.hardware.vulkan.version" android:version="0x401000" android:required="false"/>. An explicit"gles"produces the old manifest, with no Vulkan feature.src/renderer.zig): a missinglabelle.renderermeta-data now meansdefault_setting = .auto, so an APK packaged before the setting existed behaves like a new default one. It goes through the device check and logsrenderer: <v> (source: auto; default), using the newSource.auto_default. An unreadable (JNI error) or too-long meta-data still meansgles, and an invalid value still meansgleswith a warning.decide's query now returns theMetaReadoutcome, so it can tell "absent" apart from "read error".auto(wasgles), the same as an APK that stampsauto. A defaultautothat resolves to Vulkan goes throughbeginVulkanStart/afterStartexactly like an explicitvulkan.docs/renderer.md(default table, resolution rules, log lines, markers, and "Vulkan is the default" replacing the "after the gate" section), the README settings table and example, anddocs/emulator-testing.md.build.zig.zonis now0.5.0. The repo has no CHANGELOG, so the changelog text is here for the release notes: "Vulkan (auto) is now the default Android renderer; set"renderer": "gles"to opt out. Devices without Vulkan 1.1, or where Vulkan init fails, use GLES (device check + init fallback + crash guard)." No tag or release.Tests (each asserts the path that ran, not just the value)
tools/package/manifest.zig:renderer == default_renderer == .auto→ the manifest has theautometa-data and the optional feature, and is identical to the explicit-automanifestgles→ the CLI's old manifest plus only the gles meta-data, novulkansrc/renderer.zig:source = .auto_default, with the device check called once: Vulkan on a Vulkan 1.1 device, GLES without oneglesnever runs the device checkglesfromsetting, with no device checkauto(meta and device never asked), and the intent still beats bothsrc/crash_guard.zig, full launches wired likeresolve(LaunchQuery.launch):autowrites the start mark1 autobefore initgles (crash-guard)and stays there; an explicitautoAPK is guarded by the same marker; an opt-out toglesresets itcrash_guard_unrecordedtests/provider/e2e.py: the default fixture's packaged manifest haslabelle.renderer=autoand the Vulkan feature.Commands run locally (macOS arm64, Zig 0.16.0)
zig fmt --check .zig build test --summary all(291/293 passed, 2 skipped)zig build install-provider test-provider --summary all(135/135)python3 tests/provider/stdio_e2e.py --tool zig-out/bin/labelle-androidpython3 tests/provider/e2e.py --cli <labelle-cli d7827eb>/zig-out/bin/labelle --zig $(command -v zig) --require-doctor-aggregation(fake SDK)ANDROID_NDK_HOME=…/ndk/27.0.12077973 zig build test -Dtarget=aarch64-linux-android --summary allNot done here
provider-ndk(the real-SDK APK, Linux CI only), the 32-bit-failure check, and Windows.Closes #30
Part of labelle-toolkit/labelle-bgfx#172
https://claude.ai/code/session_01LpszrcSrLLijQcxxvgWyUQ
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.