Files
qyburn-coder/docker-compose.yml
T
admin 7fa1fb9e99 feat: switch Qyburn to unified diff output + patch apply
Full-file replacement confirmed failing at all model sizes (tested up to
codestral:22b on 619-line file). Model hallucinates a new short file instead
of reproducing the original with changes applied.

New approach: model outputs only the unified diff (10-20 lines), applied
programmatically via `patch`. Works at any file size, uses ~154 tokens vs
~700+ previously, and succeeds on first attempt.

- Add `patch` binary to Dockerfile (apt install)
- Replace `_extract_code` with `_extract_diff`
- Add `_apply_diff` using subprocess patch
- Rewrite `_CODER_SYSTEM` to ask for diff format
- Rewrite `_build_prompt` to return plain string (no prefill dict)
- Rewrite `_ask_coder` to drop prefill assistant message
- Reduce num_predict 16384 → 4096 (diff output is short)
- Update `run_coding_loop` inner loop to apply diff then syntax-check result
- Update `_write_handoff` to show last diff instead of last full-file attempt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 12:23:12 +00:00

28 lines
700 B
YAML

services:
qyburn:
build: .
container_name: qyburn-coder
restart: unless-stopped
ports:
- "8700:8700"
volumes:
- /opt/stacks:/opt/stacks:rw
- /opt/sites:/opt/sites:rw
- /opt/agent-os:/opt/agent-os:rw
- /var/run/docker.sock:/var/run/docker.sock
- /usr/bin/docker:/usr/bin/docker:ro
- /usr/libexec/docker/cli-plugins:/usr/libexec/docker/cli-plugins:ro
environment:
HODOR_URL: http://hodor-gateway:8200
OLLAMA_URL: http://172.27.40.20:11434
CODER_MODEL: phi4
STACKS_DIR: /opt/stacks
SITES_DIR: /opt/sites
AGENT_OS_DIR: /opt/agent-os
networks:
- proxy
networks:
proxy:
external: true