Loading...
Loading...
Compare original and translation side by side
1. gitnexus_query({query: "<error or symptom>"}) → Find related execution flows
2. gitnexus_context({name: "<suspect>"}) → See callers/callees/processes
3. READ gitnexus://repo/{name}/process/{name} → Trace execution flow
4. gitnexus_cypher({query: "MATCH path..."}) → Custom traces if neededIf "Index is stale" → runin terminal.npx gitnexus analyze
1. gitnexus_query({query: "<错误或症状>"}) → 查找相关执行流程
2. gitnexus_context({name: "<可疑对象>"}) → 查看调用方/被调用方/流程
3. 读取 gitnexus://repo/{name}/process/{name} → 追踪执行流程
4. gitnexus_cypher({query: "MATCH path..."}) → 如有需要可自定义追踪如果提示"Index is stale"(索引已过期)→ 在终端运行。npx gitnexus analyze
- [ ] Understand the symptom (error message, unexpected behavior)
- [ ] gitnexus_query for error text or related code
- [ ] Identify the suspect function from returned processes
- [ ] gitnexus_context to see callers and callees
- [ ] Trace execution flow via process resource if applicable
- [ ] gitnexus_cypher for custom call chain traces if needed
- [ ] Read source files to confirm root cause- [ ] 理解问题症状(错误信息、异常行为)
- [ ] 使用gitnexus_query查询错误文本或相关代码
- [ ] 从返回的流程中识别可疑函数
- [ ] 使用gitnexus_context查看调用方和被调用方
- [ ] 如有必要,通过流程资源追踪执行流程
- [ ] 如有需要,使用gitnexus_cypher进行自定义调用链追踪
- [ ] 阅读源文件确认根本原因| Symptom | GitNexus Approach |
|---|---|
| Error message | |
| Wrong return value | |
| Intermittent failure | |
| Performance issue | |
| Recent regression | |
| 症状 | GitNexus处理方法 |
|---|---|
| 错误信息 | 使用 |
| 返回值异常 | 对目标函数使用 |
| 间歇性故障 | 使用 |
| 性能问题 | 使用 |
| 近期回归问题 | 使用 |
gitnexus_query({query: "payment validation error"})
→ Processes: CheckoutFlow, ErrorHandling
→ Symbols: validatePayment, handlePaymentError, PaymentExceptiongitnexus_context({name: "validatePayment"})
→ Incoming calls: processCheckout, webhookHandler
→ Outgoing calls: verifyCard, fetchRates (external API!)
→ Processes: CheckoutFlow (step 3/7)MATCH path = (a)-[:CodeRelation {type: 'CALLS'}*1..2]->(b:Function {name: "validatePayment"})
RETURN [n IN nodes(path) | n.name] AS chaingitnexus_query({query: "payment validation error"})
→ 流程:CheckoutFlow、ErrorHandling
→ 符号:validatePayment、handlePaymentError、PaymentExceptiongitnexus_context({name: "validatePayment"})
→ 传入调用:processCheckout、webhookHandler
→ 传出调用:verifyCard、fetchRates(外部API!)
→ 流程:CheckoutFlow(第3/7步)MATCH path = (a)-[:CodeRelation {type: 'CALLS'}*1..2]->(b:Function {name: "validatePayment"})
RETURN [n IN nodes(path) | n.name] AS chain1. gitnexus_query({query: "payment error handling"})
→ Processes: CheckoutFlow, ErrorHandling
→ Symbols: validatePayment, handlePaymentError
2. gitnexus_context({name: "validatePayment"})
→ Outgoing calls: verifyCard, fetchRates (external API!)
3. READ gitnexus://repo/my-app/process/CheckoutFlow
→ Step 3: validatePayment → calls fetchRates (external)
4. Root cause: fetchRates calls external API without proper timeout1. gitnexus_query({query: "payment error handling"})
→ 流程:CheckoutFlow、ErrorHandling
→ 符号:validatePayment、handlePaymentError
2. gitnexus_context({name: "validatePayment"})
→ 传出调用:verifyCard、fetchRates(外部API!)
3. 读取 gitnexus://repo/my-app/process/CheckoutFlow
→ 第3步:validatePayment → 调用fetchRates(外部服务)
4. 根本原因:fetchRates调用外部API时未设置合理超时时间