Skip to content

feat(ops): error-payload scrubbing wired into error boundaries (#76) - #113

Merged
joelpeace48-cell merged 1 commit into
FinesseStudioLab:mainfrom
leojay-net:feat/error-scrubbing-76
Aug 30, 2026
Merged

feat(ops): error-payload scrubbing wired into error boundaries (#76)#113
joelpeace48-cell merged 1 commit into
FinesseStudioLab:mainfrom
leojay-net:feat/error-scrubbing-76

Conversation

@leojay-net

Copy link
Copy Markdown
Contributor

Description

Error-payload scrubbing, wired into both error boundaries (issue #76). No new deps.

  • lib/observability/scrub.tsscrubErrorPayload(error, context) masks Stellar addresses (G…/C… 56-char base32) in the message, stack trace, and any nested context object, and drops request bodies, headers, auth tokens, and other sensitive keys. Recursion is cycle-safe and depth-bounded.
  • lib/observability/report.tscaptureError(), the single reporting entry point; everything passes through the scrubber before it goes anywhere. The Sentry transport (source maps, release = commit SHA, rate-based alerting) layers on here without call sites changing.
  • app/error.tsx + app/global-error.tsx now call captureError() instead of a raw console.error(error).
  • tests/unit/scrub.test.ts — asserts a known address string never survives scrubbing (message, stack, nested context), plus cycle handling and sensitive-key drops (7 tests).

Follow-up (same issue)

Sentry SDK + DSN, build-time source-map upload, release tagging in CI, rate-based alert rules.

Testing

npm test (7 new tests pass), next lint clean locally.

Closes #76

…inesseStudioLab#76)

- lib/observability/scrub.ts: scrubErrorPayload() masks Stellar addresses
  (G.../C... 56-char base32) in messages, stack traces and nested context,
  and drops request bodies, headers, auth and other sensitive keys.
  Recursion is cycle-safe and depth-bounded.
- lib/observability/report.ts: captureError() — the single reporting entry
  point; all output goes through the scrubber first. Sentry transport
  (source maps, release = commit SHA, rate alerting) layers on here.
- app/error.tsx + app/global-error.tsx now call captureError().
- tests/unit/scrub.test.ts asserts a known address string never survives
  scrubbing — the invariant that stays true as the codebase changes.

Refs FinesseStudioLab#76
@joelpeace48-cell
joelpeace48-cell merged commit 739d0f6 into FinesseStudioLab:main Aug 30, 2026
4 checks passed
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.

ops: error tracking and session diagnostics

2 participants