Skip to content

learn(unit-test): write and run a microflow unit test that can fail - #432

Merged
MendixMau merged 3 commits into
masterfrom
feat/unit-test-skill
Oct 16, 2026
Merged

MendixMau merged 3 commits into
masterfrom
feat/unit-test-skill

Conversation

@MendixMau

Copy link
Copy Markdown
Owner

Direct lane

What changed and why (one paragraph):
New on-demand skill skills/unit-test.md: the how of a microflow unit test (.test.mdl, mxcli test) in one file a user can ask for outside the pipeline. Today that knowledge is spread over testing-shape.md (§1 when, §4 false greens, §5 model writes, §6 positive control), rest-between-mendix-apps.md (timings) and the bug log. The skill covers what is worth a unit test and what is not, writing an assertion that is live (equality-only @expect, BUG-LOCAL-30; no file-level header, BUG-LOCAL-29; @verify/@setup only real from v0.19.0), --list against the / separator count before any run, running on a scratch copy via test-scratch.sh so the live app survives (#278), the BUG-157 after-startup trap, a positive control, and a four-line report. It deliberately does not decide whether or when unit tests run: that stays with the project's test strategy (testing-shape.md §1 today, #417 next). One row in testing-shape.md's owner table points at it.

Impact

Row Answer
Process none: on request only; no gate, no stage artifact, unit stays off by default
Dependencies bin/lib/skill-routing.tsv + re-rendered surfaces (README, ROUTING, mdl/test/review agents, gate-check stage map); testing-shape.md owner table, one row. Independent of #431 (load-test) except both touch the routing table and CHANGELOG, so the second to merge re-renders. Complements #417 (whether/when), does not overlap its sections
Context cost baseline 75,204 → 75,225 words (budget 80,000); base measured at 54c3ae1, head at 88f2410; render-routing.sh --check exit 0. Stage 5 test 21,639 → 21,660, review 31,367 → 31,388; stage 6 test 21,414 → 21,435. The skill itself is ondemand
Behaviour NOT RUN: no A/B; new ondemand text, no existing skill rewritten
Runtime n/a

Field evidence: every rule cites an existing toolkit source measured on field projects (mxcli v0.19 to v0.27, Mendix 11.13 to 11.15, 2026-08 to 2026-10): BUG-LOCAL-29/30 and BUG-157 in the bug log, #278 (live app broken by an in-place test run, 2026-10-12), the 143-minute run that found no logic bug (#274), the 9 min 21 s / 848 ms and ~76 s timings, and a positive-control copy that failed 1 of 6 as intended.

  • No client data anywhere in the diff (leak guard with denylist: pass)
  • Size cap: 10 files, 116 insertions / 2 deletions
  • Test tier: T0, render-routing.sh --check exit 0, leak guard and doc-numbering pre-commit pass. Skill text not field-run as a skill
  • For a new skill: routing row added
  • CHANGELOG.md line appended

🤖 Generated with Claude Code

MendixMau and others added 3 commits October 16, 2026 18:34
New on-demand skill that gathers the how of .test.mdl tests from
testing-shape.md, rest-between-mendix-apps.md and the bug log into one file a
user can ask for outside the pipeline: what is worth a test, equality-only
@expect (BUG-LOCAL-30), no file-level header (BUG-LOCAL-29), --list before a
run, test-scratch.sh so the live app survives (#278), BUG-157, a positive
control, a four-line report. Whether and when unit tests run stays with the
project's test strategy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…triggers, --require-assertions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MendixMau
MendixMau merged commit eabff20 into master Oct 16, 2026
2 checks passed
MendixMau added a commit that referenced this pull request Oct 16, 2026
…r does not prove (#431)

Load test skill

# Review #431 round 2 (self-review of fix delta to f851fe6)
Round 1 (431.md, Opus) asked 1 change, addressed: the replay reads `mx.session.sessionData.csrftoken` (Mendix 11 has no getCSRFToken), refuses to fire on an empty token as helpers.js does, and sessions end with `helpers.logout`. Fixer ran render-routing --check, check-skill-routing, test-render-routing 5/0, test-routing-tier 26/0, portability clean. Merges after #432 with routing files re-rendered.

APPROVE
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.

1 participant