[failproofai] Remove dead code and stale daemon residue - #666
[failproofai] Remove dead code and stale daemon residue#666NiveditJain wants to merge 3 commits into
Conversation
📝 WalkthroughWalkthroughThis maintenance change enables ChangesCleanup and daemon maintenance
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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.
🧹 Nitpick comments (2)
tsconfig.json (1)
12-12: 📐 Maintainability & Code Quality | 🔵 TrivialComplete the required validation before pushing.
The PR objectives report blocked Docker smoke testing and an
npm installfallback. Use Bun for local package installation and scripts. Complete the required unit, local smoke, Docker clean-install, and E2E checks, or obtain an approved exception before pushing.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tsconfig.json` at line 12, Before pushing, use Bun for dependency installation and script execution, then complete the required unit, local smoke, Docker clean-install, and E2E checks. If Docker smoke testing or any required validation remains blocked, obtain an approved exception and document it before pushing.Source: Coding guidelines
__tests__/hooks/daemon-client.test.ts (1)
78-83: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd direct tests for
DaemonAttemptfailure categories.
daemonResultconverts both"unreachable"and"protocol-mismatch"tonull. The tests at Line 147 and Lines 210-217 therefore no longer verify the structured result introduced byattemptDaemonHook. Add direct assertions for both failure categories. KeepdaemonResultfor tests that intentionally preserve the legacy null behavior.As per coding guidelines, always add unit tests for new behaviour.
Also applies to: 147-147, 210-217
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@__tests__/hooks/daemon-client.test.ts` around lines 78 - 83, Keep daemonResult for legacy null-behavior tests, but add direct attemptDaemonHook assertions in the affected tests to verify structured failures: assert the unreachable case returns ok false with category "unreachable", and the protocol mismatch case returns ok false with category "protocol-mismatch".Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@__tests__/hooks/daemon-client.test.ts`:
- Around line 78-83: Keep daemonResult for legacy null-behavior tests, but add
direct attemptDaemonHook assertions in the affected tests to verify structured
failures: assert the unreachable case returns ok false with category
"unreachable", and the protocol mismatch case returns ok false with category
"protocol-mismatch".
In `@tsconfig.json`:
- Line 12: Before pushing, use Bun for dependency installation and script
execution, then complete the required unit, local smoke, Docker clean-install,
and E2E checks. If Docker smoke testing or any required validation remains
blocked, obtain an approved exception and document it before pushing.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 93758f0f-0796-458a-b96a-7a9a982c5473
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (64)
CHANGELOG.md__tests__/actions/update-scheduled-audit.test.ts__tests__/audit/cache.test.ts__tests__/components/button.test.tsx__tests__/components/date-picker-input.test.tsx__tests__/e2e/hooks/codex-integration.e2e.test.ts__tests__/hooks/cloud-enrollment-cli.test.ts__tests__/hooks/collector-config.test.ts__tests__/hooks/configure-wizard.test.ts__tests__/hooks/daemon-client.test.ts__tests__/hooks/fp-home.test.ts__tests__/hooks/new-telemetry.test.ts__tests__/lib/codex-sessions.test.ts__tests__/lib/pi-sessions.test.ts__tests__/lib/telemetry-id.test.ts__tests__/lib/telemetry.test.ts__tests__/scripts/translate-docs/cache.test.tsapp/actions/get-hooks-config.tsapp/audit/_components/audit-dashboard.tsxapp/audit/_components/audit-progress-strip.tsxapp/audit/_components/come-back-better-section.tsxapp/audit/_components/empty-state.tsxapp/audit/_components/how-to-improve-section.tsxapp/audit/_components/quirks-section.tsxapp/audit/_components/report-footer.tsxapp/audit/_components/run-progress.tsxapp/audit/_components/strengths-section.tsxapp/components/pause-notices.tsxapp/components/raw-log-viewer.tsxapp/components/toast.tsxapp/policies/hooks-client.tsxapp/settings/settings-client.tsxbin/failproofaid-shim.mjscrates/PROTOCOL.mdcrates/failproofaid/Cargo.tomlcrates/failproofaid/src/worker.rscrates/failproofaid/tests/daemon_e2e.rscrates/fpai-ipc/src/envelope.rscrates/fpai-ipc/src/peer.rslib/auth/auth-store.tspackage.jsonscripts/translate-docs/cache.tsscripts/translate-docs/cli.tsscripts/translate-docs/mintlify-nav.tssrc/audit/cache.tssrc/audit/dashboard-cache.tssrc/audit/report.tssrc/hooks/builtin-policies.tssrc/hooks/cloud-enrollment-cli.tssrc/hooks/cloud-enrollment.tssrc/hooks/cloud-managed-policies.tssrc/hooks/collector-config.tssrc/hooks/configure-wizard.tssrc/hooks/custom-hooks-loader.tssrc/hooks/daemon-client.tssrc/hooks/daemon-download.tssrc/hooks/daemon-service.tssrc/hooks/hook-logger.tssrc/hooks/integrations.tssrc/hooks/loader-utils.tssrc/hooks/manager.tssrc/hooks/onboarding-lock.tssrc/hooks/session-pause.tstsconfig.json
💤 Files with no reviewable changes (22)
- lib/auth/auth-store.ts
- src/hooks/integrations.ts
- package.json
- tests/lib/telemetry.test.ts
- tests/e2e/hooks/codex-integration.e2e.test.ts
- tests/lib/telemetry-id.test.ts
- src/audit/report.ts
- app/audit/_components/strengths-section.tsx
- app/audit/_components/quirks-section.tsx
- src/audit/cache.ts
- src/hooks/session-pause.ts
- src/hooks/custom-hooks-loader.ts
- app/audit/_components/report-footer.tsx
- src/hooks/configure-wizard.ts
- src/hooks/hook-logger.ts
- app/actions/get-hooks-config.ts
- src/hooks/daemon-download.ts
- src/hooks/cloud-managed-policies.ts
- app/audit/_components/empty-state.tsx
- src/hooks/cloud-enrollment-cli.ts
- tests/hooks/cloud-enrollment-cli.test.ts
- src/audit/dashboard-cache.ts
This reverts commit 67b55dd.
Summary
Verification
Notes
The exact Docker CLI smoke was blocked by the repository's dogfood policy forbidding failproofai invocation. The package-import fallback was stopped after npm install stalled.