test: gate Tool v1 dispatch on frozen RC.1 and RC.2 releases

Refs #1
This commit is contained in:
cflmy committed 2026-11-24 00:06:14 +08:00
1 parent 81fcab0e3a
commit 5f66f04d90
10 files changed
+670 -17

No files matched your search

+8
View File
@@ -136,6 +136,14 @@ impl<'a, 'source> Matcher<'a, 'source> {
.is_some_and(|control| self.tree.controls[control].kind == ControlKind::Loop),
StatementKind::Break => located.jump == Some(JumpKind::Break),
StatementKind::Continue => located.jump == Some(JumpKind::Continue),
StatementKind::Expression => {
let value = &statement.value["value"];
// RC.1 could emit these bare identifiers as variable expressions.
located.ordinary
|| (located.jump.is_some()
&& value["kind"] == "variable"
&& value["name"].as_str() == Some(located.carrier.payload.trim()))
}
_ => located.ordinary,
};
let primary = index.at(statement.span).filter(eligible);
+6 -2
View File
@@ -97,7 +97,11 @@ pub fn check_heading_boundary(
.filter(|diagnostic| {
matches!(
diagnostic.code.as_str(),
"sem.unmatched_else" | "sem.unmatched_end"
"sem.unmatched_else"
| "sem.unmatched_else_if"
| "sem.unmatched_end"
| "sem.break_outside_loop"
| "sem.continue_outside_loop"
)
})
.find_map(|diagnostic| {
@@ -117,7 +121,7 @@ pub fn check_heading_boundary(
.name;
diagnostics.push(
Diagnostic::new("MQD-KNOW-001", markdown.nodes[heading.node].span)
.with_message("核心报告控制块未闭合,后续标题段的 else/end 无法关闭它")
.with_message("核心报告控制块未闭合,后续标题段的控制载体无法关联到该控制块")
.with_related(opener.span)
.with_related(related.span)
.with_function(name),