Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions compatibility/conformance-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"id": "compound-expression-tokens",
"claim": "Compound expression punctuation and token adjacency are preserved for the parser.",
"probeKinds": ["positive", "contextual"],
"probes": ["synthetic/issue-28-syntax"]
"probes": ["synthetic/expressions-values"]
},
{
"id": "malformed-lexical-input",
Expand All @@ -45,7 +45,7 @@
],
"probeFixtures": [
"synthetic/issue-28-string-modifiers",
"synthetic/issue-28-syntax",
"synthetic/expressions-values",
"synthetic/issue-28-invalid-syntax",
"synthetic/issue-33-f-string",
"real-world/overpy-zencopter"
Expand Down Expand Up @@ -76,7 +76,7 @@
"id": "branches-loops-and-switches",
"claim": "Branches, loops, switch ordering, and break shapes are parsed distinctly.",
"probeKinds": ["positive", "contextual", "negative"],
"probes": ["synthetic/control-flow", "synthetic/issue-47-control-flow", "synthetic/issue-47-do-while-invalid-placement", "synthetic/issue-47-do-while-shapes", "synthetic/issue-47-switch-multiple-break", "synthetic/issue-47-switch-order", "synthetic/issue-47-switch-structured-target", "synthetic/issue-47-unsupported", "synthetic/issue-33-switch-break", "synthetic/for-range-agentlab"]
"probes": ["synthetic/control-flow", "synthetic/issue-47-control-flow", "synthetic/issue-47-do-while-invalid-placement", "synthetic/issue-47-do-while-shapes", "synthetic/issue-47-switch-order", "synthetic/issue-47-switch-structured-target", "synthetic/issue-33-switch-break", "synthetic/for-range-agentlab"]
},
{
"id": "lambda-and-postfix-context",
Expand All @@ -86,30 +86,26 @@
},
{
"id": "indexed-assignment-depth",
"claim": "Indexed assignment depth has explicit supported and unsupported parser shapes.",
"probeKinds": ["contextual", "negative"],
"probes": ["synthetic/issue-46-primitives", "synthetic/issue-60-4d-negative"]
"claim": "Indexed assignment and access forms retain their structural boundaries before lowering.",
"probeKinds": ["contextual"],
"probes": ["synthetic/issue-46-primitives"]
}
],
"probeFixtures": [
"synthetic/basic-rule",
"synthetic/expressions-values",
"synthetic/control-flow",
"synthetic/issue-28-syntax",
"synthetic/issue-33-lambda-negative",
"synthetic/issue-33-switch-break",
"synthetic/issue-47-control-flow",
"synthetic/issue-47-do-while-invalid-placement",
"synthetic/issue-47-do-while-shapes",
"synthetic/issue-47-switch-multiple-break",
"synthetic/issue-47-switch-order",
"synthetic/issue-47-switch-structured-target",
"synthetic/issue-47-unsupported",
"synthetic/issue-33-switch-break",
"synthetic/issue-59-embedded-postfix-negative",
"synthetic/issue-59-postfix-assignment",
"synthetic/issue-59-postfix-negative",
"synthetic/issue-60-4d-negative",
"synthetic/issue-60-nested-index",
"synthetic/for-range-agentlab",
"synthetic/issue-46-primitives",
Expand Down Expand Up @@ -276,7 +272,7 @@
"id": "vertical-slice",
"claim": "A successful source-to-WIR vertical slice is comparable through the canonical Workshop contract.",
"probeKinds": ["positive"],
"probes": ["synthetic/issue-35-integration", "synthetic/issue-40-structural"]
"probes": ["synthetic/issue-35-integration", "synthetic/issue-40-structural", "synthetic/issue-28-syntax"]
},
{
"id": "assignments-and-indexing",
Expand Down Expand Up @@ -318,6 +314,7 @@
"probeFixtures": [
"synthetic/issue-35-integration",
"synthetic/issue-40-structural",
"synthetic/issue-28-syntax",
"synthetic/issue-46-primitives",
"synthetic/issue-46-unsupported",
"synthetic/issue-47-control-flow",
Expand Down
5 changes: 4 additions & 1 deletion compatibility/conformance.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
"w_already_imported": "preprocess",
"do-while-placement": "semantic",
}
FRONTIER_CONSTRUCTS = {
"lambda-context": "parse-error",
}
PROBE_KINDS = {"positive", "negative", "contextual", "composition"}


Expand Down Expand Up @@ -220,7 +223,7 @@ def native_frontier(result: dict[str, Any]) -> dict[str, str] | None:
if stage is None:
failure_class = compile_result.get("failureClass")
stage = "lowering" if failure_class == "integration" else "semantic"
return {"stage": stage, "construct": code}
return {"stage": stage, "construct": FRONTIER_CONSTRUCTS.get(code, code)}


def run_compile(binary: Path, directory: Path, metadata: dict[str, Any]) -> dict[str, Any]:
Expand Down
13 changes: 13 additions & 0 deletions compatibility/tests/test_conformance.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,19 @@ def test_native_frontier_skips_warnings_before_the_first_error(self):
{"stage": "parse", "construct": "parse-error"},
)

def test_native_frontier_normalizes_lambda_context_to_parse_frontier(self):
result = {
"compile": {
"status": "failure",
"failureClass": "frontend",
"diagnostics": [{"code": "lambda-context"}],
}
}
self.assertEqual(
conformance.native_frontier(result),
{"stage": "parse", "construct": "parse-error"},
)

def test_reference_success_native_failure_is_divergence(self):
oracle = {
"compile": {"status": "success", "diagnostics": []},
Expand Down
8 changes: 8 additions & 0 deletions docs/opy/conformance-baseline.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,11 @@ Its summary groups results by the manifest's root capability and owner, and
its fixture entries retain both reference and native diagnostics. It is the
current divergence inventory used to group follow-up work. No current native
failure is entered into the manifest as an expected pass.

The broad `synthetic/issue-28-syntax` probe is inventoried under the
canonical-WIR boundary rather than lexical conformance. Its source compiles
successfully, but the pinned Workshop output contains `0X20`, which the
released `workshop-rs` parser does not currently reparse; this is a
`workshop-rs` evidence limitation, not an OPY lexer divergence. Likewise,
switch multi-break and nested switch-break probes remain lowering-only gaps
and are not parser failures.