chore(cleanup): remove legacy MCP/CLI entry points + 6 orphaned backfill funcs (Bucket D / Option A)#176
Conversation
…kfill funcs
Phase 1 of the v4.4.0 -> revival cleanup. Bucket D from
.agent/reports/cleanup-audit.md. User chose Option A (full snose) after
triage proved both binaries are pre-v3.7.0 architecture stragglers and
the plugin marketplace path uses cmd/engram (stdio proxy) exclusively.
Deleted:
- cmd/mcp/ (legacy per-project MCP server, engram-mcp binary)
- cmd/engram-cli/ (legacy backfill CLI, no Makefile/Dockerfile/goreleaser refs)
- internal/backfill/backfill.go::Runner.Run + Runner.processFile
- internal/backfill/import_feedback.go::ImportFeedbackFiles
- internal/backfill/extract/extract.go::BuildUserPrompt + BuildAlreadyExtracted
- internal/backfill/metrics/metrics.go::Metrics.Snapshot
Updated release/build/install configs:
- Dockerfile : removed engram-mcp build line + client image stage
- Makefile : removed engram-mcp targets (native + 3 cross-compile)
- .goreleaser.yaml : removed engram-mcp + engram-mcp-stdio-proxy build entries
- scripts/install.sh : removed engram-mcp + engram-mcp-stdio-proxy cp/chmod
- scripts/install.ps1 : same treatment for the PowerShell installer
- docs/arch/COMPONENTS.md: removed bin/mcp-server + bin/mcp-stdio-proxy sections
Note: cmd/mcp-stdio-proxy/ source was already physically deleted at some
prior point; these refs were broken-link orphans that silently failed
during install (install.sh used 2>/dev/null || true).
Live code that stays in internal/backfill:
- Runner struct + NewRunner + DefaultConfig + Runner.ProcessSession
(all called by internal/worker/handlers_backfill.go HTTP handler)
Verification:
- go build ./... clean
- go vet ./... clean
- go test ./... all packages green
- staticcheck U1000 entries dropped
- deadcode -test entries dropped from 69 to 52
- bash -n install.sh pre-existing CRLF on Windows; content verified clean
BREAKING CHANGE: engram-mcp and engram-mcp-stdio-proxy release
artifacts removed. Anyone using bare-metal install of these binaries
must migrate to the plugin marketplace path. Plugin users are unaffected
(plugin downloads only the engram stdio-proxy binary). Will be
announced in v4.5.0 release notes.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
WalkthroughPR удаляет двоичные цели MCP и связанный CLI/backfill код, а также их сборочные, docker- и install-артефакты и сопутствующую документацию; в релизной пайплайне и образах остаётся только Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Makefile`:
- Line 32: Update README.md and CONTRIBUTING.md to remove or correct statements
that "make build" builds MCP (references around the sections that currently
describe MCP being included), change any commands/examples that say to run `make
build` to obtain MCP, and replace them with the current build instructions or a
note about how MCP is built now (or where to find MCP build steps); search for
mentions of "MCP" and the Makefile target "build" and update the descriptive
text in those sections so docs no longer claim MCP is built by the `build`
target.
In `@scripts/install.ps1`:
- Around line 77-78: В скрипте scripts/install.ps1 операция Copy-Item для
engram-server.exe использует -ErrorAction SilentlyContinue which hides failures;
change it to fail fast (remove -ErrorAction SilentlyContinue or use -ErrorAction
Stop), then after the Copy-Item for "$TempDir\engram-server.exe" ->
"$InstallDir\" verify the file exists (check Test-Path
"$InstallDir\engram-server.exe") and, if missing, log an explicit error and exit
with non-zero code (e.g., write an error via Write-Error or use Exit 1) so the
installer cannot report success when the main binary wasn't copied.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 59480ae1-0653-4ae5-9717-d858bd247866
📒 Files selected for processing (12)
.goreleaser.yamlDockerfileMakefilecmd/engram-cli/main.gocmd/mcp/main.godocs/arch/COMPONENTS.mdinternal/backfill/backfill.gointernal/backfill/extract/extract.gointernal/backfill/import_feedback.gointernal/backfill/metrics/metrics.goscripts/install.ps1scripts/install.sh
💤 Files with no reviewable changes (10)
- internal/backfill/metrics/metrics.go
- Dockerfile
- .goreleaser.yaml
- scripts/install.sh
- internal/backfill/import_feedback.go
- internal/backfill/backfill.go
- docs/arch/COMPONENTS.md
- cmd/mcp/main.go
- internal/backfill/extract/extract.go
- cmd/engram-cli/main.go
|
|
||
| # Build all binaries | ||
| build: dashboard worker mcp | ||
| build: dashboard worker |
There was a problem hiding this comment.
Обновите документацию после удаления MCP из сборки.
После изменения на Line 32 make build больше не собирает MCP, но в README.md (Line 275-285) и CONTRIBUTING.md (Line 108-116) это всё ещё заявлено. Это будет путать пользователей.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@Makefile` at line 32, Update README.md and CONTRIBUTING.md to remove or
correct statements that "make build" builds MCP (references around the sections
that currently describe MCP being included), change any commands/examples that
say to run `make build` to obtain MCP, and replace them with the current build
instructions or a note about how MCP is built now (or where to find MCP build
steps); search for mentions of "MCP" and the Makefile target "build" and update
the descriptive text in those sections so docs no longer claim MCP is built by
the `build` target.
| # Copy binaries | ||
| Copy-Item "$TempDir\engram-server.exe" "$InstallDir\" -Force -ErrorAction SilentlyContinue |
There was a problem hiding this comment.
Не подавляйте ошибку копирования основного бинарника.
На Line 78 используется -ErrorAction SilentlyContinue для engram-server.exe, из-за чего установка может завершиться с ложным успехом (см. Line 102), даже если бинарник не скопирован.
Предлагаемое исправление
- Copy-Item "$TempDir\engram-server.exe" "$InstallDir\" -Force -ErrorAction SilentlyContinue
+ Copy-Item "$TempDir\engram-server.exe" "$InstallDir\" -Force -ErrorAction Stop
+ if (-not (Test-Path "$InstallDir\engram-server.exe")) {
+ throw "engram-server.exe не найден в $InstallDir после копирования"
+ }📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # Copy binaries | |
| Copy-Item "$TempDir\engram-server.exe" "$InstallDir\" -Force -ErrorAction SilentlyContinue | |
| # Copy binaries | |
| Copy-Item "$TempDir\engram-server.exe" "$InstallDir\" -Force -ErrorAction Stop | |
| if (-not (Test-Path "$InstallDir\engram-server.exe")) { | |
| throw "engram-server.exe не найден в $InstallDir после копирования" | |
| } |
🧰 Tools
🪛 PSScriptAnalyzer (1.25.0)
[warning] Missing BOM encoding for non-ASCII encoded file 'install.ps1'
(PSUseBOMForUnicodeEncodedFile)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@scripts/install.ps1` around lines 77 - 78, В скрипте scripts/install.ps1
операция Copy-Item для engram-server.exe использует -ErrorAction
SilentlyContinue which hides failures; change it to fail fast (remove
-ErrorAction SilentlyContinue or use -ErrorAction Stop), then after the
Copy-Item for "$TempDir\engram-server.exe" -> "$InstallDir\" verify the file
exists (check Test-Path "$InstallDir\engram-server.exe") and, if missing, log an
explicit error and exit with non-zero code (e.g., write an error via Write-Error
or use Exit 1) so the installer cannot report success when the main binary
wasn't copied.
…s deleted in this PR)
…REAKING) Consolidates the BREAKING CHANGE from PR #176 (legacy MCP/CLI removal) with two user-visible plugin tactical fixes into a single coherent v4.5.0 release. ## BREAKING CHANGES (carried over from PR #176) The 'engram-mcp' and 'engram-mcp-stdio-proxy' release artifacts no longer ship. Bare-metal users who installed via tarball or scripts/install.sh and relied on the engram-mcp binary must migrate to the plugin marketplace install path: /plugin marketplace add thebtf/engram-marketplace /plugin install engram Plugin marketplace users are unaffected — ensure-binary.js downloads only the 'engram' stdio-proxy binary, not engram-mcp. cmd/mcp/, cmd/engram-cli/, the Dockerfile client image stage, the engram-mcp Makefile + goreleaser + install.sh entries, and the bin/mcp-server / bin/mcp-stdio-proxy COMPONENTS.md sections are all gone. ## Fix #1 — MCP startup reliability after CC plugin update Smoking gun (.agent/reports/plugin-tactical-fix-triage.md): when CC updates the plugin from v4.3.0 to v4.4.x it does NOT migrate plugin-level user_config (server_url + api_token). .mcp.json then expands ${user_config.server_url} to an empty string, the binary spawns silently, and every MCP tool call fails with an opaque gRPC dial error against an empty target. Fix: - plugin/engram/.mcp.json: env block now also passes "ENGRAM_URL_LEGACY": "${ENGRAM_URL}" so users who had ENGRAM_URL in their shell from the v4.3.0 setup still get a working MCP server. - plugin/engram/scripts/run-engram.js: before spawning, fall back to ENGRAM_URL_LEGACY if ENGRAM_URL is empty, AND emit a visible WARN to stderr if both are empty so the failure mode is no longer silent. ## Fix #2 — disable noisy context injection Per .agent/reports/phase-2-synthesis.md fix #16 + the entity audits, the session-start hook currently injects 100 raw observations unioned with 10 semantic hits, plus project briefing, plus learned guidance. Reported as noise rather than relevant context. plugin/engram/hooks/session-start.js now keeps the inject GET (still needed for result.always_inject) but renders ONLY: - result.always_inject -> <user-behavior-rules> - GET /api/issues -> <engram-issues> - GET /api/issues resolved -> <engram-resolved-issues> Skipped: result.observations / result.full_count / result.project_briefing / result.guidance. mark-injected scoped to always_inject IDs only so citation tracking does not log false positives. Misleading observation- count log line removed. Save / recall MCP tools (recall_memory, store_memory, find_by_file, observations, store, feedback, vault, issues) are completely independent of this hook — separate gRPC path, unaffected. This is tactical, NOT a redesign. Phase 2 strategic work continues: citation session_id="" smoking gun, 100-obs cap policy, hook curated-render redesign — all in .agent/reports/phase-2-synthesis.md. ## Version bump Per Constitution §15 the daemon version and plugin version move together: - cmd/engram/main.go daemonVersion "v4.4.0" -> "v4.5.0" - plugin/engram/.claude-plugin/plugin.json "4.4.0" -> "4.5.0" ## Verification - JSON parse on .mcp.json + plugin.json: clean - node --check on run-engram.js + session-start.js: clean - go build ./... clean - 3-OS matrix CI green on the prior 4.4.1 commit (re-runs on amend) ## Files 4 plugin/daemon files + 1 daemon version constant. Net: -76 LOC (mostly removed render blocks in session-start.js).
…REAKING) (#177) Consolidates BREAKING from PR #176 + 2 plugin tactical fixes into v4.5.0. BREAKING: 'engram-mcp' and 'engram-mcp-stdio-proxy' release artifacts no longer ship. Bare-metal users migrate to plugin marketplace path. Plugin marketplace users unaffected (ensure-binary.js downloads only the 'engram' stdio-proxy binary). Fix #1 — MCP startup reliability after CC plugin update: - .mcp.json adds ENGRAM_URL_LEGACY = ${ENGRAM_URL} fallback - run-engram.js falls back if user_config-derived ENGRAM_URL is empty, + visible WARN to stderr if both empty (no more silent failure) Fix #2 — Disable noisy context injection: - session-start.js keeps inject GET (still needed for always_inject) but renders ONLY result.always_inject + 2 issues fetches - Skipped: result.observations / result.full_count / result.project_briefing / result.guidance - mark-injected scoped to always_inject IDs only - All MCP save/recall tools unchanged (separate gRPC path) Version bump per Constitution §15: - cmd/engram/main.go daemonVersion v4.4.0 -> v4.5.0 - plugin/engram/.claude-plugin/plugin.json 4.4.0 -> 4.5.0 Phase 2 strategic redesign continues separately — see .agent/reports/phase-2-synthesis.md for the 21-item fix priority matrix.
What
Phase 1 of the v4.4.0 → revival cleanup. Bucket D, Option A from
.agent/reports/cleanup-audit.md. After per-binary triage proved bothengram-mcpandengram-cliare pre-v3.7.0 architecture stragglers and the plugin marketplace path usescmd/engram(stdio proxy) exclusively, the user explicitly chose full snose over deprecation.Removed source
cmd/mcp/— legacy per-project MCP server (engram-mcpbinary). Last touched 2026-03-19 (~4 weeks before this cleanup), not downloaded byplugin/engram/scripts/ensure-binary.js, not spawned byrun-engram.js.cmd/engram-cli/— legacy backfill CLI. Last touched 2026-03-09 (~5 weeks). Not in Makefile / Dockerfile / goreleaser / install.sh. Sole consumer ofinternal/backfill.Runner.Run.internal/backfill/import_feedback.go— entire file (heldImportFeedbackFiles+ supporting types, all orphan aftercmd/engram-cliremoval).internal/backfill/:(*Runner).Run+(*Runner).processFile(CLI batch entry point)extract.BuildUserPrompt+extract.BuildAlreadyExtracted(*Metrics).Snapshot+SnapshotMetricstypeUpdated release / build / install configs
Dockerfileengram-mcpbuild step + entire client image stageMakefilemcptarget + 4 cross-compile entries + install cp + help entry.goreleaser.yamlengram-mcpandengram-mcp-stdio-proxybuild entries (~53 lines)scripts/install.shscripts/install.ps1Copy-Itemlines forengram-mcp.exeandengram-mcp-stdio-proxy.exedocs/arch/COMPONENTS.mdbin/mcp-server+bin/mcp-stdio-proxysections + diagram entriesBonus fix
cmd/mcp-stdio-proxy/source was already physically deleted at some prior point. The references in.goreleaser.yaml+install.sh+install.ps1+COMPONENTS.mdwere broken-link orphans that silently failed during install (scripts/install.shused2>/dev/null || true). All four are now consistent — the source is gone and so are the references.Live code that stays in
internal/backfillRunnerstruct +NewRunner+DefaultConfig(*Runner).ProcessSession(the per-session API used byinternal/worker/handlers_backfill.goHTTP route)ProcessSessionSo the HTTP backfill path stays fully functional — only the CLI batch entry point and the file-walker helpers were removed.
Verification
go build ./...— cleango vet ./...— cleango test ./... -count=1— all packages greenstaticcheck -checks=U1000 ./...— verified zero entries ininternal/backfill/deadcode -test ./...— entries dropped 69 → 52 (-17, matches what we removed)Subagent could not run
bash -n install.shlocally due to a pre-existing CRLF line-ending issue on Windows; content correctness was verified via PowerShell instead. Linux CI will exercise the actual script syntax.The
engram-mcpandengram-mcp-stdio-proxyrelease artifacts are removed. Anyone using bare-metal install of these binaries must migrate to the plugin marketplace path:Plugin users are unaffected —
ensure-binary.jsalready downloads only theengramstdio-proxy binary, notengram-mcp.This will be announced in the v4.5.0 release notes. Bumping to a new MINOR version because removing release artifacts is technically a breaking change for the install scripts, even though the canonical install path is unchanged.
Combined cleanup metrics across Buckets A + B + D
deadcode -test ./...entriesstaticcheck -checks=U1000 ./...entriesengram-mcp,engram-mcp-stdio-proxy)Phase 1 cleanup nearly complete. Bucket B-2 (db/gorm + moduletest + RateLimiter / TokenAuth / sessions/parser triage) remains as a follow-up, lower priority.
Summary by CodeRabbit
Release Notes
Chores
Documentation