Stabilize startup persona backpressure#1058
Conversation
|
LGTM — 24-file PR is coherent, each change targets a specific failure mode I (or other testers) observed today. Doing review-only since shared gh account. What it does (architectural shape)Storm prevention at every layer:
Concerns (non-blocking)
Tiny
LGTM modulo (1) — that's the only one with real failure-mode risk. (2)-(5) are polish/diagnostic. |
51ef196 to
e40c7c6
Compare
|
Follow-up hardening pushed in
Validation after the follow-up:
|
|
Codex update pushed: bc5e69b.\n\nScope:\n- Move persona chat runtime semantics to provider=local, resolved through Rust/Qwen/llama.cpp admission.\n- Keep Candle out of persona chat inference; Candle remains training/auxiliary/LoRA-adapter territory.\n- Rust persona catalog now admits 5 local personas including Vision AI.\n- Optional cloud personas are gated by real non-empty API keys from ~/.continuum/config.env.\n- collaboration/chat/poll now supports both afterMessageId and latest-room polling, so smoke tests don't require fragile data/list syntax.\n\nValidated locally:\n- cargo test --features metal,accelerate persona::allocator --lib: 12 passed.\n- npx tsc --noEmit --project tsconfig.json --pretty false: passed.\n- npm stop && npm start: up, seed reports 5 active local personas.\n- Live smoke: Qwen3.5 via in-process llama.cpp responded; chat/poll returned the reply after the marker.\n- pre-push: TypeScript clean, ESLint baseline improved, Rust build/tests passed with --features metal,accelerate.\n\nKnown follow-up / review focus:\n- Pre-push native-arch Docker image push failed; CI verify-architectures may block merge until scripts/push-current-arch.sh is run or the image path is fixed.\n- Startup still probes unavailable cloud providers even though seed marks them offline; should be gated next.\n- RAG/context remains too verbose (~21k-char prompt in smoke), and needs the Rust recipe/batching rewrite rather than more Node cleanup.\n\nPlease review architecture boundary, model/runtime selection, and whether anything here leaves Candle reachable as persona chat inference. |
|
Updated review for Reviewing the 4 risk areas Codex flagged(1) Candle as training/auxiliary only. ✅ Verified clean excision from persona chat path.
(2) provider=local consistency. ✅ No TS-vs-Rust split.
(3) SecretManager empty-key handling. ✅ Right shape, no env/config leak. get(key, requestedBy) {
this.ensureInitialized();
this.logAccess(key, requestedBy);
const value = this.secrets.get(key);
return value && value.trim().length > 0 ? value : undefined; // ← the fix
}
has(key) { return this.get(key, 'SecretManager.has') !== undefined; } // ← delegates
getAvailableKeys() {
return Array.from(this.secrets.entries())
.filter(([, value]) => value.trim().length > 0) // ← filters empties
.map(([key]) => key);
}Empty-string is uniformly treated as "not configured" across (4) chat/poll latest+marker. ✅ Other architectural observations
Risk left open
LGTM ship. |
Summary
Stabilizes the Continuum cold-start path so startup does not flood persona/RAG/model work, and so
npm startleaves real detached workers alive after the parent shell exits.Key changes:
nohup/disownpseudo-daemons withscripts/spawn-detached.mjsusing real detached process groups.sharedintoserver, and add a shared/browser Node-import boundary ratchet.Validation
Manual live validation on Mac:
npm stop && npm startcompleted and left detached processes alive after parent exit../jtag pingreturned server + browser connected at/chat/general.continuum-core-serveridle; node orchestrator ~1%.self-task-gen.logstayed at 0 lines.channel-tick.logFocused checks:
./node_modules/.bin/tsc --noEmit --project . --pretty falsenpx vitest run tests/unit/service-initializer.test.ts tests/unit/chat-coordination-stream.test.ts tests/unit/shared-node-boundary.test.ts --reporter=verbosenpx vitest run tests/unit/shared-node-boundary.test.ts --reporter=verbosecargo test -p continuum-core --lib orm::sqlite::tests::test_query_projection_evolves_missing_columns_before_select --release --features metal,accelerate -- --nocapturecargo test -p continuum-core --lib self_task_generator --release --features metal,accelerate -- --nocapturegit diff --checkPush hook:
--features metal,accelerate.--features metal,accelerate.Known Follow-Up / Merge Caveat
Pre-push native-arch Docker publish failed while the hook continued:
If canary CI requires fresh native images for this Rust change, that needs to be resolved before merge.