Skip to content

fix: 健全图书馆提醒逻辑 - #378

Merged
weiji6 merged 8 commits into
asynccnu:mainfrom
Dailiduzhou:fix/reminder-auth-promote
Sep 7, 2026
Merged

weiji6 merged 8 commits into
asynccnu:mainfrom
Dailiduzhou:fix/reminder-auth-promote

Conversation

@Dailiduzhou

Copy link
Copy Markdown
Contributor
  1. 补全座位预约status缺失的枚举
  2. 防止错发过期提醒
  3. 发送消息提醒前,检验消息的时效性

@Dailiduzhou

Copy link
Copy Markdown
Contributor Author

@codex code review

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 8ed0156e-87cc-4b9d-9d32-99f0c5d01c28

📥 Commits

Reviewing files that changed from the base of the PR and between dbc16fe and 6d949b6.

⛔ Files ignored due to path filters (1)
  • be-library/go.sum is excluded by !**/*.sum
📒 Files selected for processing (24)
  • .github/workflows/promote.yaml
  • be-ccnu/crawler/library.go
  • be-ccnu/service/ccnu.go
  • be-classlist/client/ccnu.go
  • be-classlist/service/classlist.go
  • be-classlist/service/errors.go
  • be-feed/grpc/feed.go
  • be-feed/repository/dao/userFeedConfig.go
  • be-feed/repository/model/model.go
  • be-feed/service/feedUserConfig.go
  • be-feed/service/pushDelivery.go
  • be-feed/service/pushDelivery_test.go
  • be-grade/service/grade.go
  • be-grade/service/rank.go
  • be-library/config/config-example.yaml
  • be-library/crawler/reminder.go
  • be-library/go.mod
  • be-library/repository/dao/reminder.go
  • be-library/service/reminder.go
  • be-library/service/reminder_test.go
  • be-user/service/user.go
  • common/bizpkg/grpc/server/middleware.go
  • common/tool/ccnu_auth.go
  • common/tool/studentid.go

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

本次变更新增 CCNU 初始化错误分类和统一学号校验。Feed 配置拒绝无效学号。图书馆提醒增加预约、episode、有效期和投递状态复核。提醒请求限速改用加权信号量。生产版本相同时继续执行容器部署。图书馆接口将 401/403 视为无效令牌。

Sequence Diagram(s)

sequenceDiagram
  participant dispatchJob
  participant awayEpisodeCurrent
  participant endAwayEpisode
  participant sendOutboxRow
  dispatchJob->>awayEpisodeCurrent: 校验 episode 版本和状态
  awayEpisodeCurrent-->>dispatchJob: 返回当前性结果
  dispatchJob->>endAwayEpisode: 结束非暂离 episode
  endAwayEpisode-->>dispatchJob: 更新 episode 并取消任务
  dispatchJob->>sendOutboxRow: 交付有效暂离任务
  sendOutboxRow->>awayEpisodeCurrent: 发送前再次复核
Loading

Merge Risk: ⚪ Minimal · up to 6d949

No actionable merge-blocking risk remains after the current changes and repository checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 24.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 25 functions across 21 files. (3 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 标题准确概括了图书馆提醒逻辑的主要修复,内容简洁且与变更相关。
Description check ✅ Passed 描述明确涉及座位预约状态、过期提醒拦截和发送前时效性校验,与变更内容相关。
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 24.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 25 functions across 21 files. (3 skipped: 3 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 6d949b6d06

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@weiji6
weiji6 merged commit 2e6cd6a into asynccnu:main Sep 7, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants