Track
Lua
Review table shapes, nil boundaries, modules, metatables, coroutines, sandboxed execution, embedded APIs, and tests.
- 01
Tables as records and arrays
Keep table shape clear when a value behaves like a record, array, or map.
tablesshaperecords - 02
Nil boundaries and defaults
Normalize nil at the boundary so the rest of the code can distinguish missing data from empty values.
nildefaultsboundaries - 03
Module return contracts
Return an explicit module table so require calls expose a stable API instead of hidden globals.
modulesrequireglobals - 04
Metatable operator boundaries
Use metatables for clear domain behavior, not for surprising mutation or hidden lookup rules.
metatableoperatorsdomain - 05
Coroutine lifecycle
Check coroutine status and resume results so yielded work cannot fail silently.
coroutineslifecycleerrors - 06
pcall error handling
Wrap untrusted or plugin code with pcall and convert failures into typed results for the host app.
pcallerrorsplugins - 07
Sandboxed execution
Limit the environment for dynamic Lua chunks so scripts can use approved helpers without reaching host globals.
sandboxenvironmentsecurity - 08
Embedded API boundaries
Keep host-provided APIs small and explicit when Lua scripts extend an application.
embeddedapihost - 09
Configuration validation
Validate Lua configuration tables before using them to build routes, plugins, or runtime behavior.
configurationvalidationtables - 10
Busted test cases
Write Lua tests around observable module behavior instead of only checking that functions return truthy values.
testsbustedassertions