fix: review fixes, knowledge gap reduction, and env var hardening#423
Merged
fix: review fixes, knowledge gap reduction, and env var hardening#423
Conversation
All configuration (AWS_REGION, BEDROCK_MODEL_ID, PINECONE_INDEX, BATCH_SIZE, EMBEDDING_CONCURRENCY) must now be set via environment variables or .env.local — no more hardcoded ap-south-1 or model ID defaults. Fail-fast with clear error messages if any are missing. This fixes the S3 PermanentRedirect error in the Deploy Knowledge Base CI job, which was caused by the bucket being in us-east-1 while code defaulted to ap-south-1. Bucket has been recreated as setu-docs-content-prod in ap-south-1. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Checklist to merge a PR 🚀To merge this pull request, please take time to complete the checklist. What action did you perform?Review the corresponding checklist items for the action you performed and mark them done. Edit an existing content (MDX) pageChecklist
Edit an existing API reference pageChecklist
Add a new content (MDX) pageChecklist
Add a new API reference pageChecklist
|
pankaj0308
approved these changes
Mar 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vars.*) instead of hardcoded values in CIChanges
Code Review Fixes (
22eaf1a,fb6a0d8)content.indexOf(paragraph)bug in chunker (always found first occurrence)Knowledge Gap Reduction (
f9bb103)FORCE_EMBED_PATTERNSwithisForceEmbeddable()for critical contentEnv Var Hardening (
d3b95b0)ap-south-1, model IDs, index names from coderequireEnv()helper — fail-fast with clear error messagesvars.*for non-sensitive config,secrets.*for sensitivesetu-docs-content-prodinap-south-1Required GitHub Actions Variables
AWS_REGIONap-south-1BEDROCK_MODEL_IDamazon.titan-embed-text-v2:0PINECONE_INDEXdocs-embeddingsBATCH_SIZE25EMBEDDING_CONCURRENCY3Required Secret Update
CONTENT_BUCKET_NAMEsetu-docs-content-prodTest plan
yarn build— both packages compileyarn test— 93/93 tests passyarn dry-run— embedding dry-run validates 5,576 chunkssetu-docs-content-prodexists inap-south-1