.1602452971339523:5c0ae0b53354897a650d45b88139c406_69eda26c5c84888b671671ca.69edacbe5c84888b671674c7.69edacbed55b86767f56e60a:Trae CN.T(2026/4/26 14:12:14)#51
Open
666yuhan666 wants to merge 4 commits into
Conversation
- 在 RedisStreamService 中添加事件指纹生成和去重检查方法 - 为 event、visit、keep_alive 三种事件类型生成唯一指纹 - 使用 Redis 缓存已处理的事件指纹,设置 24 小时过期时间 - 在 Consumer 的 processStreamEntry 中添加去重检查 - 重复事件会被跳过并记录日志,不影响现有上报协议
- 在 ProjectSchema 中添加 timezone 字段,默认为 'UTC' - 修改 getRequestContext 透传时区参数(优先使用请求头,其次使用项目配置) - 修改 TimelineService 支持时区参数,在 聚合中使用指定时区 - 修改 UtilsController 及其子类(VisitController, SessionController, BouncingController, DurationController)支持时区 - 修改所有 timeline API 端点传递时区参数,并在缓存 key 中包含时区 - 修改 useAuthFetch 添加 x-timezone 和 x-shared-timezone 请求头 - 前端优先使用项目配置的时区,其次使用浏览器本地时区
- 添加 Vitest 测试框架配置 - 新增事件去重逻辑单元测试 (RedisStreamService) - 新增时区聚合逻辑单元测试 (TimelineService) - 新增集成测试,覆盖三类关键场景: - 并发重试 (Event Deduplication) - 跨天分桶 (Timezone Bucket) - 筛选组合 (Filter Combination) - 添加测试说明文档 TESTS.md,包含: - 测试目录结构 - 测试覆盖范围 - 执行方法 - 已知限制 - 关键场景详细说明
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.
本分支为 Round 1 (事件去重) 和 Round 2 (时区统一) 两轮改动提供回归测试保障,包括:
单元测试覆盖核心逻辑
集成测试覆盖三类关键场景
完整测试说明文档
标准化测试框架配置