101 lines
3.6 KiB
Markdown
101 lines
3.6 KiB
Markdown
# Mizan — Known Issues
|
|
|
|
Identified by domain expert review (Cloudflare, Serverless, Vercel, React Query, Django, Laravel, Vue/Svelte).
|
|
|
|
## Fixed
|
|
|
|
- ~~C1~~ Scoped cache purge now passes user_id
|
|
- ~~C2~~ initSession retries 3x, resets on failure
|
|
- ~~C3~~ SSR backend injects `__MIZAN_SSR_DATA__` script tag
|
|
- ~~C4~~ SSR bridge uses _write_lock for stdin
|
|
- ~~C5~~ SSR bridge registers atexit handler
|
|
- ~~C7~~ View-path mutations now purge origin cache
|
|
- ~~H1~~ pendingScoped is Array, not Map (no overwrite)
|
|
- ~~H2~~ stableKey() sorts JSON keys (order-independent)
|
|
- ~~H3~~ mizanFetch retries 2x on 5xx/network errors
|
|
- ~~H4~~ Named contexts skip refetch if SSR data exists
|
|
- ~~H6~~ refreshContext uses GET /ctx/ not POST /call/
|
|
- ~~H10~~ _meta always fresh dict
|
|
- ~~H11~~ Python normalizes True→"true" for cross-language HMAC
|
|
- ~~H13~~ isValid checks all required fields are touched
|
|
- ~~M11~~ execute_function return type includes HttpResponseBase
|
|
- ~~M18~~ registerContext cleanup uses ?. (no crash)
|
|
|
|
## Remaining Critical
|
|
|
|
### C6. No loading/error/stale states in runtime
|
|
**File:** `mizan-runtime/src/index.ts`
|
|
The kernel stores only `{params, refetch}`. No `data`, `status`, `error`. Every adapter reinvents loading tracking. Blocks stale-while-revalidate.
|
|
|
|
## Remaining High
|
|
|
|
### H5. Mutation hooks expose no loading/error state
|
|
**File:** `mizan-django/generate/generator/lib/adapters/react.mjs`
|
|
Returns bare `useCallback`. No `isPending`, `error`, `isSuccess`.
|
|
|
|
### H7. Redis SCAN blocks request path at scale
|
|
**File:** `mizan-django/src/mizan/cache/backend.py`
|
|
Synchronous SCAN at 1M keys: multi-second blocking.
|
|
|
|
### H8. Svelte codegen uses Svelte 4 stores
|
|
**File:** `mizan-django/generate/generator/lib/adapters/svelte.mjs`
|
|
Should use Svelte 5 `$state`/`$derived` runes.
|
|
|
|
### H9. Svelte destroy() not auto-called
|
|
**File:** `mizan-django/generate/generator/lib/adapters/svelte.mjs`
|
|
Memory leak if user forgets `onDestroy`.
|
|
|
|
### H12. Forms triggerValidation captures stale data
|
|
**File:** `mizan-react/src/forms.ts`
|
|
Debounced validation uses stale closure data.
|
|
|
|
## Remaining Medium
|
|
|
|
### M1. SSR bridge not fork-safe
|
|
gunicorn prefork shares file descriptors and Redis connections.
|
|
|
|
### M2. cache_purge_user() not implemented
|
|
No way to purge all cache entries for one user.
|
|
|
|
### M3. No garbage collection for context entries
|
|
Runtime `contexts` Map grows monotonically.
|
|
|
|
### M4. No cross-tab invalidation
|
|
No BroadcastChannel. Logout in tab 1 doesn't affect tab 2.
|
|
|
|
### M5. React 18 Strict Mode double-fetch
|
|
useEffect runs twice in dev mode.
|
|
|
|
### M6. No request deduplication
|
|
Two components mounting same context fire parallel fetches.
|
|
|
|
### M7. SSR worker module cache never invalidates
|
|
Dynamic imports cached forever.
|
|
|
|
### M8. Vue injection key not exported
|
|
Can't inject directly without generated composables.
|
|
|
|
### M9. Vue onMounted won't pre-fetch in Vue SSR
|
|
Needs `onServerPrefetch` for Nuxt.
|
|
|
|
### M10. Svelte should use setContext/getContext
|
|
Module-level stores don't scope to component tree.
|
|
|
|
### M12. render_strategy heuristic uses hardcoded param names
|
|
Misses `member_id`, `customer_id`, non-English names.
|
|
|
|
### M13. initSession called for token-auth requests
|
|
Wastes GET /session/ round-trip for JWT/MWT apps.
|
|
|
|
### M14. Vue watch imported but unused
|
|
Params not watched — reactive param changes don't trigger refetch.
|
|
|
|
### M15. Vue mutation composables misleading `use` prefix
|
|
`export const useXxx = callXxx` — not a real composable.
|
|
|
|
### M16. Svelte mutation imports bypass Stage 1 index
|
|
Should import from `'../index'` consistently.
|
|
|
|
### M17. Side effects in React state updater
|
|
Context listeners called inside `setContextStore()` updater.
|