Report detailed session import error types (#33863)

## What changed

- Add stable `sub_error_type` values for external-agent session import failures,
  including detection, preparation, configuration, thread storage, and ledger
  update errors.
- Preserve these values through import results and analytics while leaving
  unrelated plugin and memory errors unchanged.

## Testing

- Verify that a missing session reports `session_not_detected` in both the
  completed import result and its analytics event.

GitOrigin-RevId: cbf1f52df4bb1ac107442c4afa0b130fa32ad0a5
This commit is contained in:
charlesgong-openai authored and copyberry committed 2026-07-17 16:14:36 +00:00
1 parent 20465d30ae
commit ab0f71aed6
5 files changed
+98 -18

No files matched your search

@@ -270,6 +270,7 @@ impl ExternalAgentConfigRequestProcessor {
record_import_error(
&mut item_result,
"plugin_import",
/*sub_error_type*/ None,
error.to_string(),
/*source*/ None,
);
@@ -400,6 +401,7 @@ impl ExternalAgentConfigRequestProcessor {
record_import_error(
&mut item_result,
"session_missing",
Some("session_not_detected"),
format!(
"external agent session was not detected for import: {}",
session.path.display()
@@ -412,6 +414,7 @@ impl ExternalAgentConfigRequestProcessor {
record_import_error(
&mut item_result,
"session_source_path",
Some("failed_to_resolve_session_source_path"),
err.to_string(),
Some(session.path.display().to_string()),
);