Skip to content

feat(devcontainer): one-command isolated environment — models baked, versions pinned, doctor-gated - #129

Merged
cdeust merged 1 commit into
mainfrom
feat/devcontainer
Jul 14, 2026
Merged

feat(devcontainer): one-command isolated environment — models baked, versions pinned, doctor-gated#129
cdeust merged 1 commit into
mainfrom
feat/devcontainer

Conversation

@cdeust

@cdeust cdeust commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Fixes #118.

  • .devcontainer/ : feature claude-code 1.0.5 pinnée + Node 22 pinné, DISABLE_AUTOUPDATER=1, compose app+db (pgvector/pgvector:pg16 — la même image que reproduce.sh), extensions par initdb/ (même DDL que pg_schema.py), modèles embedding+FlashRank préchauffés AU BUILD sous /opt/model-cache (jamais /tmp — classe d'incident FlashRank), postCreateCommand = setup_db + python -m mcp_server.doctor en gate exit-0.
  • Doc : section « Dev container » dans docs/deployment-scenarios.md (le foyer unique des nuances d'environnement), incluant deux vérités utiles : la preuve extraite de ghcr.io que le tag de feature n'épingle PAS le CLI (npm -g non pinné → DISABLE_AUTOUPDATER nécessaire), et le quirk Docker Desktop des bind mounts sous /tmp (répertoires silencieusement vides — d'où le pattern initdb/ en répertoire).
  • Testé end-to-end : build OK (modèles baked, confirmés par mtime), compose config valide, up -d les deux services healthy, setup_db → ready, doctor → exit 0 toutes checks vertes.

Couvre P1 (préflight au build), P3 (one-command), isolation container (seule couche confinant MCP+hooks) — réfs #113 #115 #116, META #120.

🤖 Generated with Claude Code

…d models

Adds .devcontainer/{devcontainer.json,docker-compose.yml,Dockerfile,initdb/}
delivering a single-command dev environment: the Claude Code CLI feature,
a PostgreSQL+pgvector service reusing the exact image already validated by
benchmarks/reproduce.sh, and Cortex's embedding/reranker models prewarmed
at build time (never /tmp — mirrors the reranker.py 2026-07-11 incident
fix) so first-session recall/remember never pays a cold-start fetch.
postCreateCommand chains scripts/setup_db.py (already used by the
SessionStart hook) with python -m mcp_server.doctor as the exit-0 gate.

All dependency and feature versions are pinned with a `# source` citation
(uv.lock for torch/sentence-transformers/flashrank; live ghcr.io manifest
inspection for the devcontainer features — which also confirms, by
extracting and reading install.sh, the claude-code feature's stated
"options": {} means pinning its tag fixes the install script but not the
CLI release it npm-installs, the exact gap this issue names).

Verified locally: devcontainer.json JSON-lints; `docker compose config`
validates; the app image builds and both models prewarm successfully;
a full `docker compose up` (from a $HOME-rooted checkout, to route around
a /tmp-specific Docker Desktop bind-mount quirk on this machine) brings
up both services healthy, and setup_db.py + mcp_server.doctor both
succeed with exit 0.

Fixes #118

Co-Authored-By: Claude <noreply@anthropic.com>
@cdeust
cdeust merged commit 4121fbd into main Jul 14, 2026
14 checks passed
@cdeust
cdeust deleted the feat/devcontainer branch July 14, 2026 22:16
pull Bot pushed a commit to asleekgeek/Cortex that referenced this pull request Jul 15, 2026
Cuts 13 commits ahead of v4.14.1: core→infrastructure layer-violation
cleanup via reverse-DI ports-and-adapters (cdeust#135), check_setup MCP tool +
/preflight command (cdeust#115, cdeust#119, cdeust#133), XDG-aware embedding cache_folder
(cdeust#132), project settings catalogue + headless CI regimes (cdeust#131), devcontainer
with prewarmed models (cdeust#129), optional OTLP telemetry (cdeust#128), stale docs/
module-count fixes (cdeust#130, cdeust#121), CLAUDE.md refactor (cdeust#125), Windows
postInstall dispatch fix (cdeust#117). No retrieval-path code touched.

Pre-tag guard on the exact release tree (git_sha 018c76d, isolated
ephemeral pgvector container via benchmarks/reproduce.sh --no-ablation):
LongMemEval MRR 0.9166/R@10 0.9820 (matches v4.14.1, no regression); LoCoMo
3-run mean MRR 0.8009/R@10 0.9146 (vs v4.14.1's 3-run mean 0.7984/0.9142,
an improvement within noise); BEAM MRR 0.5437/R@10 0.7139 (within v4.14.1's
established intra-day variance band). All 4 gated floors PASS (tolerance
0.005) — unlike v4.14.1 where LoCoMo MRR failed the absolute floor on its
3-run mean, 4.14.2's mean clears it by -0.0041. Evidence:
benchmarks/results/repro/20260715-v4.14.2-pretag/.

Co-Authored-By: Claude <noreply@anthropic.com>
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.

Devcontainer officiel Cortex : environnement une-commande, isolé, versions pinnées

1 participant