Skip to content

fix(base): improve field creation and query guidance - #2114

Merged
zhouyue-bytedance merged 17 commits into
larksuite:mainfrom
huarenmin13:codex/base-field-query-guidance
Aug 7, 2026
Merged

fix(base): improve field creation and query guidance#2114
zhouyue-bytedance merged 17 commits into
larksuite:mainfrom
huarenmin13:codex/base-field-query-guidance

Conversation

@huarenmin13

@huarenmin13 huarenmin13 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Improve Base agent guidance for recurring field/query failures and remove the batch-create latency regression exposed by the new array guidance.

  • make the existing batch field-create capability discoverable in command help and the delivered Skill;
  • select field types from explicit stored-value requirements and user semantics, using names and purposes only as confirmation clues;
  • stop unsupported derived/automatic behavior instead of creating a plain storage placeholder;
  • add a compact, generic quick reference for common +data-query filter values;
  • keep same-table field writes sequential without sleeping one full second after every successful request;
  • bound large batch response/context size through explicit --jq, skip unnecessary simple-text references/readbacks, and avoid deterministic chunking, quoting, and pagination retries;
  • present typed errors before copying them into partial-failure stdout, preserve recovery extensions, and prevent extension keys from rewriting the batch ledger;
  • distinguish unchanged automatic retries from resubmissions after recovery, and classify Base write conflict 1254291 as retryable.

Changes

  • Document object-or-array input, ordered partial-failure semantics, and contract-preserving full batch success responses for +field-create.
  • Add a general field-type selection invariant that keeps formatting, derived fields, relations, and automation distinct while treating names and business purposes only as confirmation clues.
  • Add a terminal capability boundary: if documented capabilities cannot implement the requested behavior, do not probe, create a placeholder, or claim completion; report the boundary and alternatives.
  • Add common select, datetime, and empty-value filter shapes to the data-query quick guide.
  • Pace batch field creation with a 500ms minimum interval between request starts; request latency counts toward the interval, while serialization and partial-failure output stay unchanged.
  • Keep one array per table when it fits the caller timeout, and guide generated arrays toward --json @file or argv-safe invocation instead of fixed-size chunks or double-escaped shell substitutions.
  • For large successful arrays, project stdout to created / total / next-step fields while preserving the complete partial-failure envelope; next_step:done stops default field-list/get readback.
  • Let one or more minimal {name,type:text} fields use command help as a fast path; other types/properties still require the field JSON SSOT, and formula/lookup keep their mandatory guides.
  • Keep the compatible +field-list default of 100; large-schema verification can explicitly request --limit 200 --jq ....
  • Route field-create partial failures through Runtime.PresentError before copying message, typed metadata, hints, and permission extensions into the result payload.
  • Gate only unchanged automatic retries on retryable:true; non-retryable items may be resubmitted after following their authorization or input-correction hint. Register 1254291 as api/conflict/retryable:true with the canonical wait guidance.
  • Lock the guidance and pacing contracts with focused tests while keeping the full query DSL in its existing SSOT; the query-guide test rejects real case artifacts rather than blacklisting an old scenario template.

Attribution and live A/B

The evaluation report's 150-field case (base_table_032) took 197.444s on baseline and 347.016s on the PR version: a 149.572s regression. This PR makes array field creation the recommended path, which activates a pre-existing fixed one-second delay before each field after the first.

Using fresh, equivalent Bases and the same 150-text-field payload:

Version Wall time Create result Readback total
PR head 4d1fb9a0 269.64s 150/150 154
Patched f22e5b0d 118.80s 150/150 154
Throttle + review head 1eac5d23 103.58s 150/150 154

The first patched run removed 150.84s (-55.9%); the 1eac5d23 run was 166.06s faster than the old head (-61.6%). All runs produced identical create/readback counts. This directly closes the identified PR-attributable fixed-wait regression.

I also reran the original base_table_032 prompt through the agent with GPT-5.4, runs=1, jobs=1, separate fresh equivalent Bases, and the then-current merged main as the baseline:

Metric Evaluated main 7363eb54 Evaluated PR bcb3ceb7 Delta
Raw token usage 452,702 425,960 -5.9%
Weighted token usage 113,720.2 116,248.4 +2.2%
Candidate duration 265.765s 214.543s -19.3%
Peak context tokens 47,266 40,995 -13.3%
Output tokens 3,259 2,178 -33.2%
Tool calls 30 24 -20.0%
Turns 11 11 unchanged
Independent field readback 154 154 identical

The final current trace used one array call, skipped the two field reference documents on the simple-text fast path, bounded the create result to 334 characters, bounded the optional readback result to 158 characters, and completed without pagination or quoting retries. The weighted-token point estimate moved +2.2% while raw tokens, peak context, output tokens, and tool calls all fell; the two runs had different cache-hit rates (87.8% vs 84.1%), so this isolated weighted movement does not support PR causality. Earlier current-tree trials exposed and then closed two attributable token risks: a 14.6KB expanded batch result and a 27.9KB unfiltered field-list readback.

The agent A/B above evaluated bcb3ceb7. Current head 6680508e restores the existing full-success response contract and field-list default of 100, preserves presented typed-error extensions behind collision-safe batch-ledger aliases, makes same-name handling command-specific, and documents caller-timeout reconciliation. The evaluated success trace explicitly projected both field-create and field-list output with --jq and never entered partial failure, so these compatibility fixes do not change that trajectory; this preserves the measured mechanism without claiming that the new head itself has been rerun at agent level.

The branch merge-base remains upstream main 875d20a2. A clean merge-tree against latest main 426f80fd passes Base normal and race tests, and the current branch passes the exact CI unit-package race command. Latest main itself currently reproduces an unrelated +messages-search affordance-example failure, so this description does not claim a green latest-main full-repository suite.

The current run's control-plane prepareBase/status callbacks warned, but local result.json, trace completion, and independent Base readback were all present.

This is targeted causal evidence for the changed field-create path, not a replacement for a refreshed 124-case aggregate evaluation.

Review follow-up

  • Batch-create full success now returns the original server fields again; only partial-failure created items keep compact id / name / type identity.
  • +field-list now defaults to 100 again while retaining the 1-200 range, --page-size alias, and explicit --limit 200 support.
  • Field-create partial failures now present typed errors before copying them into stdout: visible recovery includes base:field:create, concealed distributions retain the scope without exposing auth login, and typed recovery extensions such as challenge_url survive. Colliding extension keys cannot overwrite index, status, field, or error in the batch ledger.
  • Partial-failure retry guidance now allows authorization/input recovery before resubmission while reserving unchanged automatic retry for retryable:true; Base error 1254291 now carries api/conflict/retryable:true and canonical wait guidance. Caller-timeout recovery reads back before resubmission and marks same-name hits as ambiguous when no pre-write snapshot exists.
  • Global same-name guidance now defers to each command or guide; the simple-text help fast path is an explicit exception to the field-JSON read rule, and field type selection no longer rejects business semantics as a confirmation clue.
  • base_table_028: current guidance now has an explicit unsupported terminal state and forbids plain storage placeholders or false completion. The replacement tip remains 36 English words, equal to the prior tip, and contains no translation-specific wording. This current-head behavior still needs an agent benchmark before claiming the original task is fixed.
  • base_table_087: removed the contract test's blacklist of the old date-plus-status template and placeholder names. The remaining contract checks atomic Condition.value rules, the DSL SSOT link, guide size, and absence of real case IDs/Base URLs.

Test Plan

  • Targeted throttle contract tests
  • Targeted full-success/partial-failure output and field-list default contract tests
  • Targeted visible/concealed partial-failure error presentation tests
  • Targeted security-challenge extension and custom typed-error ledger-collision tests
  • Targeted authorization-recovery resubmission contract test
  • Targeted 1254291 retryable write-conflict partial-failure test
  • go test ./shortcuts/base -count=1
  • go test -race ./shortcuts/base -count=1
  • Latest-main merged-tree Base normal/race tests; unrelated latest-main IM affordance failure independently reproduced
  • Array field-create CLI E2E
  • make unit-test
  • make build
  • go vet ./...
  • go mod tidy leaves go.mod and go.sum unchanged
  • CI-equivalent golangci-lint reports 0 issues
  • Source-contract lint and lint module tests
  • Current-branch binary help and embedded-Skill reads expose the new guidance
  • Live old-head, patched, and current-head A/B over 150 serial field creates
  • Original case032 prompt, model, and fresh-fixture evaluated-main/PR agent A/B with local traces and independent 154-field readback

Earlier benchmark context

Three normalized runs were completed over Base evaluation cases 096, 028, and 087 on pre-generalization head c88ec548. Case 096 exercised one-call batch creation of 10 fields in 2/3 runs; the third run found copied target fields already present and skipped the requested write. Case 087 returned the requested overdue count in 3/3 runs, using direct +data-query in 2/3 and a record-list fallback in 1/3. Case 028 did not produce automatic translation in any run: one unsupported type was rejected and two runs created plain-text placeholders. The whole-case grader was 4/9 in each run, with several broader newly created expectations also affected by pre-existing copied state. The generalized 028 terminal boundary and 087 atomic guide at current head have not yet received the corresponding agent-level benchmark.

Related Issues

  • None
改动范围: Base field-create 指南、批量节流、显式 jq 有界输出、field-list 兼容默认、部分失败错误呈现、恢复重提语义、1254291 冲突分类及对应契约测试
思考过程: 保留通用字段和查询规则及 case032 已验证收益路径,恢复既有输出和分页契约;把 retryable 限定为原样自动重试,并允许按 hint 修复后重提
改动原因: PR 必须至少优化 token、正确率或耗时之一且不引入可归因回退;本轮消除权限恢复与顶层提示冲突,并让既有写冲突等待规则获得结构化错误支持
Break Change: 否

Co-authored-by: BASE Infra Harness ai@base-infra-harness.noreply.local
AI-SHA256: de5306bfc038a81dbc4a57b2301c2c053aba673bf3b7f5d4472adda2baaded12

Summary by CodeRabbit

  • New Features
    • Expanded field creation to support creating one or more fields in a single request: --json now accepts either a single JSON object or a non-empty JSON array.
  • Documentation
    • Refreshed the base data-query guide's “Common filter values” with clearer Condition.value shapes and date/empty handling notes.
    • Updated field-create/reference docs (and quick-route entries) to cover multi-field --json usage and batch response/failure details.
  • Bug Fixes
    • Improved batch create failure handling to return a structured partial-failure result (including per-item outcomes and retry guidance).
  • Tests
    • Strengthened help/tips and markdown contract coverage for field-create and query guides.

1. Document batch field creation in shortcut help and the delivered Base skill.
2. Choose field types from stored values instead of business-purpose names.
3. Add generic common filter values to the data-query quick guide with contract tests.

说明:
- Combines the accepted fixes for base_table_096, base_table_028, and base_table_087;
    MR 1275 contributes round 4 only.

```ai-signature
改动范围: Base field-create 帮助与 Skill 指南、data-query 快速指南,以及对应的 shortcuts/base 契约测试
思考过程: 保留三个实验的最终通用规则,合并 public main 上新增的字段读回提示,并排除没有 benchmark 支撑的 MR 1275 round6
改动原因: 让代理发现批量字段接口、按存储值选择字段类型,并用常见通用形状构造 data-query 过滤条件
Break Change: 否
```

Co-authored-by: BASE Infra Harness <ai@base-infra-harness.noreply.local>
AI-SHA256: a53fdb6b6b82d74e4deff5e6d32591ec897cd2dc6ad662885c961a27e67d4666
@huarenmin13
huarenmin13 marked this pull request as draft July 30, 2026 09:41
@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 30, 2026
@coderabbitai

coderabbitai Bot commented Jul 30, 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
📝 Walkthrough

Walkthrough

BaseFieldCreate now supports documenting and validating single or batch field creation, including structured partial-failure responses. Related references and skill rules were updated, while the data-query quick guide and its contract test now focus on common Condition.value shapes.

Changes

Field creation contract and guidance

Layer / File(s) Summary
Field creation metadata and input contract
shortcuts/base/field_create.go, shortcuts/base/base_shortcuts_test.go, shortcuts/base/references/lark-base-field-json.md
Help text, JSON usage, tips, and contract checks describe single objects or non-empty arrays and stored-value-based type selection.
Batch partial-failure handling
shortcuts/base/field_ops.go, shortcuts/base/base_execute_test.go
Batch creation returns ordered created, failed, and not-attempted items with summary counts, structured error details, and retry guidance.
Batch creation and create semantics documentation
skills/lark-base/SKILL.md, skills/lark-base/references/lark-base-field-create.md, shortcuts/base/base_skill_contract_test.go
References and routing documentation cover array input, sequential failure behavior, response shapes, and create-versus-reuse rules; contract tests validate consistency.

Data-query quick guide

Layer / File(s) Summary
Condition value guide and contract validation
skills/lark-base/references/lark-base-data-query-guide.md, shortcuts/base/data_query_guide_contract_test.go
The guide documents select, datetime, and empty-array Condition.value shapes; tests validate normalized content, size limits, and forbidden identifiers.

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

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant FieldCreate
  participant FieldAPI
  CLI->>FieldCreate: Submit field object array
  FieldCreate->>FieldAPI: Create fields sequentially
  FieldAPI-->>FieldCreate: Success or API error
  FieldCreate-->>CLI: Return created, failed, and not-attempted results
Loading

Possibly related PRs

  • larksuite/cli#1661: Directly relates to the JSON-array batch field creation and sequential execution paths updated here.

Suggested reviewers: 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
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.
Title check ✅ Passed The title clearly identifies the Base field-creation and query-guidance improvements covered by the pull request.
Description check ✅ Passed The description includes all required sections and provides detailed scope, test results, benchmarks, follow-up items, and related-issue status.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

❤️ Share

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

@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 `@shortcuts/base/data_query_guide_contract_test.go`:
- Around line 18-31: Expand the assertion list in the contract test around the
guide fixture to cover every newly added filter example: isLess,
isEmpty/isNotEmpty, value as an empty array, type 1, conditions, and the exact
["<status_value>"] shape. Keep the existing substring-based validation and add
one assertion for each required contract fragment so removal of any example
causes the test to fail.

In `@skills/lark-base/references/lark-base-field-create.md`:
- Line 46: Insert one blank line immediately after the arguments table in
lark-base-field-create.md and before the following heading, leaving the table
content unchanged so markdownlint MD058 is resolved.
🪄 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 Plus

Run ID: 4562f56b-1db3-4620-80f7-15c88607d2ce

📥 Commits

Reviewing files that changed from the base of the PR and between a575a8b and 9ba8ffa.

📒 Files selected for processing (6)
  • shortcuts/base/base_shortcuts_test.go
  • shortcuts/base/data_query_guide_contract_test.go
  • shortcuts/base/field_create.go
  • skills/lark-base/SKILL.md
  • skills/lark-base/references/lark-base-data-query-guide.md
  • skills/lark-base/references/lark-base-field-create.md

Comment thread shortcuts/base/data_query_guide_contract_test.go
Comment thread skills/lark-base/references/lark-base-field-create.md
@huarenmin13
huarenmin13 marked this pull request as ready for review July 30, 2026 09:56
1. Assert every common filter fragment introduced by the data-query quick guide.
2. Keep the field-create argument table compliant with markdown table spacing.

```ai-signature
改动范围: data-query 指南契约测试与 field-create Markdown 表格后的空行
思考过程: 逐条核对 CodeRabbit 建议,只补会防止新增指南片段回退的断言和确定性的 MD058 格式问题,不改生产提示语义
改动原因: 关闭 PR 2114 的两条有效自动审查意见并保持变更可回归
Break Change: 否
```

Co-authored-by: BASE Infra Harness <ai@base-infra-harness.noreply.local>
AI-SHA256: 81096f474001f2c9c59af48ee64150f205101710ebcf3b909ab9d300a019f46f
@huarenmin13
huarenmin13 marked this pull request as draft July 30, 2026 11:11
@huarenmin13
huarenmin13 marked this pull request as ready for review July 30, 2026 11:12
@huarenmin13
huarenmin13 marked this pull request as draft July 30, 2026 11:14
1. Replace the date-and-status scenario template with reusable Condition.value shape rules.
2. Update the contract test to require relative-date guidance and reject evaluation-shaped placehold
    ers.

```ai-signature
改动范围: lark-base data-query quick guide 与对应 shortcuts/base 契约测试
思考过程: 保留 select、datetime、empty 的通用 value shape,删除日期字段和状态字段组合模板,避免将 base_table_087 的解题路径固化到公共指南
改动原因: benchmark 显示当前文案能引导目标题,但组合示例与测试过度贴合单题,需要收敛为跨场景可复用的不变量
Break Change: 否
```

Co-authored-by: BASE Infra Harness <ai@base-infra-harness.noreply.local>
AI-SHA256: 7b6916f05dccf6489dce65610fe757f7b346bcd0f8f5500cfbfb1f30c60471f3
@huarenmin13
huarenmin13 marked this pull request as ready for review July 30, 2026 11:46

@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: 1

🤖 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 `@shortcuts/base/data_query_guide_contract_test.go`:
- Around line 42-51: Update the forbidden-content loop in the contract test to
search normalizedGuide instead of the raw guide, matching the positive checks
and ensuring forbidden phrases split by whitespace or Markdown line breaks are
detected.
🪄 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 Plus

Run ID: 8b8e8e8b-59bc-4c3c-ab2a-58a3fdf140a8

📥 Commits

Reviewing files that changed from the base of the PR and between c88ec54 and bfbe90d.

📒 Files selected for processing (2)
  • shortcuts/base/data_query_guide_contract_test.go
  • skills/lark-base/references/lark-base-data-query-guide.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • skills/lark-base/references/lark-base-data-query-guide.md

Comment thread shortcuts/base/data_query_guide_contract_test.go
Comment thread skills/lark-base/SKILL.md Outdated
Comment thread skills/lark-base/references/lark-base-field-create.md
@huarenmin13
huarenmin13 marked this pull request as draft July 30, 2026 14:48
@huarenmin13
huarenmin13 marked this pull request as ready for review July 30, 2026 15:09

@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: 1

🤖 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 `@shortcuts/base/field_ops.go`:
- Around line 223-233: Preserve the underlying err when constructing the partial
failure in field_ops.go, passing it as the OutPartialFailure cause while
retaining the existing structured payload. In base_execute_test.go, replace the
display-string-only assertion with checks that errs.ProblemOf metadata includes
category, a non-empty subtype, code, log ID, and the original cause.
🪄 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 Plus

Run ID: 7695c4d8-a2af-4837-a4b3-afe0a71f91e1

📥 Commits

Reviewing files that changed from the base of the PR and between db0506b and a1f350e.

📒 Files selected for processing (7)
  • shortcuts/base/base_execute_test.go
  • shortcuts/base/base_skill_contract_test.go
  • shortcuts/base/data_query_guide_contract_test.go
  • shortcuts/base/field_ops.go
  • skills/lark-base/SKILL.md
  • skills/lark-base/references/lark-base-field-create.md
  • skills/lark-base/references/lark-base-field-json.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • skills/lark-base/references/lark-base-field-create.md
  • skills/lark-base/SKILL.md

Comment thread shortcuts/base/field_ops.go Outdated
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add huarenmin13/cli#codex/base-field-query-guidance -y -g

huarenmin13 and others added 4 commits August 5, 2026 16:17
1. 将固定 1 秒批次等待改为 500ms 最小请求起点间隔,并让请求耗时抵扣等待
2. 新增节流计算契约测试,覆盖首次请求、快速响应和慢响应
3. 同输入 150 字段 A/B 从 269.64s 降至 118.80s,且两侧均创建 150/150

说明:
- 保持同表写入串行和 partial failure 输出不变

```ai-signature
改动范围: shortcuts/base/field_ops.go 与 shortcuts/base/base_execute_test.go,仅调整 field-create 数组批次的串行节流计算和回归测试
思考过程: 保留同表串行写入,以 500ms 作为请求起点最小间隔,并把请求耗时计入间隔,避免固定空等同时降低写冲突风险
改动原因: PR 引导 Agent 使用数组批量创建后触发既有每项固定 1 秒等待,导致 150 字段用例产生约 149 秒可归因耗时回退
Break Change: 否
```

Co-authored-by: BASE Infra Harness <ai@base-infra-harness.noreply.local>
AI-SHA256: 69b888d362d2f484c4ce6ad050bdbfe2de7368948eb79ba516bcaa6806ec9107
1. 派生、自动、同步或回填行为只使用已记录能力,无法实现时禁止探测、占位或虚假完成
2. 删除 data-query 契约测试对旧题模板占位符的反向黑名单,只保留原子规则和真实 case 污染检查
3. field-create 指引替换前后均为 36 个英文词,不扩大该帮助项的词数

```ai-signature
改动范围: shortcuts/base/field_create.go、base_shortcuts_test.go 与 data_query_guide_contract_test.go,仅收口通用终止规则和测试泛化
思考过程: 采纳 review 中可独立闭环的两点,不增加翻译专用规则,不修改运行时能力;用等词数替换避免帮助上下文继续增长
改动原因: 当前规则能阻止按业务名猜字段类型,却仍允许退化成普通文本占位;同时测试记住旧题模板会阻碍未来合理示例
Break Change: 否
```

Co-authored-by: BASE Infra Harness <ai@base-infra-harness.noreply.local>
AI-SHA256: 759b7f4044c6381b963c8ea299b70967e634ab9d43b6ebfbe94ef38bb69ba46a
1. 批量成功与部分失败仅返回字段 id/name/type,保留恢复所需身份并减少大响应上下文
2. 引导数组在调用方超时范围内一次提交,并为生成的大数组推荐 @file 或 argv-safe 调用
3. 字段列表默认页大小提升到 API 上限 200,避免百字段以上场景的帮助查询与重试

说明:
- 同口径 case032:raw token 432292→428304,weighted token 126408→117761,耗时 272675ms→235022ms,两侧均读回 154 字段

```ai-signature
改动范围: Base field-create 批量输出、帮助提示、field-list 默认分页及对应契约测试与 Skill 返回说明
思考过程: 从同口径 trace 定位固定分块、大字段对象回传、100 条分页和 shell 双重转义四个确定性开销,保持单字段与部分失败恢复语义不变并逐项用测试锁定
改动原因: PR 引导数组批量创建后虽降低耗时,但多回合大输出会推高 raw token;需要在不牺牲正确率和恢复信息的前提下同时压缩 token 与耗时
Break Change: 否
```

Co-authored-by: BASE Infra Harness <ai@base-infra-harness.noreply.local>
AI-SHA256: 8a2bd2d79c9abdb1e36ae45822dd04b2a3384498a1dc268cffcd47cff00d94ed
1. 合并 GitHub main 7363eb5,保留上游新增的统一 flag alias、恢复提示和其他仓库能力
2. field-list 唯一冲突采用上游 Aliases 机制,同时维持本 PR 的默认 limit 200
3. 合并后重新通过完整 race 单测、构建、数组 E2E、vet 与全部 lint 门禁

说明:
- 普通 merge 不重写 PR 历史;冲突仅涉及 shortcuts/base/field_list.go

```ai-signature
改动范围: 合并 GitHub main 7363eb5,并解决 Base field-list 分页别名与默认值冲突
思考过程: PR 已落后 main 40 个提交且 GitHub 标记 DIRTY;选择普通 merge 避免 force-push,冲突处采用 main 的原生 Aliases 机制而保留本 PR 经评测验证的 200 默认页大小
改动原因: 让 PR 恢复可合并状态,同时不丢失 token 和耗时优化,也不把已经被上游统一实现的旧别名辅助逻辑带回最终代码
Break Change: 否
```

Co-authored-by: BASE Infra Harness <ai@base-infra-harness.noreply.local>
AI-SHA256: a98424c2559b48ebb1b9f861ba02b632b53a8f0cfe720646d16968ca04b03abc
huarenmin13 and others added 5 commits August 5, 2026 18:11
1. 大数组成功路径推荐保留摘要的 --jq 投影,失败路径仍原样保留部分失败明细
2. 为一个或多个简单 text 字段提供 help fast path,并让 next_step:done 终止默认回读
3. 补充 Skill、帮助与执行结果契约测试,锁定有界输出和可恢复失败语义

说明:
- 最新 main 同题 A/B:两侧均回读 154 字段,raw token 下降 5.9%,耗时下降 19.3%,峰值上下文下降 13.3%,工具调用下降 20%

```ai-signature
改动范围: Base field-create 帮助、简单字段成功提示、lark-base Skill 路由与对应契约测试
思考过程: 从最终 A/B trace 分别定位批量成功展开 150 项、简单 text 读取冗余指南和成功后整表回读三类可控上下文开销,用成功摘要与失败全量明细分流来保留恢复能力
改动原因: 继续优化 PR 2114 的 token 和耗时,同时要求任何回退不能归因到 PR;需要让大批量成功路径有界且不削弱正确性或部分失败恢复
Break Change: 否
```

Co-authored-by: BASE Infra Harness <ai@base-infra-harness.noreply.local>
AI-SHA256: 626b288a7f5444dfecb872e6cd29d4fe0788404f5001dcb47aac64e2d55d9b5a
1. 批量创建完整成功时保留服务端字段元数据,部分失败仍返回精简 identity
2. 将 +field-list 默认页大小恢复为 100,继续支持显式 --limit 200
3. 补充回归测试与字段创建文档,保留 --jq 有界输出指导

说明:
- 定向、Base 全量、race、仓库单测、构建、vet 与 lint 均通过

```ai-signature
改动范围: Base 批量字段创建成功输出、字段列表默认分页、对应测试与文档
思考过程: 先用契约测试复现完整字段元数据丢失和默认分页翻倍,再只恢复主干既有成功输出与默认值,同时锁定部分失败精简输出不变
改动原因: 移除可归因到 PR 的兼容性和 token 回退,并保留显式 jq 投影、节流、快速路径及部分失败恢复带来的通用收益
Break Change: 否
```

Co-authored-by: BASE Infra Harness <ai@base-infra-harness.noreply.local>
AI-SHA256: 6351ed9d228611e3b6f5bc30faf278835b463e07f4eb020f225abd41e264399c
1. Merge upstream main at 875d20a without changing the PR-owned diff
2. Bring Runtime.PresentError and the shared recovery concealment contract into the branch

```ai-signature
改动范围: 合并 larksuite/cli 最新 main 到 PR 分支,不新增 PR 自有业务差异
思考过程: 当前修复必须调用最新公共错误呈现 API;正常合并主干可避免复制实现或制造重复提交,并保持相对 main 的改动最小
改动原因: 确保部分失败修复在真实合并契约上编译和验证,同时保留上游错误隐藏与恢复策略
Break Change: 否
```

Co-authored-by: BASE Infra Harness <ai@base-infra-harness.noreply.local>
AI-SHA256: b88e0c8bc0064c0d2b84a2e544bf735fd69143d9634a44a5db6aaadff0ff9194
1. Project the typed field-create error through Runtime.PresentError before copying result fields
2. Read Error, ProblemOf, and permission extensions from the presented clone
3. Cover visible scoped authorization and concealed recovery without fabricating missing_scopes

说明:
- Targeted, Base, full race, build, vet, format, lint, and module checks pass

```ai-signature
改动范围: Base 批量字段创建部分失败的错误呈现,以及 visible 和 concealed 恢复契约测试
思考过程: 先在最新 main 合并树上复现无 scope 授权提示和隐藏命令泄露,再复用兄弟批量命令的 PresentError 边界,仅替换 payload 复制时的错误来源
改动原因: OutPartialFailure 不会再次呈现根错误,必须在复制 typed error 字段前应用命令 scope 与发行隐藏策略
Break Change: 否
```

Co-authored-by: BASE Infra Harness <ai@base-infra-harness.noreply.local>
AI-SHA256: deee600dc8d4bb889629895178c1f217ba7762fbd5b3163da3b9d621c8585ac0
1. Clarify that retryable gates unchanged automatic retries, not corrected resubmissions
2. Classify Base error 1254291 as a retryable conflict with canonical wait guidance
3. Cover authorization recovery, write conflicts, and reference contract consistency

```ai-signature
改动范围: internal/errclass/codemeta_base.go、shortcuts/base/field_ops.go、对应 Base 回归测试与 field-create 参考文档
思考过程: 将 retryable 限定为同一请求原样自动重试资格,保留授权或输入修正后重新提交,并复用现有 conflict 恢复提示
改动原因: 部分失败顶层提示会与权限恢复 hint 冲突,且 1254291 未分类导致等待重试规则无法由结构化错误驱动
Break Change: 否
```

Co-authored-by: BASE Infra Harness <ai@base-infra-harness.noreply.local>
AI-SHA256: 65cd95f24968c5e0b0c43cf858ed787eabb6d9d63b3d5199a294bd284816c35e
1. Preserve presented typed-error extensions without allowing them to overwrite batch ledger fields
2. Align field creation guidance with command-specific name semantics and caller-timeout recovery
3. Cover security challenges, extension collisions, and storage-type selection with regression tests

```ai-signature
改动范围: shortcuts/base 的 field-create 部分失败输出、命令提示、Base Skill 写入规则、field-create reference 与对应回归测试
思考过程: 复用 Runtime.PresentError 后 concrete typed error 的 JSON wire shape 作为扩展字段单源;对批次账本自有键统一生成无冲突 error_ 别名,并只收敛已证实的同名、fast path 与 timeout 契约矛盾
改动原因: 部分失败会丢失 challenge_url 等恢复字段,自定义 typed error 还可覆盖 status/index/error 导致错误账本;过度绝对的字段类型、同名和超时文案也会形成可归因正确率回退
Break Change: 否
```

Co-authored-by: BASE Infra Harness <ai@base-infra-harness.noreply.local>
AI-SHA256: 02377560f14202ea652f530389ac102647189923e45548337814ec3871f5a4de
@zhouyue-bytedance
zhouyue-bytedance merged commit 7c4f6c0 into larksuite:main Aug 7, 2026
24 of 38 checks passed
@liangshuo-1 liangshuo-1 mentioned this pull request Aug 7, 2026
3 tasks
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.

4 participants