chore(sync): sync upstream main#1
Open
github-actions[bot] wants to merge 238 commits into
Open
Conversation
…-kernel-0-62 # Conflicts: # src-tauri/src/app/plugins/rule_runtime.rs
…istry Request logs could stay "in progress" forever when a late placeholder upsert (write-through fallback / plugin log hook delay) landed after the terminal insert and downgraded the row back to pending, with no runtime mechanism to recover until restart. - guard the request_logs upsert so placeholder-shaped inserts can no longer downgrade rows that already reached a terminal state - add an in-memory ActiveRequestRegistry: observed requests register before the placeholder is enqueued and are finished on every request-end path (non-stream, stream finalize, abort guard drop, early error, warmup intercept, gateway stop) - expose active_request_logs_snapshot and drive the UI "进行中" state from the registry only; orphaned pending rows now render as "未完成" instead of spinning forever Fixes #323 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…equest-log retention Architecture review remediation across the gateway and frontend: - Move gateway provider selection and plugin-audit persistence off the async workers onto the bounded blocking pool - Reject over-length claude model names at the provider write choke points (read-path truncation kept for legacy rows) - Match backend errors by code instead of message text on the frontend (PROMPT_NAME_REQUIRED, PROMPT_NAME_CONFLICT, SETTINGS_RECOVERY_REQUIRED; settings read-path corruption now emits the recovery code) - Add request_log_retention_days setting (0 = keep forever, default) with a daily batched purge task mounted at app level - Make the backend the single source of truth for effective input tokens (SQL <-> Rust lock-step test; None preserved for unknown usage) and is_interrupted; frontend re-derivations removed; gateway:request events carry provider_bridged and the computed value - Gate polling refetch intervals on document visibility - Guard the seams: shared gateway-event fixtures asserted by both sides, settings limits, error-code ownership, event truncation caps, attempt caps, and MSW default mirrors locked by crossLayerContracts tests (fixes schema_version/idle-timeout/billing-rectifier mock drift) - Classify provider-selection infrastructure failures as GW_INTERNAL_ERROR (500) instead of invalid-cli-key (400) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- 新增对严格格式的 host-only 和 IPv6 监听地址解析测试 - 添加对 WSL 主机地址空值及错误格式的校验测试 - 覆盖更新地址的空值、长度和格式验证测试 - 验证代理地址与密码长度限制的测试 - 增加流式空闲超时整数校验及自定义 WSL 主机配置测试 - 校验 CX2CC 相关字段的空值与长度限制测试 - 新增对未知错误格式化函数处理不同类型输入的测试
* chore(main): release aio-coding-hub 0.60.4 * chore(release): sync Cargo.lock --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Replace hand-maintained check:precommit*/check:prepush* aggregate lists with a stage registry (scripts/run-checks.mjs); git hooks and the package.json entry points resolve stages from one table - Fold the four copy-pasted coverage shard scripts into scripts/run-coverage-shards.mjs - Drop dead/duplicate scripts (test:unit:shard:*, plugin-sdk/create-aio --filter aliases, hooks:install); CI calls pnpm --filter directly, which also fixes the check:plugin-system-completion contract - Add Homebrew cask generator self-test, release workflow publish step, and docs/release-homebrew.md Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
In-progress requests without a live trace (e.g. started before the webview loaded) previously fell back to the finished log-row layout with a spinner badge, forking the in-progress style. Now: - Synthesize a TraceSession from the active-request registry entry so registry-only requests render with the same realtime card style. - Reserve realtime card slots for in-progress candidates so they are never evicted by completed exiting cards. - Guard terminal logs (status/error_code present) from being re-marked in progress by a stale active-request snapshot. - Move the idle "已静默 N 分钟" notice into the realtime card stage slot, driven by the registry last_activity_ms. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Add downloads/Tauri badges and quick section navigation links - Add local-first positioning note (127.0.0.1 gateway, no remote deploy) - Emoji section headers for core features - Replace Homebrew-only install intro with the release download matrix Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
白屏根因:WebView 在窗口隐藏(托盘常驻)期间被系统终止后,看门狗因 可见性闸门放弃恢复,用户打开窗口即见白屏且需等待 tick 与退避。 - 可见性不再阻断恢复:隐藏窗口照常 reload,阈值放宽为 60s 防节流误判 - recovery_in_flight 布尔锁 → 90s 确认截止时间,rebuild 后等 pong 永不死锁 - rebuild 预算改为连续未确认计数(pong 重置),消除后台无限重建循环 - 全量重启仅在窗口可见时执行;窗口缺失视为可重启,避免无头僵尸 - 窗口显示/聚焦(含任务栏还原)立即体检,清退避;刚显示有 20s 宽限 - 首个 pong 前隐藏窗口用 180s 启动宽限,start_minimized 慢启动不误伤 - 恢复检查串行化;可见性单次采样下传,消除 TOCTOU - 重建改用 from_config,保留 titleBarStyle/hiddenTitle 等窗口配置 - tick 先按 30s 下界早退,pong 新鲜时不再查询窗口状态 - 前端 pong 守卫加失效期与所有权 token,IPC 悬挂不再永久静音心跳 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
release-please 强推发版分支时只改版本号不改 Cargo.lock,同步前的 ci 必然因 --locked 失败;sync-release-pr-cargo-lock 用 GITHUB_TOKEN 推送 同步提交,重新触发的 ci 被卡在 action_required,红叉永远留在 PR 上。 - sync workflow 改用 RELEASE_PLEASE_TOKEN 推送,同步后 CI 正常重跑 - ci 增加 per-PR/分支 concurrency 取消,同步前注定失败的运行被新推送 自动取消,不再白跑 17 分钟留下红叉 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* chore(main): release aio-coding-hub 0.60.5 * chore(release): sync Cargo.lock * ci: retrigger checks after workflow fix --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: dyndynjyxa <dyndynjyxa@users.noreply.github.com>
git HTTPS 端点对 "AUTHORIZATION: bearer" 头返回 401(fine-grained PAT 不接受该形式),git 退化为要求输入用户名导致同步失败。 - 认证改为 Basic(x-access-token 的 base64),与 actions/checkout 一致, classic 与 fine-grained PAT 均兼容 - clone 前预检 token 对 tap 仓库的访问权,失败时报出明确的 HTTP 状态, 不再留下 "could not read Username" 这类误导性错误 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
v0.60.5 的 GitHub Release 与其构建产物已被删除(tag 保留),导致 Homebrew cask 指向的下载地址 404、自动更新回退到 0.60.4。以相同 代码内容重新走一次完整发版管线,恢复分发渠道。 Release-As: 0.60.6 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* chore(main): release aio-coding-hub 0.60.6 * chore(release): sync Cargo.lock --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Claude Code /compact 会整体替换 system prompt 并使 prompt cache 全部失效,
上游需重算超大 prompt,30 秒全局首字节超时必然误杀,原地重试还会触发熔断
(2026-07-04 故障:全部 claude 请求 503 半小时)。
- 基于解析后的 system 字段首块识别 compact 请求(标记串已对照
claude-cli 2.1.198 二进制逐字验证);禁止原始 body 子串搜索,避免会话
正文含标记文本时误判;识别失败静默回落普通策略
- compact 首字节超时取 max(配置值, 300) 秒,配置 0(禁用)保持禁用
- [REQ] 调试日志追加 kind=compact;request_logs.special_settings_json
追加 {"type":"request_kind","kind":"compact"} 类型化条目,既有
消费者按 type 过滤不受影响
- 集成测试含贯通性验证:1s 配置超时 + 2s 首字节延迟的 compact 请求仍成功
2026-07-04 故障:上游首字节超时风暴被终态 GW_REQUEST_ABORTED(「客户端主动 取消」)掩盖,用户无法定位到首字节超时设置。本提交为通用修复,不做超时特例: - FailoverAttempt 新增结构化 timeout_secs 字段(仅首字节超时窗口内的失败 填充),前端禁止解析 outcome 调试字符串;受既有跨层契约测试约束,序列化 为显式 null 而非 skip_serializing_if - 抽取 ProviderChainView 内联 attempts_json 解析器为共享模块 services/gateway/attemptsJson(move-only,链路视图行为不变) - 错误观察卡片新增「失败尝试」摘要:按 error_code 分组(短标签 × 次数 × 供应商,超时组附当时生效秒数);主导失败码 ≠ 终态展示码时补显主导码建议, 任意失败码被终态掩盖时均可归因 - GW_UPSTREAM_TIMEOUT 建议文案指明「设置 → 通用 → 首字节超时(0=禁用)」 路径与自建网关反代缓冲排查提示 - 测试:摘要纯函数分组/降序/去重/省略秒数,解析器合法/非法/非数组/null, 卡片渲染含摘要与建议、无摘要不渲染,attempts 序列化契约(超时含秒数、 非超时为 null)
熔断触发是用户请求开始硬失败的时刻,但现有通知只说「失败次数达到阈值」,
不说主因、不给行动指引(2026-07-04 故障:首字节超时风暴触发熔断,用户
无从得知根因在超时设置)。
- 触发熔断那次失败的 error_code 与迁移通知在同一调用栈内,经
RecordCircuitArgs::with_trigger 透传,零新增状态、零节流代码
(迁移天然每冷却周期一次);shared/circuit_breaker 通用组件未动
- →Open 通知在「原因」行后追加「触发失败:{短标签}({CODE})」;触发码
为 GW_UPSTREAM_TIMEOUT 时再附生效秒数(含 compact 放宽后的值)与
「设置 → 通用 → 首字节超时(0=禁用)」路径提示
- error_code.rs 新增 short_label_zh(与前端 GatewayErrorShortLabels
逐字对齐,未映射码回退原始码);通知正文抽为纯函数便于单测
- 前端事件 payload / bindings / 设置项均未变;开关沿用
enable_circuit_breaker_notice
- 测试:超时码两行新内容的精确内容与顺序、5xx 仅触发行、None 时正文与
旧实现逐行相同、HalfOpen/Closed 不变、args 默认值锁定
* chore(main): release aio-coding-hub 0.60.7 * chore(release): sync Cargo.lock --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
UsageSseTeeStream 的 Poll::Pending 分支此前从不 poll idle_sleep, 导致全局与 provider 级流式空闲超时配置静默失效、上游挂死的流永不中断。 现比照 TimingOnlyTeeStream 模式在 Pending 分支消费计时器,到期以 GW_STREAM_IDLE_TIMEOUT 终态结束流;codex 断开排水路径保持豁免。 新增触发/禁用两条路径测试,回归 drain 测试保持通过。
熔断器现记住触发打开的失败 error_code(内存态,state!=Open 时更新, success/reset 清空,不持久化);gate 拒绝时的 CircuitSnapshot 上抛, skip attempt 填充熔断状态/失败计数/阈值/恢复时间/触发错误码随 attempts_json 落库。新增两字段 skip_serializing_if 序列化省略, 成功 attempt 字节级不变(守护测试豁免清单钉住)。 前端 attemptsJson 解析器扩展(缺失优雅降级),决策链 skipped attempt 展示跳过原因与熔断归因,全熔断请求的错误观察卡给出 触发错误短标签与预计恢复时间。
实时卡片 hasFailover 此前用 segments.length>1||含失败段 判定,与落库侧 route hop>1 语义分叉,单 provider 重试成功的请求在结束瞬间徽章跳变。 抽出 traceRoute.ts 纯函数复刻后端语义(连续同 provider 折叠、hop>1), 实时卡片改为消费该函数。 删除 requestLogState.ts 恒假存根 isPersistedRequestLogInProgress 与 requestLogActivityState 被忽略的 nowMs 参数;补契约注释明确进行中判定 唯一来源为 requestActivityProjection。修正 queries.rs 中与实现不符的 has_failover 注释(skipped 实际计入 hop)。
crossLayerContracts 新增 DEFAULT_GATEWAY_PORT 断言(Rust defaults.rs ↔ 前端共享 const),前端两处写死的 37123 合并为 constants/gateway.ts 单点; 两页面各写一份的 skills.activeCli localStorage key 收敛到 constants/skills.ts。
数据管理卡新增请求日志留存展示行(0=永久保留,指向系统设置编辑入口) 与压缩数据库操作行;新增 db_compact 命令执行 checkpoint+VACUUM 回收 已删除记录的磁盘空间且不删数据,VACUUM 失败如实上抛。留存默认值与 retention 清理任务逻辑不变。
5 个 MIN_*=1 断言此前只断前端值、未锚定 Rust 侧检查,Rust 放宽下限 前端不会报警。现锚定 persistence.rs validate_bounds 的校验错误消息, 任一侧改动即红。至此 settingsValidation 全部边界均有跨层守护。
gateway:circuit 事件补 trigger_error_code/first_byte_timeout_secs 结构化 字段(显式 null 序列化),通知文案组装移至前端 circuitNotice.ts 纯函数 (语义逐行对齐原实现,单测移植),复用系统通知发送路径;开关判断移到 前端,未就绪按 Rust 默认值兜底并纳入跨层契约守护。 删除 Rust 侧 build_circuit_notice 与 short_label_zh——后者与前端 gatewayErrorCodes 短标签构成文案分叉,错误码短标签自此单一来源。
事件结构 derive specta::Type 并在导出 builder 以 .typ 注册(运行时 handler 与 emit 调用点不动),gatewayEvents.ts 手写事件字段类型全部 替换为 generated/bindings re-export,运行时 guard/normalizer 保留。 Rust 改字段前端 typecheck 即翻红,消除最后一个无生成保护的通信面; 事件名常量与 fixture 契约测试保留作序列化实值兜底。
按职责拆为 LogBadges.tsx(徽章组件)、requestLogSpecialSettings.ts (special_settings 解析)、requestLogPresentation.ts(audit/status/route/ liveTrace 展示派生纯函数),测试同步拆分(用例数不变 2078),删除原 文件不留 barrel。纯机械搬运零行为变更(唯一等价改写:路由 tooltip 的 JSX 在 .ts 中改用 createElement)。
- traceRoute.ts:删除方向与 Rust 相反的 skipped 防御分支,判定只看 provider 序列,与 route_from_attempts(skipped 计 hop)完全一致; 测试改为锚定镜像语义本身 - requestActivityProjection.test.ts:补 merged summary 三条回退链的 优先级用例(summary > trace > requestLog) - LogBadges.test.tsx:修正拆分搬运时沿袭的失实测试标题 - circuitNotice.ts:头注释明确触发失败短标签映射面宽于旧 Rust 子集 属有意改进,避免"逐行对齐"措辞误导
* chore(main): release aio-coding-hub 0.60.8 * chore(release): sync Cargo.lock --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* chore(main): release aio-coding-hub 0.60.9 * chore(release): sync Cargo.lock --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Automatic upstream sync from
dyndynjyxa/aio-coding-hub:main.Reason: target branch has local commits and cannot be safely fast-forwarded.
This workflow opened a cross-repository PR instead of pushing directly to
main.Please review and merge manually.