# Learnitive terminal / Agent hotfix validation — 2026-09-05

## Implemented

- Development Docker `developer` identity is parameterized by the staging Console service UID/GID.
- Console sandboxes use writable `/home/developer` tmpfs owned by the same UID/GID.
- Installer validates numeric and named UID/GID, `HOME=/home/developer`, home writability and toolchain health before service activation.
- Agent `apply_patch` edits general readable project text through project storage and keeps LaTeX edits on the review/collaboration-aware source path.
- Build with AI hides language/framework/catalog selectors and infers an appropriate starter from the prompt.
- AI chat header removes duplicated Ollama controls; Ollama configuration remains in AI Settings; Undo AI turn is in Agent activity.

## Validation completed in implementation sandbox

- `node --test` targeted runtime/staging/vibe set: 25/25 PASS.
- `node --test` Ollama/security/staging set: 29/29 PASS.
- `node scripts/verify-pnpm-lock-sync.mjs`: PASS.
- `node scripts/verify-trusted-runtime-manifest.mjs`: PASS.
- `node scripts/learnitive-r12-release-audit.mjs`: PASS.
- `node scripts/learnitive-capability-audit.mjs`: 40/40 PASS, zero blockers.
- Modified TS/TSX files parsed/transpiled successfully with TypeScript 5.8.3.
- `bash -n deploy/learnitive/install-staging.sh`: PASS.
- `node --check learnitive-services/console-gateway/server.js`: PASS.

## Required staging acceptance

The implementation sandbox does not contain the repository `node_modules` or a cached pnpm 11.6.0 binary, and registry DNS is unavailable. Therefore the staging installer remains authoritative for frozen dependency restore, production Vite build, real Docker identity/home validation, terminal npm writes, Agent mutation against a real React project, and end-to-end Preview/runtime acceptance.

## React Agent compile-routing follow-up

- Root cause of `LaTeX root file was not found: main.tex` on a React homepage request: `ProjectAiService.applyProposal(..., { compile: true })` still called `ProjectCompileService` directly. That service is intentionally LaTeX-specific and reads the default LaTeX project config when invoked on a non-LaTeX workspace.
- Fix: AI apply/compile now resolves the project profile first. Genuine LaTeX projects continue through `ProjectCompileService`; React/Vite and other code projects build through `ProjectExecutionService` and the Universal Runtime.
- Agent `inspect_project_health` is also mode-aware and no longer reports a fabricated LaTeX root error or stale LaTeX diagnostics for code/web projects.
- Current dependency-free validation: 364/364 server/static tests, 10/10 project-runtime tests, 12/12 vibe invariants, and 40/40 capability audit all pass.
