Repository navigation
Commit f0488ce
committed
test(widget): derive fixture widget definitions instead of reading gitignored ones
The three MDL-WIDGET27 tests added in d614807 passed locally and failed in CI
on the same commit: two got the fallback remedy instead of the container
keyword, the third found 0 violations.
They resolved the widget through LoadWidgetRegistry(fixtureProject(t)), which
reads .def.json files from testdata/expr-checker/.mxcli/widgets/. That
directory is GITIGNORED — the definitions are derived, not tracked — so they
exist for any developer who has run `mxcli widget docs` against the fixture (I
generated them earlier in the same session, investigating the issue) and never
exist on the runner. With no definition, containerKeyword returns "" and the
two definition-dependent branches degrade exactly as designed.
fixtureProjectWithDefs copies the fixture to a temp dir, removes any .mxcli the
developer's tree carries, and derives the definitions from the tracked .mpk
files with RefreshWidgetDefinitions. Local and CI now see identical inputs, and
the generated files stay out of the fixture other tests copy.
Also tightens the #999 assertion, which is why the suite did not catch this:
strings.Contains(msg, "attribute")
on a widget whose property is named `attributes` is satisfied by the property
name alone, so it passed with no definition loaded. It now asserts the remedy
shape, which only a resolved definition produces.
Reproduced by moving .mxcli aside — same three failures, same messages. Control:
with the derivation stubbed, all FOUR fail, where before only the three new ones
did. Restored, full suite green.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KTdvGwVewkdgNQGDCxpQPZ1 parent 4862fe5 commit f0488ce
2 files changed
Lines changed: 38 additions & 3 deletions
File tree
- .claude/skills/fix-issue/findings
- mdl/executor
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
| 609 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
14 | 44 | | |
15 | 45 | | |
16 | 46 | | |
17 | 47 | | |
18 | 48 | | |
19 | 49 | | |
20 | | - | |
| 50 | + | |
21 | 51 | | |
22 | 52 | | |
23 | 53 | | |
| |||
57 | 87 | | |
58 | 88 | | |
59 | 89 | | |
60 | | - | |
61 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
62 | 96 | | |
63 | 97 | | |
64 | 98 | | |
| |||
0 commit comments