IOS-INFO-011:Rust Event export → 本地队列 → ack #119
Closed
opened 2026-06-10 21:28:12 +08:00 by wangdl
·
1 comment
Labels
Clear labels
area:ai
AI对话
area:analysis
分析页
area:auth
认证/Apple登录
area:import
文件导入
area:ios-info
iOS 学习信息采集与上传
area:library
知识库
area:notification
通知推送
area:profile
我的页面
area:quiz
测验/自测
area:review
复习卡片
area:search
搜索
area:study
学习首页
audit:planned
已完成宏观规划
blocked-by:api
等待 API 接口
blocked-by:api-info-core
等待 API 学习信息体系核心
blocked-by:doc-runtime
等待 Rust document runtime
priority:p0
最高优先级
priority:p1
高优先级
priority:p2
中优先级
repo:ios
iOS App 仓库
status:blocked
被阻塞
status:done
已完成
status:partial
部分存在,需补全
status:todo
待执行
type:bug
缺陷修复
type:docs
文档
type:feature
新功能
type:ui
UI/UX
work:adapter
适配器
work:analysis
分析页
work:api-client
API Client
work:api-contract
API 契约
work:architecture
架构
work:auth
认证
work:background
后台
work:bg-task
BGTask
work:compatibility
兼容性
work:context
阅读上下文
work:continue-learning
继续学习
work:debug
调试
work:design
架构设计
work:developer-tool
开发者工具
work:diagnostics
诊断
work:docs
文档
work:dto
DTO/数据传输
work:e2e
端到端
work:error-handling
错误处理
work:event
事件
work:event-chain
事件链路
work:event-export
事件导出
work:ffi
FFI 绑定
work:flush
刷新推送
work:heartbeat
心跳计时
work:heatmap
热力图
work:history
历史
work:home
首页
work:integration
接入
work:lifecycle
生命周期
work:local-cache
本地缓存
work:local-queue
本地队列
work:logging
日志
work:mapping
字段映射
work:marked-as-read
标记已读
work:material-detail
资料详情
work:model
数据模型
work:network
网络
work:offline
离线
work:permission
权限
work:persistence
持久化
work:position
阅读位置
work:queue
队列
work:reader-view
阅读器视图
work:reading-progress
阅读进度
work:records
学习记录
work:recovery
恢复
work:restore
位置恢复
work:retry
重试
work:routing
路由
work:runtime
Runtime 接入
work:rust-runtime
Rust document runtime
work:scheduler
调度器
work:session-manager
会话管理
work:state
状态管理
work:summary
Summary
work:test
测试
work:time-tracking
时长追踪
work:trend
趋势
work:ui
UI
work:upload
上传
Milestone
No items
No Milestone
M-IOS-INFO:学习信息采集、上传、继续学习与基础分析闭环
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: wangdl/ios-projects#119
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
目标
实现正确的 Rust event 导出与 ack 流程。
正确流程
错误流程禁止
错误处理
验收标准
开发完成评论
完成内容
修正 ack 时机(核心修复):
exportAndEnqueue()改为:Rust export → map → enqueue 本地队列成功后立即 ackflush()移除重复 ack:API 上传成功只标记队列项为 uploaded,不再调 ackEventsflush()移除 markFailed:API 上传失败只标记队列项 retry,不调 markFailed已有正确流程:
ReadingEventUploadQueue本地队列 + 磁盘持久化ReadingEventUploadPipeline.shared单例管理全流程reloadOnLaunch()启动恢复 stale events新建测试:
AIStudyAppTests/ExportQueueAckTests.swift(7 个测试):修改文件
Features/MaterialReader/ReadingEventUploadQueue.swift:exportAndEnqueue 添加 ack + markFailed;flush 移除重复 ack/markFailedAIStudyAppTests/ExportQueueAckTests.swift:新建代码证据
ReadingEventUploadQueue.swift:186-190:enqueue 成功后立即adapter.ackEvents(enqueuedIds)ReadingEventUploadQueue.swift:192-196:映射失败 →adapter.markFailed(failedIds)ReadingEventUploadQueue.swift:207:flush 不再调 ackEvents(已在上游完成)验收标准逐项
queue.enqueue(uploadItems)failedIds过滤后只 ack 成功映射的是否建议进入 Review