the judge is a bracketed token, and the brackets are part of the match - #446
Merged
Merged
Conversation
`compat.py` recorded a member as correctly "refused" when its output matched the bare word `interface-not-provided`, under a comment claiming the judge was "the engine's own refusal code and NOT a string in the diagnostic". It was a string in the diagnostic. What the comment was reaching for is true but was not what the code did: mcpp prints `[interface-not-provided]` in brackets, the way it prints `E0006`, and the token is an entry in docs/50's table -- a machine interface this index may read rather than a sentence that may be rewritten. The brackets are what make it one. Read as a bare word it is a hyphenated phrase an ordinary compile error can contain: an upstream message quoting a manifest key, or a member's own diagnostic naming the condition. A member that merely failed would then be published as correctly refused, which moves the figure in the direction that flatters the engine. `classify_failure` is split out of `measure` so the rule has a criterion that runs without a toolchain, a network or a member, and `compat.py selftest` states five: a bracketed token is a refusal, the same token as prose is a failure, an ordinary compile error is a failure, a member that ran and failed its tests still built, and the same output without a runner is not evidence it built. Restoring the previous matcher fails the second and only the second. The step runs in `lint` rather than in openkal-compat.yml: its cases are about the rule, not about any member, and the measurement it guards takes four hours to reach.
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.
What this changes
compat.pyclassified a member as correctly refused whenever its output matched the bare wordinterface-not-provided. The comment above that line claimed the judge was "the engine's own refusal code and NOT a string in the diagnostic" — it was a string in the diagnostic.The distinction the comment was reaching for is real. mcpp prints
[interface-not-provided]in brackets, the way it printsE0006, and the token is an entry indocs/50-machine-output.md's table: a machine interface this index may read, rather than a sentence that may be rewritten. The brackets are what make it one, so they are now part of the match.Why it matters
Read as a bare word,
interface-not-providedis a hyphenated phrase an ordinary compile error can contain — an upstream message quoting a manifest key, or a member's own diagnostic naming the condition. A member that merely failed would be published as correctly refused, moving the compatibility figure in the direction that flatters the engine.The rule now has a criterion
classify_failureis split out ofmeasureso it can be exercised without a toolchain, a network or a member.compat.py selfteststates five cases:Restoring the previous matcher fails the second and only the second:
The step runs in
lint, not inopenkal-compat.yml: its cases are about the rule rather than any member, and the measurement it guards takes four hours to reach.