feat(debug): comprehensive integration & debugging workflows (#104) - #3
Open
dorisadams wants to merge 2 commits into
Open
feat(debug): comprehensive integration & debugging workflows (#104)#3dorisadams wants to merge 2 commits into
dorisadams wants to merge 2 commits into
Conversation
…#127) Flips `unwrap_used`, `expect_used`, `panic` from `allow` to `warn` in `backend/Cargo.toml` and tightens `.github/workflows/clippy.yml` + `ci-quality.yml` so `cargo clippy --lib` denies them. The three non-test `.expect()` calls in `backend/src/rpc/stellar.rs` are replaced with safe `match`+`warn` fallbacks / typed errors. No scaffolding for Stellar-Insightss#93 or Stellar-Insightss#104 in this PR — those PRs register their own modules. This keeps the lint fix scope minimal and conflict-free. Refs Stellar-Insightss#127
…-Insightss#104) Dev-gated diagnostic toolkit. The debug surface is double-gated by `STELLAR_INSIGHTS_DEBUG=1` AND `cfg(debug_assertions)` (or `RUST_ENV=development`), so production bundles never expose diagnostic data. * `backend/src/debugging/{mod,state}.rs` — dev-only `/debug/*` router (`/debug/health/detail`, `/debug/cache/state`, `/debug/queue/status`) returning `503` in production. `DiagnosticSnapshot` exposes counts only — never secrets. 5 unit tests. The `ENV_LOCK` static mutex in `state.rs` has an explicit `do NOT hold across .await` comment. * `frontend/src/lib/debug.ts` — dev-only `getDebugSnapshot` / `subscribeDebug`. Connectivity, realtime (WebSocket) health, TanStack Query cache counts, localStorage size estimate. Gated to `process.env.NODE_ENV !== "production"`. * `mobile/src/services/debugService.ts` — dev-only `getMobileDebugSnapshot` (connectivity, sync_queue depth, notification permission). Gated to `__DEV__`. * `docs/debugging-guide.md` — comprehensive developer reference covering backend / frontend / mobile / WebSocket workflows, common failure scenarios, production-safety checks. * `scripts/debug-stack.sh` — boots the backend in debug mode and prints diagnostic URLs the README can point contributors at. * `backend/src/lib.rs` — registers the new `debugging` module. Refs Stellar-Insightss#104
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes Stellar-Insightss#104 — dev-gated /debug/* router + DiagnosticSnapshot (backend), debug.ts (frontend), debugService.ts (mobile), scripts/debug-stack.sh, docs/debugging-guide.md.