cargo-diagnostics
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCargo CLI — Diagnostics
Cargo CLI — 诊断功能
Forensic runbooks for workflow behavior: trace one run, sweep a batch for errors, profile a play's credit spend. This skill is the interpretation layer — the raw surfaces (, orchestration SQL, billing metrics) are documented in and ; each runbook here tells you which of them to pull, in what order, and what each output shape means.
run getcargo-orchestrationcargo-billing工作流行为的取证指南:追踪单次运行、批量扫描错误、分析Play的credits消耗。该技能是解释层——原始数据接口(、编排SQL、计费指标)记录在和中;本指南中的每个手册都会告诉你应调用哪些接口、调用顺序以及各输出格式的含义。
run getcargo-orchestrationcargo-billingWhich runbook?
选择哪个手册?
What are you diagnosing?
│
├── One run / one record ("why did this record fail?",
│ "run succeeded but the output is wrong/empty")
│ └── references/run-trace.md
│
├── Many runs ("the batch has errors", "error rate spiked",
│ "which node keeps failing?")
│ └── references/batch-error-sweep.md
│
└── Cost ("this play is expensive", "where do the credits go?",
"make this cheaper")
└── references/play-optimize-credits.mdRule of thumb: start with the sweep when you don't yet know which run to look at — it ends by handing you exemplar run UUIDs to feed into the trace.
Boundary with : analytics measures and exports ("what's the error rate?", "download the batch results", "export this segment"); this skill explains ("why is the error rate up?", "why is this record's output empty?"). A diagnosis often starts from an analytics signal (error count spiked, batch reports ) and ends back in analytics — once the cause is fixed and runs re-executed, bulk retrieval goes through / / , all documented in . This skill's evidence surfaces (, orchestration SQL, billing metrics) are for diagnosis, not bulk export.
cargo-analyticsfailedRunsCount > 0run download-outputsbatch downloadsegment download../cargo-analytics/SKILL.mdrun get你要诊断什么问题?
│
├── 单次运行/单条记录(「这条记录为什么失败?」、
│ 「运行成功但输出错误/为空」)
│ └── references/run-trace.md
│
├── 多次运行(「批量任务存在错误」、「错误率飙升」、
│ 「哪个节点持续失败?」)
│ └── references/batch-error-sweep.md
│
└── 成本问题(「这个Play成本过高」、「credits消耗去向?」、
「降低成本」)
└── references/play-optimize-credits.md经验法则:当你还不确定要查看哪个运行实例时,先从批量扫描开始——它最终会为你提供可用于追踪的示例运行UUID。
与的边界: analytics负责测量与导出(「错误率是多少?」、「下载批量任务结果」、「导出该分段数据」);本技能负责解释原因(「错误率为什么上升?」、「这条记录的输出为什么为空?」)。诊断通常从analytics的信号(错误计数飙升、批量任务报告)开始,最终又回到analytics——一旦问题修复并重新运行任务,批量检索需通过 / / 完成,这些操作均记录在中。本技能涉及的证据接口(、编排SQL、计费指标)仅用于诊断,不用于批量导出。
cargo-analyticsfailedRunsCount > 0run download-outputsbatch downloadsegment download../cargo-analytics/SKILL.mdrun getReferences
参考文档
| Doc | What it covers |
|---|---|
| Walk one run end-to-end: per-node executions, |
| Find errored runs across a batch/play/workspace, group failures by root cause, pick exemplars, decide fix vs report. |
| Attribute credit spend to workflows and nodes, then apply the cost levers in priority order. |
| 文档 | 涵盖内容 |
|---|---|
| 端到端追踪单次运行:逐节点执行记录、 |
| 在批量任务/Play/工作区中查找错误运行实例,按根本原因分组失败案例,选取示例,决定修复还是上报。 |
| 将credits消耗归因到工作流和节点,然后按优先级应用成本优化手段。 |
Prerequisites
前置条件
See for install, login ( / ), JSON output conventions, and error shapes. Verify the session with before running any of the commands below.
../cargo/references/prerequisites.md--oauth--tokencargo-ai whoamiCredit attribution steps (, ) need a token with admin access; everything else works with a standard token.
billing usage get-metricsbilling subscription get安装、登录( / )、JSON输出约定及错误格式请查看。运行以下命令前,请通过验证会话有效性。
--oauth--token../cargo/references/prerequisites.mdcargo-ai whoamicredits归因步骤(、)需要拥有管理员权限的token;其他操作使用标准token即可。
billing usage get-metricsbilling subscription getThe three surfaces every runbook draws on
所有手册都会用到的三类接口
| Surface | Command | Gives you |
|---|---|---|
| Run detail | | |
| Orchestration SQL | | Aggregates over |
| Billing metrics | | Credit totals, filterable and groupable by |
Full query syntax, table columns, and caps: . Debugging field semantics: .
../cargo-orchestration/references/examples/queries.md../cargo-orchestration/references/troubleshooting.md| 接口类型 | 命令 | 提供内容 |
|---|---|---|
| 运行详情 | | |
| 编排SQL | | 对 |
| 计费指标 | | credits总消耗量,可按 |
完整查询语法、表格列及限制请查看。字段语义调试请查看。
../cargo-orchestration/references/examples/queries.md../cargo-orchestration/references/troubleshooting.mdPresenting findings
结果呈现
Follow : lead with the conclusion ("18 of 20 failures are one cause: the connector's token expired"), summarize evidence in a short table, never dump raw JSON or full query results into the conversation. Any fix that re-runs paid nodes goes through the pilot gate in .
../cargo/references/interaction.mdrun get../cargo-gtm/references/cost-discipline.md请遵循:先给出结论(「20次失败中有18次是同一原因:连接器token过期」),用简短表格总结证据,切勿在沟通中直接粘贴原始 JSON或完整查询结果。任何需要重新运行付费节点的修复操作都需通过中的试点审批流程。
../cargo/references/interaction.mdrun get../cargo-gtm/references/cost-discipline.mdWhen diagnosis dead-ends
诊断陷入僵局时
If the evidence contradicts documented behavior (a field missing from , a query cap that doesn't match the docs, an error that makes no sense), file a report — that's the official channel and the team reads every one:
run getbash
cargo-ai workspaceManagement report create \
--title "<one-line summary>" \
--description "<commands run, errorMessage verbatim, expected vs actual, UUIDs>"如果证据与文档描述不符(缺少字段、查询限制与文档不一致、错误无合理解释),请提交报告——这是官方渠道,团队会查看每一份报告:
run getbash
cargo-ai workspaceManagement report create \\
--title "<一行摘要>" \\
--description "<执行的命令、完整错误信息、预期与实际结果、UUIDs>"