Repository navigation
test(diagnostics): 84 invalid programs, 76 rejected by check, and sixteen typechecker fixes - #12
Closed
Immanuel-Fowler wants to merge 3 commits into
Closed
Immanuel-Fowler wants to merge 3 commits into
Immanuel-Fowler wants to merge 3 commits into
Conversation
… rustc The diagnostics corpus, grown for the paper, found them: a call into a module or a foreign function with the wrong argument types, or to a function the module does not have; a serverlet handler called with the wrong arity or types, where only the handler's name was checked; a handler declared twice in any serverlet, not only a landline; a secret serverlet handler type the wire cannot carry, reported by check rather than by the child's build; `start X(args)` on a serverlet, which takes none; `start` of something that is not a process; `for` over a number or a string; `?` in a function returning neither result nor option; a piped value of the wrong type; a second `orchestrator main`; and, at build, a sandboxed handler that waits, which a guest cannot do. check also registers Rust sidecar signatures now, as the build always did. Without that the stricter checker would have refused every call into a Rust foreign module or the standard library during a check. Every example still passes check and the full suite passes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ects The corpus grows from 30 to 84 deliberately wrong programs across types, events, serverlets of every kind, processes, C, Rust and WebAssembly sidecars, and module boundaries, with the module fixtures they import beside them. The test runs each through `orchestrate check` first and reports the count, 76 of 84, then builds the rest and holds the ones that reach rustc to KNOWN_LEAKS.txt in both directions, so the list is always exactly the truth. benchmarks/diagnostics_coverage.py writes the same classification as CSV, JSON and Markdown. The old closure_wrong_arity case used arrow syntax the language does not have and so tested the parser; it is closure_arrow_syntax now, and closure_wrong_arity calls a real closure with too many arguments. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…e notes Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Stacked on #11 (
test/determinism-trace); merge that first.What
The diagnostics corpus grows from 30 to 84 invalid programs, across types, events, serverlets of every kind, processes, C, Rust, and WebAssembly sidecars (a 57-byte hand-assembled
.wasmfixture included), and module boundaries, with the module fixtures they import beside them underdiagnostics/modules/.The test reports the count.
diagnostics_never_leak_rustcnow runs each case throughorchestrate checkfirst and prints:It holds the leaks to
tests/error_cases/diagnostics/KNOWN_LEAKS.txtin both directions: an unlisted leak fails the test, and a listed case that stops leaking fails it too, so the list is always exactly the truth.benchmarks/diagnostics_coverage.pywrites the same classification as CSV, JSON, and Markdown.Sixteen typechecker fixes, each turning a rustc leak the corpus found into
orchestrate check's own error: module and foreign calls with wrong argument types or to functions the module lacks (the error lists what it has); serverlet handler calls with the wrong arity or types, where only the name was checked; duplicate handlers in any serverlet; secret wire types at check time;start X(args);startof a non-process;forover a scalar;?outside a result-returning function; a piped value of the wrong type; a secondorchestrator main; and a sandboxed handler that waits (at build).checkalso registers Rust sidecar signatures now, as the build always did; without that, the stricter checker would have refused every call into a Rust foreign module or the standard library during a check. Every example still passescheck, and the full test suite passes.What still leaks
Two cases, explained in
LIMITATIONS-notes.md: a function whose body can fall off the end without returning (fn_missing_return), and a generic called with conflicting arguments for one type parameter (generic_arg_conflict). Three candidates turned out to be valid programs and are recorded in the notes instead: a Rust keyword as a name, a string reused after a serverlet call, and a task touchingshared let, which is fine.Changelog entries under
[Unreleased]. No version bump.🤖 Generated with Claude Code