Files
Jyotisha/docs/tasks/PROGRESS-vedastro-runtime-ops-20260915.md
T
jesse-ux 6b3248bf53
Independent Staging Quality Gate / validate (push) Successful in 9m36s
Independent Staging Quality Gate / publish (push) Successful in 18m18s
fix(vedastro): pin SDK at install and cap free-tier wait
Image build patches vedastro.check_for_update to a no-op after pip install so import cannot hit pypi or upgrade the pin. Free-tier queue waits are capped to VEDASTRO_TIMEOUT_SECONDS and fail fast as free_tier_rate_limited. Gateway status exposes runtime mode as booleans without secrets. BUG-719 resolved; BUG-720 stays investigating until production env is filled in.
2026-09-16 00:25:15 +08:00

52 lines
3.5 KiB
Markdown
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.
# PROGRESS · VedAstro 运行期真相(2026-09-15
工作树:`.worktrees/vedastro-runtime-ops-20260915`
分支:`codex/vedastro-runtime-ops-20260915`
基线:`origin/staging` @ `ce1939b0`
本机 Windows。Anaconda Python 3.11.7 + pytest 9.1.1。无 Docker。`python3` 是 Windows Store 桩(9009)。
未改 `scripts/jyotish_api_server.py`、未改 workflow、未 SSH 生产、未写入任何 key。Skill 未 bump。CHANGELOG 补了一句免费额度用尽时马上说明(用户可感知的是「不再空等」)。
## 任务状态
| 任务 | 状态 | 说明 |
| --- | --- | --- |
| 1 隔离 SDK 自更新 | 完成 | 镜像 `pip install` 后跑 `deploy/patch_vedastro_update_check.py`,失败即构建失败 |
| 2 免费层排队预算 | 完成 | 默认预算 ≤ `VEDASTRO_TIMEOUT_SECONDS`;超预算 fail-fast `free_tier_rate_limited`。生产是否走这条路径见任务 4 |
| 3 status 可观测 | 完成 | `/api/vedastro_gateway/status` 增加 endpoint/key 布尔、fanout、range scan、免费层是否 active、sdk_version、两份 TTL |
| 4 生产模式确认 | 环境缺口 | 清单 `docs/testing/vedastro-runtime-20260915.md`,只由产品负责人执行 |
| 5 Bug 历史 | 完成 | BUG-719 resolvedBUG-720 investigating(等任务 4 回填) |
## 既有断言
| 文件 | 原值 | 新值 | 原因 |
| --- | --- | --- | --- |
| `test_post_json_with_retry_waits_for_free_tier_slot` | 窗口内第二次请求会 sleep | **未改**;预算默认等于 timeout,短等待仍发生 | 有预算的等待保留,只砍掉无上限排队 |
## 反向验证
- 把 Dockerfile 里 `python patch_vedastro_update_check.py` 删掉,`test_dockerfile_patches_vedastro_update_check_after_install` 失败。
-`check_for_update` 从目标文件拿掉,`test_patch_fails_closed_when_hook_is_missing` 失败(`SystemExit`)。
-`birthPayload` 那一行与本单无关;本单不改前端。
## 耗时
本机未在镜像里跑 bridge 子进程(无 Docker 构建)。改前机制:每次 `import vedastro` 可能付 5 秒 pypi 超时,并可 `pip install --upgrade`。改后 `check_for_update` 为 no-op,不再发起该请求。镜像构建证据待有 Docker 的门禁/部署环境给出,不得写成已在本机验证。
## 测试
| 命令 | 结果 |
| --- | --- |
| `python -m pytest tests/test_vedastro_runtime_ops.py tests/test_vedastro_official_full_snapshot.py::test_post_json_with_retry_waits_for_free_tier_slot -v` | **7 passed / 1 skipped**skip:本机未装 `vedastro`,运行期 pin 断言按任务书允许 skip) |
| `python -m pytest` 网关 status / 密钥不泄露 / chat runtime / 既有免费层等待 | 通过 |
| `tests/test_vedastro_gateway.py::test_gateway_completion_archives_official_raw_response` | **本机失败**Windows `st_mode` 33206 vs `0o600`)。改前即如此,本单未动归档权限,不修 |
| `py_compile` 改动的三个 py 文件 | 通过 |
| `scripts/run_quality_gate.py --profile quick` | 本机未跑全量:无 `.venv`、无 Docker、`python3` 不可用。定向 VedAstro 回归如上 |
| `scripts/pre_work_check.py` | 本机 `python3` 是 Store 桩。未声称预检通过 |
## 环境缺口
- 无 Docker:镜像层 patch 生效、运行期版本等于 pin,只能等门禁构建 / 部署后由产品负责人按清单第 5 条回填。
- 生产 envkey / fanout / TTL)未查:见 `docs/testing/vedastro-runtime-20260915.md`。回填前不得声称生产行为已验证。
- BUG-720 保持 `investigating`,直到清单回填。