Skip to content

feat(base): support per-record batch updates#1889

Open
kongenpei wants to merge 7 commits into
mainfrom
feat/batch-update-records-map
Open

feat(base): support per-record batch updates#1889
kongenpei wants to merge 7 commits into
mainfrom
feat/batch-update-records-map

Conversation

@kongenpei

@kongenpei kongenpei commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add an update_records map to base record-batch-update so each record can receive different field values in one request while preserving the existing shared-fields mode.

Changes

  • Forward update_records as a record ID to fields map and derive the request record ID list from its keys.
  • Document the new input shape and per-field value conventions in the lark-base skill.
  • Add shortcut contract tests plus dry-run and live Base E2E coverage, including order-independent response assertions and readback checks.

Test Plan

  • Unit tests pass in PR CI
  • Online live E2E currently fails with API code 800010701 because update_records has not rolled out to the production backend; this is expected until rollout
  • Manual local verification confirms the lark-cli base +record-batch-update flow works as expected in BOE boe_node_mcp_test
  • Scoped dry-run E2E and Base package compile checks pass
  • go vet ./... passes
  • gofmt -l . produces no output
  • go mod tidy produces no changes
  • golangci-lint reports 0 issues with GOFLAGS=-buildvcs=false (local worktree VCS stamping workaround)

Related Issues

  • None

Summary by CodeRabbit

  • New Features
    • base +record-batch-update supports per-record field updates via update_records (record ID → fields) alongside the shared record_id_list + patch mode; the two input shapes are mutually exclusive.
  • Documentation
    • Refreshed command help and skill/reference docs with updated --json examples and guidance for both update modes, including how empty data may be returned.
  • Tests
    • Added CLI E2E dry-run and workflow coverage for per-record updates, including behavior when a record ID is missing.
    • Updated E2E coverage reporting and expectations for the updated help text.

@github-actions github-actions Bot added domain/base PR touches the base domain size/M Single-domain feat or fix with limited business impact labels Jul 14, 2026
@coderabbitai

coderabbitai Bot commented Jul 14, 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: 3f8161eb-c7ce-48c0-babd-24ea556914e6

📥 Commits

Reviewing files that changed from the base of the PR and between e535e36 and 8f4cb89.

📒 Files selected for processing (2)
  • shortcuts/base/base_execute_test.go
  • tests/cli_e2e/base/base_record_batch_update_workflow_test.go
💤 Files with no reviewable changes (2)
  • tests/cli_e2e/base/base_record_batch_update_workflow_test.go
  • shortcuts/base/base_execute_test.go

📝 Walkthrough

Walkthrough

The PR documents two mutually exclusive Base record batch update payloads: shared patch and per-record update_records. It adds unit and CLI E2E coverage for per-record updates, including dry-run requests, persisted field values, and missing-record responses.

Changes

Base record batch update

Layer / File(s) Summary
Update mode documentation and help
shortcuts/base/record_batch_update.go, shortcuts/base/base_shortcuts_test.go, skills/lark-base/*, skills/lark-base/references/*
Help text, skill guidance, reference docs, and assertions describe shared patch and per-record update_records inputs as mutually exclusive modes.
Per-record passthrough verification
shortcuts/base/base_execute_test.go
A unit subtest verifies per-record updates remain intact in the outgoing request and CLI output.
CLI E2E validation and coverage
tests/cli_e2e/base/base_record_batch_update_*.go, tests/cli_e2e/base/coverage.md
Dry-run and workflow tests validate per-record requests, persisted field values, missing-record handling, and updated coverage metrics.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • larksuite/cli#277: Covers related BaseRecordBatchUpdate request passthrough behavior for shared patches.

Suggested reviewers: zgz2048, liangshuo-1

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.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 clearly and concisely summarizes the main change: adding per-record batch update support.
Description check ✅ Passed The description matches the template well, with Summary, Changes, Test Plan, and Related Issues all present and sufficiently filled out.
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 feat/batch-update-records-map

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.

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.66%. Comparing base (37d490a) to head (8f4cb89).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1889   +/-   ##
=======================================
  Coverage   74.66%   74.66%           
=======================================
  Files         877      878    +1     
  Lines       91731    91764   +33     
=======================================
+ Hits        68494    68520   +26     
- Misses      17926    17930    +4     
- Partials     5311     5314    +3     

☔ 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.

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add larksuite/cli#feat/batch-update-records-map -y -g

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

PR Quality Summary

CI did not complete successfully. Use the failed check links below to decide whether this PR needs a code change or a rerun.

Failed checks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/base PR touches the base domain size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant