Context
Found while smoke-testing the zfa-only workflow (fresh zfa setup zikzak_r2 --flutter → zfa entity create Product → canonical zfa make Product --preset=crud --with=vpc,state,di,test). Regression introduced by PR #287 (fix for #284).
What I ran
zfa setup zikzak_r2 --flutter --platforms=ios,macos
cd zikzak_r2
zfa entity create -n Product --field id:String --field name:String --field price:double
zfa make Product --preset=crud --with=vpc,state,di,test
Expected
zfa make generates the crud stack (per-method usecases + data repo impl + per-method DI + tests) and completes.
Actual
zfa make crashes immediately:
❌ Generation failed: Invalid argument(s): Unknown method: toggle
Root cause
PR #287 added entity-method defaults ['get', 'update', 'toggle'] to the test plugin (lib/src/plugins/test/test_plugin.dart:85-93) so entity configs route to generateForMethod. But the per-method test builder's method switch (lib/src/plugins/test/builders/test_builder_entity.dart:55-75) has no toggle case — only get, update, delete, watch, watchList. Any entity generated with the default methods (no explicit --methods) now crashes in the test plugin before anything is written.
Same pattern exists in other generators — need a sweep for toggle support:
- lib/src/plugins/test/builders/test_builder_entity.dart:55-75 — NO
toggle case → crash
- lib/src/plugins/usecase/generators/entity_usecase_generator.dart:341 — has
toggle? verify
- lib/src/plugins/di/di_plugin.dart:1138 — HAS
toggle (ok)
- controller/presenter/view plugins — verify each has
toggle in their method switches
Suggested fix
- Add
toggle case to test_builder_entity.dart (class Toggle${entity}UseCase, per the usecase generator's toggle shape), OR
- Make the new defaults in DI/test plugins
['get', 'update'] only (drop toggle) until every generator's method switch supports it, OR
- Add a shared method-support registry so all plugins validate methods against the same set before generating.
Impact
Blocks the entire canonical zfa make flow — the #284 fix cannot be exercised because #287 introduced this regression. Fresh zfa-only apps cannot be generated at all right now.
Context
Found while smoke-testing the zfa-only workflow (fresh
zfa setup zikzak_r2 --flutter→zfa entity create Product→ canonicalzfa make Product --preset=crud --with=vpc,state,di,test). Regression introduced by PR #287 (fix for #284).What I ran
zfa setup zikzak_r2 --flutter --platforms=ios,macos cd zikzak_r2 zfa entity create -n Product --field id:String --field name:String --field price:double zfa make Product --preset=crud --with=vpc,state,di,testExpected
zfa makegenerates the crud stack (per-method usecases + data repo impl + per-method DI + tests) and completes.Actual
zfa makecrashes immediately:Root cause
PR #287 added entity-method defaults
['get', 'update', 'toggle']to the test plugin (lib/src/plugins/test/test_plugin.dart:85-93) so entity configs route togenerateForMethod. But the per-method test builder's method switch (lib/src/plugins/test/builders/test_builder_entity.dart:55-75) has notogglecase — onlyget,update,delete,watch,watchList. Any entity generated with the default methods (no explicit--methods) now crashes in the test plugin before anything is written.Same pattern exists in other generators — need a sweep for
togglesupport:togglecase → crashtoggle? verifytoggle(ok)togglein their method switchesSuggested fix
togglecase totest_builder_entity.dart(classToggle${entity}UseCase, per the usecase generator's toggle shape), OR['get', 'update']only (droptoggle) until every generator's method switch supports it, ORImpact
Blocks the entire canonical
zfa makeflow — the #284 fix cannot be exercised because #287 introduced this regression. Fresh zfa-only apps cannot be generated at all right now.