Motivation
qjson's real deployment target is OpenResty (the bench harness uses resty; homepage is api7/lua-qjson). But the CI lua job installs Ubuntu's apt package luajit (upstream LuaJIT) and tests only against that.
lua-cjson's CI matrix explicitly includes a luajit-openresty dimension. OpenResty ships a patched LuaJIT fork whose GC behavior, ffi internals, and default flags can differ from upstream LuaJIT. Since qjson leans hard on FFI semantics and GC-pinning (_hold keeps the input buffer alive for the doc's lifetime — see CLAUDE.md "Buffer lifetime" invariant), divergence here is exactly the kind of thing a single-runtime CI would miss.
Proposed work
Add OpenResty's LuaJIT as a second dimension of the existing lua job (keep upstream LuaJIT too):
- Option A:
leafo/gh-actions-lua with luaVersion: "luajit-openresty" (already used by lua-cjson).
- Option B: run the busted suite inside an
openresty/openresty container, or install OpenResty and drive via resty.
Run the existing tests/lua/ busted suite (especially gc_spec.lua and the lazy-table / _hold GC-pinning paths) under both runtimes.
Acceptance
- CI
lua job runs tests/lua/ under both upstream LuaJIT and OpenResty LuaJIT.
- GC-pinning / lifetime specs pass under OpenResty's LuaJIT.
Affected files
Distinct from #70 (OPM publishing / Windows) — this is about test coverage of the OpenResty runtime, not packaging/distribution.
Motivation
qjson's real deployment target is OpenResty (the
benchharness usesresty; homepage isapi7/lua-qjson). But the CIluajob installs Ubuntu'saptpackageluajit(upstream LuaJIT) and tests only against that.lua-cjson's CI matrix explicitly includes a
luajit-openrestydimension. OpenResty ships a patched LuaJIT fork whose GC behavior,ffiinternals, and default flags can differ from upstream LuaJIT. Since qjson leans hard on FFI semantics and GC-pinning (_holdkeeps the input buffer alive for the doc's lifetime — see CLAUDE.md "Buffer lifetime" invariant), divergence here is exactly the kind of thing a single-runtime CI would miss.Proposed work
Add OpenResty's LuaJIT as a second dimension of the existing
luajob (keep upstream LuaJIT too):leafo/gh-actions-luawithluaVersion: "luajit-openresty"(already used by lua-cjson).openresty/openrestycontainer, or install OpenResty and drive viaresty.Run the existing
tests/lua/busted suite (especiallygc_spec.luaand the lazy-table /_holdGC-pinning paths) under both runtimes.Acceptance
luajob runstests/lua/under both upstream LuaJIT and OpenResty LuaJIT.Affected files
.github/workflows/ci.ymlDistinct from #70 (OPM publishing / Windows) — this is about test coverage of the OpenResty runtime, not packaging/distribution.