Repository navigation
feat(operations): require generated plugin metadata (ALIEN-1134) - #810
Conversation
`alien operations check` and `package` now fail when a plugin has no `generate-metadata` binary, and say what to add. `publish` rejects bundle metadata whose operations lack the input and output schemas typed definitions generate. The `Plugin` trait stays for plugins that wrap a `TypedOperations` registry with per-invocation setup, such as endpoint configuration or a whole-invocation deadline.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef59602558
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Real CLI runs at
|
|
@greptileai review |
Linear: ALIEN-1134
What changes for plugin authors
alien operations checkandalien operations packagerequiresrc/bin/generate-metadata.rs. Before, a plugin without it skipped the drift check. Now it fails with a message that names what to add: register each operation withOperationDefinitionin aTypedOperationsregistry, add agenerate-metadatabinary that writes the registry's manifest and supports--check, or scaffold it withalien operations init <name>.alien operations publishrejects a bundle whosemetadata.jsonhas operations withoutinputSchemaandoutputSchema, which typed definitions always generate. The error lists those operations and says to rebuild withalien operations package. This check runs before any upload.alien operations check --manifest-onlyis unchanged. It validatesmetadata.jsonwithout building plugin code, for reviewing a plugin you do not trust.Plugin/run_pluginPluginandrun_pluginstay.TypedOperationsimplementsPlugin, andrun_pluginis the stdin/stdout entry point for every plugin, including thealien operations initscaffold andexamples/custom-operations. No known plugin implementsPluginwith a hand-written operationmatch. Plugins that implement it themselves only wrap aTypedOperationsregistry with per-invocation setup, such as validating endpoint configuration or bounding the whole invocation with a deadline. Removing the trait would mean adding those hooks toTypedOperationswithout improving drift protection: the invocation protocol is public, so a hand-written dispatcher does not need the trait. The protection is the metadata requirement above. The SDK docs now state when to implementPlugin.What the next maintainer inherits
check.rs::TYPED_METADATA_HELPis the single remediation text used bycheck,package, andpublish.paramsSchema-only) metadata was inverted or removed, because that path is no longer supported from the CLI.--manifest-onlystill validates legacy manifests.Verification
cargo nextest run -p alien-cli -p alien-operations-sdk -E 'test(/operations/) | package(alien-operations-sdk)': 109 passed.check::requires_a_metadata_generator_and_says_what_to_addandplatform_actions::rejects_bundle_metadata_not_generated_from_typed_operations. Each fails if the requirement is reverted.