Repository navigation
chore(daemon): disambiguate audit observations - #12343
Conversation
Electron validation — final head
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughDaemon audit eligibility telemetry now includes current or legacy generation roles and privacy-preserving exact-incarnation correlations. The schema validates available and unavailable incarnation variants separately. Tracker instances cache launch-nonce correlations and retain repeat suppression. Unsupported future protocol generations do not emit telemetry. Renderer-originated daemon audit events are blocked by the IPC handler. Tests cover correlation stability, schema validation, serialized property privacy, future generations, and heartbeat windows. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
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 |
* chore(daemon): disambiguate audit observations * fix(daemon): reject future audit protocol roles * fix(telemetry): protect daemon audit observations


Summary
current/legacyrole todaemon_audit_eligibilityobservations, while dropping invalid or future protocol generations instead of contaminating the legacy cohort.Screenshots
No UI changed; Electron regression smoke was run on final head
4294685ed48a611bc538aefef52820d64a6c0848with an isolated profile. The intended worktree identity matched, the full app shell and Resource Manager rendered with 0 console errors, andpty.management.listSessions()returned{"sessions":[],"degraded":false}.Testing
pnpm lintpnpm typecheckpnpm test— the pre-review full run completed with 44,274 passing and 21 unrelated failures, primarily timeout/performance cases while another worktree was concurrently running Vitest; no failure touched this PR's files. The final-head targeted suite and CI shards cover the review fixes.pnpm buildpnpm exec oxfmt --check src/main/ipc/telemetry.ts src/main/ipc/telemetry.test.ts src/main/daemon/daemon-audit-eligibility-event.ts src/main/daemon/daemon-audit-eligibility-event.test.tsFinal-head targeted validation:
pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/telemetry.test.ts src/main/daemon/daemon-audit-eligibility-event.test.ts src/main/daemon/daemon-incarnation-evidence.test.ts src/main/daemon/daemon-incarnation-evidence-main-thread.test.ts src/main/telemetry/validator.test.ts— 111/111 passed.AI Review Report
Reviewed the complete #9138 safety plan, PR description, commit history, base-to-head diff, and production path from adapter inventory publication through the strict telemetry schema and renderer IPC boundary. The review verified privacy, stable correlation across fresh tracker instances, replacement-incarnation separation, telemetry failure isolation, heartbeat dedupe/cardinality, and the absence of daemon lifecycle/routing/containment/shutdown behavior; it found and fixed a future protocol being mislabeled as legacy and the generic renderer telemetry IPC being able to spoof the main-owned audit event. The final guards fail closed inside the telemetry boundary, with focused coverage proving that unsupported observations and renderer-originated audit rows are dropped without affecting daemon callers.
Security Audit
No command execution, path handling, authentication, dependency, or secret-handling surface changed. The existing generic renderer telemetry IPC is tightened to reject this main-owned audit event, preventing compromised renderer content from spoofing correlations or inflating its cardinality. The emitted correlation is a 128-bit prefix of a domain-separated SHA-256 digest over the daemon-generated UUID launch nonce; strict schema branches require it only when exact incarnation evidence exists, and tests verify that the raw nonce, PID, start time, Linux start ticks, and boot ID never enter telemetry. Remaining risk is limited to intentional event cardinality—one opaque value per exact daemon incarnation—and historical rows naturally lack the newly added fields.
Notes
This is observation-only groundwork for #9138 and does not merge or enable any containment or retirement policy. Electron validation screenshots and results are included above and in the validation comment.
PR 3 remains blocked until a build containing this correlated observation change reaches real machines through an RC, the restarted soak has enough dead-generation observations with zero gone-then-alive contradictions and per-platform coverage, and Brennan explicitly signs off the gone-proof list.