Skip to content

build: keep the base's commons index when a project bakes corpora - #12

Merged
daniel-rossier merged 1 commit into
mainfrom
fix-project-index-commons
Nov 14, 2026
Merged

daniel-rossier merged 1 commit into
mainfrom
fix-project-index-commons

Conversation

@daniel-rossier

Copy link
Copy Markdown
Contributor

What

build-tiered.sh project staged its index from $BAKE alone, then Dockerfile.project COPIES that index over the base's chromadb/ (replace, not merge). So a project built with --bake/SPEAR_BAKE shipped with only its own corpora indexed and lost every commons collection the base carried — the comment already said the staged index was meant to be "the FULL set the base already has plus this project's corpora", but the code didn't build that set.

Fix

Stage commons + project corpora together, and keep the staged index empty (base left untouched) when nothing is baked:

ALLBAKE=""
[ -n "$BAKE" ] && ALLBAKE="${COMMONS:+$COMMONS,}$BAKE"

Why it hadn't been hit

The default project build bakes nothing (spear-private is mounted at runtime), which already took the empty-index branch and preserved the base. The bug only bites the baked, self-contained path — untested until now.

Validation

  • No-bake spear-image build project on reds: project image carries 14 collections (identical to the base). ✓
  • Empty-bake branch unchanged; base index preserved as before.

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.
@daniel-rossier
daniel-rossier merged commit 4cf9d1c into main Nov 14, 2026
2 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.

1 participant