Skip to content

Fix/issues 1378 [Code Quality] Remove unused env vars from example file - #1419

Merged
Hexstar-labs merged 2 commits into
BrainTease:mainfrom
Timothy2025-20:fix/issues-1378-1379
Oct 22, 2026
Merged

Hexstar-labs merged 2 commits into
BrainTease:mainfrom
Timothy2025-20:fix/issues-1378-1379

Conversation

@Timothy2025-20

Copy link
Copy Markdown
Contributor

What was done: Audited .env.example and
.env.example
against the actual backend config. Removed duplicate THROTTLE_TTL/THROTTLE_LIMIT entries, added missing vars (OTEL_, RATE_LIMIT_, AUDIT_RETENTION_DAYS, SHUTDOWN_DRAIN_TIMEOUT_MS, EXPORT_OPENAPI, SOROBAN_CONTRACT_ID, etc.), and fully synced both files so every variable that is read in code has an example entry.
Files changed: .env.example,
.env.example
closes #1378

…nTease#1378)

- Root .env.example:
  - Remove duplicate THROTTLE_TTL and THROTTLE_LIMIT entries (were listed
    under both # Throttler and # Rate Limiting sections)
  - Remove duplicate CORS block that appeared twice
  - Add all vars consumed by backend config but previously missing:
    NODE_ENV, SOROBAN_CONTRACT_ID, INDEXER_POLL_INTERVAL_MS,
    STELLAR_WEB_AUTH_DOMAIN, OTEL_SERVICE_NAME, OTEL_EXPORTER_OTLP_ENDPOINT,
    OTEL_TRACES_SAMPLER_ARG, RATE_LIMIT_ADMIN/INSTRUCTOR/STUDENT/GUEST,
    RATE_LIMIT_ALLOWLIST, AUDIT_RETENTION_DAYS, SHUTDOWN_DRAIN_TIMEOUT_MS,
    EXPORT_OPENAPI
  - Move frontend vars (NEXT_PUBLIC_*) into root example alongside backend vars
  - Add section headers aligned with configuration.ts sections

- apps/backend/.env.example:
  - Full sync with validation.schema.ts — every validated variable now has
    an example entry; no variable present in the schema is missing
  - Add CORS_ORIGINS, CORS_CREDENTIALS, CORS_MAX_AGE (were in root only)
  - Add INDEXER_POLL_INTERVAL_MS, STELLAR_WEB_AUTH_DOMAIN, SOROBAN_CONTRACT_ID
  - Add OTEL_*, RATE_LIMIT_*, AUDIT_RETENTION_DAYS, SHUTDOWN_DRAIN_TIMEOUT_MS,
    EXPORT_OPENAPI to match all fields in configuration.ts

Closes BrainTease#1378
…nTease#1379)

Add __tests__/quality/todo-markers.test.ts quality gate that:
- Scans apps/, contracts/, packages/ for TODO and FIXME markers
- Fails if any marker lacks an issue reference (e.g. TODO(BrainTease#123))
- Skips string literals and the test file itself to avoid false positives
- Validates the regex correctly accepts TODO(#NNN) / FIXME #NNN patterns

No bare TODO or FIXME comments without issue references exist in the
current Brain-Storm source — the only TODO in the codebase appears
inside a test fixture string (intentional sample code in
exercise-accessibility.test.tsx) which the string-literal filter
correctly excludes.

Closes BrainTease#1379
@drips-wave

drips-wave Bot commented Oct 22, 2026

Copy link
Copy Markdown

@Timothy2025-20 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

@Hexstar-labs
Hexstar-labs merged commit aa60a4e into BrainTease:main Oct 22, 2026
17 of 49 checks passed

This branch had an error being deployed

1 failed deployment
preview-pr-1419 — c40960e3 Deployed Oct 22, 2026 by Timothy2025-20 via Deploy Preview Environment #357
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.

[Code Quality] #121 Remove unused env vars from example file

2 participants