Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
.gitignore

# Python
__pycache__
*.pyc
*.pyo
**/__pycache__/
**/*.pyc
**/*.pyo
**/.pytest_cache/
venv/
.venv/
*.egg-info/
**/*.egg-info/
packages/*/build/

# Node
node_modules/
Expand All @@ -31,6 +33,7 @@ static/

# Docs
.claude/
.docs/
docs/
*.md
!README.md
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ steps.vars.outputs.version }}
cache-from: type=gha
cache-to: type=gha,mode=max
# 固定 registry 引用,让不同发布 tag 复用包含中间 builder 的缓存。
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache,mode=max

- name: Generate release notes (tag push only)
if: ${{ github.event_name == 'push' }}
Expand Down
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# 多阶段构建,减小最终镜像大小

# ===== Stage 1: 前端构建 =====
FROM node:24.14.0-alpine AS frontend-builder
# 静态资源与目标架构无关,使用构建机原生平台,避免 ARM 镜像构建时通过 QEMU 跑 pnpm。
FROM --platform=$BUILDPLATFORM node:24.14.0-alpine AS frontend-builder

WORKDIR /app/frontend

Expand Down Expand Up @@ -42,9 +43,6 @@ RUN sed 's/^-e //' requirements-runtime.txt > /tmp/requirements-runtime.txt \
# ===== Stage 3: Python 运行环境 =====
FROM python:3.11-slim-bookworm

# 版本号(构建时传入)
ARG VERSION=dev

WORKDIR /app

# 安装系统依赖
Expand Down Expand Up @@ -98,7 +96,8 @@ COPY src/ ./src/
COPY server.py ./
COPY prompts/ ./prompts/

# 写入版本号
# 写入版本号;延后声明,避免换版本号时让系统依赖安装缓存失效。
ARG VERSION=dev
RUN echo "${VERSION}" > VERSION

# 从前端构建阶段复制静态文件
Expand Down
9 changes: 4 additions & 5 deletions tests/test_assistant_task_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,10 @@ def complete_task_with_message(self, task_id, conversation_id, content):

async def run():
runner.start_message(task_id, conversation_id)
for _ in range(20):
if repository.get_task_snapshot(task_id)["status"] == "completed":
return
await asyncio.sleep(0.01)
raise AssertionError("runner did not finish")
# Wait for the worker before reading the shared in-memory SQLite connection.
async with asyncio.timeout(5):
while runner.is_running(task_id):
await asyncio.sleep(0.01)

asyncio.run(run())
events = repository.list_task_events(task_id, after_sequence=2)
Expand Down
Loading