Skip to content

chore(docs): hide docs api-version compatibility flag#1580

Merged
SunPeiYang996 merged 1 commit into
mainfrom
codex/drop-doc-api-version
Jun 26, 2026
Merged

chore(docs): hide docs api-version compatibility flag#1580
SunPeiYang996 merged 1 commit into
mainfrom
codex/drop-doc-api-version

Conversation

@SunPeiYang996

@SunPeiYang996 SunPeiYang996 commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Hide the deprecated docs +create/+fetch/+update --api-version compatibility flag from shortcut help while continuing to accept it.
  • Remove --api-version v2 guidance from lark-doc skills, related skill templates, README examples, and cross-skill references.
  • Add a docs dry-run e2e regression test proving the hidden compatibility flag is still accepted and ignored.

Validation

  • /Users/bytedance/.agents/skills/remote-build-test/scripts/remote-run.sh --shell 'go test ./shortcuts ./shortcuts/doc ./shortcuts/note && go build -o lark-cli . && go test ./tests/cli_e2e/doc'\n- git diff --check\n- gofmt -l shortcuts/doc/v2_only.go shortcuts/doc/v2_only_test.go shortcuts/doc/docs_create_test.go shortcuts/doc/docs_fetch_v2_test.go shortcuts/doc/docs_update_test.go shortcuts/note/note_transcript.go shortcuts/note/note_transcript_test.go shortcuts/register_test.go tests/cli_e2e/doc/docs_dryrun_test.go\n\n## Notes\n\nquick_validate.py was also tried against the touched skill directories, but the repo skills already use a version frontmatter field that the system validator rejects. No skill frontmatter format was changed in this PR.

Summary by CodeRabbit

  • New Features

    • Added an end-to-end CLI test to verify docs +fetch --dry-run works with --api-version legacy.
  • Documentation

    • Removed explicit --api-version v2 from docs +create, docs +fetch, and docs +update examples across README and skill/reference materials.
  • Bug Fixes

    • Updated shortcut help and guidance so --api-version behaves like a hidden, compatibility-only flag.
    • Improved validation behavior to ignore legacy API-version values in supported doc flows.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bd0fa949-2e5f-41c7-8b1d-2b69da1b7297

📥 Commits

Reviewing files that changed from the base of the PR and between a7f3efd and fc7648e.

📒 Files selected for processing (33)
  • README.md
  • README.zh.md
  • shortcuts/doc/docs_create_test.go
  • shortcuts/doc/docs_fetch_v2_test.go
  • shortcuts/doc/docs_update_test.go
  • shortcuts/doc/v2_only.go
  • shortcuts/doc/v2_only_test.go
  • shortcuts/note/note_transcript.go
  • shortcuts/note/note_transcript_test.go
  • shortcuts/register_test.go
  • skill-template/domains/doc.md
  • skill-template/domains/drive.md
  • skills/lark-doc/SKILL.md
  • skills/lark-doc/references/lark-doc-create.md
  • skills/lark-doc/references/lark-doc-fetch.md
  • skills/lark-doc/references/lark-doc-md.md
  • skills/lark-doc/references/lark-doc-media-insert.md
  • skills/lark-doc/references/lark-doc-update.md
  • skills/lark-doc/references/lark-doc-whiteboard.md
  • skills/lark-doc/references/style/lark-doc-create-workflow.md
  • skills/lark-doc/references/style/lark-doc-update-workflow.md
  • skills/lark-drive/SKILL.md
  • skills/lark-drive/references/lark-drive-add-comment.md
  • skills/lark-drive/references/lark-drive-comment-location.md
  • skills/lark-drive/references/lark-drive-files-list.md
  • skills/lark-note/SKILL.md
  • skills/lark-note/references/lark-note-detail.md
  • skills/lark-note/references/lark-note-transcript.md
  • skills/lark-vc/SKILL.md
  • skills/lark-vc/references/vc-domain-boundaries.md
  • skills/lark-whiteboard/references/lark-whiteboard-workflow.md
  • skills/lark-workflow-meeting-summary/SKILL.md
  • tests/cli_e2e/doc/docs_dryrun_test.go
✅ Files skipped from review due to trivial changes (17)
  • skill-template/domains/doc.md
  • skills/lark-drive/SKILL.md
  • README.zh.md
  • skill-template/domains/drive.md
  • skills/lark-drive/references/lark-drive-files-list.md
  • README.md
  • shortcuts/note/note_transcript.go
  • skills/lark-doc/references/style/lark-doc-update-workflow.md
  • skills/lark-doc/references/lark-doc-media-insert.md
  • skills/lark-doc/references/lark-doc-fetch.md
  • shortcuts/note/note_transcript_test.go
  • skills/lark-doc/SKILL.md
  • skills/lark-whiteboard/references/lark-whiteboard-workflow.md
  • skills/lark-doc/references/lark-doc-md.md
  • skills/lark-drive/references/lark-drive-comment-location.md
  • skills/lark-drive/references/lark-drive-add-comment.md
  • skills/lark-doc/references/lark-doc-create.md
🚧 Files skipped from review as they are similar to previous changes (13)
  • shortcuts/doc/docs_update_test.go
  • skills/lark-note/references/lark-note-detail.md
  • skills/lark-workflow-meeting-summary/SKILL.md
  • tests/cli_e2e/doc/docs_dryrun_test.go
  • skills/lark-doc/references/lark-doc-whiteboard.md
  • skills/lark-doc/references/style/lark-doc-create-workflow.md
  • shortcuts/doc/v2_only_test.go
  • skills/lark-note/SKILL.md
  • skills/lark-doc/references/lark-doc-update.md
  • shortcuts/doc/docs_create_test.go
  • shortcuts/register_test.go
  • shortcuts/doc/v2_only.go
  • shortcuts/doc/docs_fetch_v2_test.go

📝 Walkthrough

Walkthrough

The PR removes explicit --api-version v2 usage from docs shortcut behavior, shortcut tests, note hints, and multiple docs/reference files. Related examples, workflow docs, and routing guidance now use the ignored compatibility flag behavior or omit the flag entirely.

Changes

Docs api-version cleanup

Layer / File(s) Summary
Shortcut flag behavior
shortcuts/doc/v2_only.go, shortcuts/doc/v2_only_test.go, shortcuts/register_test.go
The docs shortcut compatibility flag is described as ignored, validation no longer inspects api-version, and the help tests expect it hidden.
Shortcut tests
shortcuts/doc/docs_create_test.go, shortcuts/doc/docs_fetch_v2_test.go, shortcuts/doc/docs_update_test.go, tests/cli_e2e/doc/docs_dryrun_test.go
The docs shortcut tests drop explicit --api-version arguments, switch compatibility checks to legacy, and keep the same request/output assertions.
Create and fetch docs references
README.md, README.zh.md, skill-template/domains/doc.md, skills/lark-doc/SKILL.md, skills/lark-doc/references/lark-doc-create.md, skills/lark-doc/references/lark-doc-fetch.md, skills/lark-doc/references/lark-doc-md.md, skills/lark-doc/references/style/lark-doc-create-workflow.md
Top-level examples, the lark-doc skill, and create/fetch reference docs remove explicit --api-version v2 from docs +create and docs +fetch examples and parameter tables.
Update and workflow docs
skills/lark-doc/references/lark-doc-update.md, skills/lark-doc/references/lark-doc-media-insert.md, skills/lark-doc/references/lark-doc-whiteboard.md, skills/lark-doc/references/style/lark-doc-update-workflow.md, skills/lark-whiteboard/references/lark-whiteboard-workflow.md, skills/lark-workflow-meeting-summary/SKILL.md
The update reference docs, whiteboard workflow docs, and workflow templates remove explicit --api-version v2 from docs +update and related fetch examples.
Note shortcut hint
shortcuts/note/note_transcript.go, shortcuts/note/note_transcript_test.go
The note transcript validation hint now recommends docs +fetch --doc <token> without --api-version v2.
Note and drive guidance
skill-template/domains/drive.md, skills/lark-drive/SKILL.md, skills/lark-drive/references/lark-drive-add-comment.md, skills/lark-drive/references/lark-drive-comment-location.md, skills/lark-drive/references/lark-drive-files-list.md, skills/lark-note/SKILL.md, skills/lark-note/references/lark-note-detail.md, skills/lark-note/references/lark-note-transcript.md, skills/lark-vc/SKILL.md, skills/lark-vc/references/vc-domain-boundaries.md
The note and drive skills, references, and templates remove --api-version v2 from fetch, block-id lookup, and note routing guidance.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • larksuite/cli#1291: Same docs shortcut compat-flag path in shortcuts/doc/* and shortcuts/register_test.go.
  • larksuite/cli#710: Same docs shortcut help wiring and visibility assertions for --api-version.
  • larksuite/cli#1283: Same skills/lark-doc/SKILL.md guidance area that this PR also edits.

Suggested labels

documentation, domain/ccm, size/M

Suggested reviewers

  • zhaoleibd

Poem

🐇 I hopped through docs by moonlit light,
--api-version v2 drifted out of sight.
Fetch, update, create now hum along,
With hints and guides all tidy and strong.
Thump-thump — the carrot trail feels right.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.00% 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 is concise and accurately summarizes the main change: hiding the docs api-version compatibility flag.
Description check ✅ Passed The description covers the main summary and validation details, and is mostly complete despite missing separate Changes and Related Issues sections.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/drop-doc-api-version

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.

@github-actions github-actions Bot added domain/ccm PR touches the ccm domain domain/vc PR touches the vc domain size/L Large or sensitive change across domains or core paths labels Jun 25, 2026
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.66%. Comparing base (6b83325) to head (fc7648e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1580      +/-   ##
==========================================
- Coverage   74.66%   74.66%   -0.01%     
==========================================
  Files         804      804              
  Lines       81036    81032       -4     
==========================================
- Hits        60505    60501       -4     
  Misses      16029    16029              
  Partials     4502     4502              

☔ View full report in Codecov by Harness.
📢 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.

@SunPeiYang996 SunPeiYang996 force-pushed the codex/drop-doc-api-version branch 4 times, most recently from 237c647 to 7e20181 Compare June 25, 2026 13:27
@SunPeiYang996 SunPeiYang996 marked this pull request as ready for review June 25, 2026 13:40
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add larksuite/cli#codex/drop-doc-api-version -y -g

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills/lark-drive/references/lark-drive-add-comment.md`:
- Around line 158-162: The local comment example is missing the required
document input for block-id retrieval, so update the `--block-id` description in
the markdown to use the same complete `docs +fetch --doc <TOKEN> --detail
with-ids` form already shown below. Keep the wording consistent by ensuring the
`--block-id` guidance and the “局部评论需要先获取 block ID” step both reference the full
command with `--doc <TOKEN>`.

In `@skills/lark-workflow-meeting-summary/SKILL.md`:
- Around line 105-107: The `lark-cli docs +create` example in `SKILL.md` still
puts the document title inside `--content` instead of using the Markdown title
flag. Update the create example to follow the `lark-doc-create` guidance by
passing the title through `--title`, and keep `--content` for the body only; the
`docs +update` append example can remain as-is.
🪄 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: ee0afe3b-d964-47ae-8c24-371685c19036

📥 Commits

Reviewing files that changed from the base of the PR and between 806e867 and 7e20181.

📒 Files selected for processing (34)
  • README.md
  • README.zh.md
  • shortcuts/doc/docs_create_test.go
  • shortcuts/doc/docs_fetch_v2_test.go
  • shortcuts/doc/docs_update_test.go
  • shortcuts/doc/v2_only.go
  • shortcuts/doc/v2_only_test.go
  • shortcuts/note/note_transcript.go
  • shortcuts/note/note_transcript_test.go
  • shortcuts/register_test.go
  • skill-template/domains/doc.md
  • skill-template/domains/drive.md
  • skills/lark-doc/SKILL.md
  • skills/lark-doc/references/lark-doc-create.md
  • skills/lark-doc/references/lark-doc-fetch.md
  • skills/lark-doc/references/lark-doc-md.md
  • skills/lark-doc/references/lark-doc-media-insert.md
  • skills/lark-doc/references/lark-doc-update.md
  • skills/lark-doc/references/lark-doc-whiteboard.md
  • skills/lark-doc/references/style/lark-doc-create-workflow.md
  • skills/lark-doc/references/style/lark-doc-update-workflow.md
  • skills/lark-drive/SKILL.md
  • skills/lark-drive/references/lark-drive-add-comment.md
  • skills/lark-drive/references/lark-drive-comment-location.md
  • skills/lark-drive/references/lark-drive-files-list.md
  • skills/lark-note/SKILL.md
  • skills/lark-note/references/lark-note-detail.md
  • skills/lark-note/references/lark-note-transcript.md
  • skills/lark-vc/SKILL.md
  • skills/lark-vc/references/lark-vc-notes.md
  • skills/lark-vc/references/vc-domain-boundaries.md
  • skills/lark-whiteboard/references/lark-whiteboard-workflow.md
  • skills/lark-workflow-meeting-summary/SKILL.md
  • tests/cli_e2e/doc/docs_dryrun_test.go

Comment thread skills/lark-drive/references/lark-drive-add-comment.md
Comment thread skills/lark-workflow-meeting-summary/SKILL.md
@SunPeiYang996 SunPeiYang996 force-pushed the codex/drop-doc-api-version branch 3 times, most recently from aaf2255 to a7f3efd Compare June 26, 2026 03:52
@github-actions github-actions Bot removed the domain/vc PR touches the vc domain label Jun 26, 2026
fangshuyu-768
fangshuyu-768 previously approved these changes Jun 26, 2026
@fangshuyu-768 fangshuyu-768 changed the title [codex] Hide docs api-version compatibility flag chore(docs): hide docs api-version compatibility flag Jun 26, 2026
@SunPeiYang996 SunPeiYang996 force-pushed the codex/drop-doc-api-version branch from a7f3efd to fc7648e Compare June 26, 2026 05:05
@github-actions github-actions Bot added the domain/vc PR touches the vc domain label Jun 26, 2026
@SunPeiYang996 SunPeiYang996 merged commit d9330b7 into main Jun 26, 2026
39 checks passed
@SunPeiYang996 SunPeiYang996 deleted the codex/drop-doc-api-version branch June 26, 2026 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/ccm PR touches the ccm domain domain/vc PR touches the vc domain size/L Large or sensitive change across domains or core paths

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants