Repository navigation
feat(plugins): list plugin storage - #560
Merged
Merged
Conversation
Plugins declare what they keep in their store in `data_stored`, validated like `data_transfers`. The plugin listing shows it, with the plugin's store mode (`storage`: shared, local or off), so that clients see which data a plugin keeps and whether it is shared across processes. The OpenAPI schema of plugins requires both fields. Closes #551 Co-Authored-By: Claude Opus 5.5 <[email protected]>
YAML 1.1 reads the unquoted `off` as `false`, so the spec didn't allow the mode `off`. Test that the spec lists the modes of the code, build the host of the group test from a fake plugin instead of patching private state, and shorten the listing docs. Refs #551 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Refs #551 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideAdds a validated Sequence diagram for plugin storage metadata listingsequenceDiagram
participant Client
participant API
participant PluginHost
participant PluginClass
participant StoreSettings
Client->>API: GET /plugins/{plugin_id}
API->>PluginHost: describe_plugin(host, plugin_id)
PluginHost-->>API: loaded plugin
API->>PluginClass: read data_stored
API->>PluginHost: store_settings(plugin_id)
PluginHost->>StoreSettings: resolve effective mode
StoreSettings-->>PluginHost: shared | local | off
API-->>Client: Plugin with data_stored and storage
Flow diagram for plugin storage metadata exposureflowchart LR
Declaration[Plugin declares data_stored] --> Validation[check_plugin_class validates string items]
Validation --> Listing[Plugin listing]
Settings[Operator store settings] --> Mode[Effective storage mode]
Listing --> Response[API response]
Mode --> Response
Response --> Fields[data_stored and storage: shared | local | off]
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #560 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 56 56
Lines 7008 7010 +2
=========================================
+ Hits 7008 7010 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
uniqueg
marked this pull request as ready for review
October 29, 2026 01:28
This was referenced Oct 31, 2026
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
Shows clients what plugins keep in the plugin store (#557) and where (second part of #545).
Plugin.data_stored: a new class attribute, a tuple of strings that the plugin declares (likedata_transfers), e.g.("geolocations of backend hosts", "daily lookup counts per user (hashed)"). Plugin classes with other values are refused at load time.GET <base>/plugins,GET <base>/plugins/{plugin_id}): each plugin getsdata_storedandstorage, the effective store mode:shared(database, all processes),local(no database) oroff(the operator turned the shared store off for the plugin).foca/plugins/api.yaml): both fields are required properties ofPlugin;storageis an enum. Approved spec change.Closes #551
Verification
coverage run -m pytestwith a local MongoDB 7.0 on port 12345: 3221 passed, 2 skipped (pre-existing), coverage 100%.ruff check,ruff format --check,mypy: clean.pre-commit run --all-files(incl. semgrep and ast-grep): passed.mkdocs build --strict: passed.dev(CI passed, tests on Python 3.11 to 3.15 with MongoDB 7.0 and 8.0, Codecov, Read the Docs).Declined review findings
data_transfers/data_storedpointer in "Writing plugins" (low, optional):data_storedis documented where plugins use the store, and both in the listing section.data_stored(low): the check is shared withdata_transfers.docs/releases/).Reviews: adversarial and quality review, two rounds. Fixed: the unquoted
offin thestorageenum, which YAML 1.1 reads asfalse(high; now quoted, and a test compares the spec's enum withStoreMode); a test that patched private host state (medium); docs wording.Open questions
None.
🤖 Generated with Claude Code