Repository navigation
排名关键词:母本本地化建议流、采集预算治理与调度可靠性 - #302
Merged
Merged
Conversation
- 生成/整理统一为「en 母本 → 各语言本地化 → 建议弹窗确认」:新语言不再直接 落库,也不再每种语言重复生成英文短语;新增 projects:localizeKeywords IPC (generate/curate/localize 均接 operationId 取消通道) - 建议弹窗按语言分 tab(zh-CN 拼音音序);采纳/忽略选择内聚弹窗内部,点击 不再重渲染整个关键词页;确认时统一落库并过滤已删除历史词 - 批量进度改整体口径(x/N + 阶段文案 + 跨语言字符累计单调递增),支持中途 停止(保留已完成语言的建议) - 新增采集预算(软 240 / 硬 360 实例每天):成本 = 活跃关键词 × 语言覆盖的 商店数(en 全局词按全部本地化计费);AI 建议采纳 / 候选一键加入 / 恢复 暂停词均受硬上限约束,超限自动裁剪并提示 - 语言标签按 zh-CN 拼音音序(不再 en 置顶);AI 按钮字数统一一位小数
- iTunes /search 全局节拍 3.2s/请求(实测 45+/min 持续 5 分钟即 429→403), rank 采集与竞品雷达共用;403 熔断级别化:解除后复发窗口(15min)内再次 403 → 冷却翻倍(45→90→180→360min 封顶),打破「解除即全速重试→又 403」 的滚动延期;kv 兼容旧 ISO 格式 - 共享库锁根治:事务改 BEGIN IMMEDIATE(WAL 下读升写会立即 BUSY, busy_timeout 不介入)+ busy_timeout 10s + 锁错误有界重试;lease 记 leaderPid,崩溃主(心跳新鲜但进程已死)立即接管,不再空等 60s TTL; 诊断输出兼容未迁移库 - daemon 平滑停机/重启:停止派发后先排空在途执行(上限 30s)再拆 socket/ 释放租约,SIGTERM/shutdown/自重启同路径;崩溃栈与活动日志落 scheduler-daemon.log(uncaughtException/unhandledRejection 钩子) - AI 用量:主进程记账后直连推送渲染层(不再经 data-changed 三跳中转), 胶囊改精确数字并显示累计请求数
|
Appilot CLA v1.0 accepted. Thank you for contributing. / Appilot CLA 1.0 已接受,感谢贡献。 |
allowlist 匹配提交的 git author name/email(未关联 GitHub 账号的邮箱不会 解析为登录名),把仓库所有者的常用提交身份加入白名单,自有 PR 直接通过。
wxy
force-pushed
the
feat/rank-keywords-lifecycle
branch
from
September 17, 2026 05:52
dee05ad to
20a9c02
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
概述
本 PR 覆盖排名关键词链路的一组治理与可靠性改进:建议流重构、采集预算、iTunes Search 限流熔断、调度 daemon 可靠性(DB 锁 / 平滑停机 / 租约接管)与 AI 用量显示修复。
1. 关键词建议流重构
projects:localizeKeywordsIPC 与引擎层localizeKeywords;generate / curate / localize 均接入 operationId 取消通道阶段 语言 · x/N文案 + 跨语言字符累计单调递增(此前显示"当前查看语言"的流,跑到后面的语言时数字冻结);支持中途停止,保留已完成语言的建议2. 采集预算治理(关键词生命周期策略)
每日采集 N/360 · 关键词 M)3. iTunes Search 限流熔断(403 排查)
4. 调度可靠性
BEGIN IMMEDIATE(WAL 下 DEFERRED 事务读升写会立即 SQLITE_BUSY,busy_timeout 不介入)+ busy_timeout 10s + 锁错误有界重试leaderPid(schema v16),崩溃主(心跳新鲜但进程已死)立即接管,不再空等 60s TTL 导致 watchdog 连续空转scheduler-daemon.log(壳以 detached + stdio ignore 拉起,此前崩溃栈全部丢失)5. AI 用量显示修复
849,312 · 缓存 178,304)并显示累计请求数测试
npm test通过(pipefail EXIT 0)、tsc --noEmit通过