Repository navigation
feat(#593): scripting codegen splice — embed scripts, wire the plugin, drain touchpoint - #596
Conversation
…, drain touchpoint Makes .params.language projects RUN their scripts (epic labelle-engine#237; contract labelle-engine#749; plugin labelle-scripting#1): - scripting_splice.detect(): the #589-parsed language + manifest name 'scripting' gate; EMBED_LANGUAGES table (lua -> .lua; native languages deliberately absent -> warn, no splice). - Copy <lang>/ via the prefabs/scenes scanner machinery (sorted stems, /-joined subdirs); generated main registers each script (scripting.registerScript(stem, @embedfile(...))) BEFORE PluginControllers.setup boots the VM — both lifecycle shapes. - module_vars emit the scripting import alias + scripting_enabled flag; build.zig passes .language enum to the plugin dependency. - drainEvents rides tick_code between the plugin ticks and g.dispatchEvents (engine-gated, outside the scaled_dt gate) — NOT the backend template: dispatch is emitted inside the tick_code hole, so a template drain would tap an already-swapped buffer; riding tick_code also lands the drain on every backend at once. Templates carry only the bind touchpoint (bgfx PR). - Tests: 6 zspec (registrations sorted/pre-setup, drain placement, whole-main expectAstGenOk, empty-set, no-splice zero-markers, build.zig .language) + 7 unit; all byte-identity goldens unchanged (script-less projects byte-identical). Clean-HOME: 50/50 steps, 1576/1580 (4 skipped). Closes #593 Claude-Session: https://claude.ai/code/session_01P7YLw4hXFCCaY2LAUt4G1j
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reached
Next review available in: 46 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Makes
.params = .{ .language = "lua" }projects run their scripts. Closes #593 (epic labelle-toolkit/labelle-engine#237).scripting) → copylua/via the scanner machinery → generated main registers each script (@embedFile, sorted, beforePluginControllers.setupboots the VM) → build.zig passes.languageto the plugin dep →scripting_enabledflag + import alias viamodule_varsfor the template gate.drainEventsrides the assembler'stick_codebetween the plugin ticks andg.dispatchEvents()— it CANNOT live in backend templates (dispatch is emitted inside the{{tick_code}}hole; a template drain would tap an already-swapped buffer, and the contract forbids post-dispatch taps). Riding tick_code also lands the drain on every backend at once; templates carry onlybind(labelle-bgfx companion PR).Companion: labelle-toolkit/labelle-bgfx bind-touchpoint PR. Next: null-template touchpoint +
examples/scripting-smoke(labelle-toolkit/labelle-engine#739).https://claude.ai/code/session_01P7YLw4hXFCCaY2LAUt4G1j