fix(telemetry): ingest keeps error_message/failed_step instead of dropping them

The telemetry_events columns exist and bin/gstack-telemetry-log already
sends error_message + failed_step, but the Supabase ingest function dropped
both fields on insert — every error report arrived with no message and no
failing step. Map them through with the same bounded-length sanitization as
error_class (500/100 chars). The completion-status resolver now also passes
--error-message/--failed-step in the generated skill telemetry block, with
instructions to leave them empty on success.

Resolver only for the template side; generated SKILL.md files regenerate
from this source in the docs lane.

Contributed by @sunnnybala (PR #769).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-08-14 20:21:00 -07:00
co-authored by Claude Fable 5
parent a6c94c7feb
commit 8e46c6e521
6 changed files with 29 additions and 6 deletions
@@ -73,11 +73,15 @@ fi
if [ "$_TEL" != "off" ] && [ -x ~/.claude/skills/gstack/bin/gstack-telemetry-log ]; then
~/.claude/skills/gstack/bin/gstack-telemetry-log \\
--skill "SKILL_NAME" --duration "$_TEL_DUR" --outcome "OUTCOME" \\
--used-browse "USED_BROWSE" --session-id "$_SESSION_ID" 2>/dev/null &
--used-browse "USED_BROWSE" --session-id "$_SESSION_ID" \\
--error-message "ERROR_MESSAGE" --failed-step "FAILED_STEP" 2>/dev/null &
fi
\`\`\`
Replace \`SKILL_NAME\`, \`OUTCOME\`, and \`USED_BROWSE\` before running.
Replace \`ERROR_MESSAGE\` with a short description of the error (if outcome is error,
otherwise use empty string ""), and \`FAILED_STEP\` with the step name or number where
the failure occurred (if outcome is error, otherwise use empty string "").
## Plan Status Footer