feat(cli): standardize and harden Hive interface - #32
Conversation
📝 WalkthroughWalkthroughHive adopts a standardized CLI with foreground ChangesHive CLI adoption
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related PRs
Sequence Diagram(s)sequenceDiagram
participant Operator
participant HiveCLI
participant ServiceManager
participant ServiceDaemon
participant HiveDaemon
Operator->>HiveCLI: hive start or hive restart
HiveCLI->>ServiceManager: start installed service
ServiceManager->>ServiceDaemon: invoke service-daemon
ServiceDaemon->>HiveDaemon: spawn node cli.js daemon
HiveDaemon-->>HiveCLI: health becomes available
HiveCLI-->>Operator: lifecycle result
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Approved Release |
|
✅ Approved — applying the minor bump. The release-gate check will go green; it publishes on merge. |
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 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.
Inline comments:
In `@CHANGELOG.md`:
- Around line 3-21: Consolidate the stale “Unreleased — PRD-003 CLI interface
adoption” section into the existing v0.12.0 changelog entry. Remove the
duplicate Unreleased heading and preserve its detailed migration bullets and
operator guidance under v0.12.0, without retaining redundant summary text.
In `@library/qa/quality/2026-07-13-prd-003-hive-cli-adoption-qa.md`:
- Line 3: Replace the machine-specific absolute path in the Plan document
reference with the repository-relative path or a redacted logical path, removing
the local username while preserving the referenced PRD location.
- Line 6: Update the evidence metadata in the QA document to record the exact
audited commit SHA instead of only the dirty branch state. Clearly label whether
the results are based on local-only working-tree evidence or a release revision,
and preserve that distinction in the report.
In `@library/qa/security/2026-07-13-prd-003-hive-cli-adoption-security-audit.md`:
- Line 9: Update the CVE catalog statement in the audit to use a catalog
refreshed for the July 13, 2026 assessment, or replace “current” with the exact
coverage window and explicitly state the limitation.
- Line 13: Make the QA and security reports reflect one final, commit-consistent
post-security test run: in
library/qa/security/2026-07-13-prd-003-hive-cli-adoption-security-audit.md at
lines 13 and 73-76, remove the stale-report wording and update the full-suite
count and timeout disposition; in
library/qa/quality/2026-07-13-prd-003-hive-cli-adoption-qa.md at lines 11 and
102, record a post-security PASS and match the security audit’s test-run
metadata and count.
In `@src/install/registry.ts`:
- Around line 254-277: Move the initial registry existence check from before
withRegistryLock into its callback so deleteHiveEntryAtPath always acquires the
lock before deciding the entry is absent. Preserve the ENOENT false result and
existing deletion flow, while allowing a concurrent registration to complete
before the absence check.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 55fe32dc-cc48-4415-b14d-ff72c975745c
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (37)
.github/workflows/ci.yamlCHANGELOG.mdREADME.mdlibrary/knowledge/private/operations/cli-and-runbook.mdlibrary/knowledge/private/operations/prd-003-cli-migration.mdlibrary/qa/quality/2026-07-13-prd-003-hive-cli-adoption-qa.mdlibrary/qa/security/2026-07-13-prd-003-hive-cli-adoption-security-audit.mdpackage.jsonscripts/verify-packed-cli.mjssrc/cli-commands.tssrc/cli-interface.tssrc/cli-observability.tssrc/cli-update.tssrc/cli.tssrc/install/registry.tssrc/process-identity.tssrc/service/commands.tssrc/service/daemon-wrapper.tssrc/service/index.tssrc/service/templates.tssrc/shared/apiary-root.tssrc/terminal-safety.tstests/cli-commands.test.tstests/cli-interface.test.tstests/cli-observability.test.tstests/cli-update.test.tstests/daemon/installer/funnel-telemetry.test.tstests/dashboard/use-swr.test.tsxtests/install/registry.test.tstests/process-identity.test.tstests/service/commands.test.tstests/service/daemon-wrapper.test.tstests/service/helpers.tstests/service/service-module.test.tstests/service/templates.test.tstests/shared/apiary-root.test.tsvitest.config.ts
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@library/qa/quality/2026-07-13-prd-003-hive-cli-adoption-qa.md`:
- Line 108: Update the npm audit result entry to state “0 high-or-higher
vulnerabilities,” matching the --audit-level=high scope, or replace it with the
complete audit output if the result is intended to cover all severity levels.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: d5cdcd16-607e-4fce-8695-87c927d14b56
📒 Files selected for processing (5)
.github/workflows/ci.yaml.github/workflows/release-gate.yaml.github/workflows/release.yaml.github/workflows/tag-on-merge.yamllibrary/qa/quality/2026-07-13-prd-003-hive-cli-adoption-qa.md
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/workflows/ci.yaml
Summary
Why
Hive was the weakest CLI in the Apiary fleet and still used a divergent command surface. This brings Hive to the PRD-003 standard while retaining its product-specific daemon behavior and preparing the same pattern for the remaining CLIs.
Dogfood evidence
Validation
Summary by CodeRabbit
status,logs, andtelemetry.