Commit e3edd63
authored
fix(build): warn before --no-incremental wipes embeddings (#986)
* fix(build): warn before --no-incremental wipes embeddings
A full rebuild (either via --no-incremental or when promoted by an engine/
schema/version mismatch) silently drops every row from the embeddings
table. Users who just spent minutes generating embeddings lose them with
no warning, and subsequent \`codegraph search\` returns zero hits with no
indication why.
Add a warnOnEmbeddingsWipe step to setupPipeline that runs after the
incremental/forceFullRebuild decision is made. When the build will be
full AND the embeddings table is non-empty, log:
Full rebuild will discard N embeddings; re-run \`codegraph embed\`
after the build.
The warning sits at the pipeline entry, so it fires uniformly for the
native orchestrator and the JS fallback path. It is silent when the
embeddings table is missing, empty, or when the build is incremental.
Closes #982
* fix(build): re-check embeddings on native-orchestrator version mismatch (#986)
The catch block that handles native-orchestrator throws performs a late
promotion to a full rebuild when the codegraph_version mismatch is
detected. warnOnEmbeddingsWipe already ran in setupPipeline before
forceFullRebuild was set here, so this path previously wiped embeddings
silently — exactly the scenario the initial guard was meant to close.
Call warnOnEmbeddingsWipe again after setting ctx.forceFullRebuild = true
so the late-promotion path surfaces the same warning as the other full
rebuild paths.
Impact: 1 functions changed, 6 affected1 parent badeaed commit e3edd63
1 file changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
109 | 124 | | |
110 | 125 | | |
111 | 126 | | |
| |||
151 | 166 | | |
152 | 167 | | |
153 | 168 | | |
| 169 | + | |
154 | 170 | | |
155 | 171 | | |
156 | 172 | | |
| |||
960 | 976 | | |
961 | 977 | | |
962 | 978 | | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
963 | 983 | | |
964 | 984 | | |
965 | 985 | | |
| |||
0 commit comments