From e4dab2507b26922dad8781a95e1fe9b922eb68f7 Mon Sep 17 00:00:00 2001 From: Chaim Date: Sat, 25 Apr 2026 21:35:47 +0000 Subject: [PATCH] refactor(kb): rename default S3 bucket to `legal-kb` (was `insurance-kb`) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bucket name was a holdover from the original single-domain prototype (Israeli National Insurance only). With multi-topic support the same bucket now hosts files for ביטוח לאומי, דיני עבודה, פלילי, and any future legal domains — separated by `inbox//` prefix, not by bucket. Generic `legal-kb` name reflects that. Only the default in `_bucket()` changes; deployments that already set `KB_S3_BUCKET` are unaffected. Dev was migrated to `legal-kb` in the same operation (`mc mirror` of all 221 objects, env var update, UPDATE on `kb_source.original_path` rewriting `s3://insurance-kb/` → `s3://legal-kb/`). Prod MinIO has the empty `legal-kb` bucket ready for shira-hermes prod cutover. Co-Authored-By: Claude Opus 4.7 (1M context) --- api/services/kb/s3.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/services/kb/s3.py b/api/services/kb/s3.py index 720d363..669de09 100644 --- a/api/services/kb/s3.py +++ b/api/services/kb/s3.py @@ -1,4 +1,4 @@ -"""MinIO/S3 helpers for the insurance-kb bucket. +"""MinIO/S3 helpers for the shared kb bucket (formerly `insurance-kb`). Layout in the bucket: inbox/{law,regulation,circular,caselaw,tool}/ @@ -41,7 +41,7 @@ def _client(): def _bucket() -> str: - return os.environ.get("KB_S3_BUCKET", "insurance-kb") + return os.environ.get("KB_S3_BUCKET", "legal-kb") def list_inbox() -> list[dict]: