Skip to content

fix(cli)!: remove broken runtime activate/deactivate/status (#72) - #73

Merged
drmaas merged 1 commit into
mainfrom
feature/remove-runtime-activate-deactivate
Sep 4, 2026
Merged

fix(cli)!: remove broken runtime activate/deactivate/status (#72)#73
drmaas merged 1 commit into
mainfrom
feature/remove-runtime-activate-deactivate

Conversation

@drmaas

@drmaas drmaas commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Delete rogatio runtime activate, deactivate, and status. 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.
  • Keep rogatio runtime install|trust|untrust|uninstall (real trust lifecycle) and rogatio runtime host [path] (real consolidated host).
  • Add a new extension.request-body-needs-trust diagnostic so the management page points to rogatio runtime trust (not the install command) when the project has request-body rules and the device-local CA is not yet trusted.
  • Remove the dead NativeFrameType.RuntimeActivate enum member.
  • Scrub the removed surface from current-behavior docs (README, samples, cli README, docs site, rogatio-overview, architecture) and reverse the prior rename introduced in fix(extension): truthful runtime start errors and visible status #49.

Breaking change

rogatio runtime activate|deactivate|status exit 2 with an unknown-subcommand error. Use the extension's Start/Stop controls. install|trust|untrust|uninstall and host are unchanged.

Closes #72.

Validation

pnpm validate is 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.

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
drmaas merged commit ecb0ff1 into main Sep 4, 2026
6 checks passed
@drmaas
drmaas deleted the feature/remove-runtime-activate-deactivate branch September 4, 2026 00:39
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(cli): remove broken runtime activate/deactivate/status

1 participant