Leave: share balance, balance-status and update results between CLI and MCP
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 重构
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- csharp
- 领域
- api, backend-api-design, cli
调研方向
Start with RateLookupResult, LeaveCreateService.ApplyAsync, LeaveCreateResult, and the listed LeaveBalanceLookup, LeaveBalanceStatusResult, LeaveUpdateService.ApplyAsync, and LeaveBalanceImportService entry points. Trace how the CLI commands and MCP handlers currently serialize each result, then use the migration checklist and #62 to define done, including the 0.4.0 contract or PermittedDifferences handling.
由索引模型根据 Issue 内容生成。
描述
Why
Leave create, update and list share services well. The remaining leave reads and the update result are still per-surface, and the difference is visible to agents:
GetLeaveBalance: a miss is{"error":"No leave stats found for …"}on MCP but{found:false, empId}with exit 0 ontp leave balance --json. A new starter with no leave history looks like a failure to an agent.GetLeaveBalanceStatusandleave balances statusduplicate theLastImportedAt == null → imported:falsebranch.LeaveUpdateService.ApplyAsyncreturns nothing, soUpdateCommandandUpdateLeaveeach hand-build the same{success, leaveId, changes}and dry-run objects.LeaveListServicereturns the envelope, but both adapters throw awaycancelledCountand paging (#62).ImportLeaveBalancesaddsmayHaveBeenApplied:trueon an uncertain import; the CLI emits a plain error for the same case.
Migrate
-
LeaveBalanceLookupreturningLeaveBalanceResult { found, empId, daysSinceLastLeave, leaveTakenInLast12Months }, used byleave balanceandGetLeaveBalance. -
LeaveBalanceStatusResultshared byleave balances statusandGetLeaveBalanceStatus. -
LeaveUpdateService.ApplyAsyncreturns aLeaveUpdateResult; both adapters serialise it. - One typed "may have been applied" outcome from
LeaveBalanceImportService, rendered the same way on both surfaces. - Fold in #62.
How
RateLookupResult for "a miss shares the hit's schema"; LeaveCreateService.ApplyAsync / LeaveCreateResult for the update result.
Contract
The MCP GetLeaveBalance miss and the leave-list envelope change shape: hold for 0.4.0 or declare them in PermittedDifferences until then.
Part of #38.
- 主要语言
- C#
- 星标
- 3
- 派生
- 0
- 平均合并
- 11 分钟
- 30 天内合并 PR
- 4
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
SSWConsulting/TimePro.Tools 的其他 Issue
-
Priority: P3 Type: Refactor
难度 5/5 一周以上 新手友好度 38/100
SSWConsulting/TimePro.Tools#101 ·
-
Priority: P3 Type: Refactor
难度 4/5 3-5 天 新手友好度 42/100
SSWConsulting/TimePro.Tools#100 ·
-
Priority: P3 Type: Refactor
难度 5/5 一周以上 新手友好度 35/100
-
Priority: P2 Type: Refactor
难度 5/5 一周以上 新手友好度 35/100
-
Priority: P2 Type: Bug Type: Refactor
难度 5/5 一周以上 新手友好度 38/100
查看 SSWConsulting/TimePro.Tools 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 66/100
gavin-wolfe/wolfden#104 ·
维护者通常 1 天内回复
-
[BUG] Still libmicrohttpd dependency is not removed properly from External-Dependency-Info.txt file未关闭type/bug
难度 1/5 1 小时以内 新手友好度 72/100
维护者通常 1 天内回复
-
area:framework
难度 1/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
[辞書] かんそうりつ->乾燥率未关闭辞書
难度 1/5 1 小时以内 新手友好度 62/100
维护者通常 1 天内回复
-
bug good first issue
难度 2/5 1-3 小时 新手友好度 76/100
thomhurst/TUnit#7201 · 1 条评论 ·
维护者通常 1 天内回复