Skip to content

feat: okr progress records#574

Open
syh-cpdsss wants to merge 1 commit intomainfrom
feat/okr_dev
Open

feat: okr progress records#574
syh-cpdsss wants to merge 1 commit intomainfrom
feat/okr_dev

Conversation

@syh-cpdsss
Copy link
Copy Markdown
Collaborator

@syh-cpdsss syh-cpdsss commented Apr 20, 2026

Summary

Add OKR progress record management shortcuts to enable creating, reading, updating, deleting, and listing progress records for objectives and key results.
Also includes image upload support for rich text content in progress records.

Changes

  • Add +progress-create shortcut to create progress records for objectives/key results
  • Add +progress-get shortcut to retrieve a single progress record by ID
  • Add +progress-list shortcut to list all progress records for an objective or key result
  • Add +progress-update shortcut to update progress record content
  • Add +progress-delete shortcut to delete progress records
  • Add +upload-image shortcut to upload images for use in progress record rich text
  • Add comprehensive unit tests and e2e dry-run tests for all new shortcuts
  • Update lark-okr skill documentation with new shortcuts and usage examples

Test Plan

  • Unit tests pass (go test ./shortcuts/okr/...)
  • E2E dry-run tests pass (LARK_CLI_BIN=/tmp/lark-cli go test ./tests/cli_e2e/okr/...)
  • go vet ./shortcuts/okr/... passes
  • manual test & agent evaluation passes

Related Issues

  • None

Summary by CodeRabbit

  • New Features

    • Added OKR progress record management: list, get, create, update, delete; added image upload for OKR progress rich text. AI Agent skills count 22→23 and business domains 14→15; OKR feature text now includes “progress”.
  • Documentation

    • Updated README (en/zh), skill docs and added reference guides for progress CRUD and image upload; ContentBlock guidance updated for progress fields.
  • Tests

    • Added unit, integration, and CLI end-to-end dry-run tests for progress CRUD and image-upload commands.

@github-actions github-actions Bot added the size/XL Architecture-level or global-impact change label Apr 20, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 20, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds OKR progress-record support and image upload: new CLI shortcuts (+progress-list/get/create/update/delete, +upload-image), new OpenAPI v1/v2 progress/content types and converters, response DTOs and status enum, extensive unit and e2e tests, README/skill documentation updates. (50 words)

Changes

Cohort / File(s) Summary
Docs & Registry
README.md, README.zh.md, internal/registry/service_descriptions.json
Update AI agent/skill/domain counts, append “进展记录/进展” to OKR descriptions and README bullets; zh README formatting tweaks and service description string updated.
Core Response Types
shortcuts/okr/okr_cli_resp.go
Add ProgressStatus enum (+parse/String helpers) and DTOs RespProgressRate / RespProgress.
OpenAPI Models & Converters
shortcuts/okr/okr_openapi.go, shortcuts/okr/okr_openapi_test.go
Add v1/v2 ContentBlock and Progress models, ToV1/ToV2 conversions, ProgressV1/Progress → RespProgress mapping, and comprehensive tests for round-trips, JSON, and status mapping.
Image Upload Shortcut
shortcuts/okr/okr_image_upload.go, shortcuts/okr/okr_image_upload_test.go
New OKRUploadImage (+upload-image): extension whitelist, multipart file upload to /open-apis/okr/v1/images/upload, response parsing (file_token,url), and multipart-aware unit tests.
Progress CRUD Shortcuts
shortcuts/okr/okr_progress_create.go, .../okr_progress_get.go, .../okr_progress_list.go, .../okr_progress_update.go, .../okr_progress_delete.go
Add CLI shortcuts for create/get/list/update/delete progress records with flag parsing/validation, dry-run request construction, Execute implementations, pagination for list, and formatted outputs.
Progress CRUD Tests
shortcuts/okr/*_test.go
Add unit tests covering validation, dry-run, execution success/error, httpmock stubs, multipart decoding, parsing, and status mapping for all new shortcuts.
Shortcut Registry
shortcuts/okr/shortcuts.go
Register new shortcuts: OKRListProgress, OKRGetProgressRecord, OKRCreateProgressRecord, OKRUpdateProgressRecord, OKRDeleteProgressRecord, OKRUploadImage.
Skill Docs & References
skills/lark-okr/SKILL.md, skills/lark-okr/references/*
Document ProgressRecord entity, ProgressRate, CRUD commands, image upload guide, ContentBlock guidance, scopes, and individual reference pages for each new command.
E2E Dry-run Tests
tests/cli_e2e/okr/okr_progress_test.go
Add dry-run e2e tests asserting constructed HTTP methods and API paths for upload and progress CRUD (objective/key_result variants).

Sequence Diagram(s)

sequenceDiagram
    participant CLI as CLI (lark-cli)
    participant Runtime as runtime.DoAPI / HTTP client
    participant OKRAPI as OKR API (/open-apis/okr/v1 or v2)
    participant Storage as FileService (multipart)

    CLI->>Runtime: Validate flags → build JSON body or multipart
    alt Dry-run
        Runtime-->>CLI: Emit constructed request description
    else Execute
        Runtime->>OKRAPI: POST/PUT/GET/DELETE (JSON) or POST /images/upload (multipart)
        Note right of Runtime: multipart includes file bytes + fields
        OKRAPI->>Storage: (if image) accept file, return file_token,url
        OKRAPI-->>Runtime: JSON response (code, data)
        Runtime-->>CLI: Parse → RespProgress / envelope → print
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Suggested reviewers

  • zhangzq0
  • liangshuo-1

Poem

🐰 I hopped through fields of code and creeds,
I stitched progress records, images, and feeds.
Shortcuts and tests now snug and bright,
Docs and models hopping into sight—
Tap the carrot, watch goals take flight.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 35.71% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: okr progress records' directly reflects the main change of adding OKR progress record management capabilities including CRUD operations and image uploads.
Description check ✅ Passed The pull request description follows the template structure with Summary, Changes, Test Plan, and Related Issues sections, providing clear details about the new progress record shortcuts and test coverage.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/okr_dev

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 and usage tips.

Comment thread skills/lark-okr/references/lark-okr-image-upload.md Outdated
Comment thread skills/lark-okr/references/lark-okr-image-upload.md Outdated
Comment thread skills/lark-okr/references/lark-okr-image-upload.md Outdated
Comment thread shortcuts/okr/okr_image_upload_test.go Outdated
Comment thread shortcuts/okr/okr_image_upload_test.go Outdated
Comment thread shortcuts/okr/okr_image_upload_test.go Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

❌ Patch coverage is 79.25072% with 144 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.41%. Comparing base (67e51ec) to head (dc49fef).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
shortcuts/okr/okr_progress_create.go 66.66% 23 Missing and 17 partials ⚠️
shortcuts/okr/okr_progress_update.go 68.47% 17 Missing and 12 partials ⚠️
shortcuts/okr/okr_progress_list.go 73.62% 17 Missing and 7 partials ⚠️
shortcuts/okr/okr_image_upload.go 80.26% 9 Missing and 6 partials ⚠️
shortcuts/okr/okr_progress_get.go 70.58% 10 Missing and 5 partials ⚠️
shortcuts/okr/okr_openapi.go 93.36% 10 Missing and 4 partials ⚠️
shortcuts/okr/okr_progress_delete.go 81.48% 3 Missing and 2 partials ⚠️
shortcuts/okr/okr_cli_resp.go 90.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #574      +/-   ##
==========================================
+ Coverage   60.35%   61.41%   +1.06%     
==========================================
  Files         393      407      +14     
  Lines       33588    34824    +1236     
==========================================
+ Hits        20272    21388    +1116     
- Misses      11430    11459      +29     
- Partials     1886     1977      +91     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 20, 2026

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@dc49fef43e4ddfd778e12d75f7e44251ed0861cd

🧩 Skill update

npx skills add larksuite/cli#feat/okr_dev -y -g

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 11

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
README.zh.md (1)

9-16: ⚠️ Potential issue | 🟡 Minor

Keep the Skill count consistent.

Lines 9 and 15 still say 22, while Line 16 now says 23.

📝 Proposed doc fix
-飞书官方 CLI 工具,由 [larksuite](https://github.com/larksuite) 团队维护 — 让人类和 AI Agent 都能在终端中操作飞书。覆盖消息、文档、多维表格、电子表格、幻灯片、日历、邮箱、任务、会议等核心业务域,提供 200+ 命令及 22 个 AI Agent [Skills](./skills/)。
+飞书官方 CLI 工具,由 [larksuite](https://github.com/larksuite) 团队维护 — 让人类和 AI Agent 都能在终端中操作飞书。覆盖消息、文档、多维表格、电子表格、幻灯片、日历、邮箱、任务、会议等核心业务域,提供 200+ 命令及 23 个 AI Agent [Skills](./skills/)。
@@
-- **为 Agent 原生设计** — 22 个 [Skills](./skills/) 开箱即用,适配主流 AI 工具,Agent 无需额外适配即可操作飞书
+- **为 Agent 原生设计** — 23 个 [Skills](./skills/) 开箱即用,适配主流 AI 工具,Agent 无需额外适配即可操作飞书
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.zh.md` around lines 9 - 16, The README contains inconsistent Skill
counts: update the occurrences of "22 个 AI Agent [Skills](./skills/)" and "23 个
AI Agent [Skills](./skills/)" so they match (choose the correct canonical number
and replace all instances), specifically edit the two places showing "22 个 AI
Agent [Skills](./skills/)" and the place showing "23 个 AI Agent
[Skills](./skills/)" to use the same number and keep the link text
"[Skills](./skills/)" unchanged.
🧹 Nitpick comments (4)
skills/lark-okr/references/lark-okr-image-upload.md (1)

37-37: Optional wording polish: 图片内容 can be made more precise.
Consider “图片块” to match ContentGallery terminology and reduce ambiguity.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-okr/references/lark-okr-image-upload.md` at line 37, Replace the
ambiguous phrase "图片内容" with the more precise term "图片块" in the sentence that
reads "获取返回的 `file_token`,用于构建 ContentBlock 中的图片内容。", so that it aligns with
ContentGallery terminology and reduces ambiguity when referring to image
elements inside ContentBlock; ensure the updated sentence reads something like
"获取返回的 `file_token`,用于构建 ContentBlock 中的图片块。".
shortcuts/okr/okr_openapi.go (1)

450-457: Slice aliasing between V1 and V2 gallery images.

ContentGallery.ToV1 reuses the same backing slice (ImageList: g.Images) — and the inverse ContentGalleryV1.ToV2 also reuses the slice (line 569). If either side is later mutated after conversion, the other is silently affected. Not an issue under current request/response-only flows, but worth documenting or defensively copying if these conversions ever get used in a mutation path.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@shortcuts/okr/okr_openapi.go` around lines 450 - 457, ContentGallery.ToV1
currently assigns the Images slice directly to ImageList (ImageList: g.Images),
creating shared backing arrays with ContentGalleryV1.ToV2 and risking silent
mutation; update ToV1 (and verify ToV2) to return a shallow copy of the slice
(allocate a new slice and copy elements) so the returned
ContentGalleryV1.ImageList does not share backing storage with the original
ContentGallery.Images, referencing the functions ContentGallery.ToV1 and
ContentGalleryV1.ToV2 to find the conversion points.
shortcuts/okr/okr_progress_update.go (1)

114-131: DryRun silently swallows parseUpdateProgressRecordParams error.

p, _ := parseUpdateProgressRecordParams(runtime) drops the error. Today this is safe only because Validate is guaranteed to run first and rejects invalid --content JSON; however, parseUpdateProgressRecordParams also handles --progress-percent/--progress-status, which Validate validates redundantly. If either side drifts, a returned-nil p would NPE on p.UserIDType/p.ProgressID inside DryRun. Either (a) collapse the duplicated validation and trust the parse path, or (b) at minimum guard against p == nil before dereferencing.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@shortcuts/okr/okr_progress_update.go` around lines 114 - 131, The DryRun
implementation for DryRun in okr_progress_update.go currently ignores errors
from parseUpdateProgressRecordParams by using p, _ :=
parseUpdateProgressRecordParams(runtime), which can yield a nil p and cause NPEs
when accessing p.UserIDType or p.ProgressID; update DryRun to check and handle
the returned error (or nil p) from parseUpdateProgressRecordParams: call p, err
:= parseUpdateProgressRecordParams(runtime), if err or p == nil then return a
sensible empty/failed DryRun API (or propagate the error) instead of
dereferencing p; alternatively collapse duplicated validation by moving
validation into parseUpdateProgressRecordParams and using its result in both
Validate and DryRun so DryRun can safely rely on a non-nil p.
shortcuts/okr/okr_image_upload.go (1)

77-84: DryRun body represents target_type as int while Execute sends it as a string.

In DryRun the body shows "target_type": targetTypeVal (numeric), but Execute (line 108) submits target_type as a decimal string via multipart (fmt.Sprintf("%d", targetTypeVal)). Users relying on --dry-run to predict the exact wire payload will see a different JSON shape than what is actually posted. Consider stringifying in DryRun as well for consistency with multipart semantics.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@shortcuts/okr/okr_image_upload.go` around lines 77 - 84, The DryRun payload
represents target_type as a numeric value while Execute sends it as a decimal
string; update the DryRun builder (the block that returns
common.NewDryRunAPI().POST(...).Body(...)) to stringify targetTypeVal (use the
same fmt.Sprintf("%d", targetTypeVal) format used in Execute) so the DryRun body
and the multipart Execute payload match; keep target_id and file handling
identical and only change target_type to a string to ensure consistency between
DryRun and Execute.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@internal/registry/service_descriptions.json`:
- Around line 68-69: The EN and ZH entries for the "OKR" service in
service_descriptions.json are semantically mismatched: the "zh" description
mentions progress records while "en" does not; update the "en" description for
the "OKR" entry (the object under key "en" alongside "zh") to include the same
capabilities (e.g., add "progress records" or equivalent phrase) so both locales
describe the same features, or alternatively remove "progress records" from the
"zh" description to keep them aligned—edit the "en" description string to mirror
the ZH items (object title "OKR", description field).

In `@README.md`:
- Line 16: Update the inconsistent skill count in the README by changing the
intro sentence that currently states "22 AI Agent Skills" to match the later
line "23 AI Agent [Skills]"; locate the intro paragraph and replace the numeric
value 22 with 23 so both the intro and the "Wide Coverage — 15 business domains,
200+ curated commands, 23 AI Agent [Skills]" line are consistent.
- Line 158: Update the `lark-okr` table row so its description mirrors the
Features section by mentioning progress management; change the text for
`lark-okr` (the table entry string `lark-okr`) to read something like "Query,
create, update OKRs; manage objectives & key results, alignments, indicators,
and progress" so the skill row explicitly includes progress management alongside
objectives, key results, alignments, and indicators.

In `@README.zh.md`:
- Line 159: Update the `lark-okr` skill table row to mention OKR progress
records by adding "OKR 进展记录" (or simply "进展记录") into the description cell
alongside the existing items so the row reads e.g. "查询、创建、更新
OKR,管理目标、关键结果、对齐、指标和进展记录", editing the table row that contains the `lark-okr`
token to keep wording consistent with the feature list.

In `@shortcuts/okr/okr_image_upload.go`:
- Around line 22-55: The Validate function for OKRUploadImage uses
filepath.Ext(filePath) and checks against allowedImageExts but doesn't normalize
case, so extensions like "PNG" are rejected; update the validation in Validate
to normalize the extracted extension (e.g., ext :=
strings.ToLower(strings.TrimSpace(filepath.Ext(filePath)))) before checking
allowedImageExts so lookups use the lowercase keys defined in allowedImageExts;
ensure you import strings if not already present and keep the same error message
and runtime.Str usage.

In `@shortcuts/okr/okr_progress_create.go`:
- Around line 219-228: The CLI output uses the internal type name "ProgressV1"
in the user-facing messages; update the strings in the runtime.OutFormat closure
(the block referencing resp.ID, resp.ModifyTime, resp.ProgressRate.Percent,
resp.Content) to use a user-friendly label such as "Progress" (e.g., change
"Created ProgressV1 Record" -> "Created Progress Record" and "ProgressV1:
%.1f%%" -> "Progress: %.1f%%") while leaving the surrounding formatting and nil
checks intact.

In `@shortcuts/okr/okr_progress_get.go`:
- Around line 78-83: The pretty printer is emitting the internal model name
"ProgressV1" to users; change the displayed labels inside the runtime.OutFormat
callback (the fmt.Fprintf calls that reference resp and print the header
"ProgressV1 Record [%s]\n") to use the public/domain terminology (e.g.,
"Progress Record" or "OKR Progress Record") and update any other user-facing
label that contains "ProgressV1" so the output uses command/domain names instead
of the internal model name; keep the rest of the logic (resp.ID,
resp.ModifyTime, ProgressRate printing) unchanged.

In `@shortcuts/okr/okr_progress_update.go`:
- Around line 164-172: Change the user-facing strings that leak the internal
type name "ProgressV1" to neutral wording in both okr_progress_update.go and
okr_progress_create.go: update the runtime.OutFormat output in the block that
writes "Updated ProgressV1 Record [...]" (function using resp.ID,
resp.ModifyTime, resp.ProgressRate.Percent, resp.Content) to something like
"Updated progress record [...]" and replace "ProgressV1: %.1f%%" with "Progress:
%.1f%%" (similarly change the "Created ProgressV1 Record" text in the create
file) so only neutral terms (e.g., "progress" or "progress record") appear to
users while keeping the same resp fields and formatting logic.

In `@skills/lark-okr/references/lark-okr-progress-create.md`:
- Around line 17-22: Update the example invocation for the lark-cli okr
+progress-create command to use a valid signed int64 for --target-id: replace
the current oversized value (9876543210987654321) with the suggested valid ID
(8876543210987654321) so the CLI validation for the --target-id parameter
passes.

In `@skills/lark-okr/references/lark-okr-progress-delete.md`:
- Around line 19-23: Replace the placeholder-style parameter cell that currently
shows `--progress-id <id>` with the plain flag name `--progress-id` to match the
rest of the OKR docs; keep the "必填" as "是" and move the type/validation detail
("进展记录 ID(int64 类型,正整数)") into the 说明 column so the table row reads
`--progress-id | 是 | — | 进展记录 ID(int64 类型,正整数)`, ensuring consistency with other
flag rows.

In `@skills/lark-okr/SKILL.md`:
- Around line 32-33: Update the "ContentBlock 富文本格式" bullet to note that
progress records also use ContentBlock and are included in the ContentBlock
summary; specifically edit the line referencing `ContentBlock` (the second
bullet) so it reads something like "ContentBlock 富文本格式 —
Objective/KeyResult/Notes 和进度记录(Progress Records)字段使用的富文本格式说明", ensuring
`ContentBlock` and "进度记录"/"Progress Records" are mentioned so the summary is not
stale.

---

Outside diff comments:
In `@README.zh.md`:
- Around line 9-16: The README contains inconsistent Skill counts: update the
occurrences of "22 个 AI Agent [Skills](./skills/)" and "23 个 AI Agent
[Skills](./skills/)" so they match (choose the correct canonical number and
replace all instances), specifically edit the two places showing "22 个 AI Agent
[Skills](./skills/)" and the place showing "23 个 AI Agent [Skills](./skills/)"
to use the same number and keep the link text "[Skills](./skills/)" unchanged.

---

Nitpick comments:
In `@shortcuts/okr/okr_image_upload.go`:
- Around line 77-84: The DryRun payload represents target_type as a numeric
value while Execute sends it as a decimal string; update the DryRun builder (the
block that returns common.NewDryRunAPI().POST(...).Body(...)) to stringify
targetTypeVal (use the same fmt.Sprintf("%d", targetTypeVal) format used in
Execute) so the DryRun body and the multipart Execute payload match; keep
target_id and file handling identical and only change target_type to a string to
ensure consistency between DryRun and Execute.

In `@shortcuts/okr/okr_openapi.go`:
- Around line 450-457: ContentGallery.ToV1 currently assigns the Images slice
directly to ImageList (ImageList: g.Images), creating shared backing arrays with
ContentGalleryV1.ToV2 and risking silent mutation; update ToV1 (and verify ToV2)
to return a shallow copy of the slice (allocate a new slice and copy elements)
so the returned ContentGalleryV1.ImageList does not share backing storage with
the original ContentGallery.Images, referencing the functions
ContentGallery.ToV1 and ContentGalleryV1.ToV2 to find the conversion points.

In `@shortcuts/okr/okr_progress_update.go`:
- Around line 114-131: The DryRun implementation for DryRun in
okr_progress_update.go currently ignores errors from
parseUpdateProgressRecordParams by using p, _ :=
parseUpdateProgressRecordParams(runtime), which can yield a nil p and cause NPEs
when accessing p.UserIDType or p.ProgressID; update DryRun to check and handle
the returned error (or nil p) from parseUpdateProgressRecordParams: call p, err
:= parseUpdateProgressRecordParams(runtime), if err or p == nil then return a
sensible empty/failed DryRun API (or propagate the error) instead of
dereferencing p; alternatively collapse duplicated validation by moving
validation into parseUpdateProgressRecordParams and using its result in both
Validate and DryRun so DryRun can safely rely on a non-nil p.

In `@skills/lark-okr/references/lark-okr-image-upload.md`:
- Line 37: Replace the ambiguous phrase "图片内容" with the more precise term "图片块"
in the sentence that reads "获取返回的 `file_token`,用于构建 ContentBlock 中的图片内容。", so
that it aligns with ContentGallery terminology and reduces ambiguity when
referring to image elements inside ContentBlock; ensure the updated sentence
reads something like "获取返回的 `file_token`,用于构建 ContentBlock 中的图片块。".
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1f910ed0-c9ff-4f7b-b054-94c88c3cf7b0

📥 Commits

Reviewing files that changed from the base of the PR and between 67e51ec and 1b5248b.

📒 Files selected for processing (31)
  • README.md
  • README.zh.md
  • internal/registry/service_descriptions.json
  • shortcuts/okr/okr_cli_resp.go
  • shortcuts/okr/okr_image_upload.go
  • shortcuts/okr/okr_image_upload_test.go
  • shortcuts/okr/okr_openapi.go
  • shortcuts/okr/okr_openapi_test.go
  • shortcuts/okr/okr_progress_create.go
  • shortcuts/okr/okr_progress_create_test.go
  • shortcuts/okr/okr_progress_delete.go
  • shortcuts/okr/okr_progress_delete_test.go
  • shortcuts/okr/okr_progress_get.go
  • shortcuts/okr/okr_progress_get_test.go
  • shortcuts/okr/okr_progress_list.go
  • shortcuts/okr/okr_progress_list_test.go
  • shortcuts/okr/okr_progress_update.go
  • shortcuts/okr/okr_progress_update_test.go
  • shortcuts/okr/shortcuts.go
  • skills/lark-okr/SKILL.md
  • skills/lark-okr/references/lark-okr-contentblock.md
  • skills/lark-okr/references/lark-okr-cycle-detail.md
  • skills/lark-okr/references/lark-okr-cycle-list.md
  • skills/lark-okr/references/lark-okr-entities.md
  • skills/lark-okr/references/lark-okr-image-upload.md
  • skills/lark-okr/references/lark-okr-progress-create.md
  • skills/lark-okr/references/lark-okr-progress-delete.md
  • skills/lark-okr/references/lark-okr-progress-get.md
  • skills/lark-okr/references/lark-okr-progress-list.md
  • skills/lark-okr/references/lark-okr-progress-update.md
  • tests/cli_e2e/okr/okr_progress_test.go

Comment on lines 68 to +69
"en": { "title": "OKR", "description": "Lark OKR objectives, key results, alignments, indicators" },
"zh": { "title": "OKR", "description": "飞书 OKR 目标、关键结果、对齐、量化指标" }
"zh": { "title": "OKR", "description": "飞书 OKR 目标、关键结果、对齐、量化指标、进展记录" }
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Keep okr EN/ZH descriptions semantically aligned.
zh now includes progress records, but en does not. This creates localized capability mismatch.

Suggested fix
-    "en": { "title": "OKR", "description": "Lark OKR objectives, key results, alignments, indicators" },
+    "en": { "title": "OKR", "description": "Lark OKR objectives, key results, alignments, indicators, progress records" },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"en": { "title": "OKR", "description": "Lark OKR objectives, key results, alignments, indicators" },
"zh": { "title": "OKR", "description": "飞书 OKR 目标、关键结果、对齐、量化指标" }
"zh": { "title": "OKR", "description": "飞书 OKR 目标、关键结果、对齐、量化指标、进展记录" }
"en": { "title": "OKR", "description": "Lark OKR objectives, key results, alignments, indicators, progress records" },
"zh": { "title": "OKR", "description": "飞书 OKR 目标、关键结果、对齐、量化指标、进展记录" }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/registry/service_descriptions.json` around lines 68 - 69, The EN and
ZH entries for the "OKR" service in service_descriptions.json are semantically
mismatched: the "zh" description mentions progress records while "en" does not;
update the "en" description for the "OKR" entry (the object under key "en"
alongside "zh") to include the same capabilities (e.g., add "progress records"
or equivalent phrase) so both locales describe the same features, or
alternatively remove "progress records" from the "zh" description to keep them
aligned—edit the "en" description string to mirror the ZH items (object title
"OKR", description field).

Comment thread README.md
Comment thread README.md
Comment thread README.zh.md Outdated
Comment thread shortcuts/okr/okr_image_upload.go
Comment thread shortcuts/okr/okr_progress_get.go
Comment thread shortcuts/okr/okr_progress_update.go
Comment thread skills/lark-okr/references/lark-okr-progress-create.md
Comment thread skills/lark-okr/references/lark-okr-progress-delete.md Outdated
Comment thread skills/lark-okr/SKILL.md Outdated

```json
{
"file_token": "boxbcc6DmPfgi4rNXIaGfptc9HX",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Gitleaks has detected a secret with rule-id generic-api-key in commit 2fe2499.
If this secret is a true positive, please rotate the secret ASAP.

If this secret is a false positive, you can add the fingerprint below to your .gitleaksignore file and commit the change to this branch.

echo 2fe2499daae36a935fd3e3f097bc8b646c2e3f28:skills/lark-okr/references/lark-okr-image-upload.md:generic-api-key:45 >> .gitleaksignore

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

♻️ Duplicate comments (5)
shortcuts/okr/okr_progress_create.go (1)

219-228: ⚠️ Potential issue | 🟡 Minor

Use user-facing wording instead of ProgressV1.

This still exposes the internal DTO name in CLI output; use neutral labels like “Progress Record” and “Progress”.

📝 Proposed fix
 	runtime.OutFormat(result, nil, func(w io.Writer) {
-		fmt.Fprintf(w, "Created ProgressV1 Record [%s]\n", resp.ID)
+		fmt.Fprintf(w, "Created Progress Record [%s]\n", resp.ID)
 		fmt.Fprintf(w, "  ModifyTime: %s\n", resp.ModifyTime)
 		if resp.ProgressRate != nil && resp.ProgressRate.Percent != nil {
-			fmt.Fprintf(w, "  ProgressV1: %.1f%%\n", *resp.ProgressRate.Percent)
+			fmt.Fprintf(w, "  Progress: %.1f%%\n", *resp.ProgressRate.Percent)
 		}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@shortcuts/okr/okr_progress_create.go` around lines 219 - 228, The CLI output
is using internal DTO names; update the strings inside the runtime.OutFormat
call to use user-facing labels: change "Created ProgressV1 Record [%s]\n" to
something like "Created Progress Record [%s]\n" and change "  ProgressV1:
%.1f%%\n" to "  Progress: %.1f%%\n" (keep resp.ID, resp.ModifyTime,
resp.ProgressRate.Percent and resp.Content usage the same) in the anonymous func
passed to runtime.OutFormat so the output shows neutral labels rather than DTO
names.
shortcuts/okr/okr_progress_update.go (1)

164-172: ⚠️ Potential issue | 🟡 Minor

Use user-facing wording instead of ProgressV1.

This still exposes the internal DTO name in CLI output; use neutral labels like “Progress Record” and “Progress”.

📝 Proposed fix
 	runtime.OutFormat(result, nil, func(w io.Writer) {
-		fmt.Fprintf(w, "Updated ProgressV1 Record [%s]\n", resp.ID)
+		fmt.Fprintf(w, "Updated Progress Record [%s]\n", resp.ID)
 		fmt.Fprintf(w, "  ModifyTime: %s\n", resp.ModifyTime)
 		if resp.ProgressRate != nil && resp.ProgressRate.Percent != nil {
-			fmt.Fprintf(w, "  ProgressV1: %.1f%%\n", *resp.ProgressRate.Percent)
+			fmt.Fprintf(w, "  Progress: %.1f%%\n", *resp.ProgressRate.Percent)
 		}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@shortcuts/okr/okr_progress_update.go` around lines 164 - 172, Update the
user-facing CLI messages in the runtime.OutFormat block that currently expose
the internal DTO name: change the "Updated ProgressV1 Record [%s]\n" string to
"Updated Progress Record [%s]\n" and the "  ProgressV1: %.1f%%\n" label to a
neutral "  Progress: %.1f%%\n"; keep using resp.ID and resp.ProgressRate.Percent
(and the existing Content/ModifyTime output) but replace any other occurrences
of the "ProgressV1" token in that printing block to "Progress" to avoid leaking
internal type names.
skills/lark-okr/references/lark-okr-image-upload.md (1)

43-49: ⚠️ Potential issue | 🟡 Minor

Replace token-shaped examples with obvious placeholders.

These sample values look like real API tokens and have already triggered secret scanning. Use non-secret placeholders to keep docs scanner-safe. Based on learnings, Never commit secrets, tokens, or internal sensitive data.

📝 Proposed doc fix
 {
-  "file_token": "boxbcc6DmPfgi4rNXIaGfptc9HX",
-  "url": "https://example.larksuite.com/download?file_token=XXXXXXXXX",
+  "file_token": "FILE_TOKEN_PLACEHOLDER",
+  "url": "https://example.larksuite.com/download?file_token=FILE_TOKEN_PLACEHOLDER",
   "file_name": "screenshot.png",
   "size": 102400
 }
           {
-            "file_token": "XXXXXXXX",
+            "file_token": "FILE_TOKEN_PLACEHOLDER",
             "width": 800,
             "height": 600

Also applies to: 83-85

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-okr/references/lark-okr-image-upload.md` around lines 43 - 49,
Replace token-shaped sample values in the JSON example with obvious non-secret
placeholders: change "file_token": "boxbcc6DmPfgi4rNXIaGfptc9HX" to something
like "file_token": "<FILE_TOKEN_PLACEHOLDER>", the "url" query value "XXXXXXXXX"
to "<FILE_TOKEN_PLACEHOLDER>" or "<DOWNLOAD_TOKEN>", and any real-looking file
names (e.g., "screenshot.png") to a benign placeholder like "<FILE_NAME>".
Update the example JSON in lark-okr-image-upload.md (and the duplicate instances
referenced at lines 83-85) so no token-shaped strings or internal-looking
identifiers remain.
README.zh.md (1)

159-159: ⚠️ Potential issue | 🟡 Minor

Mention progress records in the lark-okr skill row.

The feature table includes OKR 进展记录, but the Agent Skills row is still missing it.

📝 Proposed doc fix
-| `lark-okr`                      | 查询、创建、更新 OKR,管理目标、关键结果、对齐和指标              |
+| `lark-okr`                      | 查询、创建、更新 OKR,管理目标、关键结果、对齐、指标和进展记录        |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.zh.md` at line 159, Update the `lark-okr` skill table row to include
the missing "OKR 进展记录" feature: edit README.zh.md and change the `lark-okr` row
(the line containing "`lark-okr` | 查询、创建、更新 OKR,管理目标、关键结果、对齐和指标") to also list
"OKR 进展记录" so it matches the feature table (e.g., append "、OKR 进展记录" to that
cell).
skills/lark-okr/SKILL.md (1)

33-33: ⚠️ Potential issue | 🟡 Minor

Include progress records in the ContentBlock summary.

Progress record content also uses ContentBlock, so this summary is still stale.

📝 Proposed doc fix
-- [`ContentBlock 富文本格式`](references/lark-okr-contentblock.md) — Objective/KeyResult/Notes 字段使用的富文本格式说明
+- [`ContentBlock 富文本格式`](references/lark-okr-contentblock.md) — Objective/KeyResult/Notes/进展记录内容使用的富文本格式说明
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-okr/SKILL.md` at line 33, Update the ContentBlock summary in
SKILL.md so it explicitly states that progress records also use the ContentBlock
rich-text format; modify the existing bullet/link for "ContentBlock 富文本格式"
(references/lark-okr-contentblock.md) and its descriptive text to mention
Objective/KeyResult/Notes fields and Progress Records, ensuring the summary and
link target reflect that progress record content is covered.
🧹 Nitpick comments (2)
tests/cli_e2e/okr/okr_progress_test.go (2)

38-39: Nit: prefer assert.Contains over assert.True(strings.Contains(...)).

Throughout the file, assert.Contains(t, output, substr, msg) gives clearer failure diffs than wrapping strings.Contains in assert.True, and removes the need to import strings. Purely optional.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/cli_e2e/okr/okr_progress_test.go` around lines 38 - 39, Replace uses of
assert.True(t, strings.Contains(output, ...)) with assert.Contains(t, output,
...) to get clearer failure output; update the two assertions that check for
"/open-apis/okr/v1/images/upload" and "POST" accordingly (replace the calls in
the test function that contains those assert.True lines) and remove the
now-unnecessary strings import from the test file.

91-113: _WithProgress variant doesn't actually verify progress fields.

TestOKR_ProgressCreateDryRun_WithProgress (and the analogous TestOKR_ProgressUpdateDryRun_WithProgress at lines 183-204) only asserts the same API path as the base test — it never checks that progress_rate, 75, normal, or progress_status appear in the dry-run output. As written, the test would still pass even if --progress-percent/--progress-status were silently dropped from the request body, defeating the purpose of the variant.

Consider asserting on the progress-related substrings so the test meaningfully differs from the base case, e.g.:

Proposed additional assertions
 	output := result.Stdout
 	assert.True(t, strings.Contains(output, "/open-apis/okr/v1/progress_records/"), "dry-run should contain API path, got: %s", output)
+	assert.Contains(t, output, "progress_rate", "dry-run should include progress_rate body field, got: %s", output)
+	assert.Contains(t, output, "75", "dry-run should include progress percent value, got: %s", output)

Same treatment for TestOKR_ProgressUpdateDryRun_WithProgress (check for 100 / done).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/cli_e2e/okr/okr_progress_test.go` around lines 91 - 113,
TestOKR_ProgressCreateDryRun_WithProgress currently only asserts the API path
and never verifies that progress fields are present; update the test (and the
analogous TestOKR_ProgressUpdateDryRun_WithProgress) to also assert that the
dry-run output contains the progress-related substrings: in
TestOKR_ProgressCreateDryRun_WithProgress check for "progress_rate" (or
"progress_percent"), "75" and "progress_status" / "normal" using
assert.True(strings.Contains(output, ...)) so the dry-run includes the progress
percent and status; similarly, in TestOKR_ProgressUpdateDryRun_WithProgress add
assertions that the output contains the updated progress values (e.g., "100" and
"done") so the tests fail if those flags are dropped from the request body.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@README.zh.md`:
- Line 16: Update the inconsistent skill count in the Chinese README by making
all occurrences agree with the corrected number (change the text fragment
"**覆盖面广** — 15 大业务域、200+ 精选命令、23 个 AI Agent [Skills](./skills/)" and any nearby
instances that say "22" such as the intro sentence and the "Agent-native"
bullet) so every mention of the Skills count reads "23" (or the intended
canonical number) across the file.

In `@shortcuts/okr/okr_progress_create.go`:
- Around line 58-72: The code currently accepts --progress-status alone but
ignores it because progress_rate is only set when --progress-percent is
provided; update the validation in the block handling
runtime.Str("progress-percent") and runtime.Str("progress-status") so that if
runtime.Str("progress-status") is set but runtime.Str("progress-percent") is
empty you return a FlagError (e.g., via common.FlagErrorf) stating that
--progress-status requires --progress-percent; keep using ParseProgressStatus to
validate the status and continue to set progressRate = &ProgressRateV1{Percent:
&percent} and progressRate.Status = int32Ptr(int32(status)) when both are
present.

In `@shortcuts/okr/okr_progress_update.go`:
- Around line 35-49: The code currently allows --progress-status to be validated
but then silently ignored if --progress-percent is not provided because
progressRate.Status is only set inside the percent branch; update
parseUpdateProgressRecordParams to reject status-only updates by checking
runtime.Str("progress-status") when runtime.Str("progress-percent") is empty and
returning a FlagErrorf like "--progress-status requires --progress-percent"
(apply the same check in both occurrences around the percent/status handling
blocks), and keep using ParseProgressStatus to validate the status before
returning the error so users cannot pass a status without a percent; reference
the existing variables/functions progressRate, runtime.Str("progress-percent"),
runtime.Str("progress-status"), and ParseProgressStatus to locate the changes.

---

Duplicate comments:
In `@README.zh.md`:
- Line 159: Update the `lark-okr` skill table row to include the missing "OKR
进展记录" feature: edit README.zh.md and change the `lark-okr` row (the line
containing "`lark-okr` | 查询、创建、更新 OKR,管理目标、关键结果、对齐和指标") to also list "OKR 进展记录"
so it matches the feature table (e.g., append "、OKR 进展记录" to that cell).

In `@shortcuts/okr/okr_progress_create.go`:
- Around line 219-228: The CLI output is using internal DTO names; update the
strings inside the runtime.OutFormat call to use user-facing labels: change
"Created ProgressV1 Record [%s]\n" to something like "Created Progress Record
[%s]\n" and change "  ProgressV1: %.1f%%\n" to "  Progress: %.1f%%\n" (keep
resp.ID, resp.ModifyTime, resp.ProgressRate.Percent and resp.Content usage the
same) in the anonymous func passed to runtime.OutFormat so the output shows
neutral labels rather than DTO names.

In `@shortcuts/okr/okr_progress_update.go`:
- Around line 164-172: Update the user-facing CLI messages in the
runtime.OutFormat block that currently expose the internal DTO name: change the
"Updated ProgressV1 Record [%s]\n" string to "Updated Progress Record [%s]\n"
and the "  ProgressV1: %.1f%%\n" label to a neutral "  Progress: %.1f%%\n"; keep
using resp.ID and resp.ProgressRate.Percent (and the existing Content/ModifyTime
output) but replace any other occurrences of the "ProgressV1" token in that
printing block to "Progress" to avoid leaking internal type names.

In `@skills/lark-okr/references/lark-okr-image-upload.md`:
- Around line 43-49: Replace token-shaped sample values in the JSON example with
obvious non-secret placeholders: change "file_token":
"boxbcc6DmPfgi4rNXIaGfptc9HX" to something like "file_token":
"<FILE_TOKEN_PLACEHOLDER>", the "url" query value "XXXXXXXXX" to
"<FILE_TOKEN_PLACEHOLDER>" or "<DOWNLOAD_TOKEN>", and any real-looking file
names (e.g., "screenshot.png") to a benign placeholder like "<FILE_NAME>".
Update the example JSON in lark-okr-image-upload.md (and the duplicate instances
referenced at lines 83-85) so no token-shaped strings or internal-looking
identifiers remain.

In `@skills/lark-okr/SKILL.md`:
- Line 33: Update the ContentBlock summary in SKILL.md so it explicitly states
that progress records also use the ContentBlock rich-text format; modify the
existing bullet/link for "ContentBlock 富文本格式"
(references/lark-okr-contentblock.md) and its descriptive text to mention
Objective/KeyResult/Notes fields and Progress Records, ensuring the summary and
link target reflect that progress record content is covered.

---

Nitpick comments:
In `@tests/cli_e2e/okr/okr_progress_test.go`:
- Around line 38-39: Replace uses of assert.True(t, strings.Contains(output,
...)) with assert.Contains(t, output, ...) to get clearer failure output; update
the two assertions that check for "/open-apis/okr/v1/images/upload" and "POST"
accordingly (replace the calls in the test function that contains those
assert.True lines) and remove the now-unnecessary strings import from the test
file.
- Around line 91-113: TestOKR_ProgressCreateDryRun_WithProgress currently only
asserts the API path and never verifies that progress fields are present; update
the test (and the analogous TestOKR_ProgressUpdateDryRun_WithProgress) to also
assert that the dry-run output contains the progress-related substrings: in
TestOKR_ProgressCreateDryRun_WithProgress check for "progress_rate" (or
"progress_percent"), "75" and "progress_status" / "normal" using
assert.True(strings.Contains(output, ...)) so the dry-run includes the progress
percent and status; similarly, in TestOKR_ProgressUpdateDryRun_WithProgress add
assertions that the output contains the updated progress values (e.g., "100" and
"done") so the tests fail if those flags are dropped from the request body.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 609fe1b7-536e-4c87-a617-0406ca52bf25

📥 Commits

Reviewing files that changed from the base of the PR and between 1b5248b and 2fe2499.

📒 Files selected for processing (31)
  • README.md
  • README.zh.md
  • internal/registry/service_descriptions.json
  • shortcuts/okr/okr_cli_resp.go
  • shortcuts/okr/okr_image_upload.go
  • shortcuts/okr/okr_image_upload_test.go
  • shortcuts/okr/okr_openapi.go
  • shortcuts/okr/okr_openapi_test.go
  • shortcuts/okr/okr_progress_create.go
  • shortcuts/okr/okr_progress_create_test.go
  • shortcuts/okr/okr_progress_delete.go
  • shortcuts/okr/okr_progress_delete_test.go
  • shortcuts/okr/okr_progress_get.go
  • shortcuts/okr/okr_progress_get_test.go
  • shortcuts/okr/okr_progress_list.go
  • shortcuts/okr/okr_progress_list_test.go
  • shortcuts/okr/okr_progress_update.go
  • shortcuts/okr/okr_progress_update_test.go
  • shortcuts/okr/shortcuts.go
  • skills/lark-okr/SKILL.md
  • skills/lark-okr/references/lark-okr-contentblock.md
  • skills/lark-okr/references/lark-okr-cycle-detail.md
  • skills/lark-okr/references/lark-okr-cycle-list.md
  • skills/lark-okr/references/lark-okr-entities.md
  • skills/lark-okr/references/lark-okr-image-upload.md
  • skills/lark-okr/references/lark-okr-progress-create.md
  • skills/lark-okr/references/lark-okr-progress-delete.md
  • skills/lark-okr/references/lark-okr-progress-get.md
  • skills/lark-okr/references/lark-okr-progress-list.md
  • skills/lark-okr/references/lark-okr-progress-update.md
  • tests/cli_e2e/okr/okr_progress_test.go
✅ Files skipped from review due to trivial changes (11)
  • README.md
  • skills/lark-okr/references/lark-okr-contentblock.md
  • internal/registry/service_descriptions.json
  • skills/lark-okr/references/lark-okr-cycle-detail.md
  • skills/lark-okr/references/lark-okr-progress-list.md
  • skills/lark-okr/references/lark-okr-progress-delete.md
  • shortcuts/okr/okr_image_upload_test.go
  • skills/lark-okr/references/lark-okr-progress-get.md
  • shortcuts/okr/okr_progress_update_test.go
  • skills/lark-okr/references/lark-okr-entities.md
  • shortcuts/okr/okr_progress_create_test.go
🚧 Files skipped from review as they are similar to previous changes (11)
  • shortcuts/okr/shortcuts.go
  • shortcuts/okr/okr_progress_delete.go
  • shortcuts/okr/okr_progress_get.go
  • skills/lark-okr/references/lark-okr-cycle-list.md
  • shortcuts/okr/okr_progress_list_test.go
  • shortcuts/okr/okr_progress_get_test.go
  • shortcuts/okr/okr_cli_resp.go
  • shortcuts/okr/okr_progress_list.go
  • skills/lark-okr/references/lark-okr-progress-create.md
  • shortcuts/okr/okr_image_upload.go
  • shortcuts/okr/okr_openapi_test.go

Comment thread README.zh.md
Comment thread shortcuts/okr/okr_progress_create.go
Comment thread shortcuts/okr/okr_progress_update.go

```json
{
"file_token": "boxbcc6DmPfgi4rNXIaGfptc9HX",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Gitleaks has detected a secret with rule-id generic-api-key in commit 2a9b376.
If this secret is a true positive, please rotate the secret ASAP.

If this secret is a false positive, you can add the fingerprint below to your .gitleaksignore file and commit the change to this branch.

echo 2a9b37618fa76af3cce2c964b993e09f5180de65:skills/lark-okr/references/lark-okr-image-upload.md:generic-api-key:45 >> .gitleaksignore

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (4)
README.zh.md (1)

15-15: ⚠️ Potential issue | 🟡 Minor

Fix the remaining skill count inconsistency.

Line 15 still says "22 个 [Skills]" but should match the corrected count of 23 used in Lines 9 and 16. This was partially addressed in previous reviews but Line 15 was missed.

📝 Proposed fix
-- **为 Agent 原生设计** — 22 个 [Skills](./skills/) 开箱即用,适配主流 AI 工具,Agent 无需额外适配即可操作飞书
+- **为 Agent 原生设计** — 23 个 [Skills](./skills/) 开箱即用,适配主流 AI 工具,Agent 无需额外适配即可操作飞书
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.zh.md` at line 15, Update the remaining inconsistent skill count in
README.zh.md by changing the string "为 Agent 原生设计 — 22 个 [Skills](./skills/)
开箱即用,适配主流 AI 工具,Agent 无需额外适配即可操作飞书" to use "23 个 [Skills]" so it matches the
corrected occurrences on Lines 9 and 16; locate the exact sentence (the one
starting with "为 Agent 原生设计") and replace the numeral 22 with 23.
shortcuts/okr/okr_progress_update.go (1)

42-49: ⚠️ Potential issue | 🟠 Major

Reject status-only updates instead of silently dropping them.

--progress-status currently passes validation without --progress-percent, but parseUpdateProgressRecordParams only includes status inside the percent branch, so the user’s update becomes a no-op.

Suggested fix
 	var progressRate *ProgressRateV1
+	if runtime.Str("progress-status") != "" && runtime.Str("progress-percent") == "" {
+		return nil, common.FlagErrorf("--progress-status requires --progress-percent")
+	}
 	if v := runtime.Str("progress-percent"); v != "" {
 		percent, err := strconv.ParseFloat(v, 64)
 		if err != nil || percent < 0 || percent > 100 {
 			return nil, common.FlagErrorf("--progress-percent must be a number between 0 and 100")
 		{Name: "progress-percent", Desc: "progress percentage (0-100)"},
-		{Name: "progress-status", Desc: "progress status: normal | overdue | done", Enum: []string{"normal", "overdue", "done"}},
+		{Name: "progress-status", Desc: "progress status: normal | overdue | done; requires --progress-percent", Enum: []string{"normal", "overdue", "done"}},
 	if v := runtime.Str("progress-status"); v != "" {
 		if _, ok := ParseProgressStatus(v); !ok {
 			return common.FlagErrorf("--progress-status must be one of: normal | overdue | done")
 		}
+		if runtime.Str("progress-percent") == "" {
+			return common.FlagErrorf("--progress-status requires --progress-percent")
+		}
 	}

Also applies to: 102-106

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@shortcuts/okr/okr_progress_update.go` around lines 42 - 49, The handler
allows a validated --progress-status (via runtime.Str and ParseProgressStatus)
to be set but then only attaches status to the progress payload inside the
percent branch of parseUpdateProgressRecordParams, causing status-only updates
to be dropped; modify parseUpdateProgressRecordParams so that when
ParseProgressStatus returns ok you set progressRate.Status (and include it in
the returned payload) regardless of whether --progress-percent was provided, and
add validation to reject status-only updates if policy requires percent together
(or conversely accept status-only by ensuring progressRate.Status is applied
outside the percent branch); update references in
parseUpdateProgressRecordParams and any callers to ensure progressRate (and its
Status field) is included in the constructed update request.
shortcuts/okr/okr_progress_create.go (1)

222-226: ⚠️ Potential issue | 🟡 Minor

Remove the internal ProgressV1 name from CLI output.

ProgressV1 is an implementation detail; keep human-readable output version-neutral.

Suggested wording cleanup
 		runtime.OutFormat(result, nil, func(w io.Writer) {
-			fmt.Fprintf(w, "Created ProgressV1 Record [%s]\n", resp.ID)
+			fmt.Fprintf(w, "Created Progress Record [%s]\n", resp.ID)
 			fmt.Fprintf(w, "  ModifyTime: %s\n", resp.ModifyTime)
 			if resp.ProgressRate != nil && resp.ProgressRate.Percent != nil {
-				fmt.Fprintf(w, "  ProgressV1: %.1f%%\n", *resp.ProgressRate.Percent)
+				fmt.Fprintf(w, "  Progress: %.1f%%\n", *resp.ProgressRate.Percent)
 			}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@shortcuts/okr/okr_progress_create.go` around lines 222 - 226, The CLI output
prints an internal implementation name "ProgressV1" — update the fmt.Fprintf
call inside runtime.OutFormat (the block using resp.ID, resp.ModifyTime and
resp.ProgressRate.Percent) to remove "ProgressV1" and use a version-neutral
label such as "Progress" (i.e., change the string "  ProgressV1: ..." to " 
Progress: ..."), keeping the rest of the formatting and use of
resp.ProgressRate.Percent unchanged.
skills/lark-okr/references/lark-okr-image-upload.md (1)

43-49: ⚠️ Potential issue | 🟡 Minor

Use unmistakable placeholders for token examples.

The sample file_token and URL query value look secret-like and have already tripped secret scanning. Replace them with clearly synthetic placeholders so Gitleaks does not keep blocking the PR. Based on learnings, Never commit secrets, tokens, or internal sensitive data.

Suggested doc-only cleanup
 {
-  "file_token": "boxbcc6DmPfgi4rNXIaGfptc9HX",
-  "url": "https://example.larksuite.com/download?file_token=XXXXXXXXX",
+  "file_token": "FILE_TOKEN_PLACEHOLDER",
+  "url": "https://example.larksuite.com/download?file_token=FILE_TOKEN_PLACEHOLDER",
   "file_name": "screenshot.png",
   "size": 102400
 }
           {
-            "file_token": "XXXXXXXX",
+            "file_token": "FILE_TOKEN_PLACEHOLDER",
             "width": 800,
             "height": 600
           }

Also applies to: 80-86

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-okr/references/lark-okr-image-upload.md` around lines 43 - 49,
The example JSON contains secret-like values—replace the "file_token" value and
the URL query parameter with unmistakably synthetic placeholders (e.g.,
FILE_TOKEN_EXAMPLE or <FILE_TOKEN_EXAMPLE>) so scanners won’t flag them; update
the "file_token" field and the "url" value in the sample JSON (and the duplicate
occurrences later in the document) to use these clearly non-secret placeholders
while keeping "file_name" and "size" unchanged. Ensure all occurrences of the
token-like string in the document are replaced consistently so Gitleaks won't
block the PR.
🧹 Nitpick comments (1)
shortcuts/okr/okr_progress_delete_test.go (1)

81-97: Minor: TestProgressDeleteValidate_Valid largely duplicates TestProgressDeleteExecute_Success.

Both register a success stub for DELETE /open-apis/okr/v1/progress_records/<id> and assert no error. Since the validation path with a valid numeric id is already indirectly exercised by the Execute and DryRun tests, this case adds little unique coverage. Consider either dropping it or narrowing it to a pure validation check (e.g., by asserting the command proceeds past Validate without needing a stub — perhaps via --dry-run) to keep intent distinct from the Execute success test.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@shortcuts/okr/okr_progress_delete_test.go` around lines 81 - 97,
TestProgressDeleteValidate_Valid is redundant with
TestProgressDeleteExecute_Success; either remove it or convert it into a pure
validation check: delete the HTTP stub registration (reg.Register(...)) and
invoke runProgressDeleteShortcut with the same args plus "--dry-run" (or
otherwise trigger only Validate) so the test only asserts that Validate passes
for a numeric progress id; reference TestProgressDeleteValidate_Valid,
runProgressDeleteShortcut, and progressDeleteTestConfig to locate and update the
test.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@shortcuts/okr/okr_progress_create.go`:
- Around line 59-63: The flag parsing for --progress-percent uses
strconv.ParseFloat and only checks numeric range, but ParseFloat accepts "NaN"
and "Inf" which bypass range checks; update both parsing sites (the
runtime.Str("progress-percent") branch where percent is assigned and the second
identical ParseFloat block later) to explicitly detect and reject NaN/Inf after
parsing by using math.IsNaN(percent) || math.IsInf(percent, 0) and return the
same FlagErrorf("--progress-percent must be a number between 0 and 100") when
true; also add unit tests that pass "--progress-percent NaN" and
"--progress-percent Inf" to the OKR progress creation command and assert those
produce the flag error.

In `@shortcuts/okr/okr_progress_update.go`:
- Around line 36-40: ParseFloat accepts "NaN"/"Inf", so after parsing the value
returned by runtime.Str("progress-percent") in both places where
strconv.ParseFloat is used, add explicit checks using math.IsNaN(percent) and
math.IsInf(percent, 0) before the existing range check; if either is true,
return the same FlagErrorf("--progress-percent must be a number between 0 and
100"). Update both occurrences (the blocks that parse
runtime.Str("progress-percent")) and add a unit test that invokes the command
with `--progress-percent NaN` to assert it fails with the expected flag error.

---

Duplicate comments:
In `@README.zh.md`:
- Line 15: Update the remaining inconsistent skill count in README.zh.md by
changing the string "为 Agent 原生设计 — 22 个 [Skills](./skills/) 开箱即用,适配主流 AI
工具,Agent 无需额外适配即可操作飞书" to use "23 个 [Skills]" so it matches the corrected
occurrences on Lines 9 and 16; locate the exact sentence (the one starting with
"为 Agent 原生设计") and replace the numeral 22 with 23.

In `@shortcuts/okr/okr_progress_create.go`:
- Around line 222-226: The CLI output prints an internal implementation name
"ProgressV1" — update the fmt.Fprintf call inside runtime.OutFormat (the block
using resp.ID, resp.ModifyTime and resp.ProgressRate.Percent) to remove
"ProgressV1" and use a version-neutral label such as "Progress" (i.e., change
the string "  ProgressV1: ..." to "  Progress: ..."), keeping the rest of the
formatting and use of resp.ProgressRate.Percent unchanged.

In `@shortcuts/okr/okr_progress_update.go`:
- Around line 42-49: The handler allows a validated --progress-status (via
runtime.Str and ParseProgressStatus) to be set but then only attaches status to
the progress payload inside the percent branch of
parseUpdateProgressRecordParams, causing status-only updates to be dropped;
modify parseUpdateProgressRecordParams so that when ParseProgressStatus returns
ok you set progressRate.Status (and include it in the returned payload)
regardless of whether --progress-percent was provided, and add validation to
reject status-only updates if policy requires percent together (or conversely
accept status-only by ensuring progressRate.Status is applied outside the
percent branch); update references in parseUpdateProgressRecordParams and any
callers to ensure progressRate (and its Status field) is included in the
constructed update request.

In `@skills/lark-okr/references/lark-okr-image-upload.md`:
- Around line 43-49: The example JSON contains secret-like values—replace the
"file_token" value and the URL query parameter with unmistakably synthetic
placeholders (e.g., FILE_TOKEN_EXAMPLE or <FILE_TOKEN_EXAMPLE>) so scanners
won’t flag them; update the "file_token" field and the "url" value in the sample
JSON (and the duplicate occurrences later in the document) to use these clearly
non-secret placeholders while keeping "file_name" and "size" unchanged. Ensure
all occurrences of the token-like string in the document are replaced
consistently so Gitleaks won't block the PR.

---

Nitpick comments:
In `@shortcuts/okr/okr_progress_delete_test.go`:
- Around line 81-97: TestProgressDeleteValidate_Valid is redundant with
TestProgressDeleteExecute_Success; either remove it or convert it into a pure
validation check: delete the HTTP stub registration (reg.Register(...)) and
invoke runProgressDeleteShortcut with the same args plus "--dry-run" (or
otherwise trigger only Validate) so the test only asserts that Validate passes
for a numeric progress id; reference TestProgressDeleteValidate_Valid,
runProgressDeleteShortcut, and progressDeleteTestConfig to locate and update the
test.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bdc9e3d1-7ee2-41ab-b271-5e171dd61920

📥 Commits

Reviewing files that changed from the base of the PR and between 2fe2499 and 2a9b376.

📒 Files selected for processing (31)
  • README.md
  • README.zh.md
  • internal/registry/service_descriptions.json
  • shortcuts/okr/okr_cli_resp.go
  • shortcuts/okr/okr_image_upload.go
  • shortcuts/okr/okr_image_upload_test.go
  • shortcuts/okr/okr_openapi.go
  • shortcuts/okr/okr_openapi_test.go
  • shortcuts/okr/okr_progress_create.go
  • shortcuts/okr/okr_progress_create_test.go
  • shortcuts/okr/okr_progress_delete.go
  • shortcuts/okr/okr_progress_delete_test.go
  • shortcuts/okr/okr_progress_get.go
  • shortcuts/okr/okr_progress_get_test.go
  • shortcuts/okr/okr_progress_list.go
  • shortcuts/okr/okr_progress_list_test.go
  • shortcuts/okr/okr_progress_update.go
  • shortcuts/okr/okr_progress_update_test.go
  • shortcuts/okr/shortcuts.go
  • skills/lark-okr/SKILL.md
  • skills/lark-okr/references/lark-okr-contentblock.md
  • skills/lark-okr/references/lark-okr-cycle-detail.md
  • skills/lark-okr/references/lark-okr-cycle-list.md
  • skills/lark-okr/references/lark-okr-entities.md
  • skills/lark-okr/references/lark-okr-image-upload.md
  • skills/lark-okr/references/lark-okr-progress-create.md
  • skills/lark-okr/references/lark-okr-progress-delete.md
  • skills/lark-okr/references/lark-okr-progress-get.md
  • skills/lark-okr/references/lark-okr-progress-list.md
  • skills/lark-okr/references/lark-okr-progress-update.md
  • tests/cli_e2e/okr/okr_progress_test.go
✅ Files skipped from review due to trivial changes (12)
  • skills/lark-okr/references/lark-okr-cycle-detail.md
  • skills/lark-okr/references/lark-okr-contentblock.md
  • internal/registry/service_descriptions.json
  • shortcuts/okr/okr_progress_delete.go
  • skills/lark-okr/references/lark-okr-progress-get.md
  • skills/lark-okr/references/lark-okr-progress-delete.md
  • skills/lark-okr/references/lark-okr-progress-list.md
  • skills/lark-okr/references/lark-okr-progress-create.md
  • shortcuts/okr/okr_cli_resp.go
  • shortcuts/okr/okr_progress_create_test.go
  • shortcuts/okr/okr_image_upload_test.go
  • skills/lark-okr/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (8)
  • README.md
  • shortcuts/okr/shortcuts.go
  • shortcuts/okr/okr_progress_get_test.go
  • shortcuts/okr/okr_progress_list_test.go
  • shortcuts/okr/okr_progress_get.go
  • skills/lark-okr/references/lark-okr-entities.md
  • shortcuts/okr/okr_image_upload.go
  • tests/cli_e2e/okr/okr_progress_test.go

Comment thread shortcuts/okr/okr_progress_create.go
Comment thread shortcuts/okr/okr_progress_update.go
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

♻️ Duplicate comments (4)
shortcuts/okr/okr_progress_update.go (1)

96-106: ⚠️ Potential issue | 🟠 Major

Status-only updates are still silently dropped (cross-check missing).

--progress-status passes Validate without --progress-percent, but parseUpdateProgressRecordParams (lines 35-49) only sets progressRate.Status inside the percent branch — so lark-cli okr +progress-update --progress-id X --content … --progress-status done validates fine, sends a body with no progress_rate at all, and the status change is silently lost. The create shortcut already enforces this cross-check at okr_progress_create.go:155-157; please mirror that here.

🛠️ Suggested fix
 		if v := runtime.Str("progress-status"); v != "" {
 			if _, ok := ParseProgressStatus(v); !ok {
 				return common.FlagErrorf("--progress-status must be one of: normal | overdue | done")
 			}
+			if runtime.Str("progress-percent") == "" {
+				return common.FlagErrorf("--progress-status requires --progress-percent")
+			}
 		}

Also update the flag description on line 72 to hint at this constraint:

-		{Name: "progress-status", Desc: "progress status: normal | overdue | done", Enum: []string{"normal", "overdue", "done"}},
+		{Name: "progress-status", Desc: "progress status (requires --progress-percent): normal | overdue | done", Enum: []string{"normal", "overdue", "done"}},
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@shortcuts/okr/okr_progress_update.go` around lines 96 - 106, The validation
currently allows --progress-status without --progress-percent, but
parseUpdateProgressRecordParams only sets progressRate.Status when a percent is
provided so status changes get dropped; update the Validate logic to require
that if runtime.Str("progress-status") is non-empty then
runtime.Str("progress-percent") must also be provided (return a FlagErrorf if
not), mirror the same cross-check used in the create flow, and also update the
progress-status flag description to mention that status requires supplying
--progress-percent so callers know the constraint; ensure ParseProgressStatus
and parseUpdateProgressRecordParams behavior remains consistent with this
validation.
README.zh.md (1)

15-16: ⚠️ Potential issue | 🟡 Minor

Skill count on line 15 still says "22 个"; should be "23".

Lines 9 and 16 were updated to "23 个", but the "为 Agent 原生设计" bullet on line 15 was missed, leaving the README self-inconsistent.

📝 Suggested fix
-- **为 Agent 原生设计** — 22 个 [Skills](./skills/) 开箱即用,适配主流 AI 工具,Agent 无需额外适配即可操作飞书
+- **为 Agent 原生设计** — 23 个 [Skills](./skills/) 开箱即用,适配主流 AI 工具,Agent 无需额外适配即可操作飞书
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.zh.md` around lines 15 - 16, Update the "为 Agent 原生设计" bullet that
currently reads "22 个 [Skills](./skills/)" to "23 个 [Skills](./skills/)" so it
matches the other occurrences; look for the exact text "为 Agent 原生设计 — 22 个
[Skills](./skills/)" in README.zh.md and replace 22 with 23 to keep the document
consistent with the "23 个" used elsewhere.
shortcuts/okr/okr_progress_create.go (1)

155-157: ⚠️ Potential issue | 🟡 Minor

Grammar in error message: "must provided with" → "must be provided with".

Also, since this branch is triggered by --progress-status being set, the message reads more naturally in the other direction.

🛠️ Suggested fix
-			if v := runtime.Str("progress-percent"); v == "" {
-				return common.FlagErrorf("--progress-percent must provided with --progress-status")
+			if p := runtime.Str("progress-percent"); p == "" {
+				return common.FlagErrorf("--progress-status requires --progress-percent")
 			}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@shortcuts/okr/okr_progress_create.go` around lines 155 - 157, Fix the grammar
and clarify direction in the error string inside the check that validates
runtime.Str("progress-percent") — update the common.FlagErrorf call currently
returning "--progress-percent must provided with --progress-status" to a
correct, clearer message such as "--progress-percent must be provided when
--progress-status is set" (locate the check using
runtime.Str("progress-percent") and the common.FlagErrorf invocation in
okr_progress_create.go).
shortcuts/okr/okr_image_upload.go (1)

51-54: ⚠️ Potential issue | 🟡 Minor

Case-sensitive extension check still rejects legitimately named files.

filepath.Ext preserves the original casing but allowedImageExts only has lowercase keys, so photo.PNG, logo.JPG, pic.HEIC (common on macOS/iOS/Windows exports) are rejected even though the help text on line 42 advertises them. Normalize to lowercase before the lookup.

🛠️ Proposed fix
 import (
 	"context"
 	"encoding/json"
 	"errors"
 	"fmt"
 	"path/filepath"
 	"strconv"
+	"strings"
-		ext := filepath.Ext(filePath)
-		if !allowedImageExts[ext] {
+		ext := strings.ToLower(filepath.Ext(filePath))
+		if !allowedImageExts[ext] {
 			return common.FlagErrorf("--file must be an image (supported: JPG, JPEG, PNG, WEBP, GIF, BMP, ICO, TIFF, HEIC), got %q", ext)
 		}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@shortcuts/okr/okr_image_upload.go` around lines 51 - 54, The extension check
uses filepath.Ext(filePath) and looks it up in allowedImageExts but misses
mixed-case extensions; normalize ext to lowercase (e.g., strings.ToLower(ext))
before the lookup so files like "photo.PNG", "logo.JPG", or "pic.HEIC" are
accepted by the existing allowedImageExts map in the same validation block in
okr_image_upload.go.
🧹 Nitpick comments (4)
shortcuts/okr/okr_progress_create.go (1)

166-186: DryRun silently swallows parseCreateProgressRecordParams errors.

p, _ := parseCreateProgressRecordParams(runtime) discards the error, and then p.UserIDType, p.TargetID, etc. are dereferenced. Although Validate runs before DryRun in the normal flow and catches --content JSON errors, the parse function is duplicating logic that can still produce a nil p (e.g., if the JSON sneaks through, or if the function is later extended). Consider either:

  • having Validate be the single source of truth and letting parseCreateProgressRecordParams rely on its preconditions (then p is safe to dereference), or
  • returning a DryRunAPI that surfaces the error via Desc when err != nil.

At minimum, a nil guard on p would prevent a panic if the Validate/Parse contract drifts in the future.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@shortcuts/okr/okr_progress_create.go` around lines 166 - 186, The DryRun
closure currently ignores errors from parseCreateProgressRecordParams (p, _ :=
parseCreateProgressRecordParams(runtime)), which can lead to nil derefs when
using p.UserIDType, p.TargetID, etc.; update DryRun in okr_progress_create.go to
handle the error: call parseCreateProgressRecordParams and if err != nil return
a common.NewDryRunAPI() that describes the parse error (e.g., via Desc) so the
error is surfaced, or at minimum add a nil guard before dereferencing p and
return a descriptive DryRunAPI when p == nil; reference the DryRun function,
parseCreateProgressRecordParams, and common.NewDryRunAPI()/Desc to implement the
fix.
shortcuts/okr/okr_image_upload.go (2)

105-108: Minor: prefer strconv.Itoa over fmt.Sprintf("%d", ...).

Micro-readability/perf nit: fd.AddField("target_type", strconv.Itoa(targetTypeVal)) is the idiomatic Go form for integer → decimal string, avoiding the reflection path inside fmt.Sprintf. strconv is already imported.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@shortcuts/okr/okr_image_upload.go` around lines 105 - 108, Replace the use of
fmt.Sprintf for converting the integer targetTypeVal to string when adding the
"target_type" form field: in the NewFormdata usage where
fd.AddField("target_type", fmt.Sprintf("%d", targetTypeVal)) is called, use
strconv.Itoa(targetTypeVal) instead (keep fd, AddField and the "target_type" key
unchanged).

91-114: Consider adding a pre-upload size check to fail fast on oversized images.

shortcuts/im/helpers.go:1128 validates file size before uploading (5 MB limit for IM images). The OKR image upload endpoint currently opens and streams the file without any size validation. Adding an analogous pre-upload check would prevent unnecessary I/O and provide clearer error messages for users. The specific size limit for the OKR endpoint is not documented in the API; consider checking Lark/Feishu OKR upload constraints or aligning with platform-wide image limits (10 MB) when implementing.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@shortcuts/okr/okr_image_upload.go` around lines 91 - 114, Add a pre-upload
size check right after the runtime.FileIO().Stat(filePath) call using
info.Size() and fail fast if the file exceeds the OKR image limit (use a named
constant like maxOKRImageSize, e.g. 10*1024*1024 if you choose 10MB); return the
same style of error used in shortcuts/im/helpers.go (around helpers.go:1128) so
the message and handling are consistent, and do this before calling
runtime.FileIO().Open(filePath) and before constructing fd with
larkcore.NewFormdata and calling runtime.DoAPI.
shortcuts/okr/okr_openapi_test.go (1)

386-399: Test adds little value beyond exercising core.ResolveOpenBaseURL.

TestParseCreateProgressRecordParams_BrandAwareSourceURL doesn't actually exercise parseCreateProgressRecordParams; it only verifies constants from core.ResolveOpenBaseURL. Consider driving the check through the actual parseCreateProgressRecordParams code path (or renaming the test) so it would catch regressions in the OKR-side brand-aware default logic rather than just the core helper.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@shortcuts/okr/okr_openapi_test.go` around lines 386 - 399, Test currently
only exercises core.ResolveOpenBaseURL; instead invoke the OKR parsing path so
the test covers parseCreateProgressRecordParams logic. Update
TestParseCreateProgressRecordParams_BrandAwareSourceURL to construct a minimal
ContentBlock JSON input, call parseCreateProgressRecordParams with BrandFeishu
and BrandLark, and assert the returned params/sourceURL equals
core.ResolveOpenBaseURL(core.BrandFeishu)+"/app" and
core.ResolveOpenBaseURL(core.BrandLark)+"/app" respectively; alternatively, if
you intend to keep it as a unit test of the helper, rename the test to reflect
core.ResolveOpenBaseURL behavior. Use the existing test name and function
parseCreateProgressRecordParams and the constants
core.BrandFeishu/core.BrandLark in your assertions to make the intent clear.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@shortcuts/okr/okr_image_upload_test.go`:
- Around line 132-143: The test stub registered via reg.Register using
httpmock.Stub returns a fake "file_token" value of "xxxxxxxxx" which triggers
Gitleaks; update the stub in the POST "/open-apis/okr/v1/images/upload" block to
use a clearly non-secret placeholder (e.g., "test-file-token" or
"placeholder-file-token") for the "file_token" field so assertions still pass
but avoid secret-shaped literals in the map returned by the stub.

In `@shortcuts/okr/okr_openapi.go`:
- Around line 378-380: ContentGalleryV1 currently reuses ContentImageItem which
serializes JSON with snake_case tags (file_token) but the OKR v1 API expects
camelCase (fileToken), so update the model and conversion logic: define a
V1-specific image struct (e.g., ContentImageItemV1 or similar) with json tags
using camelCase, change ContentGalleryV1.ImageList to use that type, and modify
ContentGallery.ToV1() and ContentGalleryV1.ToV2() to map fields explicitly
(create new V1 image instances copying fileToken/src/width/height from V2 items
and vice versa) instead of assigning the slice by reference so the serialized
JSON uses the correct camelCase keys.
- Around line 711-721: The Progress struct's UpdateTime field must be renamed to
ModifyTime and its json tag changed from `update_time` to `modify_time` so
unmarshalling captures the API's `modify_time` value; update the Progress type
definition (field previously named UpdateTime) to ModifyTime
`json:"modify_time"` and search/replace all references/usages of
Progress.UpdateTime (e.g., any code reading/writing UpdateTime, methods, tests,
or JSON handling) to use Progress.ModifyTime to keep the codebase consistent.
- Around line 530-538: ContentMention.ToV1() currently maps UserID -> OpenID
without checking that the ID is actually an open_id, which can silently mislabel
union_id/user_id values; update handling so either: validate mention IDs against
the chosen --user-id-type and return an error (or skip/convert) when mismatched,
or restrict/annotate the CLI flag when content contains mentions (e.g., require
--user-id-type=open_id), and add clear help text documenting the limitation;
locate the conversion in ContentMention.ToV1() and the CLI flag
parsing/validation logic for --user-id-type to implement ID-type checks and
surface validation errors or update the flag help text accordingly.

In `@skills/lark-okr/references/lark-okr-entities.md`:
- Line 174: Replace the typo "oke +progress-list" with the correct shortcut "okr
+progress-list" in the references table entry that links to
lark-okr-progress-list.md so the shortcut matches the other entries and the link
target; search for the exact string "oke +progress-list" and update it to "okr
+progress-list" to keep naming consistent.
- Around line 325-328: The bottom reference list is missing the entry for the
progress-list operation; add a new list item for "okr +progress-list" pointing
to lark-okr-progress-list.md (consistent with the other entries like "okr
+progress-get", "okr +progress-create", etc.) so the documented inline "okr
+progress-list" (mentioned earlier) is included in the references; ensure the
format and ordering match the existing four entries.

In `@skills/lark-okr/references/lark-okr-image-upload.md`:
- Around line 43-50: Replace the secret-looking placeholder value for the JSON
key "file_token" (currently "XXXXXXXXX") with a clearly non-credential
placeholder such as REPLACE_WITH_FILE_TOKEN or example-file-token in the Lark
OKR image upload example; update both the inline example under the "file_token"
key and the gallery example (the duplicate at line 84) so neither uses a generic
API-key shaped string and Gitleaks false positives are avoided.

---

Duplicate comments:
In `@README.zh.md`:
- Around line 15-16: Update the "为 Agent 原生设计" bullet that currently reads "22 个
[Skills](./skills/)" to "23 个 [Skills](./skills/)" so it matches the other
occurrences; look for the exact text "为 Agent 原生设计 — 22 个 [Skills](./skills/)"
in README.zh.md and replace 22 with 23 to keep the document consistent with the
"23 个" used elsewhere.

In `@shortcuts/okr/okr_image_upload.go`:
- Around line 51-54: The extension check uses filepath.Ext(filePath) and looks
it up in allowedImageExts but misses mixed-case extensions; normalize ext to
lowercase (e.g., strings.ToLower(ext)) before the lookup so files like
"photo.PNG", "logo.JPG", or "pic.HEIC" are accepted by the existing
allowedImageExts map in the same validation block in okr_image_upload.go.

In `@shortcuts/okr/okr_progress_create.go`:
- Around line 155-157: Fix the grammar and clarify direction in the error string
inside the check that validates runtime.Str("progress-percent") — update the
common.FlagErrorf call currently returning "--progress-percent must provided
with --progress-status" to a correct, clearer message such as
"--progress-percent must be provided when --progress-status is set" (locate the
check using runtime.Str("progress-percent") and the common.FlagErrorf invocation
in okr_progress_create.go).

In `@shortcuts/okr/okr_progress_update.go`:
- Around line 96-106: The validation currently allows --progress-status without
--progress-percent, but parseUpdateProgressRecordParams only sets
progressRate.Status when a percent is provided so status changes get dropped;
update the Validate logic to require that if runtime.Str("progress-status") is
non-empty then runtime.Str("progress-percent") must also be provided (return a
FlagErrorf if not), mirror the same cross-check used in the create flow, and
also update the progress-status flag description to mention that status requires
supplying --progress-percent so callers know the constraint; ensure
ParseProgressStatus and parseUpdateProgressRecordParams behavior remains
consistent with this validation.

---

Nitpick comments:
In `@shortcuts/okr/okr_image_upload.go`:
- Around line 105-108: Replace the use of fmt.Sprintf for converting the integer
targetTypeVal to string when adding the "target_type" form field: in the
NewFormdata usage where fd.AddField("target_type", fmt.Sprintf("%d",
targetTypeVal)) is called, use strconv.Itoa(targetTypeVal) instead (keep fd,
AddField and the "target_type" key unchanged).
- Around line 91-114: Add a pre-upload size check right after the
runtime.FileIO().Stat(filePath) call using info.Size() and fail fast if the file
exceeds the OKR image limit (use a named constant like maxOKRImageSize, e.g.
10*1024*1024 if you choose 10MB); return the same style of error used in
shortcuts/im/helpers.go (around helpers.go:1128) so the message and handling are
consistent, and do this before calling runtime.FileIO().Open(filePath) and
before constructing fd with larkcore.NewFormdata and calling runtime.DoAPI.

In `@shortcuts/okr/okr_openapi_test.go`:
- Around line 386-399: Test currently only exercises core.ResolveOpenBaseURL;
instead invoke the OKR parsing path so the test covers
parseCreateProgressRecordParams logic. Update
TestParseCreateProgressRecordParams_BrandAwareSourceURL to construct a minimal
ContentBlock JSON input, call parseCreateProgressRecordParams with BrandFeishu
and BrandLark, and assert the returned params/sourceURL equals
core.ResolveOpenBaseURL(core.BrandFeishu)+"/app" and
core.ResolveOpenBaseURL(core.BrandLark)+"/app" respectively; alternatively, if
you intend to keep it as a unit test of the helper, rename the test to reflect
core.ResolveOpenBaseURL behavior. Use the existing test name and function
parseCreateProgressRecordParams and the constants
core.BrandFeishu/core.BrandLark in your assertions to make the intent clear.

In `@shortcuts/okr/okr_progress_create.go`:
- Around line 166-186: The DryRun closure currently ignores errors from
parseCreateProgressRecordParams (p, _ :=
parseCreateProgressRecordParams(runtime)), which can lead to nil derefs when
using p.UserIDType, p.TargetID, etc.; update DryRun in okr_progress_create.go to
handle the error: call parseCreateProgressRecordParams and if err != nil return
a common.NewDryRunAPI() that describes the parse error (e.g., via Desc) so the
error is surfaced, or at minimum add a nil guard before dereferencing p and
return a descriptive DryRunAPI when p == nil; reference the DryRun function,
parseCreateProgressRecordParams, and common.NewDryRunAPI()/Desc to implement the
fix.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 23ec4734-2f30-49d0-b64e-17bb2cc6d9fd

📥 Commits

Reviewing files that changed from the base of the PR and between 2a9b376 and 2bfb322.

📒 Files selected for processing (31)
  • README.md
  • README.zh.md
  • internal/registry/service_descriptions.json
  • shortcuts/okr/okr_cli_resp.go
  • shortcuts/okr/okr_image_upload.go
  • shortcuts/okr/okr_image_upload_test.go
  • shortcuts/okr/okr_openapi.go
  • shortcuts/okr/okr_openapi_test.go
  • shortcuts/okr/okr_progress_create.go
  • shortcuts/okr/okr_progress_create_test.go
  • shortcuts/okr/okr_progress_delete.go
  • shortcuts/okr/okr_progress_delete_test.go
  • shortcuts/okr/okr_progress_get.go
  • shortcuts/okr/okr_progress_get_test.go
  • shortcuts/okr/okr_progress_list.go
  • shortcuts/okr/okr_progress_list_test.go
  • shortcuts/okr/okr_progress_update.go
  • shortcuts/okr/okr_progress_update_test.go
  • shortcuts/okr/shortcuts.go
  • skills/lark-okr/SKILL.md
  • skills/lark-okr/references/lark-okr-contentblock.md
  • skills/lark-okr/references/lark-okr-cycle-detail.md
  • skills/lark-okr/references/lark-okr-cycle-list.md
  • skills/lark-okr/references/lark-okr-entities.md
  • skills/lark-okr/references/lark-okr-image-upload.md
  • skills/lark-okr/references/lark-okr-progress-create.md
  • skills/lark-okr/references/lark-okr-progress-delete.md
  • skills/lark-okr/references/lark-okr-progress-get.md
  • skills/lark-okr/references/lark-okr-progress-list.md
  • skills/lark-okr/references/lark-okr-progress-update.md
  • tests/cli_e2e/okr/okr_progress_test.go
✅ Files skipped from review due to trivial changes (13)
  • skills/lark-okr/references/lark-okr-contentblock.md
  • shortcuts/okr/shortcuts.go
  • internal/registry/service_descriptions.json
  • skills/lark-okr/references/lark-okr-cycle-detail.md
  • shortcuts/okr/okr_progress_update_test.go
  • skills/lark-okr/references/lark-okr-progress-list.md
  • skills/lark-okr/references/lark-okr-progress-delete.md
  • shortcuts/okr/okr_progress_get_test.go
  • skills/lark-okr/references/lark-okr-progress-get.md
  • shortcuts/okr/okr_progress_delete_test.go
  • shortcuts/okr/okr_progress_list_test.go
  • shortcuts/okr/okr_progress_create_test.go
  • tests/cli_e2e/okr/okr_progress_test.go
🚧 Files skipped from review as they are similar to previous changes (5)
  • skills/lark-okr/references/lark-okr-cycle-list.md
  • shortcuts/okr/okr_progress_delete.go
  • README.md
  • skills/lark-okr/references/lark-okr-progress-create.md
  • skills/lark-okr/SKILL.md

Comment thread shortcuts/okr/okr_image_upload_test.go
Comment thread shortcuts/okr/okr_openapi.go
Comment thread shortcuts/okr/okr_openapi.go
Comment thread shortcuts/okr/okr_openapi.go
Comment thread skills/lark-okr/references/lark-okr-entities.md Outdated
Comment thread skills/lark-okr/references/lark-okr-entities.md
Comment thread skills/lark-okr/references/lark-okr-image-upload.md
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
skills/lark-okr/references/lark-okr-entities.md (1)

7-15: ⚠️ Potential issue | 🟡 Minor

Fix the tree connectors for the new progress-record nodes.

The added ProgressRecord siblings make both branches show multiple └── terminal children. Use ├── for non-final siblings so the overview renders the intended hierarchy.

🛠️ Proposed docs fix
 Cycle (用户周期)
   └── Objective (目标)
         ├── KeyResult (关键结果)
-        │     └── Indicator (指标)
+        │     ├── Indicator (指标)
         │     └── list<ProgressRecord> (进展记录列表)
-        └── Indicator (指标)
+        ├── Indicator (指标)
         └── list<ProgressRecord> (进展记录列表)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-okr/references/lark-okr-entities.md` around lines 7 - 15, The
ASCII-tree showing Cycle → Objective → KeyResult/Indicator has incorrect
terminal connectors: both ProgressRecord siblings are using "└──" which makes
multiple terminal children appear as final nodes; update the tree under
Objective and under KeyResult so non-final children use "├──" and only the last
child uses "└──" — adjust the lines for Indicator and
list<ProgressRecord>/ProgressRecord nodes (references: Cycle, Objective,
KeyResult, Indicator, list<ProgressRecord>, ProgressRecord) so the hierarchy
renders correctly.
♻️ Duplicate comments (3)
README.zh.md (1)

15-15: ⚠️ Potential issue | 🟡 Minor

Fix the inconsistent skill count.

Line 15 still says "22 个" but should be "23 个" to match the updated counts on Lines 9 and 16.

📝 Proposed fix
-- **为 Agent 原生设计** — 22 个 [Skills](./skills/) 开箱即用,适配主流 AI 工具,Agent 无需额外适配即可操作飞书
+- **为 Agent 原生设计** — 23 个 [Skills](./skills/) 开箱即用,适配主流 AI 工具,Agent 无需额外适配即可操作飞书
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.zh.md` at line 15, Update the inconsistent skill count in the README
by changing the phrase "**为 Agent 原生设计** — 22 个 [Skills](./skills/) 开箱即用..." to
use "23 个" so it matches the counts on Lines 9 and 16; locate the exact text
snippet "**为 Agent 原生设计** — 22 个 [Skills](./skills/)" and replace "22" with
"23".
skills/lark-okr/references/lark-okr-entities.md (1)

320-328: ⚠️ Potential issue | 🟡 Minor

Restore the missing okr +progress-list reference.

Line 174 documents okr +progress-list, but the bottom reference index still omits it, so readers cannot discover the list reference from this section.

🛠️ Proposed docs fix
 - [okr +progress-get](lark-okr-progress-get.md) — 获取进展记录
 - [okr +progress-create](lark-okr-progress-create.md) — 创建进展记录
 - [okr +progress-update](lark-okr-progress-update.md) — 更新进展记录
 - [okr +progress-delete](lark-okr-progress-delete.md) — 删除进展记录
+- [okr +progress-list](lark-okr-progress-list.md) — 列出进展记录
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-okr/references/lark-okr-entities.md` around lines 320 - 328, Add
the missing reference entry for "okr +progress-list" to the bottom reference
list so the documented "okr +progress-list" (mentioned around line 174) is
discoverable; follow the same bullet format as the other entries and add a line
like "- [okr +progress-list](lark-okr-progress-list.md) — 列出进展记录" in the
references block that contains "okr +progress-get", "okr +progress-create",
etc., ensuring the link target uses the corresponding file name for the
progress-list page.
shortcuts/okr/okr_progress_create.go (1)

223-228: ⚠️ Potential issue | 🟡 Minor

Remove the internal ProgressV1 name from CLI output.

The human-readable output still exposes the internal API model name. Use the domain label already used by the get/update shortcuts.

Suggested output text fix
-			fmt.Fprintf(w, "Created ProgressV1 Record [%s]\n", resp.ID)
+			fmt.Fprintf(w, "Created Progress Record [%s]\n", resp.ID)
 			fmt.Fprintf(w, "  ModifyTime: %s\n", resp.ModifyTime)
 			if resp.ProgressRate != nil && resp.ProgressRate.Percent != nil {
-				fmt.Fprintf(w, "  ProgressV1: %.1f%%\n", *resp.ProgressRate.Percent)
+				fmt.Fprintf(w, "  Progress: %.1f%%\n", *resp.ProgressRate.Percent)
 			}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@shortcuts/okr/okr_progress_create.go` around lines 223 - 228, The CLI output
is leaking the internal model name "ProgressV1"; update the runtime.OutFormat
block that prints the created record (referencing runtime.OutFormat, resp.ID,
resp.ModifyTime, resp.ProgressRate) to remove "ProgressV1" and use the domain
label used by the get/update shortcuts (e.g., "Progress" or "Progress Record")
instead; change the fmt.Fprintf that currently prints "Created ProgressV1 Record
[%s]\n" to the domain-friendly text and keep the existing ModifyTime and
ProgressRate formatting unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@shortcuts/okr/okr_openapi_test.go`:
- Around line 290-312: Extend TestContentBlockV1JSON to include a gallery
ContentBlockElementV1 that contains a ContentGalleryV1 with at least one
ContentImageItemV1 so JSON serialization asserts the expected V1 keys (use the
struct field that maps to "fileToken" rather than "file_token"); specifically
add an element referencing ContentGalleryV1 and a ContentImageItemV1 (with its
FileToken set to a test value) and assert the marshaled JSON contains "gallery",
"imageItem" (or the gallery/item key used), and "fileToken" and the token string
to prevent regression of the JSON tag behavior for ContentImageItemV1.

In `@shortcuts/okr/okr_progress_create.go`:
- Around line 60-63: The percent parsing currently allows huge and negative
values; change the validation in the runtime.Str("progress-percent") parsing
paths to enforce the documented 0–100 range: after strconv.ParseFloat(v, 64)
keep the existing NaN/Inf checks but replace percent < -99999999999 || percent >
99999999999 with percent < 0 || percent > 100 and return an error message like
"--progress-percent must be a number between 0 and 100". Apply the same change
to the other parsing branches that set progress_rate.percent so all assignments
to progress_rate.percent validate 0–100 consistently.

In `@shortcuts/okr/okr_progress_update.go`:
- Around line 37-40: The progress-percent parsing currently allows negative and
>100 values; update the validation in the runtime.Str("progress-percent")
parsing branch (and the other occurrences handling the parsed percent at the
other two locations) to keep the NaN/Inf guards but enforce percent >= 0 &&
percent <= 100, and return the FlagErrorf with a corrected message like
"--progress-percent must be a number between 0 and 100" when out of range; look
for the percent variable and strconv.ParseFloat usage and replace the current
extreme bounds check with the 0–100 range check for all three occurrences.

In `@skills/lark-okr/references/lark-okr-entities.md`:
- Around line 308-316: Add the image-upload OAuth scope row to the scopes table:
insert a row for `okr:okr.progress.file:upload` with permission type "写" and
description like "上传/附加图像或文件到进展记录 (用于 okr +upload-image)"; update any
surrounding ordering/formatting so the table remains aligned and consistent with
other `okr:okr.progress:*` entries (reference the existing table and rows such
as `okr:okr.progress:readonly`, `okr:okr.progress:writeonly`, and
`okr:okr.progress:delete` to place this new scope).

---

Outside diff comments:
In `@skills/lark-okr/references/lark-okr-entities.md`:
- Around line 7-15: The ASCII-tree showing Cycle → Objective →
KeyResult/Indicator has incorrect terminal connectors: both ProgressRecord
siblings are using "└──" which makes multiple terminal children appear as final
nodes; update the tree under Objective and under KeyResult so non-final children
use "├──" and only the last child uses "└──" — adjust the lines for Indicator
and list<ProgressRecord>/ProgressRecord nodes (references: Cycle, Objective,
KeyResult, Indicator, list<ProgressRecord>, ProgressRecord) so the hierarchy
renders correctly.

---

Duplicate comments:
In `@README.zh.md`:
- Line 15: Update the inconsistent skill count in the README by changing the
phrase "**为 Agent 原生设计** — 22 个 [Skills](./skills/) 开箱即用..." to use "23 个" so it
matches the counts on Lines 9 and 16; locate the exact text snippet "**为 Agent
原生设计** — 22 个 [Skills](./skills/)" and replace "22" with "23".

In `@shortcuts/okr/okr_progress_create.go`:
- Around line 223-228: The CLI output is leaking the internal model name
"ProgressV1"; update the runtime.OutFormat block that prints the created record
(referencing runtime.OutFormat, resp.ID, resp.ModifyTime, resp.ProgressRate) to
remove "ProgressV1" and use the domain label used by the get/update shortcuts
(e.g., "Progress" or "Progress Record") instead; change the fmt.Fprintf that
currently prints "Created ProgressV1 Record [%s]\n" to the domain-friendly text
and keep the existing ModifyTime and ProgressRate formatting unchanged.

In `@skills/lark-okr/references/lark-okr-entities.md`:
- Around line 320-328: Add the missing reference entry for "okr +progress-list"
to the bottom reference list so the documented "okr +progress-list" (mentioned
around line 174) is discoverable; follow the same bullet format as the other
entries and add a line like "- [okr +progress-list](lark-okr-progress-list.md) —
列出进展记录" in the references block that contains "okr +progress-get", "okr
+progress-create", etc., ensuring the link target uses the corresponding file
name for the progress-list page.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0d654077-33fe-42b3-b20d-dc961623e9ae

📥 Commits

Reviewing files that changed from the base of the PR and between 2bfb322 and 61ff1a0.

📒 Files selected for processing (31)
  • README.md
  • README.zh.md
  • internal/registry/service_descriptions.json
  • shortcuts/okr/okr_cli_resp.go
  • shortcuts/okr/okr_image_upload.go
  • shortcuts/okr/okr_image_upload_test.go
  • shortcuts/okr/okr_openapi.go
  • shortcuts/okr/okr_openapi_test.go
  • shortcuts/okr/okr_progress_create.go
  • shortcuts/okr/okr_progress_create_test.go
  • shortcuts/okr/okr_progress_delete.go
  • shortcuts/okr/okr_progress_delete_test.go
  • shortcuts/okr/okr_progress_get.go
  • shortcuts/okr/okr_progress_get_test.go
  • shortcuts/okr/okr_progress_list.go
  • shortcuts/okr/okr_progress_list_test.go
  • shortcuts/okr/okr_progress_update.go
  • shortcuts/okr/okr_progress_update_test.go
  • shortcuts/okr/shortcuts.go
  • skills/lark-okr/SKILL.md
  • skills/lark-okr/references/lark-okr-contentblock.md
  • skills/lark-okr/references/lark-okr-cycle-detail.md
  • skills/lark-okr/references/lark-okr-cycle-list.md
  • skills/lark-okr/references/lark-okr-entities.md
  • skills/lark-okr/references/lark-okr-image-upload.md
  • skills/lark-okr/references/lark-okr-progress-create.md
  • skills/lark-okr/references/lark-okr-progress-delete.md
  • skills/lark-okr/references/lark-okr-progress-get.md
  • skills/lark-okr/references/lark-okr-progress-list.md
  • skills/lark-okr/references/lark-okr-progress-update.md
  • tests/cli_e2e/okr/okr_progress_test.go
✅ Files skipped from review due to trivial changes (17)
  • README.md
  • skills/lark-okr/references/lark-okr-contentblock.md
  • internal/registry/service_descriptions.json
  • skills/lark-okr/references/lark-okr-cycle-detail.md
  • shortcuts/okr/okr_progress_delete.go
  • skills/lark-okr/references/lark-okr-progress-delete.md
  • shortcuts/okr/shortcuts.go
  • skills/lark-okr/references/lark-okr-progress-list.md
  • skills/lark-okr/references/lark-okr-progress-get.md
  • skills/lark-okr/references/lark-okr-progress-create.md
  • skills/lark-okr/references/lark-okr-cycle-list.md
  • shortcuts/okr/okr_progress_delete_test.go
  • shortcuts/okr/okr_progress_list_test.go
  • tests/cli_e2e/okr/okr_progress_test.go
  • shortcuts/okr/okr_progress_list.go
  • shortcuts/okr/okr_progress_create_test.go
  • shortcuts/okr/okr_cli_resp.go
🚧 Files skipped from review as they are similar to previous changes (3)
  • skills/lark-okr/SKILL.md
  • shortcuts/okr/okr_progress_update_test.go
  • shortcuts/okr/okr_image_upload_test.go

Comment thread shortcuts/okr/okr_openapi_test.go
Comment thread shortcuts/okr/okr_progress_create.go
Comment thread shortcuts/okr/okr_progress_update.go
Comment thread skills/lark-okr/references/lark-okr-entities.md Outdated
@syh-cpdsss syh-cpdsss force-pushed the feat/okr_dev branch 3 times, most recently from 8bcab00 to 556e0b2 Compare April 21, 2026 11:51
Change-Id: I06878082fb42e341bb807dac91732489708700d1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XL Architecture-level or global-impact change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant