Files
yingqing/core/backend
seaislee1209andClaude Opus 4.8 66778fa2d3 harden(extract): 提取加写死的 JSON 输出契约兜底,消除"过度依赖 skill 文件"脆点
承上次定位:脚本生成空 skill 也能出 JSON,是因其 system 带写死的 _OUTPUT_PROTOCOL(进镜像、
永远在);提取没有这层兜底,只靠 skill 文件 → skill 一空就吐散文解析失败。本次对齐脚本做法:
给提取也加 _EXTRACT_OUTPUT_CONTRACT(写死的 entities/segments JSON 契约 + 不提商品等铁律),
拼在 skill 正文之后。即便将来 skill 再丢,提取也仍收到「只输出 JSON」硬指令,不会再退化。

真验证:用 dev 库里那条真实失败脚本,system 仅留写死契约(模拟 skill 全空)真调豆包 →
仍稳定出 JSON(角色/场景齐、商品不提)。

测试:152/152 全绿(新增契约兜底单测)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 00:24:29 +08:00
..

AirShelf Backend

All backend code lives under AirShelf/core/backend by project decision.

Local bootstrap

cd /Users/maidong/Desktop/zyc/qiyuan_gitea/AirShelf/core/backend
python3.12 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
python manage.py migrate
python manage.py runserver 0.0.0.0:8000

Start workers in separate terminals:

cd /Users/maidong/Desktop/zyc/qiyuan_gitea/AirShelf/core/backend
source .venv/bin/activate
celery -A airshelf worker -l info -P threads -c 4   # 线程池 4 并发(出图/视频可并行;勿用 -P solo 串行)

ffmpeg must be available on PATH for Stage5 export jobs.

Runtime layout

  • Django project: airshelf
  • Domain apps: apps/*
  • Settings module: airshelf.settings.development
  • Celery app: airshelf.celery

Secrets must be supplied by environment variables or .env; never commit values from account.md.

Useful commands

python manage.py check
python manage.py makemigrations --check --dry-run
python manage.py migrate
python manage.py bootstrap_volcano_models
python manage.py test apps.accounts apps.projects apps.billing