Skip to content

test: run change refresh doctype fixture in CI#458

Merged
ako merged 5 commits intomendixlabs:mainfrom
hjotha:submit/change-refresh-doctype-fixture-name
May 2, 2026
Merged

test: run change refresh doctype fixture in CI#458
ako merged 5 commits intomendixlabs:mainfrom
hjotha:submit/change-refresh-doctype-fixture-name

Conversation

@hjotha
Copy link
Copy Markdown
Contributor

@hjotha hjotha commented May 1, 2026

Summary

  • rename change_refresh_modifier.test.mdl to change_refresh_modifier.mdl so the doctype fixture runner discovers it
  • update the change refresh proposal reference to the actual fixture path

Closes #457.

Validation

  • make build
  • ./bin/mxcli check mdl-examples/doctype-tests/change_refresh_modifier.mdl
  • go test ./mdl/executor -run 'ChangeRefresh|RefreshInClient' -count=1
  • make test

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

AI Code Review

Critical Issues

  • None

Moderate Issues

  • None

Minor Issues

  • None

What Looks Good

  • The test file change_refresh_modifier.test.mdl has been renamed to change_refresh_modifier.mdl to match the naming convention of other doctype test files (which all use .mdl extension without .test). This ensures the doctype fixture runner discovers it.
  • The proposal reference in docs/11-proposals/PROPOSAL_microflow_change_refresh_modifier.md has been updated to point to the correct fixture path (change_refresh_modifier.mdl).
  • The change is minimal, focused, and addresses the stated issue of making the doctype fixture discoverable in CI.
  • No MDL syntax, grammar, or executor changes are involved, so full-stack consistency checks are not applicable.
  • The PR is scoped to a single concern (fixing test discovery) with no unrelated changes.

Recommendation
Approve the PR. The changes are straightforward, correct, and improve test discoverability without introducing any risks or violations.


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
The change refresh modifier example used a .test.mdl suffix, so the doctype
fixture runner skipped it even though review feedback expected it to be part of
CI coverage.

Rename the fixture to .mdl and update the proposal reference so the existing
doctype integration test discovers the example.

Tests:
- make build
- ./bin/mxcli check mdl-examples/doctype-tests/change_refresh_modifier.mdl
- go test ./mdl/executor -run 'ChangeRefresh|RefreshInClient' -count=1
- make test
@hjotha hjotha force-pushed the submit/change-refresh-doctype-fixture-name branch from 257a88f to 72a3c7f Compare May 2, 2026 10:04
@hjotha
Copy link
Copy Markdown
Contributor Author

hjotha commented May 2, 2026

CI stabilization note: merged #412 into this branch so it uses the same integration-CI baseline as the rest of the active PR set.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 2, 2026

AI Code Review

Critical Issues

None found.

Moderate Issues

None found.

Minor Issues

  • The PR includes unrelated changes (TUI watcher refactor, nanoflow example simplification) alongside the main doctype test fix. While each change is small and acceptable, ideally they'd be split into separate PRs for better atomicity. However, given the scope is limited and all changes are validated, this is acceptable.

What Looks Good

  • Doctype test discovery: Renaming change_refresh_modifier.test.mdlchange_refresh_modifier.mdl correctly fixtures the test for CI discovery, and the proposal reference is updated accordingly.
  • TUI watcher robustness: Using atomic.Uint64 for debounce sequencing eliminates a potential race condition where rapid file changes could trigger stale debounce timers. The test adjustment (removing time.Sleep and tightening the burst) improves CI reliability on slower machines.
  • Nanoflow example simplification: Streamlining 02b-nanoflow-examples.mdl maintains essential test coverage (empty nanoflow, parameterized nanoflow, validation, formatting) while removing redundant examples. This improves maintainability without sacrificing test value.
  • Roundtrip test accuracy: Updating known CE errors in roundtrip_doctype_test.go and roundtrip_nanoflow_test.go reflects actual Studio Pro behavior differences, preventing false positives in validation.

Recommendation

Approve. The changes are well-scoped, validated, and improve both test reliability and code robustness. Minor concerns about atomicity are outweighed by the simplicity and safety of each individual change.


Automated review via OpenRouter (Nemotron Super 120B) — workflow source

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.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 2, 2026

AI Code Review

Critical Issues

  • None found.

Moderate Issues

  • None found.

Minor Issues

  • None found.

What Looks Good

  • Fixture discovery fixed: Renaming change_refresh_modifier.test.mdl to change_refresh_modifier.mdl ensures the doctype fixture runner discovers it, directly addressing the PR's goal.
  • TUI watcher robustness: The atomic counter in watcher.go prevents race conditions in debounce logic, a solid correctness improvement for rapid file changes.
  • Test suite improvements:
    • Updated roundtrip doctype test to account for known CE errors in nanoflow and page examples, reducing flakiness.
    • Simplified 02b-nanoflow-examples.mdl maintains test coverage while improving readability (removed redundant comments, streamlined examples).
    • Added explicit void return type test for Java actions, enhancing test coverage.
    • Tightened debounce test in watcher_test.go to avoid CI flakiness on slow machines.
  • Documentation accuracy: Updated proposal reference to match the actual fixture path, preventing future confusion.
  • No syntax violations: PR modifies no MDL syntax (only tests, fixtures, and internal code), so MDL design guidelines don't apply.
  • Atomic changes: Each commit serves a clear purpose (fixture fix, TUI improvement, test updates), adhering to scope & atomicity principles.

Recommendation

Approve. The PR successfully resolves the fixture discovery issue while improving test reliability and code robustness. All changes are well-scoped, tested, and align with project practices. No checklist violations detected. Ready for merge.


Automated review via OpenRouter (Nemotron Super 120B) — workflow source

@ako ako merged commit f77980e into mendixlabs:main May 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change refresh doctype fixture is skipped by CI

3 participants