Repository navigation
fix(tools): apply runtime contracts to std examples - #1057
Merged
LunaStev merged 4 commits intoNov 2, 2026
Merged
Conversation
Signed-off-by: hiyouwhatsapp <[email protected]>
Signed-off-by: hiyouwhatsapp <[email protected]>
Signed-off-by: hiyouwhatsapp <[email protected]>
Member
|
The runtime-contract validation is a useful improvement, but the current CI reports a regression in The test fails with: Please investigate why the execution report no longer contains the expected Also, please verify that fixture-defined environment variables preserve the necessary compiler execution environment instead of unintentionally replacing it. Once these issues are addressed, please rerun the full CI suite. |
Overlay fixture variables on the supplied compiler environment. Keep actual_exit present for unfinished cases, and give real fake-compiler processes sufficient startup time before testing timeout handling. Signed-off-by: devlewanabe <[email protected]>
LunaStev
approved these changes
Nov 2, 2026
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.
Fixes #994
The std example runner only accepted exit 0 and wasn't checking output fixtures, so a broken example could still pass.
It now uses the existing test-contract helpers for expected exits, stdin, environment and stdout/stderr. Unsupported run modes fail explicitly, and reports cannot overwrite borrowed fixtures.
Fixture variables overlay the supplied compiler environment, preserving compiler SDK settings and other inherited values. Reports retain actual_exit for completed processes and use null when execution never completes.
The reported KeyError came from the fake compiler's 200 ms startup timeout: an ordinary failure could be classified as a timeout before it returned exit 7. The regression now allows startup time while still checking real timeout termination, captured output and JSON exit reporting.
Validation: