Repository navigation
Conversation
skhaz
approved these changes
Sep 30, 2026
wolfy-j
force-pushed
the
feature/tick-preemption
branch
from
November 10, 2026 03:00
397cc2b to
fa08172
Compare
wolfy-j
force-pushed
the
feat/runtime-argument-contracts
branch
from
November 10, 2026 03:00
5908d78 to
ffe81d2
Compare
wolfy-j
force-pushed
the
feat/runtime-argument-contracts
branch
from
November 10, 2026 04:07
ffe81d2 to
7572c35
Compare
Contributor
Author
|
Rebased onto #60 at its new tip (tag |
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.
Purpose
Let embedders validate arguments at an external function boundary using explicit Lua parameter declarations. Ordinary VM calls are unchanged. Wippy's Lua function integration in wippyai/runtime#887 calls the new helper; there is no global VM validation switch.
Implementation
any; contextual/inferred signatures do not become runtime contracts.FunctionProto.CheckArguments(state, args)lazily decodes immutable metadata and uses the existingType:isvalidator. It checks missing values as nil and typed varargs, returning non-retryable INVALID errors with argument/parameter/field details.TypeInfo; only each callable's own descriptor is retained. No additional global cache.Semantics and limits
No return validation, coercion, inferred-arity enforcement, or global VM-call changes. Extra ordinary arguments remain allowed. Validation has precisely the existing runtime type semantics: records allow extra fields, arrays/string-keyed maps validate their respective table portions, function types check callable kind and platform types check userdata kind. Generic function parameters are not dynamically instantiated from argument values.
Verification
go vet ./...passes.Review stack
This PR is stacked on go-lua #60 and owns both dependency commits previously tested by runtime's temporary integration branch. The composition commit adds no source changes. Runtime #887 pins this reproducible commit and is stacked on runtime #893.
Land #60 before this PR. Updated-head CI is rerunning; prior verification is not a claim that the new CI run is complete. Nothing has been merged or released.
CI corrections
Current landing review — 2026-10-31
The exact
5908d78c86c80319a4ad42f1db0577a271a94532head has twelve successful hosted checks, and focused argument-contract tests pass locally under the race detector. This remains a stack onfeature/tick-preemption(#60), not a standalone change against main. Rodrigo's recorded approval namesfd9105fd69f6f574fb57aa9aa2b9859e1b5f36c5, before the current composed dependency state.Hold landing until #60 has a qualified current-main integration, then verify this contract-only delta, manifest/bytecode compatibility and consumer integration at the resulting exact head. Runtime #887 remains untouched in this review. No release or Runtime adoption is inferred from the passing stacked-head checks.
The approved
fd9105fpatch was also isolated directly on current main in an owned worktree: it applies cleanly as a twelve-file contract-only change and its focused race tests pass. That proves mechanical independence of the library code, not approval to reorder the consumer stack. Runtime #887 explicitly integrates on #893, pins the composed library revision, and exercises initializer preemption alongside validation. The original #58 branch/base remain unchanged; the local extraction was not pushed and no Runtime dependency was altered. Preserve the documented landing order until that combined integration is qualified.