Skip to content

fix(integrations): sync public integration API contract - #93

Merged
alick-liming merged 3 commits into
feat/public-integration-contract-syncfrom
codex/public-integration-contract-sync-20261009
Oct 13, 2026
Merged

alick-liming merged 3 commits into
feat/public-integration-contract-syncfrom
codex/public-integration-contract-sync-20261009

Conversation

@alick-liming

Copy link
Copy Markdown
Contributor

目的

仅同步公共集成 API 契约,配合 fc-datasource #556、fc-saas-web #1203 和 flashduty-docs #1028;不改其他服务、鉴权、路由或数据库。

变更

  • 同步九条 /integration/* 契约(type/list 原本一致,实际 diff 涉及八条路径)及六个相关 schema。
  • list/info 保留原始 settings、解密 integration_key 和相关 ID、编辑权限字段。
  • create 支持 integration_key/is_test;update 支持 is_test,并保留 team_id=0、headers={} 的请求语义。
  • 保留插件测试失败结果,并避免未测试时生成假的失败结果;使用现有 preserve-absence 元数据,不修改生成器。
  • 仅重新生成集成相关模型与方法注释,新增契约回归测试。

兼容性和依赖

  • API 方法名称和签名不变;旧 datasource 服务不删除。
  • IntegrationDetail 的部分 any 字段修正为 string/int64/Timestamp,依赖类型断言的 SDK 使用方需适配;时间序列化遵循已有 Timestamp 约定。
  • schema 源为 flashduty-docs #1028。新字段需 fc-datasource #556 上线后使用。
  • CLI 当前 SDK 依赖另含尚未进入 SDK main 的 automation timezone 功能;不能直接替换并丢失该功能,待明确依赖整合顺序。
  • 本 PR 仅进入 feat/public-integration-contract-sync;main 发版由维护者操作。

验证

  • 新字段保留测试:修复前失败,修复后通过。
  • 未返回 test 的缺省测试:修复前失败,修复后通过。
  • make GOLANGCI_LINT=/Users/lim/go/go/go/bin/golangci-lint:格式化、lint(0 issues)、全量 race 测试、构建通过。
  • go vet ./...、git diff --check 通过。
  • 未进行生产 HTTP 写操作或数据库操作;本地测试覆盖 JSON 契约。

@alick-liming

Copy link
Copy Markdown
Contributor Author

CLI dependency preparation

  • Pushed 577bf0504904b683160ccc7c7c448883d5661669 to this existing PR branch; main was not merged or modified.
  • Restore only the already-published AutomationRuleUpdateRequest.Timezone pointer field and nil/empty/named regression tests. Latest CLI main already uses this field; preserving it prevents the integration SDK pin from breaking existing automation commands.
  • CLI can now pin the immutable commit as v0.15.13-0.20261012034738-577bf0504904; no tag or release is needed for that dependency.
  • make, race tests, vet, build, generate-drift and independent review passed; all PR CI checks are green.
  • No Runner/Safari changes, CDN upload or deployment.

@alick-liming
alick-liming marked this pull request as ready for review October 13, 2026 01:02
@alick-liming
alick-liming merged commit f5132b1 into feat/public-integration-contract-sync Oct 13, 2026
4 of 8 checks passed
@alick-liming
alick-liming deleted the codex/public-integration-contract-sync-20261009 branch October 13, 2026 01:03
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.

1 participant