48 Commits
Author SHA1 Message Date
rays 8d33acac4a chore(release): prepare 2.1.0 documentation and metadata 2026-10-25 19:31:50 +08:00
rays 977945717b test(compat): refresh host contracts and runtime matrix 2026-10-25 16:17:01 +08:00
rays 8537b1b082 refactor: remove unused frontend modules, helpers and a stray script
Remove code that nothing imports or calls:

- web/doctor_chat.js (the ChatPanel class, superseded by the chat
  island; only its import in doctor_ui.js remained), web/doctor_chat.css
  and web/doctor_telemetry.js. ComfyUI still loaded these files as
  extension scripts, but they had no module-level side effects.
- DoctorUI.triggerAIAnalysis and DoctorUI.updatePollInterval;
  DoctorAPI.getHistory, DoctorAPI.verifyApiKey and DoctorAPI.chat;
  renderContentPipeline.
- The first, shadowed PatternLoader.get_pattern_info definition (the
  later one was always the one in effect).
- verify_routes.py, which could not run under package imports and
  replaced sys.modules entries with mocks when imported.

The architecture guide lists only existing frontend modules, enforced by
a new test, and the import-scan skip lists no longer name the script.
2026-10-13 14:45:04 +08:00
rays b7aa4f92d7 fix(ui): load chat rendering assets from the extension's own folder
The markdown and code-highlighting libraries were requested from the
absolute path /extensions/ComfyUI-Doctor/lib/. ComfyUI serves an
extension under its install folder name, so any other folder name got
404s and silently loaded unpinned copies from cdn.jsdelivr.net into the
ComfyUI origin; offline, assistant replies rendered as blank bubbles and
the failed load surfaced as an unhandled promise rejection.

Asset URLs are now resolved relative to the rendering module, and the
CDN fallback is removed. A missing asset logs one warning and the load
never rejects. The chat island shows a reply as plain text while marked
is unavailable and re-renders it as markdown once the assets settle.

The E2E test server also serves the extension under a lowercase install
folder, and the harness can load Doctor through a host-shaped
/extensions/<folder>/ entry. Host-asset tests cover both folder names,
missing assets and late asset loading, with CDN requests blocked.
2026-10-13 14:17:43 +08:00
rays 48abb93869 fix(security): harden LLM destination checks after review
- Let an inherited proxy on an unregistered host:port (e.g. localhost:7890)
  through the connect-time resolver; registered host:port pairs stay checked.
- Accept underscores inside host labels so Docker service names such as
  my_ollama can be approved.
- Refuse IPv4-compatible and site-local IPv6 for official providers and
  judge NAT64/6to4/compatible forms by the IPv4 address they carry.
- Fix approved destinations when routes are registered instead of on the
  first request.
- Static outbound check: exact path matching, import-alias and
  TCPConnector detection, policy factory wiring, raw HTTP client imports,
  no nosec for policy rules, fail closed on unparseable files.
- Settings: restore the model controls when the base URL is empty.
2026-10-13 12:47:35 +08:00
rays cc31b1433d fix(security): restrict LLM requests to operator-approved destinations
The analyze, chat, verify-key and model-list routes sent server-side
requests to a caller-supplied base URL guarded only by a pre-flight
denylist. Callers could choose arbitrary hosts and paths, reach shared
address space and metadata ranges, drive local LLM write APIs, and use
DNS rebinding to deliver server-held keys to loopback services.

Requests now select an entry of an immutable destination registry built
at startup from the built-in provider catalog, local Ollama/LM Studio,
and operator environment variables (DOCTOR_LLM_ALLOWED_BASE_URLS and the
existing base URL variables). Outbound URLs are built from the approved
entry, resolved addresses are checked at connect time inside the shared
connector, redirects are never followed or treated as success, and error
responses no longer reflect upstream bodies or network details. The UI
shows localized operator guidance, a static rule enforces disabled
redirects and policy-managed sessions, and .comfyignore keeps tests and
tooling out of the published archive.
2026-10-13 12:22:39 +08:00
rays 750b05e290 test(harness): execute real route handlers and serve host-shaped assets
Add a reusable backend harness that executes the real package entrypoint
host-style, serves the registered PromptServer routes on loopback through
aiohttp's test server, captures provider requests in-process, and refuses
non-loopback connects and unknown DNS lookups. Characterization tests pin
current handler behavior and the harness's process-state restoration.

Map /extensions/ComfyUI-Doctor/ onto web/ in the E2E server, confined to
web/, so vendored rendering assets load the way ComfyUI serves them and the
default lane no longer falls back to CDN downloads. A focused spec asserts
local asset loading, markdown rendering of a chat reply, and alias
confinement.
2026-10-13 11:36:37 +08:00
rays a951b03b9a fix(compat): align host contracts and node focus lifecycle
Refresh exact frontend lanes and relocated host contracts while preserving
Desktop settings behavior. Recognize first-party Switch nodes and optional
branches without suppressing required-input or broken-link diagnostics.

Revalidate canvas, workflow and target identity across focus navigation;
cancel stale requests on newer actions and sidebar teardown. Keep legacy
positioning and nested graph traversal covered by action-level regressions.

Validation: 75 source contracts, 84 frontend unit tests, Windows full gate
with 871 backend tests and 125 subtests, and 149 mocked browser E2E tests.
Seven existing backend skips remain. No live-host certification is claimed.
2026-09-22 15:18:41 +08:00
rays cee3f9ccc0 test(compat): refresh current host contract matrix 2026-09-04 21:59:18 +08:00
rays 679b74a986 test(host): refresh compatibility matrix 2026-08-19 16:02:32 +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 1f2daa26fb docs: align public guidance with current behavior 2026-08-08 17:30:22 +08:00
rays 06c3a15aac test(pytest): stop mutating package entrypoint 2026-08-08 16:20:55 +08:00
rays d0d8034189 test(compat): refresh current host contract matrix 2026-08-08 16:08:45 +08:00
rays f4e4bf4d23 test(compat): refresh current host contract matrix 2026-07-31 03:40:37 +08:00
rays 79354915d4 test(host): add version-aware compatibility matrix 2026-07-19 18:18:37 +08:00
rays 6624963832 chore(tooling): clarify node runtime policy 2026-06-24 17:45:18 +08:00
rays 62dad1fb92 test(host): refresh compatibility smoke anchors 2026-06-24 17:07:47 +08:00
rays fd2deb3c01 test(host): refresh compatibility smoke anchors 2026-06-12 15:52:08 +08:00
rays 009d2e2450 docs(readme): refresh public update notes 2026-05-31 16:05:54 +08:00
rays 30760e231f ci(security): add quarterly audit workflow 2026-05-31 14:27:45 +08:00
rays e1dfb588ee test(e2e): add stress test lane 2026-05-31 14:09:10 +08:00
rays a85ee2fc1d test(e2e): make integration lane deterministic 2026-05-31 14:02:42 +08:00
rays e9f9286b50 chore(test): rename focused gate entrypoints 2026-05-31 13:56:30 +08:00
rays 18ae26f61d refactor(api): decompose route registration 2026-05-31 12:57:39 +08:00
rays 0262733826 test(host): refresh compatibility smoke checks 2026-05-31 11:58:01 +08:00
rays 8c3de2200c Merge branch 'dev' 2026-05-13 16:53:42 +08:00
rays 72a023b2bf test(host): expand compatibility harness 2026-05-13 15:56:16 +08:00
rays 3f4d851a07 docs(security): add supply-chain triage checklist 2026-05-13 15:26:23 +08:00
rays 1fb8de79cd ci(security): gate dependency installs 2026-05-13 15:21:33 +08:00
rays e089b7f6cf feat(security): add supply-chain IOC scanner 2026-05-13 15:10:58 +08:00
rays d1fcdaeb05 fix(ci): guard coverage baseline dependencies 2026-04-28 16:07:25 +08:00
rays 63b7770c27 fix(imports): guard absolute fallback paths 2026-04-26 19:04:24 +08:00
rays ac766c06ec chore: align version metadata and cleanup tracked artifacts 2026-04-26 18:21:04 +08:00
rays c55f267d1e docs(readme): sync latest public updates 2026-04-25 18:43:06 +08:00
rays 316161d7bf ci(test): add coverage baseline workflow 2026-04-25 18:05:54 +08:00
rays 67544adfd8 test(host): add reference compatibility smoke check 2026-04-25 17:30:22 +08:00
rays de6fde26a4 test(gate): harden host-like package startup validation 2026-04-04 17:41:11 +08:00
rays 01568bf8a8 fix(startup): harden prestartup encoding and non-ui console output 2026-04-04 17:23:22 +08:00
rays 45f518ee1b test(gate): harden acceptance gap regressions 2026-03-26 21:12:40 +08:00
rays 3612975c89 feat: add fail-closed external enrichment foundation, resumable job APIs, and non-stream LLM output cleanup 2026-02-17 01:52:32 +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 ea090ed825 feat(ui): move Trust & Health + Anonymous Telemetry from Settings to Statistics and stabilize Playwright E2E routes 2026-01-15 14:40:09 +08:00
rays 71493339da chore(repo): reorganize docs/scripts and update roadmap 2026-01-14 23:08:33 +08:00
rookiestar28 2b6e393b5f feat(R12): implement smart token budget with local opt-in, enhanced metadata, and A/B harness 2026-01-10 23:22:50 +08:00
rookiestar28 9f7b1b83f5 feat(T11,T12,A8): Phase 2 CI gates: add release readiness + outbound safety checks, plus plugin migration tooling 2026-01-09 17:51:58 +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 c99b0173e9 feat(A7): Phase 5B implementation 2026-01-07 02:39:29 +08:00