Skip to content

Commit b276d1c

Browse files
authored
Merge pull request #200 from Context-Engine-AI/bubble-bullshit
Bubble bullshit
2 parents 828e690 + df941c1 commit b276d1c

24 files changed

+2151
-338
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,4 @@ deploy/eks-cdk/
6464
ctx_config.json
6565
/deploy/eks-cdk
6666
/deploy/eks-cdk-PATHFUL
67+
.env

.indexignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,18 @@ cosqa*.json
22
# dev-workspace contains uploaded client workspaces - they get indexed
33
# separately via upload service, not as part of the main Context-Engine repo
44
dev-workspace/
5+
6+
# CDK/deploy build artifacts - duplicates of source files
7+
deploy/eks-cdk-*/cdk.out/
8+
**/cdk.out/
9+
10+
# Build/dist artifacts
11+
dist/
12+
build/
13+
*.egg-info/
14+
15+
# IDE/editor artifacts
16+
.idea/
17+
.vscode/
18+
*.swp
19+
*.swo

ctx-mcp-bridge/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@context-engine-bridge/context-engine-mcp-bridge",
3-
"version": "0.0.16",
3+
"version": "0.0.17",
44
"description": "Context Engine MCP bridge (http/stdio proxy combining indexer + memory servers)",
55
"bin": {
66
"ctxce": "bin/ctxce.js",

ctx-mcp-bridge/src/mcpServer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ function selectClientForTool(name, indexerClient, memoryClient) {
126126
return indexerClient;
127127
}
128128
const lowered = name.toLowerCase();
129-
if (memoryClient && (lowered.startsWith("memory.") || lowered.startsWith("mcp_memory_"))) {
129+
// Route to memory server for any memory-prefixed tool
130+
if (memoryClient && lowered.startsWith("memory")) {
130131
return memoryClient;
131132
}
132133
return indexerClient;

deploy/helm/context-engine/templates/mcp-memory-http.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ spec:
107107
- name: work-volume
108108
mountPath: /work
109109
readOnly: true
110+
- name: codebase-volume
111+
mountPath: /work/.codebase
110112
- name: metadata-volume
111113
mountPath: /tmp/rerank_weights
112114
subPath: rerank_weights
@@ -117,6 +119,9 @@ spec:
117119
- name: work-volume
118120
persistentVolumeClaim:
119121
claimName: {{ .Values.persistence.codeRepos.name }}
122+
- name: codebase-volume
123+
persistentVolumeClaim:
124+
claimName: {{ .Values.persistence.codeMetadata.name }}
120125
- name: metadata-volume
121126
persistentVolumeClaim:
122127
claimName: {{ .Values.persistence.codeMetadata.name }}

deploy/helm/context-engine/values-example.yaml

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -52,61 +52,68 @@ mcpIndexerHttp:
5252
replicas: 1
5353
resources:
5454
requests:
55-
cpu: 250m
55+
cpu: 500m
5656
memory: 8Gi
5757
limits:
58-
cpu: "1"
58+
cpu: "2"
5959
memory: 16Gi
6060
autoscaling:
6161
enabled: true
6262
minReplicas: 1
63-
maxReplicas: 4
63+
maxReplicas: 2
6464

6565
# MCP Memory HTTP
6666
mcpMemoryHttp:
6767
enabled: true
6868
replicas: 1
6969
resources:
7070
requests:
71-
cpu: 250m
72-
memory: 512Mi
71+
cpu: 500m
72+
memory: 1Gi
7373
limits:
74-
cpu: "1"
75-
memory: 2Gi
74+
cpu: "1500m"
75+
memory: 3Gi
7676
autoscaling:
7777
enabled: true
7878
minReplicas: 1
79-
maxReplicas: 3
79+
maxReplicas: 1
8080

8181
# Upload Service
8282
uploadService:
8383
enabled: true
8484
replicas: 1
85+
resources:
86+
requests:
87+
cpu: 250m
88+
memory: 1Gi
89+
limits:
90+
cpu: "1500m"
91+
memory: 3Gi
8592
autoscaling:
8693
enabled: true
8794
minReplicas: 1
88-
maxReplicas: 3
95+
maxReplicas: 2
8996

9097
# Watcher
9198
watcher:
9299
enabled: true
93-
replicas: 1
100+
replicas: 2
94101
resources:
95102
requests:
96103
cpu: 500m
97-
memory: 2Gi
104+
memory: 3Gi
98105
limits:
99-
cpu: "2"
100-
memory: 8Gi
106+
cpu: "2500m"
107+
memory: 10Gi
101108

102-
# Learning Reranker Worker
109+
# Learning Reranker Worker (singleton - only 1 can run due to leader election)
103110
learningRerankerWorker:
104111
enabled: true
105112
replicas: 1
106113
autoscaling:
107114
enabled: true
108115
minReplicas: 1
109-
maxReplicas: 3
116+
maxReplicas: 1
110117

111118
# Persistence - shared PVCs
112119
persistence:

deploy/helm/context-engine/values.yaml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ mcpIndexerHttp:
140140
# -- Resource requests and limits
141141
resources:
142142
requests:
143-
cpu: 250m
143+
cpu: 500m
144144
memory: 8Gi
145145
limits:
146-
cpu: "1"
146+
cpu: "2"
147147
memory: 16Gi
148148
# -- Liveness probe
149149
livenessProbe:
@@ -167,7 +167,7 @@ mcpIndexerHttp:
167167
autoscaling:
168168
enabled: true
169169
minReplicas: 1
170-
maxReplicas: 4
170+
maxReplicas: 2
171171
targetCPUUtilizationPercentage: 70
172172
targetMemoryUtilizationPercentage: 80
173173
# -- Topology spread constraints
@@ -207,11 +207,11 @@ mcpMemoryHttp:
207207
# -- Resource requests and limits
208208
resources:
209209
requests:
210-
cpu: 250m
211-
memory: 512Mi
210+
cpu: 500m
211+
memory: 1Gi
212212
limits:
213-
cpu: "1"
214-
memory: 2Gi
213+
cpu: "1500m"
214+
memory: 3Gi
215215
# -- Liveness probe
216216
livenessProbe:
217217
httpGet:
@@ -230,7 +230,7 @@ mcpMemoryHttp:
230230
autoscaling:
231231
enabled: true
232232
minReplicas: 1
233-
maxReplicas: 3
233+
maxReplicas: 1
234234
targetCPUUtilizationPercentage: 70
235235
targetMemoryUtilizationPercentage: 80
236236
# -- Topology spread constraints
@@ -273,10 +273,10 @@ uploadService:
273273
resources:
274274
requests:
275275
cpu: 250m
276-
memory: 512Mi
276+
memory: 1Gi
277277
limits:
278-
cpu: "1"
279-
memory: 2Gi
278+
cpu: "1500m"
279+
memory: 3Gi
280280
# -- Environment variables
281281
env:
282282
UPLOAD_SERVICE_HOST: "0.0.0.0"
@@ -288,7 +288,7 @@ uploadService:
288288
autoscaling:
289289
enabled: true
290290
minReplicas: 1
291-
maxReplicas: 3
291+
maxReplicas: 2
292292
targetCPUUtilizationPercentage: 70
293293
targetMemoryUtilizationPercentage: 80
294294
# -- Topology spread constraints
@@ -305,7 +305,7 @@ watcher:
305305
# -- Enable Watcher
306306
enabled: true
307307
# -- Number of replicas
308-
replicas: 1
308+
replicas: 2
309309
# -- Command to run
310310
command:
311311
- python
@@ -316,10 +316,10 @@ watcher:
316316
resources:
317317
requests:
318318
cpu: 500m
319-
memory: 2Gi
319+
memory: 3Gi
320320
limits:
321-
cpu: "2"
322-
memory: 8Gi
321+
cpu: "2500m"
322+
memory: 10Gi
323323
# -- Environment variables (in addition to configmap)
324324
env:
325325
WATCH_ROOT: /work
@@ -343,7 +343,7 @@ watcher:
343343
learningRerankerWorker:
344344
# -- Enable Learning Reranker Worker
345345
enabled: true
346-
# -- Number of replicas
346+
# -- Number of replicas (singleton worker with leader election - only 1 can run)
347347
replicas: 1
348348
# -- Command to run
349349
command:
@@ -358,11 +358,11 @@ learningRerankerWorker:
358358
limits:
359359
cpu: "1"
360360
memory: 2Gi
361-
# -- HPA configuration
361+
# -- HPA configuration (capped at 1 - singleton worker)
362362
autoscaling:
363363
enabled: true
364364
minReplicas: 1
365-
maxReplicas: 3
365+
maxReplicas: 1
366366
targetCPUUtilizationPercentage: 70
367367
targetMemoryUtilizationPercentage: 80
368368
# -- Topology spread constraints

deploy/kubernetes/mcp-http.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ spec:
3030
command:
3131
- sh
3232
- -c
33-
- mkdir -p /mnt/rerank_weights /mnt/rerank_events && chmod 777 /mnt/rerank_weights /mnt/rerank_events
33+
- mkdir -p /work/.codebase/rerank_weights /work/.codebase/rerank_events && chmod 777 /work/.codebase/rerank_weights /work/.codebase/rerank_events
3434
volumeMounts:
35-
- name: metadata-volume
36-
mountPath: /mnt
35+
- name: codebase-volume
36+
mountPath: /work/.codebase
3737
containers:
3838
- name: mcp-memory-http
3939
image: context-engine-memory
@@ -108,10 +108,12 @@ spec:
108108
- name: work-volume
109109
mountPath: /work
110110
readOnly: true
111-
- name: metadata-volume
111+
- name: codebase-volume
112+
mountPath: /work/.codebase
113+
- name: codebase-volume
112114
mountPath: /tmp/rerank_weights
113115
subPath: rerank_weights
114-
- name: metadata-volume
116+
- name: codebase-volume
115117
mountPath: /tmp/rerank_events
116118
subPath: rerank_events
117119
livenessProbe:
@@ -133,7 +135,7 @@ spec:
133135
- name: work-volume
134136
persistentVolumeClaim:
135137
claimName: code-repos-pvc
136-
- name: metadata-volume
138+
- name: codebase-volume
137139
persistentVolumeClaim:
138140
claimName: code-metadata-pvc
139141
---

deploy/kubernetes/mcp-memory.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ spec:
2626
command:
2727
- sh
2828
- -c
29-
- mkdir -p /mnt/rerank_weights /mnt/rerank_events && chmod 777 /mnt/rerank_weights /mnt/rerank_events
29+
- mkdir -p /work/.codebase/rerank_weights /work/.codebase/rerank_events && chmod 777 /work/.codebase/rerank_weights /work/.codebase/rerank_events
3030
volumeMounts:
31-
- name: metadata-volume
32-
mountPath: /mnt
31+
- name: codebase-volume
32+
mountPath: /work/.codebase
3333
containers:
3434
- name: mcp-memory
3535
image: context-engine-memory
@@ -85,6 +85,8 @@ spec:
8585
- name: work-volume
8686
mountPath: /work
8787
readOnly: true
88+
- name: codebase-volume
89+
mountPath: /work/.codebase
8890
- name: metadata-volume
8991
mountPath: /tmp/rerank_weights
9092
subPath: rerank_weights
@@ -110,6 +112,9 @@ spec:
110112
- name: work-volume
111113
persistentVolumeClaim:
112114
claimName: code-repos-pvc
115+
- name: codebase-volume
116+
persistentVolumeClaim:
117+
claimName: code-metadata-pvc
113118
- name: metadata-volume
114119
persistentVolumeClaim:
115120
claimName: code-metadata-pvc

0 commit comments

Comments
 (0)