Skip to content

Feat/add aitable datasource tools - #1069

Open
WHUTzju wants to merge 24 commits into
DingTalk-Real-AI:mainfrom
WHUTzju:feat/add-aitable-datasource-tools
Open

Feat/add aitable datasource tools#1069
WHUTzju wants to merge 24 commits into
DingTalk-Real-AI:mainfrom
WHUTzju:feat/add-aitable-datasource-tools

Conversation

@WHUTzju

@WHUTzju WHUTzju commented Aug 20, 2026

Copy link
Copy Markdown

Summary

  • Adds 7 new shortcuts to the aitable service for datasource sync management: +datasource-create, +datasource-update, +datasource-sync, +datasource-sync-status, +datasource-get-config, +datasource-list-sources, +datasource-get-fields
  • Each shortcut maps 1:1 to a deployed MCP tool on the aitable server
  • Updates dingtalk-aitable SKILL.md with routing rules and shortcut table entries for all 7 commands
  • Adds skills/multi/dingtalk-aitable/references/aitable/aitable-datasource.md reference guide covering typical workflows, sourceConfig protocol, autoSyncSetting frequency config, and known limitations
  • Fixes sourceConfig handling: CLI validates JSON but passes raw string to MCP (MCP types it as string, not object)

Risk tier

  • Standard: ordinary implementation change with a stable package graph

Verification

  • Release fragment added: .changes/aitable-datasource-shortcuts.md
  • ./scripts/policy/check-generated-drift.sh — no drift
  • ./scripts/policy/check-command-surface.sh --strict — command surface updated correctly
  • All 7 MCP tools confirmed deployed on live endpoint
  • End-to-end OA approval datasource creation flow verified against live MCP server

Notes

  • +datasource-sync-status known limitation: downstream queryTaskStatus currently returns status=0 (RUNNING) for all tasks; FINISHED/FAILED not reliably available. Users should verify via documentUrl instead.
  • splitParentTableField and enableDataSyncOaDetailList are downstream-internal fields, intentionally not exposed in CLI flags
  • Only OA approval datasource (datasourceType=OA) is supported; other types reserved for future expansion

Agent 测试报告截图(aitable)

开始执行AI表格数据源指令

image #### 列举可用数据源 002 #### 创建、更新、查询、触发数据源 ,查询数据源字段、状态、 003 #### Agent测试结论 004

指令 CI 集成测试(aitable)

image

陌渊 added 10 commits August 20, 2026 11:20
Add 5 data source sync management shortcuts to the aitable service:
- +datasource-create (create_datasource): create sync config + first sync
- +datasource-update (update_datasource_config): update existing sync config
- +datasource-sync (run_datasource_sync): trigger manual sync (max 5 tables)
- +datasource-sync-status (get_datasource_sync_status): query sync task status
- +datasource-get-config (get_datasource_config): get sync config details

Each shortcut declares a full Contract (Identity/Interface/Selection),
Safety, Flags, and Execute that calls rt.CallMCPData on the "aitable"
MCP server. datasource-type is passed through without CLI enum check;
source-config is validated as a JSON object via parseJSONObject.
- Add --auto-sync-setting flag (JSON string) to +datasource-create and
  +datasource-update, validated and passed through as raw string.
- Update +datasource-update --source-config desc to reflect full
  replacement semantics ("传入时整体覆盖") and spell out required /
  optional fields with defaults.
- Append "仅支持 OA 审批数据源 (datasourceType=OA)" to
  +datasource-get-config description.
- Simplify +datasource-list-sources / +datasource-get-fields
  descriptions to concise Chinese aligned with snapshot wording.
- Update SKILL.md shortcuts table and add datasource usage guide.
Sync CLI field descriptions with latest ai-table-mcp-snapshot.json:
- source-config flags: restructure to "两类字段" (4 passthrough + caller-set),
  add splitParentTableField, fix Update flag to optional semantics
- get_datasource_sync_status: update status list (RUNNING/FINISHED/FAILED,
  remove TIMEOUT), change "不传返回最近一次" → "IDLE(下游暂不支持)"
- get_datasource_config: add sync=true guard note, "其他类型暂不支持", sourceConfig hint
- list_datasource_sources: full rewrite explaining result/approvals structure,
  4-field passthrough rule, enableDataSyncOaDetailList internal note
- get_datasource_fields: add "其他数据源类型暂不支持,待后续开放"
- Add --auto-sync-setting flag to DatasourceCreate (was only in Execute, not in Flags)
- Expand DatasourceSync description: add 文档链接, errorCode=4014 幂等冲突, 非数据源表参数错误
- Simplify DatasourceGetFields description: remove field property enumeration to match snapshot
- Golden Route: add datasource entry (list-sources → create flow)
- 常用 leaf 直达: add datasource-* commands
- 当前最短路径: add list-sources-first rule
- 安全边界: add sync write warning
- 错误最短路径: add errorCode=4014 and sync=false handling
- 按需加载: add datasource reference trigger
- New reference: aitable-datasource.md with full workflow, sourceConfig
  protocol, autoSyncSetting config, command details, error codes
- Fix autoSyncSetting enum: scheduled/daily/weekly/monthly; mark
  selectedMonthDays/selectedWeekdays as required for monthly/weekly
- Remove splitParentTableField from --source-config user-settable fields;
  add note that splitParentTableField/enableDataSyncOaDetailList are
  internal downstream fields not to be passed
- Prepend sync-is-fire-and-forget notice to DatasourceSync descriptions
- Remove --conflict-strategy flag (syncConflictStrategy not in MCP schema)
@github-actions
github-actions Bot requested a review from haofeng0705 August 20, 2026 06:57
@github-actions
github-actions Bot enabled auto-merge August 20, 2026 06:57
auto-merge was automatically disabled August 20, 2026 07:03

Head branch was pushed to by a user without write access

@github-actions
github-actions Bot enabled auto-merge August 20, 2026 07:03
auto-merge was automatically disabled August 20, 2026 07:08

Head branch was pushed to by a user without write access

@github-actions
github-actions Bot enabled auto-merge August 20, 2026 07:08
- Add 7 datasource leaf commands to internal/helpers/aitable.go so
  coverage test can find tool name literals (fixes TestAllShortcutsAssemble)
- Add 7 entries to semantic_catalog_aitable.json and update catalog count
  from 93 to 100 (fixes TestCrossPlatformCoverageAITableSemanticCatalog)
- Update publicShortcutCount/schemaPublishedShortcutCount/publiclyDelivered
  from 422/447/422 to 429/454/429 (fixes TestDeliverySchemaCoversOrExactly)
- Fix Contract.Selection.AgentSummary and UseWhen[0] in datasource.go to
  match Description and Intent exactly as required by schema contract test
auto-merge was automatically disabled August 20, 2026 07:44

Head branch was pushed to by a user without write access

@github-actions
github-actions Bot requested a review from wxianfeng August 20, 2026 07:45
@github-actions
github-actions Bot enabled auto-merge August 20, 2026 07:45
@wxianfeng

Copy link
Copy Markdown
Collaborator

开源 DWS Codex 自动 CR:不通过,CI 未通过

Feat/add aitable datasource tools

  • 评审 SHA:a0fc7bafafcd092efe6324babc49c73093f964d0
  • CI 状态:未通过(26 通过,4 跳过,5 未通过)
  • 冲突状态:无冲突
  • Agent 测试报告:不通过,缺少“Agent 测试报告”截图(aitable)
  • 指令 CI 集成测试:不通过,缺少“指令 CI 集成测试”截图(aitable)
  • 自动 CR 结论:不通过,CI 未通过
  • 代码评审结论:通过

变更总结

本次变更新增 7 个 AI 表格数据源原始命令及对应 Shortcut,并补充 Schema 身份、安全元数据、语义目录和使用文档;命令到 MCP 参数的主要映射保持一致,未发现阻塞合并的安全或数据损失问题。静态审查发现两处文档与实际 CLI/契约不一致,会导致用户照文档操作失败,建议修正;受安全限制未执行测试或构建。

CI 单测结果

结论说明

自动 CR 不通过,原因如下:

  • CI 单测存在失败、取消或超时
  • PR 描述或发起人评论缺少 aitable Agent 测试截图
  • PR 描述或发起人评论缺少 aitable 指令 CI 集成测试截图

代码问题

  1. [P2 | 建议修改] 移除未实现的 --conflict-strategy 参数说明docs/datasource-usage-guide.md:132

    • 说明:指南把 --conflict-strategy 列为 +datasource-create 的可用参数,并在后文描述其覆盖/跳过语义,但新增的 DatasourceCreate.Flags 中没有这个 flag,执行任何照此编写的命令都会被 Cobra 以 unknown flag 拒绝。请删除这些说明,或在 Shortcut 中真正声明、映射并验证该参数。
  2. [P2 | 建议修改] 按真实嵌套结构解析 list-sources 的 resultdocs/datasource-usage-guide.md:49

    • 说明:这里宣称每个 source 的 result 就是 processCode,后面的完整工作流也直接使用 sources[0].result=PROC-XXXX;但同一 PR 的 Shortcut 契约和专用 reference 均说明 result 是包含 approvals 数组的 JSON 字符串,processCode/name/iconUrl/url 位于选中的 approval 内。照当前指南会把整段 JSON 当作 processCode,或遗漏 name 等必填透传字段,导致 get-fields/create 请求失败。请统一为解析 result、选择唯一 approval 后提取四个字段的流程。

自动 CR 结论为不通过;未提交 GitHub Review,也不会自动合并。

ValidateRequiredFlags calls GetString which returns empty for
StringSlice flags, causing the examples test to report --table-ids
as missing. Switch to String + parseCSVValues to match the codebase
convention used by record-ids and other comma-separated flags.
auto-merge was automatically disabled August 20, 2026 09:12

Head branch was pushed to by a user without write access

@github-actions
github-actions Bot enabled auto-merge August 20, 2026 09:12

@wxianfeng wxianfeng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

开源 DWS Codex 自动 CR:不通过,需修复

Feat/add aitable datasource tools

  • 评审 SHA:d24f4be447de0ae4876fd5345ca83c68c68b5a0c
  • CI 状态:未通过(29 通过,4 跳过,2 未通过)
  • 冲突状态:无冲突
  • Agent 测试报告:不通过,缺少“Agent 测试报告”截图(aitable)
  • 指令 CI 集成测试:不通过,缺少“指令 CI 集成测试”截图(aitable)
  • 自动 CR 结论:不通过,需修复
  • 代码评审结论:不通过,需修复

变更总结

本次变更新增了 7 个 AITable 数据源直连命令和对应 Shortcut,并补充 Schema、语义目录及使用文档。命令注册和基本参数映射整体一致,但批量上限未在运行时落实,且 Reference 中存在互相冲突的枚举值和未实现的参数,会让 Agent 生成无效调用;建议修复后再合并。受审查约束未执行测试或构建。

CI 单测结果

结论说明

Codex 静态审查发现 P0/P1 阻断问题,需要修复后提交新 commit 重新 CR。

代码问题

  1. [P1 | 必须修改] 批量同步未落实声明的 1–5 个数量限制internal/shortcut/aitable/datasource.go:281

    • 说明:契约、帮助和 Reference 都声明 table-ids 单次只能传 1–5 个,但这里直接将任意长度的切片发送给 run_datasource_sync+datasource-sync 因而会接受 6 个以上 ID;新增的非 Shortcut aitable datasource sync 也只检查非空而没有检查上限。这样 Agent 按契约验证后仍可能发出服务端必然拒绝的写请求,而且没有执行文档要求的拆批。请在两个入口调用 MCP 前统一校验 1–5 个,并为边界值和超限拒绝补测试;task-ids 的最多 5 个限制也应同样落实。
  2. [P2 | 建议修改] 自动同步配置文档发布了两套互斥枚举skills/multi/dingtalk-aitable/references/aitable/aitable-datasource.md:98

    • 说明:该 Reference 将 syncType/scheduleType 写成 scheduleday|week|month,并给出可复制示例;同一 PR 的 Shortcut 参数契约却声明 scheduleddaily|weekly|monthly。由于实现只校验 JSON 形状并原样透传,至少其中一套会导致创建或更新失败。请以真实接口契约为准统一 Reference、Flag 描述和示例,并考虑在 CLI 侧校验这些枚举。
  3. [P2 | 建议修改] Reference 声明了命令并不接受的 conflict-strategy 参数skills/multi/dingtalk-aitable/references/aitable/aitable-datasource.md:177

    • 说明:创建命令的参数表公开了 --conflict-strategy,但 DatasourceCreate.Flags 和新增的 aitable datasource create 都没有注册或转发这个参数。Agent 按 Reference 使用时会在 Cobra 参数解析阶段直接失败。请删除该说明,或在两个公开入口及其 Contract/MCP 映射中完整实现该参数。

此结论已作为 GitHub CHANGES_REQUESTED 提交;不会自动合并。

@wxianfeng

Copy link
Copy Markdown
Collaborator

开源 DWS Codex 自动 CR:不通过,需修复

Feat/add aitable datasource tools

  • 评审 SHA:d24f4be447de0ae4876fd5345ca83c68c68b5a0c
  • CI 状态:未通过(29 通过,4 跳过,2 未通过)
  • 冲突状态:无冲突
  • Agent 测试报告:不通过,缺少“Agent 测试报告”截图(aitable)
  • 指令 CI 集成测试:不通过,缺少“指令 CI 集成测试”截图(aitable)
  • 自动 CR 结论:不通过,需修复
  • 代码评审结论:不通过,需修复

变更总结

本次变更新增了 7 个 AITable 数据源直连命令和对应 Shortcut,并补充 Schema、语义目录及使用文档。命令注册和基本参数映射整体一致,但批量上限未在运行时落实,且 Reference 中存在互相冲突的枚举值和未实现的参数,会让 Agent 生成无效调用;建议修复后再合并。受审查约束未执行测试或构建。

CI 单测结果

结论说明

Codex 静态审查发现 P0/P1 阻断问题,需要修复后提交新 commit 重新 CR。

代码问题

  1. [P1 | 必须修改] 批量同步未落实声明的 1–5 个数量限制internal/shortcut/aitable/datasource.go:281

    • 说明:契约、帮助和 Reference 都声明 table-ids 单次只能传 1–5 个,但这里直接将任意长度的切片发送给 run_datasource_sync+datasource-sync 因而会接受 6 个以上 ID;新增的非 Shortcut aitable datasource sync 也只检查非空而没有检查上限。这样 Agent 按契约验证后仍可能发出服务端必然拒绝的写请求,而且没有执行文档要求的拆批。请在两个入口调用 MCP 前统一校验 1–5 个,并为边界值和超限拒绝补测试;task-ids 的最多 5 个限制也应同样落实。
  2. [P2 | 建议修改] 自动同步配置文档发布了两套互斥枚举skills/multi/dingtalk-aitable/references/aitable/aitable-datasource.md:98

    • 说明:该 Reference 将 syncType/scheduleType 写成 scheduleday|week|month,并给出可复制示例;同一 PR 的 Shortcut 参数契约却声明 scheduleddaily|weekly|monthly。由于实现只校验 JSON 形状并原样透传,至少其中一套会导致创建或更新失败。请以真实接口契约为准统一 Reference、Flag 描述和示例,并考虑在 CLI 侧校验这些枚举。
  3. [P2 | 建议修改] Reference 声明了命令并不接受的 conflict-strategy 参数skills/multi/dingtalk-aitable/references/aitable/aitable-datasource.md:177

    • 说明:创建命令的参数表公开了 --conflict-strategy,但 DatasourceCreate.Flags 和新增的 aitable datasource create 都没有注册或转发这个参数。Agent 按 Reference 使用时会在 Cobra 参数解析阶段直接失败。请删除该说明,或在两个公开入口及其 Contract/MCP 映射中完整实现该参数。

此结论已作为 GitHub CHANGES_REQUESTED 提交;不会自动合并。

auto-merge was automatically disabled August 20, 2026 09:59

Head branch was pushed to by a user without write access

auto-merge was automatically disabled August 20, 2026 12:48

Head branch was pushed to by a user without write access

@github-actions
github-actions Bot enabled auto-merge August 20, 2026 12:49
@wxianfeng

wxianfeng commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

开源 DWS Codex 自动 CR:不通过,CI 未通过

Feat/add aitable datasource tools

  • 评审 SHA:f632d100dd679aecb08540da1b6d884dd14dec71
  • CI 状态:未通过(27 通过,4 跳过,4 未通过)
  • 冲突状态:无冲突
  • Agent 测试报告:不通过,缺少“Agent 测试报告”截图(aitable)
  • 指令 CI 集成测试:不通过,缺少“指令 CI 集成测试”截图(aitable)
  • 自动 CR 结论:不通过,CI 未通过
  • 代码评审结论:通过

变更总结

本次变更新增了两套 AI 表格数据源命令入口及相应契约、测试和使用文档。快捷命令的参数转发、JSON 对象校验和批量上限处理基本一致;但新增长命令的能力声明与实际参数面不一致,且文档对自动同步频率支持存在自相矛盾,建议合入前修正。未执行测试或构建,仅完成静态审查。

CI 单测结果

结论说明

自动 CR 不通过,原因如下:

  • CI 单测存在失败、取消或超时
  • PR 描述或发起人评论缺少 aitable Agent 测试截图
  • PR 描述或发起人评论缺少 aitable 指令 CI 集成测试截图

代码问题

  1. [P2 | 建议修改] 长命令宣称支持调整同步字段,但没有暴露对应参数internal/helpers/aitable.go:8260

    • 说明:aitable datasource create/update 的选择契约将“调整字段”列为适用场景,但这两个命令只注册了 source-configauto,没有快捷命令已有的 field-idsauto-sync-setting,执行体也不会向 MCP 传递 fieldIdsautoSyncSetting。因此 Agent 可能依据已发布的 use_when 选择该入口,却无法完成调整同步字段或频率的请求;同一 PR 中的 +datasource-* 入口又支持这些能力,形成两套不一致的公开契约。应补齐长命令的参数声明、校验、转发和测试,或收窄其选择描述并明确引导到快捷命令。
  2. [P2 | 建议修改] 使用指南同时声称支持和不支持自定义同步频率docs/datasource-usage-guide.md:457

    • 说明:前文为 create/update 发布了 --auto-sync-setting,并详细说明其格式,但注意事项第 7 条又称“CLI 暂不支持自定义频率”。这会让用户无法判断该参数是否可用,并可能放弃已经实现的配置能力。应统一文档结论;若仅快捷入口支持,也应明确限定具体命令入口。

自动 CR 结论为不通过;未提交 GitHub Review,也不会自动合并。

MCP requires the auto field in create_datasource / update_datasource_config
requests. Previously CLI only sent it when --auto was explicitly changed,
causing failures when users omitted the flag. Now both shortcut and helper
layers always include auto=false by default.

Also update flag descriptions and docs to clarify that the field is always
sent downstream, and add test assertions for the default-false behavior.
auto-merge was automatically disabled August 20, 2026 14:02

Head branch was pushed to by a user without write access

@github-actions
github-actions Bot enabled auto-merge August 20, 2026 14:03

@wxianfeng wxianfeng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

开源 DWS Codex 自动 CR:不通过,需修复

Feat/add aitable datasource tools

  • 评审 SHA:d4f55263cde0feb12ea899e49b3029cb8d656101
  • CI 状态:未通过(27 通过,4 跳过,4 未通过)
  • 冲突状态:无冲突
  • Agent 测试报告:不通过,缺少“Agent 测试报告”截图(aitable)
  • 指令 CI 集成测试:已通过(aitable,来源:PR 描述)
  • 自动 CR 结论:不通过,需修复
  • 代码评审结论:不通过,需修复

变更总结

本次变更新增了 7 个 AITable 数据源快捷命令及对应原生命令、Schema 契约、测试和使用文档。读取类命令及多数参数映射保持一致,但更新命令会在未提供 --auto 时仍显式下发 auto=false,与文档承诺的 PATCH 语义冲突,并可能意外关闭现有自动同步,因此当前版本不应合并。受安全限制未执行测试。

CI 单测结果

结论说明

Codex 静态审查发现 P0/P1 阻断问题,需要修复后提交新 commit 重新 CR。

代码问题

  1. [P1 | 必须修改] 省略 --auto 会意外关闭已有数据源的自动同步internal/shortcut/aitable/datasource.go:190

    • 说明:+datasource-update 无条件执行 params["auto"] = rt.Bool("auto"),因此用户只更新 source-config、字段或频率时也会向下游发送 auto=false。同 PR 的参考文档明确写着“不传时保持原设置”,所以这会静默修改用户未要求变更的配置;新增的原生 aitable datasource update 也有相同行为。应仅在 flag 被显式设置时下发 auto(同时支持 --auto=false 以便关闭),并增加测试覆盖省略时不包含该参数、显式 true/false 时精确传参。

此结论已作为 GitHub CHANGES_REQUESTED 提交;不会自动合并。

@wxianfeng

Copy link
Copy Markdown
Collaborator

开源 DWS Codex 自动 CR:不通过,需修复

Feat/add aitable datasource tools

  • 评审 SHA:d4f55263cde0feb12ea899e49b3029cb8d656101
  • CI 状态:未通过(27 通过,4 跳过,4 未通过)
  • 冲突状态:无冲突
  • Agent 测试报告:不通过,缺少“Agent 测试报告”截图(aitable)
  • 指令 CI 集成测试:已通过(aitable,来源:PR 描述)
  • 自动 CR 结论:不通过,需修复
  • 代码评审结论:不通过,需修复

变更总结

本次变更新增了 7 个 AITable 数据源快捷命令及对应原生命令、Schema 契约、测试和使用文档。读取类命令及多数参数映射保持一致,但更新命令会在未提供 --auto 时仍显式下发 auto=false,与文档承诺的 PATCH 语义冲突,并可能意外关闭现有自动同步,因此当前版本不应合并。受安全限制未执行测试。

CI 单测结果

结论说明

Codex 静态审查发现 P0/P1 阻断问题,需要修复后提交新 commit 重新 CR。

代码问题

  1. [P1 | 必须修改] 省略 --auto 会意外关闭已有数据源的自动同步internal/shortcut/aitable/datasource.go:190

    • 说明:+datasource-update 无条件执行 params["auto"] = rt.Bool("auto"),因此用户只更新 source-config、字段或频率时也会向下游发送 auto=false。同 PR 的参考文档明确写着“不传时保持原设置”,所以这会静默修改用户未要求变更的配置;新增的原生 aitable datasource update 也有相同行为。应仅在 flag 被显式设置时下发 auto(同时支持 --auto=false 以便关闭),并增加测试覆盖省略时不包含该参数、显式 true/false 时精确传参。

此结论已作为 GitHub CHANGES_REQUESTED 提交;不会自动合并。

Omitting --auto on +datasource-update previously sent auto=false to
MCP, silently disabling auto-sync for existing datasources. Now auto
is only included in tool args when the flag is explicitly provided,
so --auto=true and --auto=false work while omission preserves the
existing setting. Updated flag descriptions and added tests.
auto-merge was automatically disabled August 20, 2026 14:43

Head branch was pushed to by a user without write access

@github-actions
github-actions Bot requested a review from wxianfeng August 20, 2026 14:44
@github-actions
github-actions Bot enabled auto-merge August 20, 2026 14:44
@wxianfeng

Copy link
Copy Markdown
Collaborator

开源 DWS Codex 自动 CR:不通过,CI 未通过

Feat/add aitable datasource tools

  • 评审 SHA:787f2c0506af22a62c774280800fa847563fe3cb
  • CI 状态:未通过(29 通过,4 跳过,2 未通过)
  • 冲突状态:无冲突
  • Agent 测试报告:不通过,缺少“Agent 测试报告”截图(aitable)
  • 指令 CI 集成测试:已通过(aitable,来源:PR 描述)
  • 自动 CR 结论:不通过,CI 未通过
  • 代码评审结论:通过

变更总结

本次变更新增了 AI 表格数据源的 7 个 Shortcut、对应原生命令、Schema 契约测试及使用文档;参数映射和批量上限整体一致,但更新入口允许在未提供任何配置变更时仍调用会触发同步的写接口,存在可避免的副作用。另有一处技能文档示例缺少其自身声明为必填的 sourceConfig 成员。受静态审查限制,未执行测试或验证真实 MCP 响应。

CI 单测结果

结论说明

自动 CR 不通过,原因如下:

  • CI 单测存在失败、取消或超时
  • PR 描述或发起人评论缺少 aitable Agent 测试截图

代码问题

  1. [P2 | 建议修改] 拒绝没有任何配置变更的数据源更新internal/shortcut/aitable/datasource.go:211

    • 说明:+datasource-update 只要求 base-idtable-id;若 source-configautofield-idsauto-sync-setting 均未设置,代码仍会调用 update_datasource_config。该接口按本变更的契约会在更新后触发一次同步,因此一次没有更新意图的调用也可能启动非幂等写任务;而 Selection 又明确要求“仅需触发同步”使用 +datasource-sync。应增加 require-one-of/运行时校验,至少要求一个可变字段,并让原生 aitable datasource update 入口保持相同行为,同时补充无变更时不得调用 MCP 的测试。
  2. [P2 | 建议修改] 修正缺少 name 的可复制 sourceConfig 示例skills/multi/dingtalk-aitable/references/aitable/aitable-datasource.md:147

    • 说明:这里的 +datasource-get-fields 示例缺少 name,但同一文档前面明确规定 processCode/name/iconUrl/url 都必须从 list-sources 原样透传,命令声明也称其结构与 create 相同。代理或用户复制该示例会构造不完整的 OA sourceConfig,并在下游失败;新增的 Schema 示例测试只检查 Contract 中的示例,覆盖不到此技能文档。请补上 name,并考虑让文档示例进入同一契约校验。

自动 CR 结论为不通过;未提交 GitHub Review,也不会自动合并。

+datasource-update now requires at least one mutable option
(--source-config, --auto, --field-ids, or --auto-sync-setting)
before calling update_datasource_config, preventing accidental
sync triggers. The native datasource update command enforces the
same guard for its supported flags. Also adds the required name
field to the +datasource-get-fields doc example.
auto-merge was automatically disabled August 20, 2026 15:05

Head branch was pushed to by a user without write access

@github-actions
github-actions Bot enabled auto-merge August 20, 2026 15:06

@wxianfeng wxianfeng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

开源 DWS Codex 自动 CR:不通过,需修复

Feat/add aitable datasource tools

  • 评审 SHA:7b05a9d54c89dbd0a36d1614afc6914534f4cb73
  • CI 状态:未通过(27 通过,4 跳过,4 未通过)
  • 冲突状态:无冲突
  • Agent 测试报告:不通过,缺少“Agent 测试报告”截图(aitable)
  • 指令 CI 集成测试:已通过(aitable,来源:PR 描述)
  • 自动 CR 结论:不通过,需修复
  • 代码评审结论:不通过,需修复

变更总结

本次新增了 7 个 AI 表格数据源快捷命令及对应原生命令、Schema 契约、测试和使用文档;批量数量限制、读写安全元数据和快捷命令的参数映射总体完整。但新增的 Agent 可见原生命令与快捷命令能力不一致,导致字段范围和自动同步频率无法通过原生入口配置;文档中另有一个缺少必填字段的可复制示例。受审查边界限制,未执行测试或构建。

CI 单测结果

结论说明

Codex 静态审查发现 P0/P1 阻断问题,需要修复后提交新 commit 重新 CR。

代码问题

  1. [P1 | 必须修改] 原生 create/update 命令遗漏字段和自动同步频率参数internal/helpers/aitable.go:8263

    • 说明:新增的 aitable datasource create/update 也会作为 Agent 可见工具发布,但这里只注册并转发了 source-configauto,没有同一 PR 中快捷命令已经支持的 field-idsauto-sync-setting。尤其 update 的 UseWhen 明确声称可“调整字段”,Agent 选择该工具后却无法传入字段范围;create 同样无法完成文档所述的部分字段同步或自定义频率。请在原生命令的 Cobra flags、Contract Parameters、变更检测和 MCP 参数映射中补齐这两个参数,或不要发布与实际能力不符的选择契约。
  2. [P2 | 建议修改] 更新审批模板的文档示例缺少必填 namedocs/datasource-usage-guide.md:383

    • 说明:“更换审批模板后重新同步”的可复制命令中,source-config 只有 processCode、dataType、recentDays、iconUrl 和 url,缺少本文及命令契约反复声明必须从 list-sources 原样透传的 name。照抄该示例会使更新请求被下游拒绝。请补上 name,并考虑让文档示例接受与 Schema 示例相同的必填成员校验。

此结论已作为 GitHub CHANGES_REQUESTED 提交;不会自动合并。

@wxianfeng

Copy link
Copy Markdown
Collaborator

开源 DWS Codex 自动 CR:不通过,需修复

Feat/add aitable datasource tools

  • 评审 SHA:7b05a9d54c89dbd0a36d1614afc6914534f4cb73
  • CI 状态:未通过(27 通过,4 跳过,4 未通过)
  • 冲突状态:无冲突
  • Agent 测试报告:不通过,缺少“Agent 测试报告”截图(aitable)
  • 指令 CI 集成测试:已通过(aitable,来源:PR 描述)
  • 自动 CR 结论:不通过,需修复
  • 代码评审结论:不通过,需修复

变更总结

本次新增了 7 个 AI 表格数据源快捷命令及对应原生命令、Schema 契约、测试和使用文档;批量数量限制、读写安全元数据和快捷命令的参数映射总体完整。但新增的 Agent 可见原生命令与快捷命令能力不一致,导致字段范围和自动同步频率无法通过原生入口配置;文档中另有一个缺少必填字段的可复制示例。受审查边界限制,未执行测试或构建。

CI 单测结果

结论说明

Codex 静态审查发现 P0/P1 阻断问题,需要修复后提交新 commit 重新 CR。

代码问题

  1. [P1 | 必须修改] 原生 create/update 命令遗漏字段和自动同步频率参数internal/helpers/aitable.go:8263

    • 说明:新增的 aitable datasource create/update 也会作为 Agent 可见工具发布,但这里只注册并转发了 source-configauto,没有同一 PR 中快捷命令已经支持的 field-idsauto-sync-setting。尤其 update 的 UseWhen 明确声称可“调整字段”,Agent 选择该工具后却无法传入字段范围;create 同样无法完成文档所述的部分字段同步或自定义频率。请在原生命令的 Cobra flags、Contract Parameters、变更检测和 MCP 参数映射中补齐这两个参数,或不要发布与实际能力不符的选择契约。
  2. [P2 | 建议修改] 更新审批模板的文档示例缺少必填 namedocs/datasource-usage-guide.md:383

    • 说明:“更换审批模板后重新同步”的可复制命令中,source-config 只有 processCode、dataType、recentDays、iconUrl 和 url,缺少本文及命令契约反复声明必须从 list-sources 原样透传的 name。照抄该示例会使更新请求被下游拒绝。请补上 name,并考虑让文档示例接受与 Schema 示例相同的必填成员校验。

此结论已作为 GitHub CHANGES_REQUESTED 提交;不会自动合并。

…eate/update

Native datasource create/update now expose --field-ids and
--auto-sync-setting, matching the shortcut-layer capabilities:
- flags registered on both commands
- Contract Parameters updated
- values mapped to MCP tool args
- JSON validation for --auto-sync-setting
- no-change update guard now counts the new flags

Also fixes the missing required name in the usage-guide update example.
auto-merge was automatically disabled August 20, 2026 15:42

Head branch was pushed to by a user without write access

@github-actions
github-actions Bot requested a review from wxianfeng August 20, 2026 15:42
@github-actions
github-actions Bot enabled auto-merge August 20, 2026 15:42

@wxianfeng wxianfeng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

开源 DWS Codex 自动 CR:不通过,存在代码冲突

Feat/add aitable datasource tools

  • 评审 SHA:06c177952bfa8b61e430e6aac7a81dacae293b1e
  • CI 状态:未通过(29 通过,4 跳过,2 未通过)
  • 冲突状态:有冲突
  • Agent 测试报告:不通过,缺少“Agent 测试报告”截图(aitable)
  • 指令 CI 集成测试:已通过(aitable,来源:PR 描述)
  • 自动 CR 结论:不通过,存在代码冲突
  • 代码评审结论:不通过,需修复

变更总结

本次变更新增了 AI 表格数据源的 7 个快捷命令和 7 个分组命令,并补充了契约、语义目录、使用文档及参数转发测试。大部分命令的必填参数、批量上限和 MCP 参数映射保持一致,但分组版 update 对显式空字段列表的处理存在错误,会把一次本应更新字段选择的请求变成无配置变更的同步调用。受审查边界限制,未执行测试或构建。

CI 单测结果

结论说明

Codex 静态审查发现 P0/P1 阻断问题,需要修复后提交新 commit 重新 CR。

代码问题

  1. [P1 | 必须修改] 显式清空 field-ids 时未向下游发送字段变更internal/helpers/aitable.go:8335

    • 说明:datasource update --field-ids '' 会令 Changed("field-ids") 为 true,因此绕过“至少一个配置变更”的拒绝逻辑;但这里又以解析前的字符串非空作为加入 fieldIds 的条件,最终请求只包含 baseId/tableId。命令随后仍调用 update_datasource_config 并触发同步,却没有执行用户要求的字段选择变更。快捷命令版本按 Changed 传递空切片,也说明两个公开入口的语义已经分叉。应按 Changed 判断并发送解析后的空数组(若下游不允许清空,则应在调用前明确拒绝),同时添加显式空值的参数映射测试。

此结论已作为 GitHub CHANGES_REQUESTED 提交;不会自动合并。

@wxianfeng

Copy link
Copy Markdown
Collaborator

开源 DWS Codex 自动 CR:不通过,存在代码冲突

Feat/add aitable datasource tools

  • 评审 SHA:06c177952bfa8b61e430e6aac7a81dacae293b1e
  • CI 状态:未通过(29 通过,4 跳过,2 未通过)
  • 冲突状态:有冲突
  • Agent 测试报告:不通过,缺少“Agent 测试报告”截图(aitable)
  • 指令 CI 集成测试:已通过(aitable,来源:PR 描述)
  • 自动 CR 结论:不通过,存在代码冲突
  • 代码评审结论:不通过,需修复

变更总结

本次变更新增了 AI 表格数据源的 7 个快捷命令和 7 个分组命令,并补充了契约、语义目录、使用文档及参数转发测试。大部分命令的必填参数、批量上限和 MCP 参数映射保持一致,但分组版 update 对显式空字段列表的处理存在错误,会把一次本应更新字段选择的请求变成无配置变更的同步调用。受审查边界限制,未执行测试或构建。

CI 单测结果

结论说明

Codex 静态审查发现 P0/P1 阻断问题,需要修复后提交新 commit 重新 CR。

代码问题

  1. [P1 | 必须修改] 显式清空 field-ids 时未向下游发送字段变更internal/helpers/aitable.go:8335

    • 说明:datasource update --field-ids '' 会令 Changed("field-ids") 为 true,因此绕过“至少一个配置变更”的拒绝逻辑;但这里又以解析前的字符串非空作为加入 fieldIds 的条件,最终请求只包含 baseId/tableId。命令随后仍调用 update_datasource_config 并触发同步,却没有执行用户要求的字段选择变更。快捷命令版本按 Changed 传递空切片,也说明两个公开入口的语义已经分叉。应按 Changed 判断并发送解析后的空数组(若下游不允许清空,则应在调用前明确拒绝),同时添加显式空值的参数映射测试。

此结论已作为 GitHub CHANGES_REQUESTED 提交;不会自动合并。

Make +datasource-sync-status consistent across shortcut and native
commands: --task-ids is now required, descriptions focus on querying
by taskId, and optional/IDLE semantics are removed. Update tests,
usage guide, reference doc, and SKILL description accordingly.
auto-merge was automatically disabled August 20, 2026 16:27

Head branch was pushed to by a user without write access

@github-actions
github-actions Bot requested a review from wxianfeng August 20, 2026 16:27
@github-actions
github-actions Bot enabled auto-merge August 20, 2026 16:27

@wxianfeng wxianfeng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

开源 DWS Codex 自动 CR:不通过,存在代码冲突

Feat/add aitable datasource tools

  • 评审 SHA:33900113d477ffa1796e2b010fc376ed192c05f8
  • CI 状态:通过(2 通过)
  • 冲突状态:有冲突
  • Agent 测试报告:不通过,缺少“Agent 测试报告”截图(aitable)
  • 指令 CI 集成测试:已通过(aitable,来源:PR 描述)
  • 自动 CR 结论:不通过,存在代码冲突
  • 代码评审结论:不通过,需修复

变更总结

该变更新增了 7 个 AI 表格数据源原生命令及对应 Shortcut,并补充了 Schema、语义目录、文档和参数映射测试。主要调用映射和批量上限处理一致,但原生命令的 JSON 类型校验及空值更新处理存在回归:无效结构会被发送到 MCP,显式空更新还可能在没有任何配置字段的情况下触发同步。由于后者会产生非预期写操作,本修订不应合并。按约束未执行测试或仓库代码。

CI 单测结果

结论说明

Codex 静态审查发现 P0/P1 阻断问题,需要修复后提交新 commit 重新 CR。

代码问题

  1. [P1 | 必须修改] 显式空更新会在未发送任何配置字段时触发同步internal/helpers/aitable.go:8299

    • 说明:datasource update 使用非空字符串决定是否加入 fieldIds/autoSyncSetting,但随后使用 Flags().Changed 判断是否提供了变更。因此 --field-ids ''--auto-sync-setting '' 会绕过“至少一个配置变更”检查,却只向 update_datasource_config 发送 baseIdtableId。该接口按本次声明会触发一次同步,导致看似设置空值的调用产生无配置变更的非预期写操作;同时它与 Shortcut 路径按 Changed 传递空数组的行为不一致。应统一按 Changed 处理并明确支持清空,或在空值时于调用 MCP 前拒绝。
  2. [P2 | 建议修改] JSON 对象校验实际接受数组和标量internal/helpers/aitable.go:8131

    • 说明:validateJSONObject 只检查 JSON 能否解析且结果非 nil,因此 []"text"1true 都会通过,并作为 sourceConfigautoSyncSetting 发送给 MCP;这违反了参数声明中的“JSON 对象”契约,也与 Shortcut 使用 parseJSONObject 的校验行为不一致。应断言解码结果为 map[string]any,并增加数组、字符串及数字的拒绝测试。

此结论已作为 GitHub CHANGES_REQUESTED 提交;不会自动合并。

@wxianfeng

Copy link
Copy Markdown
Collaborator

开源 DWS Codex 自动 CR:不通过,存在代码冲突

Feat/add aitable datasource tools

  • 评审 SHA:33900113d477ffa1796e2b010fc376ed192c05f8
  • CI 状态:通过(2 通过)
  • 冲突状态:有冲突
  • Agent 测试报告:不通过,缺少“Agent 测试报告”截图(aitable)
  • 指令 CI 集成测试:已通过(aitable,来源:PR 描述)
  • 自动 CR 结论:不通过,存在代码冲突
  • 代码评审结论:不通过,需修复

变更总结

该变更新增了 7 个 AI 表格数据源原生命令及对应 Shortcut,并补充了 Schema、语义目录、文档和参数映射测试。主要调用映射和批量上限处理一致,但原生命令的 JSON 类型校验及空值更新处理存在回归:无效结构会被发送到 MCP,显式空更新还可能在没有任何配置字段的情况下触发同步。由于后者会产生非预期写操作,本修订不应合并。按约束未执行测试或仓库代码。

CI 单测结果

结论说明

Codex 静态审查发现 P0/P1 阻断问题,需要修复后提交新 commit 重新 CR。

代码问题

  1. [P1 | 必须修改] 显式空更新会在未发送任何配置字段时触发同步internal/helpers/aitable.go:8299

    • 说明:datasource update 使用非空字符串决定是否加入 fieldIds/autoSyncSetting,但随后使用 Flags().Changed 判断是否提供了变更。因此 --field-ids ''--auto-sync-setting '' 会绕过“至少一个配置变更”检查,却只向 update_datasource_config 发送 baseIdtableId。该接口按本次声明会触发一次同步,导致看似设置空值的调用产生无配置变更的非预期写操作;同时它与 Shortcut 路径按 Changed 传递空数组的行为不一致。应统一按 Changed 处理并明确支持清空,或在空值时于调用 MCP 前拒绝。
  2. [P2 | 建议修改] JSON 对象校验实际接受数组和标量internal/helpers/aitable.go:8131

    • 说明:validateJSONObject 只检查 JSON 能否解析且结果非 nil,因此 []"text"1true 都会通过,并作为 sourceConfigautoSyncSetting 发送给 MCP;这违反了参数声明中的“JSON 对象”契约,也与 Shortcut 使用 parseJSONObject 的校验行为不一致。应断言解码结果为 map[string]any,并增加数组、字符串及数字的拒绝测试。

此结论已作为 GitHub CHANGES_REQUESTED 提交;不会自动合并。

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants