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,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
**a *b* c**
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
**a __b__ c**
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
**见[链接](https://example.com)**
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
**$x + y$**
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
**~~删除~~**
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
## f
|
||||
|
||||
**a
|
||||
b**
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
*a **b** c*
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
*a _b_ c*
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
**`` ``**
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
*`` ``*
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"expr.parse"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
**1 +**
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"expr.parse"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
*1 +*
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
1. 没有条件
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
- 没有条件
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
1. > 引用不是条件
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
1. 普通文本
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"expr.parse"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
1. `n >`
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
> 这不是调用
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
## f
|
||||
|
||||
> 打印(1)
|
||||
>
|
||||
> 打印(2)
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
> > 打印(1)
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
>
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"expr.parse"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
> 打印(1) 打印(2)
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
> 1 + 2
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
## f
|
||||
|
||||
*1*
|
||||
|
||||
## main
|
||||
|
||||
> [f](#f)
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"ref.unresolved"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## main
|
||||
|
||||
> [x](https://example.com)()
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"module.unresolved"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## main
|
||||
|
||||
> [f](./other.mq.md#f)()
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"ref.unresolved"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## main
|
||||
|
||||
> [f](#不存在)()
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
## f
|
||||
|
||||
*1*
|
||||
|
||||
## f
|
||||
|
||||
*2*
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
# a
|
||||
|
||||
## f
|
||||
|
||||
*1*
|
||||
|
||||
# a
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
##
|
||||
|
||||
*1*
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"markdown.invalid_construct"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
#
|
||||
|
||||
## f
|
||||
|
||||
*1*
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"symbol.unknown"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
*nope(1)*
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"call.arity"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
## g
|
||||
|
||||
**n = n + 1**
|
||||
|
||||
*n*
|
||||
|
||||
## f
|
||||
|
||||
*g(1)*
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"call.arity"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
## g
|
||||
|
||||
`(a: Int, b: Int)`
|
||||
|
||||
*a + b*
|
||||
|
||||
## f
|
||||
|
||||
*g(a=1)*
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"call.arity"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
## g
|
||||
|
||||
`(a: Int)`
|
||||
|
||||
*a*
|
||||
|
||||
## f
|
||||
|
||||
*g(nope=1, a=2)*
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"expr.parse"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
## f
|
||||
|
||||
`(1x)`
|
||||
|
||||
*1*
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"expr.parse"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
## f
|
||||
|
||||
`(a, a)`
|
||||
|
||||
*a*
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"codes": [
|
||||
"expr.parse",
|
||||
"symbol.unknown"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
## f
|
||||
|
||||
`(a = f())`
|
||||
|
||||
*a*
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"symbol.unknown"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
## f
|
||||
|
||||
`(r: Number)`
|
||||
|
||||
*r * typo*
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"symbol.uninitialized"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
## f
|
||||
|
||||
1. `true`
|
||||
|
||||
**x = 1**
|
||||
|
||||
*x*
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"frontmatter.invalid"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
import: [unclosed
|
||||
---
|
||||
|
||||
## main
|
||||
|
||||
*1*
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"frontmatter.invalid"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
import: 42
|
||||
---
|
||||
|
||||
## main
|
||||
|
||||
*1*
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"symbol.unknown"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
> nope(1)
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"expr.parse"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
## f
|
||||
|
||||
*1*
|
||||
|
||||
## main
|
||||
|
||||
> [f](#f)(a=)
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"expr.parse"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
## f
|
||||
|
||||
1. `n >`
|
||||
|
||||
*1*
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"frontmatter.invalid"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
import:
|
||||
a: "x"
|
||||
a: "y"
|
||||
---
|
||||
|
||||
## main
|
||||
|
||||
*1*
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"expr.parse"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
> `x = 1`
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"codes": [
|
||||
"expr.parse"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
## f
|
||||
|
||||
**1x = 2**
|
||||
@@ -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"*
|
||||
Loaded 100 of 511 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user