Skip to content

Enforce text-only loading for Lua script input - #2111

Closed
Tiago Nápoli (tiagonapoli) wants to merge 2 commits into
microsoft:mainfrom
tiagonapoli:tiagonapoli/lua-text-chunk-validation
Closed

Tiago Nápoli (tiagonapoli) wants to merge 2 commits into
microsoft:mainfrom
tiagonapoli:tiagonapoli/lua-text-chunk-validation

Conversation

@tiagonapoli

Copy link
Copy Markdown
Collaborator

Summary

  • require source-text mode for client-provided Lua scripts using exact-length loading
  • keep application scripts as source text throughout session and global caches
  • remove per-script bytecode generation and its fallback path
  • retain an explicit binary-only API solely for Garnet's private precompiled loader bootstrap

Testing

  • added coverage using a valid compiled chunk for EVAL and SCRIPT LOAD source handling
  • added cross-session cache and host-inserted source coverage
  • added embedded-NUL coverage to verify exact-length parsing
  • dotnet format Garnet.slnx --verify-no-changes
  • dotnet test test\standalone\Garnet.test.scripting\Garnet.test.scripting.csproj -f net10.0 -c Debug --no-restore --filter "Name~ScriptInputsRequireTextSource|Name~HostInsertedScriptSource|Name~EvalUsesFullSourceLength|Name~CrossSessionEvalScriptCaching|Name~MultiSessionScriptFlush" -l "console;verbosity=minimal"

Tiago Napoli and others added 2 commits September 8, 2026 13:46
Track internally generated chunks separately so cached and embedded-host workflows retain their existing behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep application scripts as source text throughout caching and loading while retaining the private precompiled loader bootstrap.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@tiagonapoli

Copy link
Copy Markdown
Collaborator Author

Superseded by a hardened implementation that preserves Garnet's application bytecode cache while enforcing a typed text-only customer boundary. A replacement PR will follow from iagonapoli/fix-lua-bytecode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant