chore: address readiness-audit warnings#62
Conversation
Local-only fixes from READINESS-AUDIT.md — no publishing, no force-pushes,
no remote-state changes. Test suites and lint remain clean.
- W5 cli: openhop init exits 0 on a converged machine in both live and
--dry-run modes; fail only on `failed` results or zero detected
clients
- W10 server: default bind to 127.0.0.1; HOST=0.0.0.0 in docker-compose
so the in-container port mapping still works
- W3 README: list examples/self-loops.yaml under ## Examples
- W4 README (partial): local-first/no-telemetry line, token-light claim,
platform-badge grid (Claude Code/Cursor/Windsurf/Cline/Continue);
deferred npm-version badge (needs publish) and Discord CTA
- W8 AGENTS.md: CI lint/formatter ARE enforced; remove stale
patch.test.ts known-failure note
- W9 README: wrap http://localhost:8788 autolink in backticks
- W17 (in openhop-launch repo) — separate change, not in this commit
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughUpdates docs (AGENTS.md, README.md), adds a new example, adjusts Docker service env to set HOST=0.0.0.0, changes server startup to respect HOST (default 127.0.0.1), and refines CLI init exit codes and help metadata to add NOT_FOUND and CONFLICT handling. ChangesHost Binding Configuration
CLI Installation Result Classification
Documentation & Examples
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Review rate limit: 9/10 reviews remaining, refill in 6 minutes. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/cli/src/init.ts`:
- Around line 334-337: The code currently calls process.exit(EXIT_GENERIC) for
two policy paths; replace these with documented CLI exit constants instead of
EXIT_GENERIC: when failed.length > 0 (the installation actually failed) use the
conflict exit constant (EXIT_CONFLICT), and when !anyOutcome (no
installs/would-installs/already-installed — essentially “nothing to do”/not
found) use the not-found exit constant (EXIT_NOT_FOUND); update references near
the failed, installed, wouldInstall, alreadyInstalled checks and remove
EXIT_GENERIC usage so only documented exit codes (EXIT_CONFLICT and
EXIT_NOT_FOUND) are returned.
- Around line 335-337: The exit logic treats advisory-only detections as failure
because the boolean anyOutcome omits the advisory array; update the anyOutcome
expression to include advisory (e.g., const anyOutcome = installed.length > 0 ||
wouldInstall.length > 0 || alreadyInstalled.length > 0 || advisory.length > 0)
so that a run with only advisory clients counts as a successful detection and
does not trigger process.exit(EXIT_GENERIC); keep the existing process.exit call
for the no-outcome case.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: aaeb0984-d27e-4f7c-bb64-6181e06da96a
📒 Files selected for processing (5)
AGENTS.mdREADME.mddocker-compose.ymlpackages/cli/src/init.tspackages/server/src/index.ts
Address CodeRabbit review on PR #62. - W5 followup: failed install → CONFLICT (5), no-detected-clients → NOT_FOUND (4). EXIT_GENERIC (1) is outside the machine-API set documented in .coderabbit.yaml `packages/cli/**` instructions (0 success, 2 usage, 3 validation, 4 not-found, 5 conflict, 6 network, 7 auth). - Switch the no-detected check to a detection-count formulation so advisory-only detections (e.g. Continue.dev only) are correctly treated as success rather than exit-non-zero. - Update help-json COMMAND_META.init to declare NOT_FOUND and CONFLICT alongside SUCCESS, GENERIC, USAGE — keeping declared codes in sync with what the command can actually emit. Pre-existing EXIT_GENERIC on the sourceMissing path is left untouched (out of scope; not introduced by this PR). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Local-only fixes from
READINESS-AUDIT.md— every item that doesn't require publishing, force-pushes, or external services. Audit blockers (B1–B9) and external warnings (W1, W6, W7, W11, W12, W13, W14) are out of scope for this PR.openhop initis now idempotent. On a converged machine (every detected client already has the skill), both live and--dry-runmodes exit 0. Onlyfailedresults or zero detected clients exit non-zero.127.0.0.1;HOST=0.0.0.0is set indocker-compose.ymlso the in-container port mapping still works. Casualnpm run devis no longer LAN-exposed.examples/self-loops.yamlunder## Examples.AGENTS.mdupdated — CI lint/formatter ARE enforced; the stalepatch.test.tsknown-failure note is removed.<http://localhost:8788>wrapped in backticks (link-checker safe).Test plan
npm test --workspaces --if-present— cli 83/83, server 19/19, shared 93/93, web 22/22npm run lint— 0 errors (12 pre-existing warnings)npm run format:check— cleanopenhop inittwice on a fresh machine → second run exits 0 with all clients marked "already installed"npm run devoutside docker → server visible on127.0.0.1:8787, not on LAN IPdocker compose up→ server reachable through host port mapping🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
self-loops.yaml).Bug Fixes
Documentation