feat(lua): ASOBI_LUA_RELOAD env + asobi_lua_validate CLI module#37
Merged
feat(lua): ASOBI_LUA_RELOAD env + asobi_lua_validate CLI module#37
Conversation
Two small operator-facing additions for self-hosters: 1. `asobi_lua.reload_mode` (or the OS env `ASOBI_LUA_RELOAD`) lets sealed-bundle deployments turn off the per-tick mtime poll. `auto` (default) keeps the existing behaviour; `off` short-circuits the stat. Anything unrecognised falls back to `auto` so a typo can't silently disable reload. 2. `asobi_lua_validate:cli/1` exits 0 if a Lua file loads clean through the runtime sandbox, 1 on syntax error / sandbox violation. Designed to be invoked from CI as `bin/asobi_lua eval 'asobi_lua_validate:cli([\"file.lua\"]).'`. Self-hosting guide updated with the new tuning knob row and a CI example. Tests cover both modules. Also gitignore the local ex_doc output dir; it was getting picked up by `git add -A`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two small operator-facing additions for self-hosters:
Admin reload endpoint (originally tracked in #14) deferred — no real users have asked, and the env var dial is enough for the single-bundle and self-host volume-mount cases that exist today.
Pluggable `asobi_lua_source` behaviour (#13) dropped — premature abstraction; will revisit when a real second caller appears.
Test plan