gpt-engineer-app[bot] commited on
Commit Β·
01de83c
1
Parent(s): f9a3fa6
Changes
Browse files
src/server/branch-debug.functions.ts
CHANGED
|
@@ -231,7 +231,7 @@ const analysisTool = {
|
|
| 231 |
},
|
| 232 |
};
|
| 233 |
|
| 234 |
-
const SYSTEM_PROMPT = `You are BranchDebug, a code-aware root-cause analyzer. Inputs are:
|
| 235 |
1. A SANITIZED unified git diff where real identifiers have been replaced with opaque tokens like fn_0019.
|
| 236 |
2. A natural-language description of an observed failure.
|
| 237 |
3. A numbered list of HUNKS (filePath, lineRange, function context).
|
|
@@ -367,7 +367,7 @@ const snippetTool = {
|
|
| 367 |
},
|
| 368 |
};
|
| 369 |
|
| 370 |
-
const SNIPPET_SYSTEM = `You are BranchDebug in SNIPPET mode β an expert code reviewer with deep knowledge of every mainstream programming language (Python, TypeScript/JavaScript, C/C++, C#, Java, Kotlin, Swift, Go, Rust, Ruby, PHP, Scala, Elixir, Haskell, Lua, R, Dart, SQL, Bash, HTML/CSS, YAML/JSON/TOML, and more).
|
| 371 |
|
| 372 |
The user pasted a raw code snippet (not a diff). Identifiers are tokenized as fn_NNNN; treat them as opaque names. Carefully analyze the snippet and find ANY of the following classes of bugs that match the failure description (or are obvious defects, even if not described):
|
| 373 |
|
|
|
|
| 231 |
},
|
| 232 |
};
|
| 233 |
|
| 234 |
+
const SYSTEM_PROMPT = `You are BranchDebug Bot, a code-aware root-cause analyzer powered by Qwen3 reasoning. Inputs are:
|
| 235 |
1. A SANITIZED unified git diff where real identifiers have been replaced with opaque tokens like fn_0019.
|
| 236 |
2. A natural-language description of an observed failure.
|
| 237 |
3. A numbered list of HUNKS (filePath, lineRange, function context).
|
|
|
|
| 367 |
},
|
| 368 |
};
|
| 369 |
|
| 370 |
+
const SNIPPET_SYSTEM = `You are BranchDebug Bot in SNIPPET mode, powered by Qwen3 reasoning β an expert code reviewer with deep knowledge of every mainstream programming language (Python, TypeScript/JavaScript, C/C++, C#, Java, Kotlin, Swift, Go, Rust, Ruby, PHP, Scala, Elixir, Haskell, Lua, R, Dart, SQL, Bash, HTML/CSS, YAML/JSON/TOML, and more).
|
| 371 |
|
| 372 |
The user pasted a raw code snippet (not a diff). Identifiers are tokenized as fn_NNNN; treat them as opaque names. Carefully analyze the snippet and find ANY of the following classes of bugs that match the failure description (or are obvious defects, even if not described):
|
| 373 |
|
src/server/forensic.functions.ts
CHANGED
|
@@ -289,14 +289,14 @@ export const fetchVehicleCode = createServerFn({ method: "POST" })
|
|
| 289 |
// βββββββββββββββββββββββββ Stage analysis βββββββββββββββββββββββββ
|
| 290 |
|
| 291 |
const STAGE_PROMPTS: Record<1 | 2 | 3, string> = {
|
| 292 |
-
1: `You are an expert AV engineer specializing in post-deployment forensic debugging.
|
| 293 |
Inputs: deployed vehicle code (identifiers anonymized as fn_NNNN) and a failure description.
|
| 294 |
Logs are NOT yet available. Analyze the code statically. Generate ranked hypotheses and predict log signatures.
|
| 295 |
Always call submit_stage1.`,
|
| 296 |
-
2: `You are an expert AV engineer. You have anonymized deployed code, a failure description, AND system logs.
|
| 297 |
Correlate log evidence against the prior hypotheses (passed in). Reconstruct the timeline. Find the root cause.
|
| 298 |
Always call submit_stage2.`,
|
| 299 |
-
3: `You are an expert AV engineer. You have anonymized code, logs, AND ROS bag / sensor data excerpts.
|
| 300 |
Trace the full perception β planning β control chain. Determine the failure layer and the definitive root cause.
|
| 301 |
Always call submit_stage3.`,
|
| 302 |
};
|
|
|
|
| 289 |
// βββββββββββββββββββββββββ Stage analysis βββββββββββββββββββββββββ
|
| 290 |
|
| 291 |
const STAGE_PROMPTS: Record<1 | 2 | 3, string> = {
|
| 292 |
+
1: `You are Forensics Bot, an expert AV engineer powered by Qwen3 reasoning, specializing in post-deployment forensic debugging.
|
| 293 |
Inputs: deployed vehicle code (identifiers anonymized as fn_NNNN) and a failure description.
|
| 294 |
Logs are NOT yet available. Analyze the code statically. Generate ranked hypotheses and predict log signatures.
|
| 295 |
Always call submit_stage1.`,
|
| 296 |
+
2: `You are Forensics Bot, an expert AV engineer powered by Qwen3 reasoning. You have anonymized deployed code, a failure description, AND system logs.
|
| 297 |
Correlate log evidence against the prior hypotheses (passed in). Reconstruct the timeline. Find the root cause.
|
| 298 |
Always call submit_stage2.`,
|
| 299 |
+
3: `You are Forensics Bot, an expert AV engineer powered by Qwen3 reasoning. You have anonymized code, logs, AND ROS bag / sensor data excerpts.
|
| 300 |
Trace the full perception β planning β control chain. Determine the failure layer and the definitive root cause.
|
| 301 |
Always call submit_stage3.`,
|
| 302 |
};
|