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
+6
-2
@@ -161,7 +161,9 @@ The call result is discarded by the statement form; use `strong` to bind it
|
||||
* `*表达式*` used in a branch is a return from the whole function.
|
||||
* A function that ends without a return evaluates to `Unit`. `None` is an
|
||||
explicit empty value and is distinct from `Unit`.
|
||||
* Return at module top level (outside any function) is an error.
|
||||
* An `emph` node outside any function body is inert document content and emits
|
||||
a `markdown.inert_executable` warning (ADR-0002); it is not executed and is
|
||||
not a hard error. Inside a function body, every `emph` is a return.
|
||||
|
||||
## 6. Function signatures and parameter inference
|
||||
|
||||
@@ -238,5 +240,7 @@ The following are compile errors with source spans, never prose fallbacks:
|
||||
* block quote that is not exactly one complete call;
|
||||
* duplicate function names in a scope;
|
||||
* empty heading names;
|
||||
* return outside a function;
|
||||
* `emph`/`strong`/control structures outside any function body are inert and
|
||||
produce a `markdown.inert_executable` warning (see §4); they never return
|
||||
from or execute anything at module level;
|
||||
* executable node inside a lazy region being interpreted (must not happen).
|
||||
Reference in new issue
Block a user