Skip to content

Share PluginSummary JSON below CLI and HTTP - #9840

Merged
orbit-agent-01 merged 1 commit into
agent-mainfrom
orbit/ORB-25367-187d66d3
Nov 17, 2026
Merged

orbit-agent-01 merged 1 commit into
agent-mainfrom
orbit/ORB-25367-187d66d3

Conversation

@orbit-agent-01

Copy link
Copy Markdown
Contributor

Task

ORB-25367 — Share PluginSummary JSON below CLI and HTTP

Description

Outcome

One PluginSummary JSON projection in orbit-core, beside PluginSummary
(crates/orbit-core/src/application/plugin/inspect/summary.rs:55), with named
CLI and HTTP profiles. The CLI (plugin list/show and every plugin mutation
receipt that embeds plugin_record) and the HTTP API (GET /api/plugins,
enable/disable responses) both call it and hold no second field list. This is
the PluginSummary same-record lead deferred by the previous two surface-parity
passes, re-verified at this pin with the whole plugin family read.

Evidence

Pinned at be184be (agent-main tip). Matrix row plugin.list (surface-parity
sweep ORB-25365, Pass A same-record group PluginSummary). CLI hand-builds the
record at crates/orbit-cli/src/command/plugin/support.rs:56-124
(plugin_record, used by list/show/add/enable/disable/upgrade); HTTP
hand-builds a second copy at crates/orbit-web/src/api/plugins.rs:266-326
(plugin_to_json). The two copies share roughly fifty lines of field mapping
(name, version, status, permissions, tools, panels, links, grants, toggles).

Difference table

Difference CLI today HTTP today Converge to / kept because
build (consented build record) present absent Present on both: additive on HTTP, same value
programs[] (name/path/granted/problem/resolves_to) present absent Present on both: additive on HTTP
tools[].agent_callable present absent Present on both: additive on HTTP
enabled (derived status == Active) absent present Kept HTTP-only, because it duplicates status for the dashboard's badge and the CLI record has consumers matching on status
host_orbit_version absent present Kept HTTP-only, because it is the dashboard build's own version, already known to a CLI caller from --version
panels[].refresh_ms absent present Present on both: additive on CLI
source / install_path raw paths ~-abbreviated Kept per profile, because the HTTP record is display-only and must not disclose the home directory, while CLI records are copied into filesystem commands
capabilities (enable/disable) n/a added by the HTTP list handler after projection Kept in the HTTP handler, because it is session authorization rendering, not plugin data (unchanged)

Scope and non-goals

In scope: the PluginSummary JSON projection only. Not in scope: plugin
enable/disable grant authority differences (HTTP cannot record grants; CLI
--grant can), text tables, panel execution, or PluginSummary computation.

Stable tier

No public API change to orbit-types, orbit-common or orbit-store is expected.
If one becomes necessary it must be additive (existing callers, persisted
bytes and wire shapes unchanged).

Conventions

  • Converge, don't extend. Each surface keeps only input parsing and output
    rendering for the operations in scope; the logic moves to the named shared
    operation.
  • Visible behaviour changes only where the difference table says so. CLI,
    MCP, HTTP API, plugin protocol and goldens otherwise stay identical.
  • A behavioural difference between surfaces that this task does not list keeps its current behaviour on each surface and is listed in the execution summary; only one that cannot be kept without changing observable output is a stop-and-report.
  • A new crate edge updates ARCHITECTURE.md and
    scripts/check-dependency-direction.sh in the same change.
  • Update the shipped skills and docs that describe the operation when its
    behaviour or output changes.

Acceptance Criteria

  • CLI plugin list/show (and every CLI receipt embedding the plugin record) and HTTP GET /api/plugins plus enable/disable responses all obtain the PluginSummary JSON from one shared orbit-core projection with named CLI/HTTP profiles, and neither surface keeps a second field list.
  • Every row of the difference table is handled as specified and covered by the existing boundary tests on each affected surface (a new regression test only where a row is a reproduced defect, per AGENTS.md Tests and QA), with manual QA recorded for any row no existing test covers.
  • The focused tests for each affected surface pass, Clippy is clean on the touched crates and make goldens passes (the required PR checks gate the full suite; AGENTS.md Gates), with golden changes limited to the rows the table names.
  • The execution summary lists the lines removed per surface.

Execution Summary

Click to expand

Implemented the shared PluginSummary JSON projection at starting HEAD be184be (clean baseline). Changes remain uncommitted for pipeline delivery.

Acceptance criteria:

  1. Passed: application/plugin/inspect/summary.rs owns plugin_summary_json and named PluginSummaryJsonProfile::Cli / Http profiles beside PluginSummary. Existing CLI plugin_record callers (list/show/add/enable/disable/upgrade) and HTTP plugin_to_json callers (GET list and enable/disable receipts) delegate to it. Neither surface retains its own plugin field list.
  2. Passed: all eight difference-table rows implemented. HTTP now includes build, programs and tools[].agent_callable; CLI now includes panels[].refresh_ms. enabled and the serving build's host_orbit_version stay HTTP-only. source/install_path retain literal CLI paths and component-aware HTTP home abbreviation. Session capabilities remain solely in the HTTP list handler. Existing CLI/MCP and HTTP boundary tests were retained unchanged; uncovered output rows received real CLI/HTTP manual QA in a cleared environment, disposable home, independently initialized Git workspace and explicit --root. All 29 manual checks passed; attached plugin-projection-qa.json records commands, expected/actual checks, responses, root checks and server shutdowns. qa/manual-plugin-qa.py reproduces it. This covers active/disabled/inactive records, all CLI receipt routes, both HTTP mutations, null and populated build records, recorded and drifted program resolution, read/mutating tool consent, panel refresh, paths, operator/read-only capabilities and a denied write. The populated build was seeded only into the disposable store to verify serialization; no build was executed or consent granted.
  3. Passed: focused CLI plugin suite 55 cases, MCP plugin family 9 cases, HTTP plugin tests 2 cases; make goldens passed with zero golden changes; both mandated Clippy modes and warning-denied rustdoc passed for orbit-core, orbit-web and orbit-cli; static guards, formatting and diff checks passed. Exact commands and logs follow.
  4. Lines removed per surface (git diff --numstat): CLI support.rs removes 71 and adds 3, net -68. HTTP plugins.rs removes 62 and adds 8, net -54. The necessary web workspace re-export cleanup removes/adds one line, net zero. Whole delivery: 11 files, +177/-145 (net +32, including shared implementation, re-exports and docs).

Validation commands:

  • passed: scripts/build-budget.py -- cargo test -p orbit-web -p orbit-cli --test http_api plugins:: (2 cases); evidence validation/http-plugins.log.
  • passed: scripts/build-budget.py -- cargo test -p orbit-cli --test mcp mcp_roundtrip::plugins; evidence validation/mcp-plugins.log.
  • passed: scripts/build-budget.py -- cargo test -p orbit-cli --test tool plugin_cli_group::; evidence validation/cli-plugins-final.log.
  • passed: make goldens; evidence validation/goldens.log.
  • passed: cargo fmt --all -- --check; evidence validation/fmt.log.
  • passed: scripts/build-budget.py -- cargo clippy -p orbit-core --lib --bins -- -D warnings -A clippy::disallowed_methods; evidence validation/orbit-core-clippy-production.log.
  • passed: scripts/build-budget.py -- cargo clippy -p orbit-core --all-targets -- -D warnings -A clippy::disallowed_methods; evidence validation/orbit-core-clippy-all.log.
  • passed: RUSTDOCFLAGS="-D warnings" scripts/with-test-build-lint.sh scripts/build-budget.py -- cargo doc --no-deps -p orbit-core; evidence validation/orbit-core-doc.log.
  • passed: scripts/build-budget.py -- cargo clippy -p orbit-web --lib --bins -- -D warnings -A clippy::disallowed_methods; evidence validation/orbit-web-clippy-production.log.
  • passed: scripts/build-budget.py -- cargo clippy -p orbit-web --all-targets -- -D warnings -A clippy::disallowed_methods; evidence validation/orbit-web-clippy-all.log.
  • passed: RUSTDOCFLAGS="-D warnings" scripts/with-test-build-lint.sh scripts/build-budget.py -- cargo doc --no-deps -p orbit-web; evidence validation/orbit-web-doc.log.
  • passed: scripts/build-budget.py -- cargo clippy -p orbit-cli --bins -- -D warnings -A clippy::disallowed_methods; evidence validation/orbit-cli-clippy-production.log.
  • passed: scripts/build-budget.py -- cargo clippy -p orbit-cli --all-targets -- -D warnings -A clippy::disallowed_methods; evidence validation/orbit-cli-clippy-all.log.
  • passed: RUSTDOCFLAGS="-D warnings" scripts/with-test-build-lint.sh scripts/build-budget.py -- cargo doc --no-deps -p orbit-cli; evidence validation/orbit-cli-doc.log.
  • passed: make ci-guards; evidence validation/ci-guards-final.log.
  • passed: git diff --check; evidence validation/diff-check.log.
  • failed: python3 .orbit/tmp/manual-plugin-qa.py — diagnostic harness failure: Python Request.method missing; harness corrected to get_method(); corrected, final QA passes; evidence validation/manual-qa-attempt1.log.
  • failed: python3 .orbit/tmp/manual-plugin-qa.py — diagnostic harness failure: Expected fixture retained None fields omitted by existing PluginBuildRecord serde; corrected, final QA passes; evidence validation/manual-qa-attempt2.log.
  • failed: python3 .orbit/tmp/manual-plugin-qa.py — diagnostic harness failure: Expected fixture treated PATH drift as invalid recorded path; existing behavior reports resolves_to while retained path remains granted; corrected, final QA passes; evidence validation/manual-qa-attempt3.log.
  • passed: python3 .orbit/tmp/manual-plugin-qa.py (29 manual checks); evidence validation/manual-qa.log.
  • passed: scripts/sync-plugin-skills.sh (canonical skill change regenerated its shipped mirror); mirror checks also pass in make ci-guards.
  • passed: final git diff --cached --check and git status --short --untracked-files=all reconciliation.
  • not run: additional test-file rustfmt checks, because no test .rs files changed; cargo fmt --all -- --check passed.
  • not run: docs-index regeneration, because no indexed frontmatter, first heading or summary changed; index guards passed.
  • not run: local CodeQL (no security tags, finding or CodeQL-path edits), full-suite/blanket CI gates (not required by AGENTS.md), UI screenshots (no view/rendering changes). No pipeline final_validation_commands were supplied, and no required local check was deferred.

Preserved differences outside the table: CLI show still adds state_and_secrets_visible; enable/add receipts retain seeded/skills/warnings; upgrade retains its existing permission metadata. HTTP mutations still wrap their record under plugin and do not add list-only capabilities. Grant authority, plugin computation, text tables, MCP/plugin protocols and panel execution were unchanged. No new regression tests were admitted for this refactor per AGENTS.md.

Reconciliation and scope: original five context selectors retained; eight companion selectors added by deduplicated union and re-read. Beyond the original three implementation targets, four core re-export modules expose the shared operation to adapters; web workspaces/mod.rs drops its now-unused abbreviate_home re-export; docs/design/plugins/1_scope.md and canonical/shipped orbit-setup plugin documentation describe the additive fields and profiles. All 11 modified tracked paths are deliverable and declared. No pre-existing edits, staged entries, deletions, renames or untracked deliverable paths. Scratch, QA repositories and logs are confined to ignored .orbit/tmp; no cleanup was necessary or denied, no non-deliverable leftovers outside scratch, and every manual server child was stopped and reaped within its launching command. Final HEAD is unchanged. final-reconciliation.txt records the inventory; projection-evidence.json maps criteria and every difference-table row to evidence; validation/results.json records command outcomes and referenced attached logs.

Risks/deviations: no new crate edge or stable-tier/persisted-format changes; no breaking change. The only initial QA failures were three harness assumptions (Python request accessor, serde omission of optional null build members, and the existing distinction between PATH drift and invalid recorded program paths); each is disclosed with its failed log and corrected final evidence. Product code required no repair for those assumptions. No known remaining implementation or validation issue.

Validation

  • Not reported

Branch Freshness

  • Base ref: refs/remotes/origin/agent-main
  • Head ref: orbit/ORB-25367-187d66d3
  • Behind base: 0
  • Ahead of base: 1

Implemented the shared PluginSummary JSON projection at starting HEAD be184be (clean baseline). Changes remain uncommitted for pipeline delivery.

Orbit-Task: ORB-25367
@orbit-agent-01 orbit-agent-01 added the orbit orbit related label Nov 17, 2026
@orbit-agent-01
orbit-agent-01 merged commit 5b77160 into agent-main Nov 17, 2026
19 checks passed
@orbit-agent-01
orbit-agent-01 deleted the orbit/ORB-25367-187d66d3 branch November 17, 2026 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

orbit orbit related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant