Skip to content

fix: remove stale .env.example entries and align S3 env vars with code#556

Merged
Junman140 merged 1 commit into
Pi-Defi-world:devfrom
elijahbok14-sudo:fix/remove-stale-env-example
Jun 26, 2026
Merged

fix: remove stale .env.example entries and align S3 env vars with code#556
Junman140 merged 1 commit into
Pi-Defi-world:devfrom
elijahbok14-sudo:fix/remove-stale-env-example

Conversation

@elijahbok14-sudo

@elijahbok14-sudo elijahbok14-sudo commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Closes #453

This PR removes stale environment variable entries from .env.example and aligns the S3/KYC configuration section with the env names actually consumed by the backend code.

Changes:

  • commented out unused BULK_TRANSFER_* variables
  • replaced unsupported AWS_S3_* config names with the supported S3_* / AWS_* variants used by src/config/env.ts
  • preserved only environment variables that are currently referenced by the codebase

Summary by CodeRabbit

  • Documentation
    • Updated example environment settings to reflect the latest configuration names.
    • Bulk transfer defaults are now shown as optional commented examples instead of active values.
    • S3/KYC setup examples now use shorter, renamed bucket, region, and endpoint keys.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

.env.example now comments out the bulk transfer defaults and renames the S3/KYC example keys to S3_BUCKET, S3_REGION, and S3_ENDPOINT.

Changes

Environment example updates

Layer / File(s) Summary
Bulk transfer examples
.env.example
BULK_TRANSFER_CHUNK_SIZE and BULK_TRANSFER_MAX_FILE_SIZE_BYTES are commented out in the example file.
S3/KYC variable names
.env.example
The example storage keys are renamed to S3_BUCKET, S3_REGION, and S3_ENDPOINT, while the AWS access credential entries remain listed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 I hopped through env vars, neat and light,
Commented some defaults out of sight.
New bucket names gleam in the springy dew,
A tiny config shift, fresh and new!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change, but it omits the required Scope, Validation, and template-style Links sections. Add the missing template sections with scope, test commands/results, and issue/related PR references in the requested format.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: cleaning up .env.example and aligning S3 env names.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.env.example:
- Around line 68-78: The `S3_BUCKET` example is commented out in `.env.example`,
but `src/config/env.ts` expects it for S3 usage and falls back to an empty value
when missing. Keep `S3_BUCKET` active and visible in the example so fresh setups
know to set it, while leaving `S3_REGION` commented since `AWS_REGION` already
provides the default.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 458e2610-63f1-4648-8fdb-b2f6b69cca8f

📥 Commits

Reviewing files that changed from the base of the PR and between b4edf7d and abd7f33.

📒 Files selected for processing (1)
  • .env.example

Comment thread .env.example
Comment on lines 68 to +78
# ── S3 / KYC document storage (B-062) ────────────────────────────────────────
# S3 bucket for KYC document uploads (must be private — no public access)
AWS_S3_KYC_BUCKET=acbu-kyc-documents
# S3_BUCKET=acbu-kyc-documents
# AWS region for S3 (defaults to AWS_REGION if set)
AWS_S3_REGION=us-east-1
# AWS_REGION=us-east-1
# S3_REGION=us-east-1
# Explicit credentials — omit to use IAM role / instance profile in production
AWS_ACCESS_KEY_ID=your-access-key-id
AWS_SECRET_ACCESS_KEY=your-secret-access-key
# Optional: S3-compatible endpoint for local dev (e.g. MinIO)
# AWS_S3_ENDPOINT=http://localhost:9000
# S3_ENDPOINT=http://localhost:9000

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- .env.example relevant slice ---'
nl -ba .env.example | sed -n '60,90p'

echo
echo '--- search S3 env references ---'
rg -n --hidden --glob '!.git' 'S3_BUCKET|S3_REGION|S3_ENDPOINT|AWS_REGION|AWS_ACCESS_KEY_ID|AWS_SECRET_ACCESS_KEY' .

Repository: Pi-Defi-world/acbu-backend

Length of output: 240


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- .env.example relevant slice ---'
nl -ba .env.example | sed -n '60,90p'

echo
echo '--- search S3 env references ---'
rg -n --hidden --glob '!.git' 'S3_BUCKET|S3_REGION|S3_ENDPOINT|AWS_REGION|AWS_ACCESS_KEY_ID|AWS_SECRET_ACCESS_KEY' .

Repository: Pi-Defi-world/acbu-backend

Length of output: 240


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- .env.example relevant slice ---'
sed -n '60,90p' .env.example

echo
echo '--- search S3 env references ---'
rg -n --hidden --glob '!.git' 'S3_BUCKET|S3_REGION|S3_ENDPOINT|AWS_REGION|AWS_ACCESS_KEY_ID|AWS_SECRET_ACCESS_KEY' .

Repository: Pi-Defi-world/acbu-backend

Length of output: 2882


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- s3.bucket usages ---'
rg -n --hidden --glob '!.git' 's3\.bucket|env\.s3\.bucket|S3_BUCKET' src ENV_VARS.md

echo
echo '--- env.ts S3 block ---'
sed -n '150,175p' src/config/env.ts

Repository: Pi-Defi-world/acbu-backend

Length of output: 2072


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- s3.bucket usages ---'
rg -n --hidden --glob '!.git' 's3\.bucket|env\.s3\.bucket|S3_BUCKET' src ENV_VARS.md

echo
echo '--- env.ts S3 block ---'
sed -n '150,175p' src/config/env.ts

Repository: Pi-Defi-world/acbu-backend

Length of output: 2072


Keep S3_BUCKET active in .env.example:68-78.

src/config/env.ts uses S3_BUCKET for every S3 operation, and it defaults to an empty string when unset. S3_REGION can stay commented because AWS_REGION already covers the default region, but the bucket name should be visible for fresh setups.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.env.example around lines 68 - 78, The `S3_BUCKET` example is commented out
in `.env.example`, but `src/config/env.ts` expects it for S3 usage and falls
back to an empty value when missing. Keep `S3_BUCKET` active and visible in the
example so fresh setups know to set it, while leaving `S3_REGION` commented
since `AWS_REGION` already provides the default.

@drips-wave

drips-wave Bot commented Jun 25, 2026

Copy link
Copy Markdown

@elijahbok14-sudo 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

@Junman140 Junman140 merged commit b4467e7 into Pi-Defi-world:dev Jun 26, 2026
2 of 3 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.

.env.example lists variables not used in code

2 participants