Repository navigation
I-ML-01: 接通固定版本CPU推理、OCR证据与冻结名称候选(第36–41批) - #13
Merged
Merged
Conversation
…didates Freeze analysis object versions and route official COCO80/PP-OCRv6_small CPU inference through a pinned resident HTTP process. Rebuild OCR crops in an isolated Worker, register all evidence with lease fencing, and recompute bottle associations, source fields and frozen dictionary candidates. Update generated contracts, migration head 0004, CI runtime isolation and delivery records for batches 36-41. Keep results in needs_review and retain unknown/conflicting evidence; development dictionaries contain no safety classes. Record real MinIO version/IAM checks without assets or secrets. Validation: pytest business/domain/security/protocol (1795); CPU/protocol unittest (75); Worker pixels (9); fixture/HTTP and isolated MySQL regression; ruff check/format, generated specs/design checks and environment pip checks. Rollback: drain fixed-identity tasks, restore the matched prior application, contracts, environments and bundle/lock/pin. Retain migration additions and historical evidence; use backup/forward repair, never destructive production downgrades or old-run version backfill. Base: 13a854f (PR #12).
Replace wait_for around the bounded IPC send with Python 3.11 timeout so outer cancellation is not consumed by a concurrently completed send. Add a deterministic regression that fails against the previous supervisor and confirms cancellation reaps the CPU process and releases capacity. Validation: 76 CPU/protocol tests and 27 fixture/HTTP tests pass; both official CPU/real MinIO smoke records were rebuilt with the changed code lock. Ruff, generated contracts and design validation pass. Sync batch 36-41 Git delivery status to PR #13 without claiming independent approval. Rollback restores the matched previous application/contracts/environment and bundle/lock/pin after draining fixed-identity tasks. No new migration or change to historical evidence; retain additions and use forward repair.
Preserve the implementation-plan table formatting and record the final 458-test isolated MySQL regression. Link batch 36-41 delivery to PR #13 and distinguish local validation from pending CI and independent review. No runtime or migration changes; restore the prior document version for rollback.
1605009600
approved these changes
Oct 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明
apps/ai_inference/{analysis,inputs,bundle,runtime_cpu,supervisor}.py、apps/ai_inference/app/*;apps/worker/inference_evidence.py、packages/application/inference_execution.py、packages/inference_protocol/{association,fields,chemical,evidence}.py;packages/persistence/migrations/versions/0003_run_image_version.py、0004_ocr_evidence.py;contracts/*、tools/ml/*、.github/workflows/ci.yml、docs/08-delivery/36–41及相关开发/设计文档。影响范围
固定 analysis VersionId/SHA 与 run 输入;0004 支持独立文字区域证据。受控 development bundle/lock/pin、ready/version、串行子进程预算、取消/崩溃/退出清理与 Worker 围栏共同约束结果。文字只关联同图真实 COCO bottle;字段保留全部 source_lines,候选按全部同瓶 name 字段判断共识/冲突,Worker 核原始快照 SHA 并完整重算。开发词典不含安全分类,CPU runs 仍为 needs_review,无 DateFact/FactRevision 或新规则接线。
远程Push检查发现 IPC 发送完成时外层取消可能被 asyncio.wait_for 消费;补充 asyncio.timeout 修复及确定性取消/进程回收回归,原实现稳定重现超时,新实现正确传播取消。两份真实 MinIO/官方 CPU smoke 以修复后的代码锁重新生成,不复用旧锁宣称新代码通过。
验证
.venv-business/Scripts/python.exe -B -m pytest tests/business tests/domain tests/security tests/protocol -q.venv-ai/Scripts/python.exe -B -m unittest tests.ai.test_dfine_adapter tests.ai.test_cpu_runner tests.ai.test_cpu_pixels tests.ai.test_ocrv6_adapter tests.ai.test_quality_pixels tests.ai.test_pipeline_cpu tests.ai.test_crop_evidence tests.ai.test_analysis tests.ai.test_supervisor tests.ai.test_text_association_pixels tests.protocol.test_contract -q.venv-business/Scripts/python.exe -B -m unittest tests.ai.test_fixture tests.ai.test_cpu_runner tests.ai.test_cpu_http -q.venv-evidence/Scripts/python.exe -B -m unittest tests.worker.test_evidence_pixels -q.venv-business/Scripts/python.exe -B tools/database/run_mysql_tests.py --mysqld 'D:/SQL/MySQL/MySQL Server 8.0/bin/mysqld.exe'ruff check/ruff format --check apps packages tests tools/database tools/ml;tools/design/build_specs.py --check、tools/design/validate_specs.py;三环境pip check、git diff --check。41-i-ml01-minio-smoke.json:11项真实 AccessDenied、读取固定旧V1(latest为坏V2)、34个裁剪的准确版本/SHA/复用及退出清理通过。四张素材瓶数3/1/0/0、34条文字,第三图为 cup,全部 needs_review。41-i-ml01-candidates-smoke.json的正向候选使用明确 synthetic 测试词典与合成瓶框、真实 OCR,单独标记 is_simulated=true,不计现场模型准确率。Git 中只有脱敏工程摘要,无真实图片/OCR原文/模型权重/凭据。风险与回滚
13a854f9b80b51d5c68d8ffd5a034701bcada528(main、PR I-ML-01: 官方 COCO80 与 PP-OCRv6 CPU 推理及可重建证据 #12);先停止接入/排空任务,恢复成套旧代码、契约、依赖环境与 bundle/lock/pin,保留已登记历史结果/对象,不手改摘要。审查清单
.obsidian/、.env、凭据或未脱敏数据本 PR 涉及数据库、模型、权限与部署配置,按 CONTRIBUTING.md 需两名协作者共同确认;作者不代替独立审批,不自动合并。