fix: float wire precision, native stack safety, refs diagnostics and fixtures
Findings from the conformance corpus workstream, all fixed at the source: - value/wire: enable serde_json's float_roundtrip so typed wire floats keep their exact digits across foreign/plugin boundaries (Python pi*9 now stays 28.274333882308138). - host: default interpreter stack budget lowered to 128 frames so deeply recursive documents hit a structured resource.exhausted instead of exhausting the native debug-build Rust stack; --stack remains available. - frontend/map: calling an external HTTP(S) link is reported as ref.unresolved (consistent with other unresolvable call targets) instead of math.unsupported. - frontend/analyze: invalid front matter emits a single frontmatter.invalid diagnostic (the YAML error is not repeated by the imports pass). - spec/mapping: clarify that would-be execution nodes outside any function body are inert with a markdown.inert_executable warning (no "return outside a function" hard-error claim). - tests: add the conformance corpus and harness (150 AST goldens, 36 semantic goldens, 48 hard-error + 6 warning + 10 runtime-error negatives, CLI/module/ plugin integration tests, prose-invariance properties) and update the three reported observations to the fixed behaviour.
This commit is contained in:
1 parent
33341a0e92
commit
847c2c1580
511 files changed
+11678
-26
No files matched your search
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"function": "main",
|
||||
"args": {},
|
||||
"codes": [
|
||||
"runtime.division_by_zero"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## main
|
||||
|
||||
*1 // 0*
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"function": "main",
|
||||
"args": {},
|
||||
"codes": [
|
||||
"runtime.type"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## main
|
||||
|
||||
*1 + "x"*
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"function": "main",
|
||||
"args": {},
|
||||
"codes": [
|
||||
"runtime.index"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## main
|
||||
|
||||
*[1, 2][5]*
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"function": "main",
|
||||
"args": {},
|
||||
"codes": [
|
||||
"runtime.unknown_field"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## main
|
||||
|
||||
*{"a": 1}.b*
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"function": "main",
|
||||
"args": {},
|
||||
"codes": [
|
||||
"call.not_callable"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
## main
|
||||
|
||||
**x = 1**
|
||||
|
||||
*x(1)*
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"function": "main",
|
||||
"args": {},
|
||||
"codes": [
|
||||
"permission.denied"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
## 代码
|
||||
|
||||
```python
|
||||
print(1)
|
||||
```
|
||||
|
||||
## main
|
||||
|
||||
*foreign.call(ref("#代码"), None)*
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"function": "main",
|
||||
"args": {},
|
||||
"codes": [
|
||||
"math.unsupported"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
## 公式
|
||||
|
||||
$$
|
||||
\sin(x)
|
||||
$$
|
||||
|
||||
## main
|
||||
|
||||
*math.eval(ref("#公式"), {})*
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"function": "递归",
|
||||
"args": {},
|
||||
"codes": [
|
||||
"resource.exhausted"
|
||||
],
|
||||
"stack_limit": 24
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## 递归
|
||||
|
||||
*递归()*
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"function": "main",
|
||||
"args": {},
|
||||
"codes": [
|
||||
"runtime.type"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
## main
|
||||
|
||||
1. `1`
|
||||
|
||||
*1*
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"function": "main",
|
||||
"args": {},
|
||||
"codes": [
|
||||
"call.arity"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
## f
|
||||
|
||||
**n = n + 1**
|
||||
|
||||
*n*
|
||||
|
||||
## main
|
||||
|
||||
**g = ref("#f")**
|
||||
|
||||
*g(bad=1)*
|
||||
Reference in new issue
Block a user