test: cover qualified function calls with three segments#448
Conversation
Symptom: all open PRs against main failed the shared build-and-test job in make test-integration, even when their local build/test/lint validation passed. The failures reproduced on origin/main, so they were baseline CI instability rather than PR-specific regressions. Root cause: TestWatcherDebounce could allow stale timer callbacks to send an extra message under slow scheduling, nanoflow integration fixtures used MDL syntax that no longer matched the grammar, and the doctype mx-check harness did not classify known page/nanoflow showcase consistency errors as expected limitations. Fix: guard watcher debounce callbacks with a generation counter, tighten the watcher burst test, update nanoflow fixtures to current MDL syntax, and extend the known consistency-error allowlist for showcase-only limitations. Tests: make build Tests: go test ./cmd/mxcli/tui -run TestWatcherDebounce -count=20 -v Tests: ./bin/mxcli check mdl-examples/doctype-tests/02b-nanoflow-examples.mdl Tests: go test -tags integration -count=1 -timeout 30m ./mdl/executor -run 'TestRoundtripNanoflow_(Loop|EnumParameter|Annotations)|TestMxCheck_DoctypeScripts/02b-nanoflow-examples.mdl|TestMxCheck_DoctypeScripts/03-page-examples.mdl' -v Tests: make test Tests: make lint-go Tests: make test-integration
Symptom: the qualified function call regression coverage only asserted a two-segment callee and left the bug-test coverage implicit. Root cause: the expression parser fix accepts qualifiedName callees, including three-segment names, but the tests did not pin that shape directly. Fix: update the visitor regression to use a synthetic three-segment callee and add a parser-level bug-test MDL file that checks the same IF-condition form. Tests: ran make build, targeted mdl/visitor qualified-call tests, mxcli check for the bug-test MDL file, make test, and make lint-go.
6be73f5 to
866cfaf
Compare
|
CI stabilization note: merged #412 into this branch so it uses the same integration-CI baseline as the rest of the active PR set. |
Symptom: CI failed in TestMxCheck_DoctypeScripts/empty_java_action_argument.mdl because a Java action declared as RETURNS Void was written as an entity return type named .void, and Studio Pro reported CE1613. Root cause: the generic data-type visitor treats bare qualified names as entity/enumeration references. Java action return types reused that generic path, so the explicit Void spelling became a qualified name instead of ast.TypeVoid. Fix: add a Java-action return-type wrapper that maps unqualified Void to ast.TypeVoid while leaving generic data-type parsing unchanged for parameters and attributes. Tests: added visitor coverage for explicit RETURNS Void; verified mxcli check for the doctype fixture and the targeted integration subtest that failed in GitHub Actions.
AI Code ReviewReview SummaryThis PR fixes a regression where qualified function calls in IF conditions failed to parse when the callee wasn't a built-in function name. The changes are focused and appropriate, with complementary improvements to test reliability and robustness. Critical IssuesNone found. Moderate IssuesNone found. Minor Issues
What Looks Good
RecommendationApprove The PR is well-scoped to fix the qualified function call regression while making complementary improvements that enhance test quality and robustness. Changes follow project principles: proper use of qualified names, no syntax violations, and appropriate test coverage for the bug fix. The complementary changes (watcher robustness, Java action returns, test simplification) are justified and improve overall code quality without deviating from the main focus. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
Review: test: cover qualified function calls with three segmentsClean test-only PR. No blockers. Two minor issues. Minor 1 — bug test file name doesn't follow the issue-number conventionAll existing bug test files use Minor 2 — bug test MDL "After fix:" header implies this PR introduced a fixThe or move the "After fix" wording to note the historical fix explicitly. Positives
|
Closes #447.
Summary
Validation
make buildgo test ./mdl/visitor -run 'TestQualifiedCallInIfCondition|TestQualifiedCallPositionalArgs' -v./bin/mxcli check mdl-examples/bug-tests/qualified-function-call-expression.mdlmake testmake lint-go