Publish native arity and validate callback contracts before registration
Verify Tessera GUI / verify (push) Failing after 7m44s

This commit is contained in:
2026-10-22 12:03:24 +08:00
parent 50422f801a
commit 25275b515c
17 changed files with 297 additions and 35 deletions
+17 -1
View File
@@ -58,7 +58,23 @@ pub fn connect(
.properties
.ok_or(VmError::InvalidArgument("missing property storage"))?;
cx.store().get_attr(properties, field)?;
cx.store().object(compute)?;
if !cx.store().object(compute)?.payload().is_function() {
return Err(VmError::InvalidArgument(
"binding compute must be a Function",
));
}
if !cx
.store()
.call_arity(compute)?
.ok_or(VmError::InvalidArgument(
"binding compute requires positional metadata",
))?
.accepts(0)
{
return Err(VmError::InvalidArgument(
"binding compute requires zero unbound parameters",
));
}
let mut retained = vec![];
for connection in &data.bindings {
let mut binding = cx