Indexer: strict env validation for production profile #88
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#88
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Evidence
indexer/src/config.rs;RELEASE_READINESS_MATRIX.mdAcceptance criteria
RUN_MODE=prodrequires critical vars; fails fastEpic
#62
marked this issue as related to #62
Epic #62 delivery
Implemented strict production config in
indexer/src/config.rs:RUN_MODE=prod(orproduction) requires non-emptyDATABASE_URL,FACTORY_ADDRESS,CORS_ORIGINS, and LCD URLs that are not the built-in public default list (normalized comparison).Config::from_env()returnsResult; binary exits with a clear message on error.serial_testin the same file.Verify:
cd indexer && cargo test --lib config::@brouie please review.
mentioned in issue #62
@PlasticDigits Verified on current main. Acceptance criteria:
RUN_MODE=prod requires critical vars; fails fast: indexer/src/config.rs has Config::from_env() returning Result, binary exits with clear message on error. Ran cargo test --lib config:: locally: 5 passed, 0 failed:
config::tests::dev_allows_default_lcd_urls
config::tests::metrics_enabled_when_metrics_bind_non_empty
config::tests::prod_rejects_builtin_lcd_defaults
config::tests::prod_accepts_explicit_lcd_urls
config::tests::prod_rejects_empty_cors
Coverage confirms: prod rejects built-in LCD defaults, rejects empty CORS, accepts explicit LCD URLs, dev allows defaults. serial_test used to prevent env var contention between tests. Strict production profile validation locked in. Closing.
mentioned in issue #92