Skip to content

Host function audit table

Per-function audit of every host function registered on Lua states, confirming each either completes in O(1) time or respects its context parameter for potentially-blocking work. For the invariant this table enforces and the meta-test that backstops it, see Host function context audit. Maintain this table when adding or changing a host function — see Add a host function.

Host function(s)ClassificationHow the invariant is met
holomush.logO(1)Appends a log record via slog with no blocking I/O.
holomush.new_request_idO(1)Generates a ULID using crypto/rand, which does not block under normal operation.
holomush.kv_get, holomush.kv_set, holomush.kv_deletecontext-respectingEach derives context.WithTimeout(L.Context(), defaultPluginQueryTimeout) with a 5-second backend cap; when the CPU deadline fires, L.Context() is already cancelled, so the call returns promptly.
holomush.query_location, holomush.query_character, holomush.query_location_characters, holomush.query_objectcontext-respectingDelegate to world.Service methods that accept a context parameter and return promptly on cancellation.
holomush.create_location, holomush.create_exit, holomush.create_object, holomush.find_location, holomush.set_property, holomush.get_propertycontext-respectingDelegate to context-aware service methods.
holomush.list_commands, holomush.get_command_helpO(1)Read from an in-memory registry with no blocking calls.
holomush.add_session_stream, holomush.remove_session_stream, holomush.join_focus, holomush.leave_focus, holomush.present_focus, holomush.query_stream_historycontext-respectingDelegate to services that accept context parameters.
holomush.evaluatecontext-respectingDelegates to the ABAC engine, which accepts a context parameter and returns promptly on cancellation.
holomush.decrypt_own_audit_rowscontext-respectingDerives work from L.Context() and delegates to the audit decryptor; returns promptly when the context is cancelled.
holomush.register_emit_typeO(1)Appends to an in-memory Lua emit registry with no blocking calls.