36 Commits
Author SHA1 Message Date
rays cce05160da feat(diagnostics): surface DynamicVRAM fallback advisory 2026-08-19 16:48:22 +08:00
rays eb86f889b3 fix(logging): unify Doctor startup output
Standardize backend log identities and severity highlighting while keeping persisted logs ANSI-free. Restore the encoding-aware startup banner and emit its art as one tightly packed block.
2026-08-09 05:38:01 +08:00
rays 63b7770c27 fix(imports): guard absolute fallback paths 2026-04-26 19:04:24 +08:00
rays 9c9d066a54 fix(logger): synchronize processor reset state 2026-04-26 18:52:12 +08:00
rays ac766c06ec chore: align version metadata and cleanup tracked artifacts 2026-04-26 18:21:04 +08:00
rays 01568bf8a8 fix(startup): harden prestartup encoding and non-ui console output 2026-04-04 17:23:22 +08:00
rays 8f99daa282 fix(imports): harden package-safe startup loading 2026-04-04 16:27:47 +08:00
rays c48c7d04b7 fix(logger): harden internal stderr handler on windows 2026-03-26 21:31:03 +08:00
rays 156e6e563f fix(logger): recover from stale global install state 2026-03-26 20:59:56 +08:00
rays be39e32634 docs(readme): sync latest compatibility and hardening updates 2026-03-26 19:54:00 +08:00
rays 2d4ce9c0ad feat(r21): standardize runtime utc-aware timestamps 2026-03-26 19:20:58 +08:00
rays 8986e3dd3a R22: Fix asyncio transport GC recursive log pollution
- Add _ASYNCIO_GC_EXCLUSION_PATTERNS filter in _process_message() and _record_analysis()
- Create _doctor_internal_logger (bypasses SafeStreamWrapper via sys.__stderr__)
- Replace logging.info() in _record_analysis with _doctor_internal_logger.debug()
- Add thread-local reentrance guard in SafeStreamWrapper.write()
- Add 4 new tests: asyncio GC exclusion, helper function, reentrance guard, internal logger config
- Mark R22 completed in roadmap with plan/record links
2026-03-25 03:23:38 +08:00
rays f45656d27d feat: complete validation expansion with guardrail wiring, desktop failure-injection tests, isolation coverage, and opt-in online API lane 2026-02-17 03:51:43 +08:00
rays 0456823e93 feat: finalize dual-mode API key strategy (ENV-first + advanced server key store) 2026-02-10 15:43:06 +08:00
rays 5d8d8b78fa chore: update READMEs and robustness improvement 2026-01-30 22:45:19 +08:00
rays b36b93d668 merge dev and bump to v1.6.0 2026-01-23 22:57:20 +08:00
rays 07750ce6ee feat(r18): unify persistence under canonical Doctor data dir 2026-01-23 22:20:26 +08:00
rays 81f9e5657b fix(history): aggregate repeated errors within 60s window 2026-01-23 02:44:31 +08:00
rays 99e384a38b fix(logger): prevent ComfyUI Desktop flush error storms and dedupe history 2026-01-23 02:26:59 +08:00
rays 3bf09d25e7 fix: store history under ComfyUI user dir to avoid desktop conflicts 2026-01-23 01:09:50 +08:00
rays 713221573e fix: flush prompt-validation errors and harden history persistence 2026-01-23 00:39:58 +08:00
rays 70e32c6c38 feat: Statistics Reset + Smarter AI Prompts 2026-01-15 21:45:53 +08:00
rookiestar28 455c7c5552 feat(r14): unify error context formatting with PromptComposer, ring buffer logs, and summary-first prompts 2026-01-14 20:34:54 +08:00
rookiestar28 47dec1cef9 chore(R0_R13): Phase 2 hardening, add trust/health UI, stabilize Playwright runner, and plan CI gates/migration tooling 2026-01-09 14:38:53 +08:00
rookiestar28 8cc6c9703f feat(F15): Resolution Marking UI plan 2026-01-08 23:19:38 +08:00
rookiestar28 e78cb0dc86 fix UI display issues 2026-01-06 18:41:06 +08:00
rookiestar28 280a37ff7f feat(analyzer): refactor into A6 plugin-based pipeline architecture with community plugin support 2026-01-06 13:13:52 +08:00
rookiestar28 d6a1e7dc90 fix: error log overwrite issue 2026-01-06 11:34:00 +08:00
rookiestar28 7c8df81be9 fix: LogProcessor error 2026-01-06 10:39:17 +08:00
rookiestar28 4e3d2120bf fix: testing debt analysis and fix 2026-01-05 21:22:43 +08:00
rookiestar28 7f43fb6ad7 feat(logger): implement SafeStreamWrapper architecture to fix error capture failure (STAGE 1)
BREAKING CHANGE: Complete logger architecture redesign to resolve catastrophic
error capture failure from previous F12/F2/T8 implementation.

Problem Summary:
- Previous implementation relied on ComfyUI's LogInterceptor on_flush callbacks
- ComfyUI's LogInterceptor.flush() clears _logs_since_flush after EACH callback
- TerminalService (registered first) got data, Doctor (registered second) got empty array
- Result: Complete error capture failure in both frontend and backend
- Required emergency rollback to stable version

Solution (v1.3.0):
- SafeStreamWrapper: Zero-lock write() with immediate pass-through + queue.put_nowait()
- DoctorLogProcessor: Independent background thread processes queued messages
- Complete decoupling from LogInterceptor's callback mechanism
- Non-blocking queue with graceful overflow handling

Architecture Changes:
- logger.py: Complete rewrite (453 lines)
  - SafeStreamWrapper class (lines 103-158)
  - DoctorLogProcessor class (lines 160-350)
  - Updated install() and uninstall() functions (lines 363-422)
  - Preserved SmartLogger backward compatibility wrapper (lines 428-445)
- analyzer.py: Added import fallback for test compatibility
- tests/test_logger_safety.py: New comprehensive test suite (278 lines)
  - 8 test cases covering all critical scenarios
  - All tests passed ✅
- ROADMAP.md: Added Phase 4B with STAGE 1/2/3 breakdown

Test Results:
✅ All 8 unit tests passed
✅ No deadlock under burst load (15+ rapid validation errors)
✅ Error capture functionality verified
✅ Concurrent write safety confirmed
✅ LogInterceptor compatibility tested
✅ Queue overflow handling working
✅ Buffer timeout mechanism functional
✅ API backward compatibility preserved
✅ User-confirmed: Frontend & backend error capture working correctly

Key Design Decisions:
- write() holds ZERO locks → prevents deadlock
- Immediate pass-through → preserves original stream behavior
- Non-blocking queue.put_nowait() → never blocks main thread
- Background DoctorLogProcessor → completely independent analysis
- Graceful error handling → never crashes, always degrades gracefully

References:
- Implementation Plan: .planning/STAGE1_LOGGER_FIX_PLAN.md
- Implementation Record: .planning/STAGE1_IMPLEMENTATION_RECORD.md
- Failure Analysis: .planning/FAILURE-ERROR_CAPTURE_FAILURE_ANALYSIS.md
- Failed Implementation: .planning/FAILURE-F12_F2_T8_IMPLEMENTATION_PLAN.md

Next Steps:
- STAGE 2: F2 Integration (PatternLoader)
- STAGE 3: F12 Pattern Expansion (35+ new patterns)
- Merge to main after all stages complete and stable (1+ week)
2026-01-03 04:54:56 +08:00
rookiestar28 976e3fa3a0 fix: adjust and fix the interface components of the error panel. 2025-12-31 18:15:25 +08:00
rookiestar28 24b2ab0e74 fix: improve validation error capture to collect all failed outputs instead of only the last one 2025-12-31 11:57:09 +08:00
rookiestar28 5e4ec17b59 Phase 2: R3 session reuse, F1 history persistence, F3 workflow context 2025-12-29 15:56:24 +08:00
rookiestar28 c0d4e00353 feat: Phase 1 robustness - error handling, thread safety, XSS fix, API tests 2025-12-28 21:51:52 +08:00
rookiestar28 1ee7cc0529 Initial commit: ComfyUI-Doctor with Frontend UI and LLM integration 2025-12-28 12:57:26 +08:00