Commit Graph
60 Commits
Author SHA1 Message Date
James Veitch bcb2e70e08 Merge pull request #10 from darth-veitcher/feat/chat-inline-display
feat(chat): inline display + model→STRING, OLLAMA_HOST docker support
2026-06-29 14:50:05 +01:00
James VeitchandClaude Sonnet 4.6 09ea6ab716 docs: update lifecycle wiring, add inline display note, add CI mike deploy
- README.md + docs/index.md: fix stale wiring instructions that referenced
  model_name optional input (removed); now correctly shows wiring
  OllamaLoadModel.model_name → OllamaChatCompletion.model (STRING)
- ChatCompletion description updated to mention inline response display
- Minimal chat workflow prose updated to reflect STRING model input + inline
  display (no separate Text Display node needed)
- .github/workflows/docs.yml: auto-deploy docs via mike on push to main;
  reads version from pyproject.toml, deploys as <version> + stable alias

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb
2026-06-29 14:49:26 +01:00
James VeitchandClaude Sonnet 4.6 4c64e2b6da feat(chat): I-commit — model→STRING, OLLAMA_HOST docker support, dynamic test fixtures
- OllamaChatCompletion.model changed from COMBO to plain STRING so it can
  receive a wired value from OllamaLoadModel without a separate model_name
  socket (removes dual-input UX confusion and COMBO validation errors)
- Removed model_name optional input — model STRING is the single entry point
- _load_default_models() tries OLLAMA_HOST env var → host.docker.internal →
  localhost so COMBO nodes pre-populate on server start inside Docker
- docker-compose.dev.yml: OLLAMA_HOST=http://host.docker.internal:11434 so
  model dropdowns are populated at startup without a manual Refresh click
- JS: refreshModelWidget handles both COMBO and STRING widget types; keeps
  user-typed/wired value when it is already a known model
- Tests: first_generative_model fixture dynamically selects the first
  installed model instead of hardcoding embeddinggemma:latest (which is an
  embedding-only model that rejects /api/generate with HTTP 400)
- Tests: test_multi_turn_receives_context passes think=False to prevent
  Qwen3 thinking-mode models from returning empty content fields
- Screenshots retaken: ollama_chat.png, ollama_lifecycle.png, ollama_workflow.png

All 80 unit + 9 integration tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb
2026-06-29 12:49:53 +01:00
James VeitchandClaude Sonnet 4.6 da88e4cdaf test(chat): T-commit — model must be STRING, model_name input removed
2 failing tests:
- test_chat_completion_model_is_plain_string: model must be STRING not COMBO
- test_chat_has_no_model_name_input: redundant optional input removed

Removed test_wired_model_name_overrides_combo (behaviour going away).
Added test_chat_model_receives_wired_string (STRING wiring works directly).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb
2026-06-29 12:32:01 +01:00
James VeitchandClaude Sonnet 4.6 1377c9fbe6 feat(chat): I-commit — inline response display via OUTPUT_NODE
OllamaChatCompletion now sets OUTPUT_NODE = True and returns
{"ui": {"text": [...]}, "result": (...)} so ComfyUI renders the
response text directly in the node body after each run.

On first turn, the full response is displayed.
On subsequent turns, the response is shown with a compact history
summary (last 6 messages, 100-char snippets) so multi-turn context
is visible at a glance without a separate display node.

_history_preview() helper added for the summary rendering.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb
2026-06-29 09:50:09 +01:00
James VeitchandClaude Sonnet 4.6 ca4c322b9d test(chat): T-commit — inline display (OUTPUT_NODE + dict return)
5 failing unit tests:
- test_chat_is_output_node
- test_chat_returns_ui_result_dict
- test_chat_ui_contains_response_text
- test_chat_result_is_3_tuple
- test_wired_model_name_overrides_combo (updated to unpack from ["result"])

Integration tests updated to unpack from ["result"] for API consistency.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb
2026-06-29 09:49:29 +01:00
James Veitch d89a3bb216 fix(ollama): correctness — event-loop safety, HTTP errors, endpoint, types, timeout
fix(ollama): correctness — event-loop safety, HTTP errors, endpoint, types, timeout
2026-06-29 01:39:45 +01:00
James VeitchandClaude Sonnet 4.6 48b84e23c7 fix(screenshots): lifecycle — wider node spacing, scale 0.72
OllamaChatCompletion grew taller with the new timeout_secs widget.
Nodes repositioned with generous horizontal gaps (60→380→720→1200)
and scale reduced to 0.72 so the full Load→Chat→Unload chain is
visible without overlap.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb
2026-06-29 01:39:38 +01:00
James VeitchandClaude Sonnet 4.6 5ccd569f63 chore: ruff format pass — no logic changes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb
2026-06-29 01:34:54 +01:00
James VeitchandClaude Sonnet 4.6 b44410c0a8 fix(ollama): I-commit — all 6 correctness issues resolved
- _run_async: ThreadPoolExecutor fallback when called inside a running event loop
- _post_json: raises RuntimeError on HTTP 4xx/5xx; configurable timeout kwarg
- _DEFAULT_MODELS: static placeholder; no import-time network call
- OllamaLoadModel/UnloadModel: /api/generate endpoint; keep_alive as int (-1/0)
- OllamaChatCompletion: timeout_secs INT widget (30–3600s, default 300)
- getHostFromNode (JS): traverses graph links to find connected OllamaClient node

All 67 unit tests green. docs/README corrected to /api/generate.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb
2026-06-29 01:34:31 +01:00
James VeitchandClaude Sonnet 4.6 c80e488b49 test(ollama): T-commit — failing tests for all 6 correctness issues
9 new tests cover:
- _run_async: event-loop safety when called from a running loop
- _post_json: raises RuntimeError on 4xx/5xx; timeout kwarg forwarded
- LoadModel/UnloadModel: must use /api/generate, keep_alive must be int
- ChatCompletion: must expose timeout_secs widget and forward it

58 pre-existing unit tests remain green. Integration tests excluded.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb
2026-06-29 01:32:49 +01:00
James VeitchandClaude Sonnet 4.6 eca1517b65 fix(ollama): OllamaUnloadModel pass-through + OllamaChatCompletion model_name output
OllamaUnloadModel now works as a pass-through node: wire
OllamaChatCompletion.response into the optional `passthrough` input and
OllamaChatCompletion.model_name into `model` — ComfyUI's data-flow graph
then guarantees Load → Chat → Unload execution order.

OllamaChatCompletion gains an optional `model_name` forceInput so
OllamaLoadModel.model_name can wire in (creating Load → Chat ordering) and
overrides the COMBO dropdown. It also returns `model_name` as a 3rd output
so the model can flow downstream to UnloadModel without duplication.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb
2026-06-29 01:16:30 +01:00
James VeitchandClaude Sonnet 4.6 24a212516e docs: add Ollama model lifecycle section with load/unload screenshot
Shows OllamaLoadModel + OllamaUnloadModel wired to the same client, with
prose explaining why explicit VRAM management matters on single-GPU setups.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb
2026-06-29 01:06:06 +01:00
James VeitchandClaude Sonnet 4.6 653be8622d fix(docs): correct Ollama screenshots — seed localStorage to bypass template browser
Fresh Playwright sessions landed on ComfyUI's template gallery (no `workflow`
key in localStorage) instead of the node canvas. Pre-seeding an empty workflow
via Playwright storage_state fixes the capture. Also shows localhost:11434 in
the OllamaClient screenshot (user-facing default) rather than the Docker-internal
routing URL.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb
2026-06-29 01:02:08 +01:00
James VeitchandClaude Sonnet 4.6 f3574c0202 feat(006): Ollama model integration — 14 nodes for LLM inference in ComfyUI workflows (#8)
* fix: eliminate all identified broken windows before Ollama implementation

- pyproject.toml: add requires-python>=3.11, real description, remove dead
  [project.scripts] entry (no main() exists), add system/integration markers
- __init__.py: replace pytest-in-sys.modules guard with comfy-in-sys.modules
  (checks the actual condition; cleaner semantics)
- tests/conftest.py: remove duplicate module-level class definitions and the
  aiohttp mock (real aiohttp is installed; mock blocked integration tests)
- circuit_breaker.py: remove copy-pasted INPUT_TYPES boilerplate docstring;
  logger.debug → logger.warning for ComfyUI-absent branch (degraded state)
- random_choice.py: remove copy-pasted INPUT_TYPES boilerplate and dead
  triple-quoted string literal; fix bare re-raise to log before propagating
- format_string.py: print() → logger.warning(); remove # type: ignore on
  two dict assignments; remove cargo-culted # noqa: F401 (ruff doesn't flag)
- scripts/take_screenshots.py: remove unused h_pad and v_pad parameters

All 76 tests pass; ruff clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb

* design(006): full DESIGN phase artefacts for Ollama model integration

Adds spec, plan, tasks, 6 BDD feature files, ADRs, and epic file for
spec 006-ollama-model-integration (14 nodes ported from
darth-veitcher/comfyui-ollama-model-manager, Issue #1 fix, logging
harmonisation, live-service integration tests).

- specs/006-ollama-model-integration/{spec,plan,tasks}.md
- specs/006-ollama-model-integration/features/us{1-6}_*.feature
- specs/006-ollama-model-integration/{.beacon.toml,checklists/}
- project-management/ADRs/ADR-004-aiohttp-over-httpx-for-ollama.md
- project-management/ADRs/ADR-005-ollama-host-config-via-client-node.md
- project-management/Roadmap/epics/ollama-integration.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb

* chore(006): Phase 1 setup — Ollama fixtures, Justfile recipes, test skeleton

- conftest.py: add ollama_host (session), ollama_available (session),
  skip_if_no_ollama fixtures for @pytest.mark.integration tests
- Justfile: add test, test-unit, test-integration, test-system recipes
- tests/test_ollama.py: empty skeleton with module docstring and lazy-import
  block (uncommented phase-by-phase as ollama.py is built)

Closes T001 (system marker — done in broken-windows commit), T002, T003, T004.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb

* feat(006): Phase 3 foundational — ollama.py, ollama.js, __init__ wiring (T011-T014)

- src/comfydv/ollama.py: OllamaClientType, _run_async, _fetch_models,
  _post_json, _DEFAULT_MODELS (populated at import), /dv/ollama/models route,
  all 14 node classes (US1-US6) with correct ComfyUI contract
- src/js/ollama.js: app.registerExtension for OllamaModelSelector/LoadModel/
  ChatCompletion — refreshModelDropdown + ⟳ refresh button
- src/comfydv/__init__.py: register all 14 Ollama nodes in
  NODE_CLASS_MAPPINGS and NODE_DISPLAY_NAME_MAPPINGS

Closes T011, T012, T013, T014.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb

* test(006): full Ollama test suite — T015-T031 all US TDD-T commits (T-T032)

Add tests/test_ollama.py with 6 test classes covering all 14 nodes:
  - TestUS1OllamaConnection: client type, custom host, unreachable error
  - TestUS2ModelSelection: fetch list, selector output, COMBO type, empty fallback
  - TestUS3ModelLifecycle: COMBO type, empty-model guard, load/unload integration
  - TestUS4ChatCompletion: COMBO type, single-turn, multi-turn, history growth
  - TestUS5ComposableOptions: all 7 option nodes + chaining + deterministic
  - TestUS6HistoryInspection: debug output, length counts
  - TestNodeContracts: parametrised over all 14 nodes for ComfyUI contract

Also remove tests/__init__.py — its presence caused pytest to walk up past the
repo root and add the parent directory to sys.path, making the root-level
__init__.py win the 'comfydv' namespace over src/comfydv/.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb

* style: ruff format test_ollama.py

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb

* feat(006): T032/T034 — extend packaging tests and manager entry for 14 Ollama nodes

Update EXPECTED_NODENAMES in test_packaging.py to include all 14 Ollama node
display names. Update comfy-manager-entry.json nodename array and description
to register all 14 nodes with ComfyUI Manager.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb

* docs(006): T033 — add Ollama section to README and docs/index.md

Add all 14 Ollama nodes to the node reference table and add a dedicated
Ollama section covering minimal workflow, option nodes, and multi-turn
conversation patterns.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb

* test(006): T035-T/I — TestLoggingConsistency: no print(), correct log levels

Add TestLoggingConsistency class to tests/test_logging.py:
- AST scan: assert zero print() calls across all src/comfydv/*.py
- circuit_breaker: ComfyUI-absent branch uses logger.warning() not debug
- random_choice: exception path calls logger.error() and uses plain raise
- ollama: absent-ComfyUI paths emit at least 2 logger.warning() calls

All checks pass (fixes were already in Phase 2 broken windows commit).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb

* docs: add Quickstart section to README — satisfies beacon doctor readme-completeness

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb

* chore(006): mark all 55 tasks complete in tasks.md — spec fully implemented

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb

* docs(006): T036/T037 — add Ollama screenshots and docker extra_hosts for host Ollama routing

Captures 4 Ollama node screenshots (client, chat, workflow, options) via
Playwright against the live dev ComfyUI instance. Adds extra_hosts to
docker-compose.dev.yml so the container can reach host-machine Ollama.
Updates README and docs/index.md to embed all 8 screenshots.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 00:55:15 +01:00
James VeitchandClaude Sonnet 4.6 9b64203bee docs: update docs/index.md to match README — add Circuit Breaker, new screenshots
Mirrors the README.md rewrite into the MkDocs site landing page:
- Add Circuit Breaker section with screenshot (assets/circuit_breaker.png)
- Update Format String and Random Choice prose to match README
- Replace stale dependency list (rich/colorama/termcolor removed in spec 001)
- Add ComfyUI Manager install path
- Image paths use assets/ (MkDocs-relative) vs docs/assets/ in README

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb
2026-06-28 22:25:08 +01:00
James Veitch 32d0bbfa34 Merge pull request #7 from darth-veitcher/docs/playwright-screenshots
docs: automate README screenshots with Playwright
2026-06-28 21:53:08 +01:00
James VeitchandClaude Sonnet 4.6 ca1c35a3cf docs: automate README screenshots with Playwright from live ComfyUI harness
Replace hand-crafted PowerPoint exports with Playwright-generated screenshots
taken from the actual running Docker test harness:

- scripts/take_screenshots.py: headless Chromium via Playwright; creates nodes
  programmatically via LiteGraph/window.app, triggers updateNodeConfig() for
  FormatString's dynamic socket update, then crops tightly around each node
- docs/assets/: four screenshots (fstring, jinja2, random, circuit_breaker)
  replacing the old 1920×1080 PowerPoint exports (90%+ smaller, more accurate)
- Justfile: add `screenshots` recipe (starts harness if needed, waits healthy,
  runs the script)
- README.md: rewrite to cover all three nodes including Circuit Breaker;
  fix stale dependency list (was listing rich/colorama/termcolor which we
  removed in spec 001); add ComfyUI Manager install path
- pyproject.toml + uv.lock: add playwright to [dev] dependencies

Run: just screenshots

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb
2026-06-28 21:52:45 +01:00
James Veitch f90b8db722 fix(002): manager-compatible install — requirements.txt, comfy-manager-entry.json, Docker harness
fix(002): manager-compatible install — requirements.txt, aiohttp dep, metadata, Docker harness
2026-06-28 21:22:03 +01:00
James VeitchandClaude Sonnet 4.6 b6f8a363ef chore: update ROADMAP.md after beacon roadmap refresh
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb
2026-06-28 21:21:42 +01:00
James VeitchandClaude Sonnet 4.6 526b00953d chore(002): archive logging epic, fix roadmap ADR links, add pyyaml dev dep
- Roadmap: move logging-modernisation to Done; fix ADR links (root-relative
  paths corrected from ../../ADRs/ to project-management/ADRs/); add ADR-003
- epics/logging-modernisation.md: emptied after beacon epic finish archive
- uv.lock: updated after `uv add --dev pyyaml` (needed by TestDockerCompose)
- tests/test_packaging.py: ruff line-length formatting only
- scripts/gen_ref_pages.py: trailing blank line (ruff)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWysE6jYn4YjNorLBQ1cXb
2026-06-28 21:21:16 +01:00
James VeitchandClaude Sonnet 4.6 aec8609de9 fix(docker): explicitly install requests missing from ComfyUI v0.3.44 requirements
app/frontend_management.py imports requests but the tag's requirements.txt
omits it. Add explicit pip install so the image build is self-contained.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 17:09:04 +01:00
James VeitchandClaude Sonnet 4.6 e94cebe9de feat: add Justfile and docker-compose.dev.yml for local dev workflow
just up   — mounts local repo into container, streams logs, no rebuild needed
just up-d — same but detached; use `just logs` to follow
just build/rebuild — manage the base image
just open/status/down — day-to-day helpers
just ci-smoke — CI path (COPY-based, --quick-test-for-ci)

docker-compose.dev.yml overrides the COPY+quick-exit CMD with a volume
mount and persistent server so code changes are live immediately.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 16:54:18 +01:00
James VeitchandClaude Sonnet 4.6 a3ed53636d fix(lint): remove unused import and fix noqa directive (ruff clean)
Removed unused `import sys` from test_logging.py (left over after
stripping MockInterruptProcessingException). Fixed invalid noqa comment
format on format_string.py:31.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 16:29:47 +01:00
James VeitchandClaude Sonnet 4.6 4e764b9d63 chore(002): mark all tasks done; fix archived ADR relative links (T050-T052)
All tasks [x] complete. Fixed logging-modernisation archived epic ADR paths
(../../ → ../../../ to account for archive/ subdirectory). beacon doctor
--strict: 34/34 pass, 0 failures.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 16:29:00 +01:00
James VeitchandClaude Sonnet 4.6 01ba88c496 feat(002): add CPU-only Docker Compose test harness (T040-I, T041-I)
docker-compose.yml + docker/Dockerfile: python:3.11-slim base, ComfyUI
cloned at pinned tag, torch CPU wheel, comfydv mounted into custom_nodes/,
jinja2 installed via requirements.txt, port 8188 exposed. No GPU required.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 16:26:12 +01:00
James VeitchandClaude Sonnet 4.6 44c57c0356 test(002): failing tests for Docker Compose harness (T040-T, T041-T)
5 tests RED: docker-compose.yml and docker/Dockerfile don't exist yet.
Added pyyaml>=6.0.2 to dev deps for YAML parsing in tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 16:25:42 +01:00
James VeitchandClaude Sonnet 4.6 feea1c0960 fix(002): update @description to reflect actual nodes (T030-I)
Replaces stale 'model memory management' text with an accurate description
of FormatString, RandomChoice, and CircuitBreaker. Matches the text in
comfy-manager-entry.json exactly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 16:25:06 +01:00
James VeitchandClaude Sonnet 4.6 75a3efe021 test(002): failing tests for @description accuracy in __init__.py (T030-T)
2 tests RED: @description mentions non-existent 'model memory management'
and omits 'circuit' (CircuitBreaker). One test already passes (no Model
Unloader mention) — correct baseline.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 16:24:48 +01:00
James VeitchandClaude Sonnet 4.6 624ce0b11c feat(002): add comfy-manager-entry.json for ComfyUI Manager submission (T020-I)
Draft entry ready for PR to ltdrdata/ComfyUI-Manager/custom-node-list.json.
Contains author, title, reference, files, install_type=git-clone,
description (accurate, no non-existent nodes), and all 3 nodenames.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 16:24:23 +01:00
James VeitchandClaude Sonnet 4.6 62a0250939 test(002): failing tests for Manager entry JSON (T020-T)
4 tests RED: comfy-manager-entry.json does not exist yet. Tests validate
required fields, install_type=git-clone, and nodename list.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 16:24:09 +01:00
James VeitchandClaude Sonnet 4.6 eec7192f4f fix(002): hand-author requirements.txt; promote aiohttp to runtime deps (T010-I, T011-I)
requirements.txt now lists only jinja2>=3.1.6 per ADR-003.
aiohttp>=3.9.0 moved from [dependency-groups].dev to
[project.dependencies] so pip-only installs get the dep too.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 16:23:48 +01:00
James VeitchandClaude Sonnet 4.6 67dff3efef test(002): failing tests for requirements.txt correctness and aiohttp dep (T010-T, T011-T)
5 tests RED as expected: jinja2 missing, colorama/termcolor/bare-dot
still present, aiohttp not in [project.dependencies].

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 16:23:21 +01:00
James VeitchandClaude Sonnet 4.6 80ecf9cc39 test(002): scaffold test_packaging.py and BDD feature files (T001, T002)
18 stub tests pass; 4 Gherkin feature files cover US1–US4 acceptance
scenarios verbatim from spec.md. No assertions yet — TDD pairs T010-T
through T041-T will fill these in next.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 16:22:49 +01:00
James VeitchandClaude Sonnet 4.6 ef8608db97 docs(002): add tasks.md with TDD pairs for manager-compatible install
Phases 1–6: setup scaffold, US1 dep install (T010/T011), US2 Manager
entry JSON (T020), US3 metadata accuracy (T030), US4 Docker harness
(T040/T041), and quality gates. All user stories decomposed into
-T/-I pairs per BEACON TDD discipline.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 16:22:06 +01:00
James VeitchandClaude Sonnet 4.6 b3ed126cd3 feat(spec): 002-manager-install plan.md + ADR-003
plan.md covers:
- requirements.txt fix (jinja2 only, hand-authored)
- aiohttp→production deps in pyproject.toml
- @description metadata update
- custom-node-list.json PR scope
- Docker Compose CPU-only test harness (US4)

ADR-003: hand-authored requirements.txt as curated subset of pyproject.toml —
cross-cutting policy for all future dep additions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 16:17:13 +01:00
James VeitchandClaude Sonnet 4.6 6d21a6c58e feat(spec): 002-manager-install spec.md — Manager-Compatible Install
3 user stories, 6 FRs, 5 SCs covering:
- requirements.txt fix (jinja2 only, hand-authored)
- aiohttp promoted to production deps in pyproject.toml
- ComfyUI Manager custom-node-list.json submission
- @description metadata accuracy

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 16:14:40 +01:00
James VeitchandClaude Sonnet 4.6 1a42a2a0b2 chore(beacon): stub 4 specs for ux-and-install epic; archive logging-modernisation
Audit confirmed all 15 epic criteria are unowned. Four stubs created:
002-manager-compatible-install
003-formatstring-frontend-ux
004-node-logic-correctness
005-metadata-cleanup

logging-modernisation archived (1/1 specs shipped).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 16:10:22 +01:00
James VeitchandClaude Sonnet 4.6 61918e7436 chore(roadmap): update Gantt chart and table for ux-and-install epic
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 16:08:56 +01:00
James VeitchandClaude Sonnet 4.6 081651cbce chore(beacon): add ux-and-install epic from codebase audit
Parallel subagent audit (2026-06-28) identified four categories of defects:
- requirements.txt broken for ComfyUI Manager install
- FormatString: no debounce, clears connections, ID mismatch, class mutation
- RandomChoice/CircuitBreaker correctness bugs
- Stale metadata and dead code throughout

Epic captures 15 success criteria across installation, UX, and correctness.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 16:07:22 +01:00
3322f6f05e feat: standardise logging across all comfydv nodes (#5)
* chore: initialise BEACON framework with all bootstrap artefacts

- Problem statement, constitution, architecture doc, roadmap populated
- CHANGELOG.md created (Keep a Changelog); README expanded with
  What-is-this, Install, and Quickstart sections
- pyproject.toml gains [project.urls] (repository + documentation)
- beacon doctor: 32 pass, 2 pre-commit warns, 0 failures

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: Phase 1 — add NullHandler to package root, remove hardcoded setLevel

T001: logging.getLogger("comfydv").addHandler(NullHandler()) in __init__.py
T002: remove logger.setLevel(logging.DEBUG) from format_string.py
Also fix pyproject.toml TOML structure (project.urls was inside [project] block)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test: failing tests for logging modernisation (T010-T through T030-T)

RED phase — 5 tests fail for the correct reasons before implementation:
T010-T: format_string produces stdout (print block)
T011-T: update_widget emits INFO records on hot path
T012-T: random_choice produces stdout (colorama/rich prints)
T020-T: load_node_state uses print() on error instead of logger.error
T021-T: circuit_breaker uses print() instead of logger

T001/T002/T030-T already green: NullHandler registered, setLevel removed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat: standardise logging across all nodes (T010-I through T044)

GREEN phase — all 11 logging tests pass:

T010-I: Remove 8-line diagnostic print block from format_string()
T011-I: Downgrade all hot-path logger.info() calls to logger.debug();
        switch all logger calls to %-style formatting; remove rich import
T012-I: Replace colorama/termcolor/rich print calls in random_choice with
        logger.debug(); add logger = logging.getLogger(__name__)
T020-I: Convert print() on load_node_state error to logger.error()
T021-I: Add logger to circuit_breaker; replace print() with logger.debug();
        fix logic so status=False triggers the interrupt (per BDD spec)
T040:   Remove colorama, rich, termcolor from pyproject.toml dependencies
T042:   ruff check + format clean
T044:   beacon doctor --strict passes (34/34)

Also adds ADR-001 and ADR-002 capturing the stdlib logging and NullHandler
decisions, linked from the logging-modernisation epic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: mark all 001-standardise-logging tasks complete in tasks.md

All [x] checkboxes flipped after 11/11 tests pass and beacon doctor --strict
reports 0 failures.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: mark logging-modernisation epic success criteria complete

All success criteria verified: NullHandler added, setLevel removed, print()
calls converted, colorama/rich/termcolor removed from deps, zero stdout in
normal operation, errors surface at ERROR level, all tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: commit spec artefacts and dependency lock for 001-standardise-logging

Includes spec.md, plan.md, research.md, BDD feature files, contracts, .beacon.toml
backlink, and uv.lock after removing colorama/rich/termcolor.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: James Veitch <darthveitcher@office-mac-mini.local>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 16:00:43 +01:00
darth-veitcher abe055e63e Merge branch 'develop' 2025-11-05 15:48:55 +00:00
darth-veitcher a68b6e79b2 feat: reverse FormatString output order for reliability
BREAKING CHANGE: Output order changed to put primary outputs first

- formatted_string now always in output position 0 (was dynamic)
- saved_file_path now always in output position 1 (was dynamic)
- Variable pass-through outputs now in positions 2+ (were 0+)

This change ensures primary outputs are in fixed, predictable positions,
resolving ComfyUI output mapping issues when dynamic outputs are present.

Changes:
- Updated format_string() return statement to reverse output order
- Updated update_widget() to set RETURN_TYPES/RETURN_NAMES in new order
- Updated all 47 tests to expect new output positions
- Updated all docstrings and examples in format_string.py
- Added comprehensive "Output Structure" documentation to README.md
- Added same documentation to docs/index.md for consistency
- All tests passing ✅
2025-11-05 15:48:22 +00:00
darth-veitcher beaaf4a278 Merge branch 'develop' 2025-11-05 15:39:41 +00:00
darth-veitcher a3fa7b41f1 progress 2025-11-05 15:39:33 +00:00
darth-veitcher 522b7978e0 progress 2025-11-05 12:54:02 +00:00
darth-veitcher 8061a5007c progress 2025-11-05 12:41:34 +00:00
darth-veitcher 617834840f progress 2025-11-05 12:30:51 +00:00
darth-veitcher 9c9451b790 progress 2025-11-05 12:26:47 +00:00
darth-veitcher 884d180958 progress 2025-11-05 12:20:10 +00:00