Skip to content

fix: stabilize integration CI baseline#412

Open
hjotha wants to merge 3 commits intomendixlabs:mainfrom
hjotha:submit/stabilize-integration-ci
Open

fix: stabilize integration CI baseline#412
hjotha wants to merge 3 commits intomendixlabs:mainfrom
hjotha:submit/stabilize-integration-ci

Conversation

@hjotha
Copy link
Copy Markdown
Contributor

@hjotha hjotha commented Apr 30, 2026

Summary

  • guard watcher debounce callbacks with a generation counter so stale timers cannot send extra change notifications
  • update nanoflow integration fixtures to current MDL syntax
  • classify known doctype showcase consistency errors so make test-integration fails only on unexpected validation errors

Validation

make build
go test ./cmd/mxcli/tui -run TestWatcherDebounce -count=20 -v
./bin/mxcli check mdl-examples/doctype-tests/02b-nanoflow-examples.mdl
CGO_ENABLED=0 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
make test
make lint-go
make test-integration

Closes #411.

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

AI Code Review

Critical Issues

  • None found.

Moderate Issues

  • None found.

Minor Issues

  • None found.

What Looks Good

  • Watcher debounce fix: The addition of a generation counter (atomic.Uint64) to prevent stale timers from sending extra change notifications is a correct and robust solution for the race condition in the TUI file watcher. The test update appropriately tightens the burst timing to avoid flakiness on slow CI machines.
  • Nanoflow example syntax update: The changes to 02b-nanoflow-examples.mdl correct MDL syntax to current standards:
    • Replaced incorrect declare + call returns pattern with direct assignment ($IsValid = call nanoflow ...)
    • Fixed change statement syntax from (IsValid: true) to (IsValid = true) (using = for assignments in procedural statements, consistent with MDL grammar)
    • Removed redundant Admin role from grant execute (minimizing noise while maintaining correctness)
      All changes follow MDL design guidelines: use of qualified names, English-readable statements, proper keyword usage (call, if, change), and diff-friendly edits.
  • Test stability improvement: Adding known CE errors (CE0115, CE5601, CE0117, CE6035) to scriptKnownCEErrors ensures make test-integration only fails on unexpected validation errors. This is a prudent approach for stabilizing the CI baseline against known showcase inconsistencies without masking real regressions.

Recommendation

Approve the PR. All changes are well-scoped, technically sound, and directly address the stated goal of stabilizing the integration CI baseline. The modifications follow established patterns in the codebase and maintain full compliance with the project's architectural and style guidelines. No further changes are required.


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

@hjotha
Copy link
Copy Markdown
Contributor Author

hjotha commented Apr 30, 2026

@ako This needs to be merged first and then my PRs should be rebased to fix the CI errors.

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.

Shared build-and-test CI fails on current integration baseline

2 participants