fix: address merged-PR ako follow-up polish items#469
fix: address merged-PR ako follow-up polish items#469hjotha wants to merge 5 commits intomendixlabs:mainfrom
Conversation
AI Code ReviewReview SummaryThis PR addresses follow-up polish items from three previously merged PRs (#357, #363, #364). It contains:
Critical IssuesNone found. Moderate IssuesNone found. Minor Issues
What Looks Good
RecommendationApprove - The PR consists of safe, focused improvements that address review feedback from previously merged PRs. Changes are limited to refactoring, documentation, and test coverage without altering functionality. All validation steps passed and the changes follow the project's code quality standards. The PR maintains atomicity by addressing related follow-up items from the same general area (microflow executor). No new MDL syntax is introduced, so full-stack consistency checks are not applicable. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
The IF-header duplication fix (commit 13d21427, PR mendixlabs#469) was lost when merging fork/submit/merged-pr-ako-polish into the combined validation branch — the merge kept the pre-swap emit block that was supposed to be removed. As a result, every IF with a non- empty body emitted the @position/@annotation/if … then block twice, and re-exec failed with "Parse error: missing IF at ';'". Removed the duplicate emit blocks in both traverseFlow (line ~694) and traverseFlowUntilMerge (line ~873). Only the post-swap emit remains, so the negate-and-swap transformation updates the header before it is written out. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The IF-header duplication fix (commit 13d21427, PR mendixlabs#469) was lost when merging fork/submit/merged-pr-ako-polish into the combined validation branch — the merge kept the pre-swap emit block that was supposed to be removed. As a result, every IF with a non- empty body emitted the @position/@annotation/if … then block twice, and re-exec failed with "Parse error: missing IF at ';'". Removed the duplicate emit blocks in both traverseFlow (line ~694) and traverseFlowUntilMerge (line ~873). Only the post-swap emit remains, so the negate-and-swap transformation updates the header before it is written out. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4a63f63 to
8aedac9
Compare
AI Code ReviewReview SummaryCritical Issues: None Detailed ReviewOverlap & Duplication
MDL Syntax Design
Full-Stack Consistency
Test Coverage
Security & Robustness
Scope & Atomicity
Code Quality
Bugs & Correctness
Final NotesThe PR successfully addresses all flagged polish items from prior merges. Changes are minimal, focused, and backed by tests. No checklist violations are found. Approved. Reviewer: Code Review Assistant Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
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
Batches the remaining polish items ako flagged in PRs that already merged: - PR mendixlabs#357 (Java return-type inference): remove the dead `case javaactions.ListType:` value form, replace the exprToString→strip→lookup string-mangling with a direct `*ast.VariableExpr` type assertion, and add the missing unit test for `*javaactions.EntityType` return registration. - PR mendixlabs#363 (change refresh modifier): restore the CE0032 reference in the `addChangeObjectAction` comment so developers searching for the Studio Pro error code find the inference logic. - PR mendixlabs#364 (enum split): collapse the dual `return true` branches of `isTerminalStmt`'s EnumSplitStmt arm into one and expand the comment documenting the intentional divergence from `bodyReturns`. - PR mendixlabs#364 minor: add a doc comment on `hasExplicitFalseBranchAnchor` explaining the Top→Bottom heuristic, and add TestHasExplicitFalseBranchAnchor covering nil, default, and single-sided cases. Validation: make build, make test, make lint-go. Related: mendixlabs#463 (walkStatements refactor), mendixlabs#468 (TitleOverride nil). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
8aedac9 to
a8c48c5
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 addresses follow-up polish items from three previously merged PRs (#357, #363, #364) along with some additional cleanup. The changes are focused, well-tested, and maintain consistency with the project's architecture and guidelines. Critical IssuesNone found. Moderate IssuesNone found. Minor Issues
What Looks Good
RecommendationApprove. The PR delivers valuable polish and correctness improvements with minimal risk. The scope expansion is justified by the high-value, low-risk nature of the additional changes (watcher fix and example simplification), and all changes meet the project's quality standards. The new tests provide important coverage for previously untested code paths. No blocking issues identified. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
Batches the remaining polish items ako flagged in reviews of PRs that already merged.
Scope
PR #357 — Java return-type inference
case javaactions.ListType:value form frominferGenericJavaActionReturnType. The parser always storesListTypeas a pointer.*ast.VariableExprtype assertion. The old form only worked for simple variable references and silently produced garbage keys for any compound expression.TestAddJavaAction_EntityReturnRegistersEntityType— theEntityTypecase was the only return shape without a unit test.PR #363 — change refresh modifier
addChangeObjectActioncomment. Developers searching for the Studio Pro error code no longer hit a dead end.PR #364 — enum split
return truebranches ofisTerminalStmt's EnumSplitStmt arm into onereturn trueand expand the comment documenting the intentional divergence frombodyReturnsinvalidate_microflow.go.hasExplicitFalseBranchAnchorexplaining theAnchorTop → AnchorBottomheuristic.TestHasExplicitFalseBranchAnchorcovering nil, default right→left, split default bottom→top, authored top→bottom, and both single-sided-customised edge cases.Validation
Related
🤖 Generated with Claude Code