Skip to content

fix: resolve docs and config issues#1266

Merged
ogazboiz merged 2 commits into
LabsCrypt:mainfrom
Georgechisom:fix/docs-and-config-issues
Jun 28, 2026
Merged

fix: resolve docs and config issues#1266
ogazboiz merged 2 commits into
LabsCrypt:mainfrom
Georgechisom:fix/docs-and-config-issues

Conversation

@Georgechisom

Copy link
Copy Markdown
Contributor

This PR resolves four issues related to documentation gaps and configuration problems.

Changes

Issue: Undocumented environment variables

  • Added PORT (default 3001) to backend/.env.example and docs/ENVIRONMENT.md
  • Added INDEXER_HEALTH_LAG_LIMIT (default 100) to backend/.env.example and docs/ENVIRONMENT.md
  • Both variables were consumed in code but missing from documentation

Issue: Background jobs documentation missing

  • Added comprehensive Background Jobs section to backend/src/services/README.md
  • Documented all 6 active scheduled jobs with their schedules, env vars, and defaults
  • Listed jobs that are defined but not currently wired (scoreDecayJob, webhookRetryProcessor)
  • Added monitoring metrics and cross-referenced indexer-recovery runbook

Issue: Credit score SSE authentication broken

  • Replaced native EventSource with fetch+ReadableStream in useCreditScore hook
  • Native EventSource cannot send Authorization header, causing 401 errors
  • Now uses same pattern as useSSE and useNotificationStream with Bearer token
  • Credit score invalidation on LoanRepaid/LoanDefaulted events now works

Issue: Prettier config silently ignored

  • Removed empty prettier: {} key from backend/package.json
  • Package.json was overriding .prettierrc due to cosmiconfig resolution order
  • Verified prettier --find-config-path now resolves to .prettierrc
  • Ran npm run format to apply intended style rules (singleQuote, printWidth 100, trailingComma all)

Testing

  • Verified prettier config detection points to .prettierrc
  • Confirmed formatting applied successfully across codebase
  • No breaking changes to existing functionality

Closes #1212
Closes #1206
Closes #1218
Closes #1208

- Add PORT and INDEXER_HEALTH_LAG_LIMIT to .env.example and ENVIRONMENT.md
- Document all background jobs in services/README.md
- Fix credit score SSE to use fetch+Bearer instead of EventSource
- Remove empty prettier config from package.json and apply formatting

Closes LabsCrypt#1212, LabsCrypt#1206, LabsCrypt#1218, LabsCrypt#1208
@ogazboiz ogazboiz merged commit 955837e into LabsCrypt:main Jun 28, 2026
3 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment