Skip to content

Commit f02d3f9

Browse files
committed
fix: address PR review findings
- branch-analysis.js: fix '=' .repeat(70) syntax error → '='.repeat(70) - package.json: remove setup script pointing to deleted download-model.sh - config/index.js: CLICKHOUSE_PASSWORD required only in production (dev/test warning) - generator.js: pass config.model.revision to pipelineFn for reproducibility - server.js, Dockerfile: update version 2.0.0 → 2.1.0
1 parent d1c66b2 commit f02d3f9

6 files changed

Lines changed: 12 additions & 9 deletions

File tree

services/semantic-service/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RUN npm install -g npm@latest
1414
# Labels
1515
LABEL org.opencontainers.image.title="Semantic Service"
1616
LABEL org.opencontainers.image.description="Semantic similarity detection using E5 multilingual embeddings"
17-
LABEL org.opencontainers.image.version="2.0.0"
17+
LABEL org.opencontainers.image.version="2.1.0"
1818
LABEL org.opencontainers.image.vendor="Vigil Guard"
1919

2020
# Security: Run as non-root user

services/semantic-service/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"test:coverage": "vitest run --coverage",
1313
"test:golden": "RUN_GOLDEN_TESTS=1 vitest run tests/golden-dataset/",
1414
"lint": "eslint src/ tests/",
15-
"setup": "./scripts/download-model.sh",
15+
"setup": "echo 'Embeddings pre-generated in data/datasets/'",
1616
"embeddings:generate": "python3 scripts/generate-embeddings.py",
1717
"embeddings:import": "node scripts/import-embeddings.js",
1818
"embeddings:manage": "node scripts/embedding-manager.js"

services/semantic-service/src/config/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,14 @@ const config = {
126126
function validateConfig() {
127127
const errors = [];
128128

129-
// ClickHouse password required to avoid empty-auth startup
130-
if (!config.clickhouse.password) {
129+
// ClickHouse password required in production
130+
if (!config.clickhouse.password && config.server.env === 'production') {
131131
console.error('FATAL: CLICKHOUSE_PASSWORD not set');
132132
process.exit(1);
133133
}
134+
if (!config.clickhouse.password && config.server.env !== 'production') {
135+
console.warn('WARN: CLICKHOUSE_PASSWORD not set (ok for dev/test)');
136+
}
134137

135138
if (config.model.dimension !== 384) {
136139
errors.push('Model dimension must be 384 for E5-small');

services/semantic-service/src/embedding/generator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ async function initialize() {
4040
// Transformers.js will first check cacheDir for the model, then fetch if not found
4141
extractor = await pipelineFn('feature-extraction', modelId, {
4242
quantized: true,
43-
// If locally available, prevent network fetch
44-
local_files_only: isLocallyAvailable
43+
local_files_only: isLocallyAvailable,
44+
revision: config.model.revision
4545
});
4646

4747
ready = true;

services/semantic-service/src/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ app.get('/metrics', async (req, res) => {
450450
app.get('/', (req, res) => {
451451
res.json({
452452
service: 'semantic-service',
453-
version: '2.0.0',
453+
version: '2.1.0',
454454
branch: config.branch,
455455
description: 'Semantic similarity detection using E5 multilingual embeddings',
456456
endpoints: {

services/workflow/tests/branch-analysis.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@ function analyzeBranchContribution(event, expected) {
152152
* Main analysis
153153
*/
154154
async function main() {
155-
console.log('=' .repeat(70));
155+
console.log('='.repeat(70));
156156
console.log('Branch Specialization Analysis');
157-
console.log('=' .repeat(70));
157+
console.log('='.repeat(70));
158158

159159
// Load fixtures
160160
const allPrompts = loadFixtures();

0 commit comments

Comments
 (0)