fix: improve telemetry error classification, warehouse validation, and webfetch error context#566
Conversation
…d webfetch error context
Driven by App Insights analysis of `altimate-code-os` showing:
- 89 `core_failure` events/day with blind `"unknown error"` message
- 694 webfetch 404s classified as `error_class: "unknown"`
- 41 SQL failures from cryptic SASL/SCRAM password errors
- 4 ClickHouse attempts hitting generic "unsupported" error
**Telemetry** — add `http_error` class, expand connection/validation/permission
patterns, redact sensitive keys in `computeInputSignature()`
**Tool errors** — replace `"unknown error"` with structured
`soft_failure:{tool}:no_error_metadata`, use `maskArgs()` for objects
**Warehouse** — validate password type in postgres/redshift drivers and
registry, harden `statement_timeout`, add `KNOWN_UNSUPPORTED` hints
**Webfetch** — include hostname in HTTP error messages
**Tests** — 20+ new `classifyError` assertions including `http_error`,
expanded patterns, and priority ordering tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 15 minutes and 59 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Driven by App Insights analysis of
altimate-code-osshowing ~900 daily events with poor or missing error classification:"unknown error"in telemetry — 89core_failureevents/day had no error message. Now producessoft_failure:{tool}:no_error_metadatawith key-aware object masking viaTelemetry.maskArgs()http_errorclassification — 694 webfetch 404s were classified as"unknown", now properly bucketed ashttp_errorPASSWORD_DRIVERSgateinput_signature— passwords, tokens, api_keys now show"****"instead of leaking string lengthsstatement_timeout— usesNumber.isFinite()guard instead of string interpolationFiles changed (7)
src/altimate/telemetry/index.tshttp_errorerror_class, expanded classification patterns, sensitive key redaction incomputeInputSignature()src/tool/tool.tsmaskArgs()for object errors, circular-object safetysrc/tool/webfetch.tspackages/drivers/src/postgres.tsstatement_timeouthardeningpackages/drivers/src/redshift.tssrc/altimate/native/connections/registry.tsPASSWORD_DRIVERSvalidation,KNOWN_UNSUPPORTEDmap with workaround hintstest/telemetry/telemetry.test.tshttp_error, expanded patterns, priority orderingTest plan
telemetry.test.ts— 90 tests pass (20+ new assertions)webfetch.test.ts— 8 tests passwarehouse-telemetry.test.ts— 45 tests passtool-error-propagation-complete.test.ts— 90 tests passturbo typecheck)🤖 Generated with Claude Code