Skip to content

docs: add GC jobs, load-testing, troubleshooting, and logging conventions guides - #598

Merged
codebestia merged 4 commits into
codebestia:devfrom
Dannyorji:feat/documentations
Aug 31, 2026
Merged

docs: add GC jobs, load-testing, troubleshooting, and logging conventions guides#598
codebestia merged 4 commits into
codebestia:devfrom
Dannyorji:feat/documentations

Conversation

@Dannyorji

Copy link
Copy Markdown
Contributor

Summary

  • Documents every scheduled backend GC pass (device/key GC, envelope GC,
    file cleanup, push-subscription backoff re-enable): schedule, retention
    window, configuring env var, idempotency/crash-safety, the file
    reference-counting check, and multi-node deployment implications.
  • Documents scripts/loadtest/ (seed.ts, run.ts): flags, required local
    topology, recorded metrics and pass/fail thresholds, what
    baseline.json represents and how to refresh it, and how to triage a
    failed nightly loadtest run.
  • Adds docs/troubleshooting.md covering five real recurring failures:
    pnpm install breaking on this repo's mixed npm/pnpm and
    nested-workspace lockfiles, migrations silently not applying because
    the drizzle journal omits them, floating Node/Rust toolchains causing
    works-locally-fails-in-CI, tests interfering via shared in-process
    counters, and web build failures from the same lockfile drift.
  • Documents lib/logger.ts: pino configuration, LOG_LEVEL-driven levels,
    the redact-list backstop, the explicit no-content rule (ids/counts
    only, never ciphertext/plaintext/payload), available correlation
    fields, and that the logger currently has zero call sites — all
    existing logging still goes through console.*, and new code should
    use the structured logger instead of adding more.

Closes #552
Closes #553
Closes #560
Closes #565

Documents every scheduled cleanup pass (device/key GC, envelope GC, file
cleanup, and the push-subscription backoff re-enable) with schedule,
retention window, and configuring env var per job, plus the
crash-safe hard-delete ordering, the reference-counting check, and the
implications of every job running unguarded on every gateway node.
Documents seed.ts and run.ts (flags, required local topology), the
recorded metrics and pass/fail thresholds, what baseline.json
represents and how to refresh it, and how to triage a failed nightly
loadtest-nightly run.
Documents five failures contributors actually hit: pnpm install
failing on the repo's mixed npm/pnpm and nested-workspace lockfiles,
migrations silently not applying because the drizzle journal omits
them, floating Node/Rust toolchains causing works-locally-fails-in-CI,
tests interfering through shared module-level counters, and web build
failures from the same lockfile drift. Grounded in real commits
(46eee04, d60b648) and the actual repo state rather than hypotheticals.
Documents lib/logger.ts's pino configuration, level control via
LOG_LEVEL, the redact-list backstop, and states the no-content rule
explicitly with safe vs. unsafe logging examples. Documents the
correlation fields available for tracing a request/socket event, and
notes that logger.ts currently has zero import sites — all existing
logging goes through console.* or a hand-rolled wrapper, and new code
should use the structured logger instead of adding more console.* calls.
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@Dannyorji Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@codebestia
codebestia merged commit 4e35581 into codebestia:dev Aug 31, 2026
3 of 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.

2 participants