feat: logger DI and doc cleanup#110
Conversation
Wire a real model-inference live test (DeepSeek v4 Flash through the OpenAI-compatible client) over the real ~/.claude session, run from the pre-push hook via doppler run. Proves the Interpret pillar end-to-end, not just the read pipeline. Skips loudly without a key (CI-safe). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Single-user tool watching your own sessions on your own machine with your own keys. The inherited multi-tenant privacy posture default-DISABLED the actual product. - DEFAULT_TRANSCRIPT_PRIVACY_SETTINGS now both-on (off-host + raw). - Collapse the gate sprawl to ONE kill switch: SHADOW_LOCAL_ONLY=1 restores fully-local; granular env keys still override per-setting. - sanitizeTranscriptText is secret-scrub ONLY (tokens/keys); drop the overzealous + ineffective email/path redaction that blinded the observer to the files it exists to explain. - Suite updated to assert the new defaults with both-direction kill-switch coverage (385 green, tsc clean). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…on subsystem A prior agent copied sidecar's multi-tenant privacy DEBT (consent gates, off-host opt-in, redaction theater, a privacy-settings UI) when only its ingestion PATTERN was wanted. For a single-user tool watching your own sessions with your own key, every gate just default-disabled the product. Delete the whole subsystem: src/shared/privacy.ts, the SHADOW_ALLOW_*/SHADOW_LOCAL_ONLY env gates, sanitize/redaction, assertOffHostInferenceAllowed, prepareEventsForStorage gating, PrivacyPolicy/processingMode types and SnapshotPayload.privacy, the privacy IPC channel + renderer UI, and the credential-consent flag. Data flows raw end-to-end. -1464/+209 LOC across 43 files; build green, 366 tests pass, live DeepSeek inference verified intact, zero privacy symbols left in src/. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…e + tools, new inference clients Preserves 34-day-old in-progress work found during a quiet-dirty-repo remediation sweep. New: - src/db/ (database.ts + 001-initial.sql) and src/persistence/database-replay-store.ts - src/patterns/ (pattern-library, pattern-matcher, seeds) - src/presentation/presentation-state.ts - src/shadow/ (shadow-runtime + tools: read-active-patterns, read-event-window, read-session-continuity, select-pattern, write-interpretation, write-presentation, types) - src/inference/ deepseek-client.ts, openai-responses-client.ts - tests/ for db, patterns, presentation, shadow Modified: inference client factory/interface, shadow-inference-engine, electron start-main-process, persistence index, package.json/lock (deps for the above). .kilo/ (Kilo Code agent tooling state) added to .gitignore alongside the other agent-state ignores; not part of the product. Incomplete WIP preserved for review -- not verified against the build/test suite. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Blocking feedback
- Database startup reads a migration file that is not bundled with the Electron main build — src/db/database.ts#L84
- Shadow runtime initialization is race-prone and can stay disabled for the entire app session — src/inference/shadow-inference-engine.ts#L159
If you'd like me to push fixes, reply with item numbers (for example: please fix 1-2).
|
|
||
| function loadMigrationSql(version: number): string { | ||
| const filePath = join(migrationsDir(), `${String(version).padStart(3, '0')}-initial.sql`); | ||
| return readFileSync(filePath, 'utf8'); |
There was a problem hiding this comment.
Blocking: loadMigrationSql() reads 001-initial.sql from disk at runtime, but electron.esbuild.mjs only emits bundled JS files and does not copy this SQL asset. In packaged runs this will throw ENOENT during createDatabase() before the app window comes up.
Suggested fix: either bundle migration SQL into JS (import as text at build time), or copy src/db/migrations into dist-electron during build:electron and resolve against that emitted path.
| } | ||
|
|
||
| if (db) { | ||
| const events = await buffer.getAll(); |
There was a problem hiding this comment.
Blocking: shadowRuntime is initialized exactly once from await buffer.getAll() during start(). In start-main-process.ts, capture is started asynchronously (void currentSessionManager.start()), so the buffer is often empty here; shadowRuntime stays null and the tool-backed runtime path never activates. It also never rebinds when the session id changes.
Suggested fix: lazily create/refresh shadowRuntime inside runInference (or on first eligible event), keyed by current events[0]?.sessionId, and recreate it whenever the session id changes.
Preserved 34-day WIP