Skip to content

docs: 完善 Webhook 事件与 Transaction 字段文档 - #385

Open
rcsh1 wants to merge 4 commits into
CoboGlobal:masterfrom
rcsh1:playbook/run-run_2b1f8ce3822b41a0
Open

docs: 完善 Webhook 事件与 Transaction 字段文档#385
rcsh1 wants to merge 4 commits into
CoboGlobal:masterfrom
rcsh1:playbook/run-run_2b1f8ce3822b41a0

Conversation

@rcsh1

@rcsh1 rcsh1 commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

关联来源

意图

补齐 Webhook 事件类型、Transaction 与 MPC TSS Request Payload 参考,解决客户难以确认事件触发条件、完整 JSON 结构及阶段性字段可用性的问题。集中说明 Transaction 字段语义、充提币来源与目标结构、入账事件选择、重试隔离和失败后的恢复路径。英文与中文文档保持一致,并以已核实的事件注册、状态映射和序列化逻辑为依据。

变更摘要

  • docs.json:将新增的 Transaction Webhook、MPC TSS Request Webhook 和 Transaction 字段页面注册到中英文导航。
  • v2/guides/transactions/transaction-fields.mdx:新增 Transaction 字段字典,说明 token_idasset_idrequest_id、RBF、cobo_category 及条件字段。
  • v2/guides/webhooks-callbacks/mpc-tss-request-webhook-events.mdx:新增 wallets.mpc.tss_request.* 事件、触发条件、字段和完整示例。
  • v2/guides/webhooks-callbacks/set-up-endpoint.mdx:补充 Callback 与后续 Transaction 阶段的字段可用性对照和配套 JSON 示例。
  • v2/guides/webhooks-callbacks/transaction-webhook-events.mdx:新增 wallets.transaction.* 生命周期映射、Payload 结构和覆盖多链及充提币场景的示例。
  • v2/guides/webhooks-callbacks/webhook-event-type.mdx:补充已注册的基础事件并链接新的 Payload 参考页。
  • v2_cn/guides/transactions/transaction-fields.mdx:新增对应的中文 Transaction 字段字典。
  • v2_cn/guides/webhooks-callbacks/mpc-tss-request-webhook-events.mdx:新增对应的中文 MPC TSS Request Webhook 参考页。
  • v2_cn/guides/webhooks-callbacks/set-up-endpoint.mdx:同步中文 Callback 字段可用性说明和示例。
  • v2_cn/guides/webhooks-callbacks/transaction-webhook-events.mdx:新增对应的中文 Transaction Webhook 参考页。
  • v2_cn/guides/webhooks-callbacks/webhook-event-type.mdx:同步中文事件清单和新页面链接。
  • 本 PR 不包含 dev_openapi.yamldeveloper-site-waas2 中的 api-spec 源 YAML 改动将在单独 PR 中提交。

关联 PR

  • api-spec PR 将自动创建,并以评论形式回链本 PR。

代码证据

  • custody/custody/cobo/settings/91_webhook.py:4:确认 wallets.transaction.*wallets.mpc.tss_request.* 的基础注册事件清单。
  • custody/custody/cobo/settings/91_webhook.py:50:确认 mpc_vaults.updated 已注册。
  • custody/custody/cobo/settings/91_webhook.py:54:确认 mpc_vaults.deleted 已注册。
  • custody/custody/cobo/settings/91_webhook.py:58:确认 wallets.updated 已注册。
  • custody/custody/cobo/settings/91_webhook.py:62:确认 organizations.updated 已注册。
  • custody/waas2/webhooks/managers/wallet_event_by_source.py:25:确认 Success 映射到 wallets.transaction.succeededFailedRejectedCanceled 映射到 wallets.transaction.failed
  • custody/waas2/webhooks/managers/wallet_event_by_source.py:51:确认 Transaction Webhook Payload 使用公开 Transaction 视图。
  • custody/waas2/webhooks/managers/wallet_event_by_source.py:116:确认 Transaction Webhook 的触发与去重逻辑。
  • custody/waas2/transactions/dev/bo/transaction_query/transaction.py:319:确认 replacement 包含 replaced_by_transaction_hash
  • custody/waas2/transactions/dev/bo/transaction_query/transaction.py:363:确认 Transaction 字段集合及其可选字段。
  • custody/waas2/transactions/mongo/manager/read/waas_transaction.py:178:确认公开 Transaction Payload 的条件填充逻辑。
  • custody/waas2/developers/managers/callback_message.py:201:确认 Callback data 由 Transaction 序列化结果生成。
  • custody/waas2/developers/managers/callback_message.py:511:确认二次 Callback 按 URL 独立投递、跳过已成功 Endpoint,并最多重试 30 次。
  • custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:29:确认 MPC TSS Webhook 仅覆盖 Portal 密钥生成与 Reshare 请求。
  • custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:35:确认 WAIT_SEND_TO_BCSENT 中间状态不会发布事件。
  • custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:41:确认 TSS Request 的 createdupdatedsucceededfailed 事件分支。
  • custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:130:确认 TSS Webhook Payload 的字段填充逻辑。
  • custody/waas2/mpc/bo/dev/vault.py:235:确认共享 TSSRequestBo Payload 字段。
  • custody/waas2/transactions/mongo/manager/write/fields/token.py:24:确认 token_id 来源于 asset_coinasset_id 来源于 unique_asset_id
  • custody/waas2/transactions/dev/bo/transaction_query/source.py:18:确认公开 Transaction 的 source 变体。
  • custody/waas2/transactions/dev/bo/transaction_query/destination.py:28:确认公开 Transaction 的 destination 变体。
  • custody/waas2/transactions/mongo/enums/transaction_fields.py:45:确认 cobo_category 枚举包含 AutoSweep
  • custody/waas2/transaction_query/handlers/withdraw_request.py:337:确认提币生命周期区分授权、合规和广播状态。
  • custody/waas2/webhooks/views/dev/event_retry.py:19:确认 Webhook 事件支持权限校验后的手动重发。
  • custody/waas2/webhooks/views/dev/events.py:26:确认 Webhook 事件列表按 Endpoint 查询并使用游标分页。
  • custody/waas2/transactions/dev/bo/transaction_query/transaction.py:195:确认非唯一 Transaction 查询窗口最长为 90 天。
  • custody-2.0-website/src/pages/Developers/Events/Detail/index.tsx:133:确认 Portal 对 FailedRetrying 事件提供重发操作。
  • developer-site-waas2/v2/cobo_waas2_openapi_spec/paths/webhooks/events.yaml:6:确认公开的 List all webhook events 契约声明 30 天查询窗口和 Endpoint 作用域。
  • developer-site-waas2/v2/cobo_waas2_openapi_spec/paths/webhooks/retry_by_event_id.yaml:9:确认 Retry event 适用于 RetryingFailed 事件并要求 webhook.resend 权限。
  • developer-site-waas2/v2/cobo_waas2_openapi_spec/paths/transactions/transactions.yaml:7:确认 List all transactions 提供组织级过滤与游标分页,可用于对账。

⚠️ 待确认事项

  • 待人工确认 wallets.mpc.tss_request.failed 示例沿用既有文档中的 status: KeyGeneratingFailed;发布前需再次核实该值确为对应事件的终态失败值,而非中间状态。

rcsh1 and others added 4 commits July 21, 2026 14:38
- CN upgrade-guide.mdx: restore WaaS 2.0 API operation names to English
  (Create wallet, Create addresses in wallet, Transfer token, Speed up
  transaction, Drop transaction, Cancel transaction, Call smart contract,
  Sign message, List all transactions, Get transaction information)
- transfer-routing.mdx EN+CN: add note clarifying force_internal /
  force_external are mutually exclusive, and add JSON code examples
  showing force-Cobo-Loop, force-on-chain, and default routing
- status.mdx EN+CN: update FailedSignerTimeout remedy to specify retry
  operation by original transaction type (Transfer token / Call smart
  contract / Sign message) instead of always pointing to Transfer token

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rcsh1

rcsh1 commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

@rcsh1

rcsh1 commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

运行过程记录(自动生成)

本评论记录本次 doc 运行的内部过程,便于审查每个结论的来源。

1. 意图(确认后)

来源:Phabricator T96128(https://pha.1cobo.com/T96128)。该任务汇总 2025-11 至 2026-06 的 140 条反馈;H1 有 126 条相关反馈,其中 custody 112 条。以下为 7 个文档问题:

  1. webhook-recovery-and-retention(缺失内容 / 不清楚或不完整)

证据:T96128 要求回答重试用尽后能否从 Developer Console 或 List all webhook events API 补数、是否支持 resend、如何用 List transactions 对账,以及 Mintlify 问题“webhook 数据的保留时间是多久”。疑似 webhook events 查询/运维文档缺少恢复路径、手动重发能力、Console/API 保留期与超期行为。需核对 webhook event persistence/TTL 配置、Console 与 List all webhook events API 的查询范围、resend handler/权限、清理任务,以及 List transactions 可用于对账的过滤与分页语义。

2. 探索发现(按仓库 × explorer)

原始并行探索包含 8 份较长 findings。为避免超过 GitHub 评论长度限制,本节按规则将每个 explorer 的 findings 截断为 handoff_brief,并保留关键 code_evidence;完整结论已在“综合结论”和“编辑计划”中保留。

developer-site × explorer A

Handoff brief:主工作应落在 developer-site,并强制同步 EN/CN。新增 Transaction Payload、MPC Payload、字段字典、订阅/入账和恢复 owner pages,并更新 docs.json。生成的 API references 不直接修改;schema 描述与示例进入 developer-site-waas2 的独立 api-spec PR,required/nullable 等结构变更交由开发团队。Portal 恢复 UI 文案应路由到 product-manual。仍需外部证据确认 webhook timeout/backoff、外部 retention、通用确认阈值语义、token-listing/KYA 生产可用性和精确 token catalog 映射。

关键证据:custody/waas2/webhooks/managers/wallet_event_by_source.py:25,51,116custody/waas2/transactions/dev/bo/transaction_query/transaction.py:319,363custody/waas2/developers/managers/callback_message.py:201custody/waas2/webhooks/views/dev/event_retry.py:19custody/waas2/webhooks/views/dev/events.py:26

custody × explorer B

Handoff brief:7 个任务均与 custody 相关。Transaction event family 与公开 TransactionData wire model 已确认;TSS payload 初查预算内未完全验证,需继续读取 builder。source/destination 已有较完整指南,字段字典主要补 token_id/asset_idrequest_idreplaced_by_transaction_hashcobo_category。Callback 多 URL 重试按 endpoint 独立,已成功 URL 后续跳过;Webhook event 的实际 backoff 位于外部服务,不能把客户观测当事实。恢复方面存在 resend API 和事件列表;本地 7 天 staging cleanup 不足以证明外部 retention。

关键证据:custody/custody/cobo/settings/91_webhook.py:6-36custody/waas2/transactions/dev/bo/transaction_query/transaction.py:319-396custody/waas2/developers/managers/callback_message.py:511-604custody/waas2/webhooks/managers/managers.py:11,105-129custody/waas2/webhooks/managers/wallet_event.py:152-171custody/waas2/webhooks/views/dev/event_retry.py:19

custody-2.0-website × explorer A

Handoff brief:Portal 动态读取 event definitions,Endpoint 注册同时要求 subscribedEventswalletScopes,因此不能描述为纯组织级订阅。Portal 展示 nextRetryTimestampretriesLeft、完整 JSON、delivery attempts,并对 Failed/Retrying 事件提供权限受控的 resend。前端可证明 UI 行为,但不能证明后端 event trigger、serializer、backoff 或 persistence TTL。

关键证据:custody-2.0-website/src/pages/Developers/Webhooks/AddOrWebhooksModal/index.tsx:202,215custody-2.0-website/src/pages/Developers/Events/Detail/index.tsx:26,100,133,145,160custody-2.0-website/src/pages/Developers/components/WebhookAttemptsTable/index.tsx:35

custody-2.0-website × explorer B

Handoff brief:前端类型与组件进一步确认阶段性字段、Portal resend 和事件时间过滤。Transaction 前端模型区分 ConfirmingSuccess,包含 KYT/Travel Rule 子状态和 Portal/API initiator;RBF 在不同前端模型中出现嵌套与扁平两种表示,最终文档应服从 custody 公共 serializer。重试调度、跨 endpoint 隔离和 retention TTL 仍不在前端实现范围。

关键证据:custody-2.0-website/src/interfaces/developers.ts:421-447,676-699,963-982custody-2.0-website/src/pages/Developers/Events/Detail/index.tsx:39-49,126-185custody-2.0-website/src/interfaces/transaction.ts:37-171,230-271,362-433

developer-site-waas2 × explorer A

Handoff brief:应采用 Developer Hub + API-spec 的双 PR 路由,并附带小型 Product Manual 恢复 UI 任务。OpenAPI 仅允许修改 source YAML 的 description/example,不能改 dev_openapi.yaml、生成 MDX 或结构性 schema。Spec 可确认公开 inventory、共享 Transaction/TSSRequest schema、30 天查询窗口和 Retry event 权限,但行为事实仍需 custody 实现证据。Payment event 链接还需单独核对 redirect。

关键证据:developer-site-waas2/v2/cobo_waas2_openapi_spec/components/schemas/webhooks/event_type.yaml:3-54components/schemas/developers/callback_message.yaml:44components/schemas/webhooks/event.yaml:35paths/webhooks/events.yaml:6paths/webhooks/retry_by_event_id.yaml:9paths/transactions/transactions.yaml:7

developer-site-waas2 × explorer B

Handoff brief:7 项均可定位到 developer-site prose gaps;如需改 API 示例,只能拆到 api-spec source YAML。Spec 确认 CallbackMessage 复用 Transaction、Retry event 适用于 Retrying/Failed、List all webhook events 为 30 天窗口且按 endpoint 查询。Spec 不能独立证明 delivery worker 的 backoff 或实际 per-endpoint isolation,客户的五次/一秒观测不得写成事实。

关键证据:developer-site-waas2/v2/cobo_waas2_openapi_spec/components/schemas/transactions/transactions/transaction.yaml:1-156components/schemas/developers/callback_message.yaml:44-45components/schemas/webhooks/event_status.yaml:1-13paths/webhooks/events.yaml:5-8paths/webhooks/retry_by_event_id.yaml:1-21

cobo-libs × explorer A

Handoff brief:cobo-libs 仅提供组织级 opaque producer record 和 Created/Submitted handoff,无法证明 Payload、trigger、字段阶段、crediting、retry 或 retention。主要工作仍路由 developer-site EN/CN,OpenAPI 文案路由 developer-site-waas2,Product Manual 仅更新已验证的 Portal 行为。每个 guide-missing enum 都应逐项审计后再发布。

关键证据:cobo-libs/cobo_libs/webhook/models.py:11-28cobo-libs/cobo_libs/webhook/data/enums.py:4-6

cobo-libs × explorer B

Handoff brief:cobo-libs 是独立 webhook service 的薄封装,实际 retry/backoff 和 event TTL 不在可访问仓库中,应标记为 code_evidence_missing。可确认 resend endpoint、事件查询过滤和 event logs。其内部整数 asset_id 不是公开 API 的字符串 asset_id,不能混用。Transaction/TSS catalog 与 serializer 仍应以 custody 为准。

关键证据:cobo_libs/webhook/client/client.py:170-208cobo_libs/webhook/views/events.py:1-29cobo_libs/webhook/views/event_retries.py:1-13cobo_libs/webhook/configs.py:1-12cobo_libs/reconciliation/data/objects.py:14

3. 综合结论

result:七个问题共同指向一个文档契约缺口。现有页面虽然列出事件并链接生成 schema,但客户仍无法回答四个关键问题:事件何时触发、该阶段完整 Payload 是什么、哪个事件可驱动业务动作,以及投递失败后如何恢复。最终方向是建立共享 Transaction 字段参考、wallets.transaction.* owner page、wallets.mpc.tss_request.* owner page、阶段性 Callback 字段说明,以及场景化订阅/恢复指导;所有 Developer Hub 改动必须同步 v2/v2_cn。生成 API reference 保持不动,source YAML 的 description/example 由独立 api-spec PR 承载,结构性 schema 变更交由开发团队。

confidence:0.91

open_questions:

  1. 外部 webhook service 的权威 timeout、接受的 HTTP 状态、attempt 计数、interval/backoff、终态规则、idempotency key 和 per-endpoint isolation 行为是什么?
  2. 外部 webhook service 的 persistence TTL 是多少,它与公开 30 天查询窗口、Console 可见性、delivery logs 和过期后的 retry eligibility 如何对应?
  3. internal Transaction Success 是否对所有 wallet、chain 和 transaction type 都等价于适用确认阈值已达到,并可作为通用最终入账保证?
  4. 请求中的 ETH_USDT/USDTTRON_USDT/USDTTRON/TRONETH/ETHBTC/BTC 是否均为当前 live catalog 的精确 token_id/asset_id 配对?
  5. token-listing 与 KYA 事件是否已在生产环境普遍启用?

汇总代码证据:

  • custody/custody/cobo/settings/91_webhook.py:4,50,54,58,62,82:确认基础事件 inventory 及已注册的 wallets.updatedmpc_vaults.updated/deletedorganizations.updatedfee_station.fiat_transaction.created
  • custody/waas2/webhooks/managers/wallet_event_by_source.py:25,51,116:确认 Transaction status/event 映射、公开 Transaction view 和触发/去重逻辑。
  • custody/waas2/transactions/dev/bo/transaction_query/transaction.py:195,319,363:确认查询窗口、replacement 和完整公开字段集合。
  • custody/waas2/transactions/mongo/manager/read/waas_transaction.py:178:确认字段条件填充。
  • custody/waas2/developers/managers/callback_message.py:201,511:确认 Callback 使用 tx.to_json(),多 URL Callback 独立跟踪并跳过已成功 URL。
  • custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:29,35,41,130custody/waas2/mpc/bo/dev/vault.py:235:确认 TSS scope、中间状态抑制、事件分支和 Payload 字段。
  • custody/waas2/transactions/mongo/manager/write/fields/token.py:24:确认 token_idasset_id 的生成来源。
  • custody/waas2/transactions/dev/bo/transaction_query/source.py:18destination.py:28:确认公开 source/destination variants。
  • custody/waas2/transactions/mongo/enums/transaction_fields.py:45:确认 cobo_category 包含 AutoSweep
  • custody/waas2/webhooks/views/dev/event_retry.py:19events.py:26:确认 resend 权限与 endpoint-scoped cursor listing。
  • custody/waas2/webhooks/managers/wallet_event.py:153custody/waas2/developers/tasks.py:43:确认本地 staging 记录 7 天清理及其 hourly task,但不证明外部 retention。
  • custody-2.0-website/src/pages/Developers/Webhooks/AddOrWebhooksModal/index.tsx:202,215:确认订阅同时要求 events 与 wallet scopes。
  • custody-2.0-website/src/pages/Developers/Events/Detail/index.tsx:26,100,133,145,160:确认 Portal retry 信息、完整 JSON、attempts 和权限受控 resend。
  • developer-site-waas2/v2/cobo_waas2_openapi_spec/components/schemas/developers/callback_message.yaml:44:确认 Callback data 复用 Transaction schema。
  • developer-site-waas2/v2/cobo_waas2_openapi_spec/paths/webhooks/events.yaml:6:确认公开 30 天 event 查询窗口和 endpoint scope。
  • developer-site-waas2/v2/cobo_waas2_openapi_spec/paths/webhooks/retry_by_event_id.yaml:9:确认 Retry event 状态与权限范围。
  • developer-site-waas2/v2/cobo_waas2_openapi_spec/paths/transactions/transactions.yaml:7:确认组织级 Transaction filters 与 cursor pagination。
4. 编辑计划
[
  {"task_id":"webhook-event-index-en","action":"fix_docs","doc_file":"v2/guides/webhooks-callbacks/webhook-event-type.mdx","repo_alias":"primary","doc_edit_description":"Keep this page as the English webhook inventory. Link the Transaction and MPC TSS rows to the new owning payload pages, replace the generic generated-schema-only pointer with direct payload-reference links, and add only backend-verified missing base events such as wallets.updated, mpc_vaults.updated/deleted, and organizations.updated. Do not present environment-limited token-listing or KYA events as generally available without production confirmation.","code_evidence":["custody/custody/cobo/settings/91_webhook.py:4","custody/custody/cobo/settings/91_webhook.py:50","custody/custody/cobo/settings/91_webhook.py:54","custody/custody/cobo/settings/91_webhook.py:58","custody/custody/cobo/settings/91_webhook.py:62","custody/waas2/webhooks/managers/wallet_source_event.py:63","custody/waas2/webhooks/managers/vault_event.py:63","custody/waas2/webhooks/managers/vault_event.py:77","custody/waas2/webhooks/managers/org_event.py:21"],"code_evidence_missing":false},
  {"task_id":"webhook-event-index-cn","action":"fix_docs","doc_file":"v2_cn/guides/webhooks-callbacks/webhook-event-type.mdx","repo_alias":"primary","doc_edit_description":"Mirror webhook-event-index-en in Chinese, preserving every event and field identifier in English and linking to the Chinese Transaction and MPC TSS payload pages.","code_evidence":["custody/custody/cobo/settings/91_webhook.py:4","custody/custody/cobo/settings/91_webhook.py:50","custody/custody/cobo/settings/91_webhook.py:54","custody/custody/cobo/settings/91_webhook.py:58","custody/custody/cobo/settings/91_webhook.py:62"],"code_evidence_missing":false},
  {"task_id":"transaction-webhook-payload-en","action":"fix_docs","doc_file":"v2/guides/webhooks-callbacks/transaction-webhook-events.mdx","repo_alias":"primary","doc_edit_description":"Create the English owner page for wallets.transaction.created/updated/succeeded/failed. Document the common event envelope, exact trigger/status mapping, update and deduplication behavior, the complete Transaction payload including conditional fields, and reviewed full JSON examples that collectively cover all four lifecycle events plus deposit/withdrawal, EVM/UTXO/TRON, and native-token/token variants. Explain that created is not a success signal and failed includes Failed, Rejected, and Canceled; cross-link the shared Transaction fields and source/destination guides.","code_evidence":["custody/custody/cobo/settings/91_webhook.py:4","custody/waas2/webhooks/managers/wallet_event_by_source.py:25","custody/waas2/webhooks/managers/wallet_event_by_source.py:51","custody/waas2/webhooks/managers/wallet_event_by_source.py:116","custody/waas2/transactions/dev/bo/transaction_query/transaction.py:363","custody/waas2/transactions/mongo/manager/read/waas_transaction.py:178"],"code_evidence_missing":false},
  {"task_id":"transaction-webhook-payload-cn","action":"fix_docs","doc_file":"v2_cn/guides/webhooks-callbacks/transaction-webhook-events.mdx","repo_alias":"primary","doc_edit_description":"Create the Chinese counterpart of transaction-webhook-payload-en with the same triggers, full field coverage, conditional-field guidance, and JSON example matrix. Keep event names, field names, enum values, and API operation names in English.","code_evidence":["custody/custody/cobo/settings/91_webhook.py:4","custody/waas2/webhooks/managers/wallet_event_by_source.py:25","custody/waas2/webhooks/managers/wallet_event_by_source.py:51","custody/waas2/webhooks/managers/wallet_event_by_source.py:116","custody/waas2/transactions/dev/bo/transaction_query/transaction.py:363","custody/waas2/transactions/mongo/manager/read/waas_transaction.py:178"],"code_evidence_missing":false},
  {"task_id":"mpc-tss-webhook-payload-en","action":"fix_docs","doc_file":"v2/guides/webhooks-callbacks/mpc-tss-request-webhook-events.mdx","repo_alias":"primary","doc_edit_description":"Create the English owner page for wallets.mpc.tss_request.created/updated/succeeded/failed. State the supported portal key-generation/reshare scope, suppressed intermediate states, trigger branches, the complete TSSRequest payload and conditional source/target group fields, and a full JSON example for each event outcome. Link back to the inventory rather than duplicating unrelated event families.","code_evidence":["custody/custody/cobo/settings/91_webhook.py:4","custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:29","custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:35","custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:41","custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:130","custody/waas2/mpc/bo/dev/vault.py:235"],"code_evidence_missing":false},
  {"task_id":"mpc-tss-webhook-payload-cn","action":"fix_docs","doc_file":"v2_cn/guides/webhooks-callbacks/mpc-tss-request-webhook-events.mdx","repo_alias":"primary","doc_edit_description":"Create the Chinese counterpart of mpc-tss-webhook-payload-en with identical scope, triggers, conditional fields, and examples. Keep TSS request types, statuses, event names, and field identifiers in English.","code_evidence":["custody/custody/cobo/settings/91_webhook.py:4","custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:29","custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:35","custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:41","custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:130","custody/waas2/mpc/bo/dev/vault.py:235"],"code_evidence_missing":false},
  {"task_id":"callback-field-availability-en","action":"fix_docs","doc_file":"v2/guides/webhooks-callbacks/set-up-endpoint.mdx","repo_alias":"primary","doc_edit_description":"Add an English callback request-data section explaining that callback data uses the Transaction shape but represents an earlier phase. Provide a stage-by-stage availability table and paired early/final JSON examples for cobo_id, request_id, token_id, asset_id, result, fee, transaction_hash, block_info, raw_tx_info, and replacement. Distinguish explicit null from omission only where the serializer proves it, and link to the shared Transaction fields page.","code_evidence":["custody/waas2/developers/managers/callback_message.py:201","custody/waas2/transactions/dev/bo/transaction_query/transaction.py:363","custody/waas2/transactions/mongo/manager/read/waas_transaction.py:178"],"code_evidence_missing":false},
  {"task_id":"callback-field-availability-cn","action":"fix_docs","doc_file":"v2_cn/guides/webhooks-callbacks/set-up-endpoint.mdx","repo_alias":"primary","doc_edit_description":"Mirror callback-field-availability-en in Chinese, including the same phase table, early/final examples, null-versus-omission distinctions, and link to the Chinese Transaction fields page. Keep all field identifiers in English.","code_evidence":["custody/waas2/developers/managers/callback_message.py:201","custody/waas2/transactions/dev/bo/transaction_query/transaction.py:363","custody/waas2/transactions/mongo/manager/read/waas_transaction.py:178"],"code_evidence_missing":false},
  {"task_id":"transaction-field-dictionary-en","action":"fix_docs","doc_file":"v2/guides/transactions/transaction-fields.mdx","repo_alias":"primary","doc_edit_description":"Create a consolidated English Transaction field dictionary. Explain token_id versus asset_id and their generation sources; request_id absence when no withdrawal request exists; replacement.replaced_by_transaction_hash and RBF linkage; cobo_category including high-signal values such as AutoSweep; fee/raw_tx_info and other conditional fields; and deposit/withdrawal source and destination shapes with a link to the existing detailed guide. Add the requested ETH_USDT/USDT, TRON_USDT/USDT, TRON/TRON, ETH/ETH, and BTC/BTC matrix only after validating those exact live catalog values.","code_evidence":["custody/waas2/transactions/mongo/manager/write/fields/token.py:24","custody/waas2/transactions/dev/bo/transaction_query/transaction.py:319","custody/waas2/transactions/dev/bo/transaction_query/transaction.py:363","custody/waas2/transactions/mongo/manager/read/waas_transaction.py:178","custody/waas2/transactions/dev/bo/transaction_query/source.py:18","custody/waas2/transactions/dev/bo/transaction_query/destination.py:28","custody/waas2/transactions/mongo/enums/transaction_fields.py:45","custody/waas2/transactions/dev/manager/transaction_query.py:143"],"code_evidence_missing":false},
  {"task_id":"transaction-field-dictionary-cn","action":"fix_docs","doc_file":"v2_cn/guides/transactions/transaction-fields.mdx","repo_alias":"primary","doc_edit_description":"Create the Chinese counterpart of transaction-field-dictionary-en, preserving field names, enum values, token IDs, asset IDs, and transaction type identifiers in English. Include the same conditional-field rules, cross-links, and only live-catalog-validated comparison rows.","code_evidence":["custody/waas2/transactions/mongo/manager/write/fields/token.py:24","custody/waas2/transactions/dev/bo/transaction_query/transaction.py:319","custody/waas2/transactions/dev/bo/transaction_query/transaction.py:363","custody/waas2/transactions/mongo/manager/read/waas_transaction.py:178","custody/waas2/transactions/dev/bo/transaction_query/source.py:18","custody/waas2/transactions/dev/bo/transaction_query/destination.py:28","custody/waas2/transactions/mongo/enums/transaction_fields.py:45","custody/waas2/transactions/dev/manager/transaction_query.py:143"],"code_evidence_missing":false},
  {"task_id":"register-new-payload-pages","action":"fix_docs","doc_file":"docs.json","repo_alias":"primary","doc_edit_description":"Register transaction-webhook-events and mpc-tss-request-webhook-events in both existing Webhooks and callbacks language groups, and transaction-fields in both existing Transactions language groups. Keep English and Chinese ordering parallel.","code_evidence":["custody/custody/cobo/settings/91_webhook.py:4","custody/waas2/transactions/dev/bo/transaction_query/transaction.py:363","custody/waas2/mpc/bo/dev/vault.py:235"],"code_evidence_missing":false},
  {"task_id":"spec-transaction-webhook-example","action":"fix_docs","doc_file":"v2/cobo_waas2_openapi_spec/components/schemas/webhooks/transaction_event_data.yaml","repo_alias":"api-spec","doc_edit_description":"Improve only description/example content for Transaction webhook event data: explain that the payload is the public Transaction view and add a complete representative serialized example. Do not alter composition, fields, types, required status, or nullability.","code_evidence":["custody/waas2/webhooks/managers/wallet_event_by_source.py:51","custody/waas2/transactions/dev/bo/transaction_query/transaction.py:363","custody/waas2/transactions/mongo/manager/read/waas_transaction.py:178"],"code_evidence_missing":false},
  {"task_id":"spec-tss-event-example","action":"fix_docs","doc_file":"v2/cobo_waas2_openapi_spec/components/schemas/webhooks/tss_request_event_data.yaml","repo_alias":"api-spec","doc_edit_description":"Improve only description/example content for MPC TSS webhook event data with a complete serialized example and a pointer in the description to event-dependent status semantics. Do not change schema structure.","code_evidence":["custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:41","custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:130","custody/waas2/mpc/bo/dev/vault.py:235"],"code_evidence_missing":false},
  {"task_id":"spec-tss-request-fields","action":"fix_docs","doc_file":"v2/cobo_waas2_openapi_spec/components/schemas/wallets/mpcs/tss_request.yaml","repo_alias":"api-spec","doc_edit_description":"Improve only field descriptions and examples for TSSRequest, especially when source and target key-share-holder group fields are populated across key generation and reshare. Preserve all field names, types, enums, and required declarations.","code_evidence":["custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:29","custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:130","custody/waas2/mpc/bo/dev/vault.py:235"],"code_evidence_missing":false},
  {"task_id":"spec-callback-phase-examples","action":"fix_docs","doc_file":"v2/cobo_waas2_openapi_spec/components/schemas/developers/callback_message.yaml","repo_alias":"api-spec","doc_edit_description":"Improve only the CallbackMessage data description and examples to show that it carries the Transaction representation at the callback phase, including a complete early-phase example with verified unpopulated values. Do not change the Transaction reference or schema structure.","code_evidence":["custody/waas2/developers/managers/callback_message.py:201","custody/waas2/transactions/dev/bo/transaction_query/transaction.py:363","custody/waas2/transactions/mongo/manager/read/waas_transaction.py:178"],"code_evidence_missing":false},
  {"task_id":"spec-transaction-field-descriptions","action":"fix_docs","doc_file":"v2/cobo_waas2_openapi_spec/components/schemas/transactions/transactions/transaction.yaml","repo_alias":"api-spec","doc_edit_description":"Improve only descriptions/examples for token_id, asset_id, request_id, result, fee, transaction_hash, block_info, raw_tx_info, replacement.replaced_by_transaction_hash, cobo_category, source, and destination. State verified population/absence conditions and distinctions; do not change names, types, required status, enum values, or nullable declarations.","code_evidence":["custody/waas2/transactions/mongo/manager/write/fields/token.py:24","custody/waas2/transactions/dev/bo/transaction_query/transaction.py:319","custody/waas2/transactions/dev/bo/transaction_query/transaction.py:363","custody/waas2/transactions/mongo/manager/read/waas_transaction.py:178","custody/waas2/transactions/dev/bo/transaction_query/source.py:18","custody/waas2/transactions/dev/bo/transaction_query/destination.py:28","custody/waas2/transactions/mongo/enums/transaction_fields.py:45","custody/waas2/transactions/dev/manager/transaction_query.py:143"],"code_evidence_missing":false},
  {"task_id":"spec-nullable-required-structure","action":"skip","doc_file":"v2/cobo_waas2_openapi_spec/components/schemas/transactions/transactions/transaction.yaml","repo_alias":"api-spec","doc_edit_description":"Record any mismatch between the serialized callback/API payload and OpenAPI nullable or required declarations for engineering follow-up.","code_evidence":["custody/waas2/developers/managers/callback_message.py:201","custody/waas2/transactions/dev/bo/transaction_query/transaction.py:363","custody/waas2/transactions/mongo/manager/read/waas_transaction.py:178"],"code_evidence_missing":false,"skip_reason":"structural API change — requires dev team"}
]
5. 评审轮次

第 1 轮:未通过

Reviewer 指出事件 inventory 尚缺 wallets.updatedmpc_vaults.updatedmpc_vaults.deletedorganizations.updated;Transaction lifecycle/status 映射、MPC TSS scope/conditional fields、中文术语一致性及 Callback/Transaction 字段说明仍需收敛。执行者随后按代码证据补齐 EN/CN 内容,并保持环境受限的 token-listing/KYA 事件不进入通用清单。

第 2 轮:未通过

Reviewer 将剩余阻塞项收窄为两项机械修正:从 primary PR 移除受污染的 v2/cobo_waas2_openapi_spec/dev_openapi.yaml;修正 EN/CN JSON wire shapes,使 destination_type: Address 使用 account_outputsource_type: DepositFromAddress 使用 addresses 数组,并为 destination_type: DepositToAddress 补齐 wallet_idwallet_type。同时要求仅在 PR 待确认事项中保留 KeyGeneratingFailed 终态语义的人工复核。

完成处理

执行者完成上述两项修正,运行 Mintlify validation 通过,提交 4d103464 并创建 primary PR。当前提供的 artifacts 中未包含独立的第 3 轮 reviewer 判定。

6. 基线与同步
  • Primary 编辑前 upstream 基线 commit:执行者未报告。
  • API-spec 编辑前 upstream 基线 commit:执行者未报告。
  • Primary 最终提交:4d103464docs: 完善 Webhook 事件与 Transaction 字段文档)。
  • API-spec sync:报告为成功,从 /Users/rebeccacao/workmate/scratch/playbooks/run_2b1f8ce3822b41a0/worktrees/api-spec/v2/cobo_waas2_openapi_spec/dev_openapi.yaml 同步到 primary worktree,changed_lines: 393
  • 最终评审处理:同步后的 dev_openapi.yaml 因生成 bundle 污染从 primary PR 移除;Primary PR 不携带该文件。
  • Primary validation:npx --yes mintlify validate 通过。
  • API-spec validation:未通过;原命令因 Workmate filesystem allowlist 阻止绝对 dev_main.yaml 路径而未启动。
  • API-spec PR:https://github.com/CoboGlobal/developer-site-waas2/pull/2313

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