fix(cli)!: remove broken runtime activate/deactivate/status (#72) - #73
Merged
Merged
Conversation
Delete the `rogatio runtime activate`, `deactivate`, and `status` subcommands. They were pure ceremony over an empty-preset controller and never started, stopped, or reported the real session. The lifecycle is owned by the extension's Start/Stop controls; the CLI keeps the trust lifecycle (`install|trust|untrust|uninstall`) and the consolidated native-messaging host. Refine extension messaging so the host-missing and request-body-needs-trust failures render distinct user-visible commands. Drop the dead `NativeFrameType.RuntimeActivate` enum member. Reverses the surface introduced in #49 and reconciles the docs from #67/#68. Breaking change for any caller that used the removed subcommands; the extension's Start/Stop is the replacement. BREAKING CHANGE: `rogatio runtime activate|deactivate|status` no longer exist. Use the extension's Start/Stop controls. `runtime install|trust| untrust|uninstall` and `runtime host` are unchanged.
drmaas
added a commit
that referenced
this pull request
Sep 4, 2026
…command (#69) (#79) Replace the two-step 'rogatio runtime install' + 'rogatio runtime trust' flow with a single transactional 'rogatio runtime install --extension-id <id>' that provisions the Chrome native-messaging host manifest, generates the device-local CA, and invokes the capability-provided caTrustInstaller atomically. On any partial failure (caTrust capability absent, caTrustInstaller throw) the just-written manifest is rolled back so nothing is left half-installed. BREAKING CHANGE: 'rogatio runtime trust' is removed from the CLI surface. Per the no-alias decision, anyone invoking 'rogatio runtime trust' post-release hits the default branch and gets exit 2 with the help text. The controller's public surface drops 'trust' (kept as a private helper used by the new unified install). 'rogatio runtime status', 'activate', and 'deactivate' were already removed in #72/#73 and remain removed. Controller (packages/runtime/src/trust.ts): install() is now a six-step transactional flow (manifest-cap -> write manifest -> caTrust-cap with rollback -> trust() helper -> installer with rollback -> state:'installed'). The caTrust capability check happens AFTER the manifest write so a missing caTrust capability genuinely exercises a manifest rollback. The 'trust' method is kept as a private closure helper that delegates to a closure-private runCaTrust(); the factory return drops it from the public surface. CLI dispatch (packages/cli/src/commands/runtime.ts, index.ts): 'trust' is removed from the runtimeCommand overload union, the trustRuntimeCommand switch, both copies of showRuntimeHelp, and the top-level pipe list. The unified success message is 'runtime install complete: manifest + device-local CA trusted'. The 'rogatio runtime trust' invocation still enters trustRuntimeCommand and falls through to the inner default switch case for the exit-2 + help-text behavior, matching the post-#73 pattern. Tests: added 5 new test cases to packages/runtime/test/trust.test.ts (AC-1..AC-5) covering the unified install path, the manifest-cap-absent path, the caTrust-cap-absent rollback path, the caTrustInstaller-throw rollback path, and the idempotent re-call path. Added packages/cli/test/runtime-install-success.test.ts asserting the new success message. Extended packages/cli/test/runtime-command.test.ts with the trust->exit-2 test and tightened the help-text negative assertion. Deleted the now-redundant trust test from packages/cli/test/runtime-command-gating.test.ts. Frozen decision records: appended '> Superseded by: feat/collapse-runtime-install-and-trust' footers at 15 marked locations across docs/specs/f16-request-body-trust.md (8), docs/plans/f16-request-body-trust.md (2), docs/specs/cli-activate-deactivate-removal.md (4), and docs/specs/f17-request-body-rules.md (1). Zero body edits to any frozen spec or plan; bodies are byte-identical to the base. Live documentation: updated docs/architecture.md, rogatio-overview.md, samples/basic/README.md, packages/cli/README.md, and the four docs-site files (guides/runtime.md, reference/cli.md, reference/platforms.md, rules/request-body.md) to describe the single unified install command. Updated packages/extension/src/diagnostics.ts and extension-page-entry.ts to direct users to 'rogatio runtime install --extension-id <extension ID>' with the locked full-length wording. Verified via pnpm validate: format, lint, typecheck, build (18 ESM artifacts), vitest (79 files, 582 tests), checkArtifacts, checkEmittedModules, checkBoundaries, three intentionally-failing typecheck fixtures, playwright (23 passed, 3 skipped). Closes #69.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rogatio runtime activate,deactivate, andstatus. They were pure ceremony over an empty-preset controller; they never started, stopped, or reported the real session. Lifecycle is owned by the extension's Start/Stop controls.rogatio runtime install|trust|untrust|uninstall(real trust lifecycle) androgatio runtime host [path](real consolidated host).extension.request-body-needs-trustdiagnostic so the management page points torogatio runtime trust(not the install command) when the project has request-body rules and the device-local CA is not yet trusted.NativeFrameType.RuntimeActivateenum member.Breaking change
rogatio runtime activate|deactivate|statusexit 2 with an unknown-subcommand error. Use the extension's Start/Stop controls.install|trust|untrust|uninstallandhostare unchanged.Closes #72.
Validation
pnpm validateis green: format, lint, typecheck, build, 577 vitest tests, intentional-failure fixtures, and 23/26 playwright tests (3 skipped, none failing).Decision records
Append-only at
docs/specs/cli-activate-deactivate-removal.md,docs/plans/cli-activate-deactivate-removal.md,docs/workflows/cli-activate-deactivate-removal-workflow.md. They document the reversal of the prior rename from #49 and note that the older frozen specs (docs/specs/f14-macos-runtime.md,docs/specs/f16-request-body-trust.md) still describe the now-removed surface; a follow-up review pass will annotate those with> Superseded by:footers.