Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/opencode/src/altimate/telemetry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ export namespace Telemetry {
keywords: ["status code: 4", "status code: 5", "request failed with status", "http 404", "http 410", "http 429", "http 451", "http 403"],
},
// altimate_change end
// altimate_change start — split file_stale out of validation; remove "does not exist" (was catching HTTP 404s)
// altimate_change start — split file_stale out of validation for cleaner triage
{
class: "file_stale",
keywords: [
Expand All @@ -811,6 +811,7 @@ export namespace Telemetry {
"invalid",
"missing",
"required",
"does not exist",
],
},
// altimate_change end
Expand Down
6 changes: 4 additions & 2 deletions packages/opencode/test/telemetry/telemetry.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1628,13 +1628,15 @@ describe("telemetry.classifyError", () => {
expect(Telemetry.classifyError("Invalid dialect specified")).toBe("validation")
expect(Telemetry.classifyError("Missing required field")).toBe("validation")
expect(Telemetry.classifyError("Required parameter 'query' not provided")).toBe("validation")
// altimate_change start — file_stale split out from validation; "does not exist" moved to http_error
// altimate_change start — file_stale split out from validation
// These are now classified as file_stale, not validation
expect(Telemetry.classifyError("You must read file /path/to/file before overwriting it")).toBe("file_stale")
expect(Telemetry.classifyError("File has been modified since it was last read")).toBe("file_stale")
expect(Telemetry.classifyError("You must read file before overwriting it. Use the Read tool first")).toBe("file_stale")
// HTTP 404 "does not exist" is now http_error
// HTTP 404 "does not exist" matches http_error first (pattern priority), not validation
expect(Telemetry.classifyError("HTTP 404: https://example.com/page does not exist")).toBe("http_error")
// SQL "does not exist" matches validation (no http_error keywords present)
expect(Telemetry.classifyError("error: column foo does not exist")).toBe("validation")
// altimate_change end
})

Expand Down
Loading