Files
bid-doctor/.github/workflows/ci.yml
YANG JIANKUAN e499de7486 feat: 查标第 1 步——上传投标分册 → 检查 → 逐条处理 → 复查沿用
后端
- check 模块:检查预览、发起、进度、取消、记录;六个阶段(准备投标文件、响应匹配、规则、证据校验、
  状态沿用、汇总);问题列表、处理、撤销、批量处理(只限提示级)。
- 每条清单项的检查结论 check_item_result(C9,迁移 0005):「已响应」也带投标原文出处;
  没有校验通过的证据不能判已响应(C3)。级别从清单项算,不让模型定;说明不写整改建议。
- 响应匹配先只有第三层:内存 BM25 检索候选句 + check.match v1 提示词,检索不到不调模型,
  漏答记 missing_answer,模型临时错误只影响那一批。
- 计费:免费版不记流水;专业版 24 小时内复查免扣(记一行 0);expected_charge 不一致时拒绝不扣点;
  失败、取消退回;投标文件读不出文字按输入问题失败、不扣点。
- 投标分册:类型(volume_kind)和版本;电子投标平台加密格式在上传时拦下。
- 解析流水线前几个阶段拆到 document/pipeline/normalize.py,解析和检查共用。
- ops 模块:反馈接口;致命问题确认无误的说明自动进误报反馈(U4)。
- SK1:Valkey 客户端短超时、SSE 连接池上限。SK2:CI 加 Gotenberg、直接跑 init-roles.sh。

前端
- 上传投标文件并检查页、查标页(进度、覆盖范围、按级别筛选、逐条处理和行内说明、撤销、原文抽屉、
  已处理、本次已解决);项目头抽成公共组件,加「查标」标签页;工作台「下一步」覆盖查标阶段。

契约、文档:openapi.yaml 加 item-results、volume_kind、coverage 字段;data-model、api-design §10、
架构 §8 / §13(SK14)、AGENTS.md 同步。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 11:48:10 +08:00

83 lines
2.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 合并的前提(架构 §8):类型检查、单元测试、租户隔离用例都通过;接口契约校验通过。
name: ci
on:
push:
branches: [main]
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
server:
runs-on: ubuntu-24.04
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: bd_owner
POSTGRES_PASSWORD: dev-owner
POSTGRES_DB: bid_doctor
ports: ["5432:5432"]
options: >-
--health-cmd "pg_isready -U bd_owner" --health-interval 2s --health-retries 30
valkey:
image: valkey/valkey:8-alpine
ports: ["6379:6379"]
gotenberg: # 投标样例和招标样例都可能是 Word,转换要走 Gotenberg(SK2)
image: gotenberg/gotenberg:8
ports: ["3109:3000"]
env:
BD_TEST_PG: 127.0.0.1:5432
BD_TEST_VALKEY: redis://127.0.0.1:6379/1
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
version: "0.12.20"
- run: uv sync --frozen
- name: 数据库角色(直接跑部署用的脚本,两边不会漂移,SK2)
env:
PGHOST: 127.0.0.1
PGPASSWORD: dev-owner
POSTGRES_USER: bd_owner
POSTGRES_DB: bid_doctor
BD_APP_PASSWORD: dev-app
run: sh deploy/compose/postgres/init-roles.sh
- working-directory: server
run: |
../.venv/bin/ruff check src tests migrations
../.venv/bin/ruff format --check src tests migrations
../.venv/bin/pyright
../.venv/bin/lint-imports
../.venv/bin/pytest -q
web:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile --ignore-scripts
- name: 接口类型要和 openapi.yaml 一致
run: |
pnpm gen:api
git diff --exit-code packages/api-client/src/schema.d.ts
- run: pnpm typecheck
- run: pnpm build
contract:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- name: OpenAPI 完整校验(api-design §8)
run: npx --yes @redocly/cli@1.34.0 lint docs/architecture/openapi.yaml --skip-rule operation-4xx-response --skip-rule no-server-example.com