Skip to content

fix: map error_message and failed_step in telemetry edge function#769

Open
sunnnybala wants to merge 1 commit intogarrytan:mainfrom
sunnnybala:fix/telemetry-error-fields
Open

fix: map error_message and failed_step in telemetry edge function#769
sunnnybala wants to merge 1 commit intogarrytan:mainfrom
sunnnybala:fix/telemetry-error-fields

Conversation

@sunnnybala
Copy link
Copy Markdown

Summary

  • error_message and failed_step fields are captured locally in JSONL by gstack-telemetry-log and the Supabase columns exist (added in 002_tighten_rls.sql), but the edge function's TelemetryEvent interface and rows.push() mapping silently dropped them during remote sync — resulting in perpetually NULL columns.
  • Adds both fields to the edge function interface and row mapping with the same pattern as error_class (optional, String() coercion, .slice() truncation).
  • Updates the preamble epilogue to pass --error-message and --failed-step flags to gstack-telemetry-log so skills report error context on failures.

Privacy note

Error messages could contain file paths or repo names. The gstack-telemetry-log binary already truncates to 200 chars, and the edge function truncates to 500 chars. Maintainers may want to add redaction in the telemetry-log binary if this is a concern relative to the "no file paths or repo names" telemetry promise.

Test plan

  • Verify bun test passes (static validation)
  • Verify edge function correctly maps error_message and failed_step to non-NULL values when present in payload
  • Verify empty strings map to NULL (JavaScript "" is falsy, shell [ -n "" ] is false)
  • Verify existing fields are unaffected

🤖 Generated with Claude Code

These fields are captured locally in JSONL and the Supabase columns exist
(added in 002_tighten_rls.sql), but the edge function's TelemetryEvent
interface and rows.push() mapping silently dropped them during remote sync.

Also updates the preamble epilogue to pass --error-message and
--failed-step flags so skills actually report error context on failures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant