From b098e4ebe9ce5939cf403cd4dac5d5b72f53aadd Mon Sep 17 00:00:00 2001 From: Daniel Rossier Date: Sat, 14 Nov 2026 19:27:30 +0100 Subject: [PATCH] build: keep the base's commons index when a project bakes corpora Dockerfile.project COPIES the staged index over the base's chromadb rather than merging into it, so staging only $BAKE left a baked project image with just its own corpora and none of the base's commons -- the reds platform retrieval silently gone. Stage commons + project corpora together so the replacement is the full set the comment already promised, and keep the index empty (base untouched) when nothing is baked. --- scripts/docker/build-tiered.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/docker/build-tiered.sh b/scripts/docker/build-tiered.sh index 43b72ee..d8dc2f4 100755 --- a/scripts/docker/build-tiered.sh +++ b/scripts/docker/build-tiered.sh @@ -226,9 +226,12 @@ project) "$HERE/gen-registry.py" --profile private || echo " (some corpora skipped)" >&2 - # The index is the FULL set the base already has plus this project's corpora, - # so it replaces the base's rather than merging into it. - ALLBAKE="$BAKE" + # Dockerfile.project COPIES this index over the base's, replacing it rather + # than merging -- so when the project bakes corpora the staged index must + # carry the base's commons too, or they lose their retrieval. With nothing + # to bake it stays empty and the base's index is kept untouched. + ALLBAKE="" + [ -n "$BAKE" ] && ALLBAKE="${COMMONS:+$COMMONS,}$BAKE" IDX="${SPEAR_INDEX_DIR:-$APP/chromadb}" if [ -d "$IDX" ] && [ -n "$ALLBAKE" ]; then "$HERE/stage-index.py" --bake "$ALLBAKE" --index "$IDX" "$STAGE/index"