feat(provider): rename pkg/plugin to pkg/provider and sweep provider terminology#474
feat(provider): rename pkg/plugin to pkg/provider and sweep provider terminology#474marcusburghardt wants to merge 8 commits intocomplytime:mainfrom
Conversation
- Downgrade handshake constant identifier rename from MUST to SHOULD in FR-013 and the related Assumptions entry; the go-plugin framework does not require identifier names to follow any convention, so renaming them is a stylistic preference with no functional impact, left to the implementer's discretion. - Remove local filesystem path from the Dependencies section; the path was developer-machine-specific and irrelevant to other contributors. Assisted-by: OpenCode (claude-sonnet-4-6@default) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
- Downgrade handshake constant identifier rename from MUST to SHOULD in FR-013 and the related Assumptions entry; the go-plugin framework does not require identifier names to follow any convention, so renaming them is a stylistic preference with no functional impact, left to the implementer's discretion. - Remove local filesystem path from the Dependencies section; the path was developer-machine-specific and irrelevant to other contributors. Assisted-by: OpenCode (claude-sonnet-4-6@default) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
0006421
417767f to
0006421
Compare
ca1faad to
5241554
Compare
- Downgrade handshake constant identifier rename from MUST to SHOULD in FR-013 and the related Assumptions entry; the go-plugin framework does not require identifier names to follow any convention, so renaming them is a stylistic preference with no functional impact, left to the implementer's discretion. - Remove local filesystem path from the Dependencies section; the path was developer-machine-specific and irrelevant to other contributors. Assisted-by: OpenCode (claude-sonnet-4-6@default) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
5241554 to
c8fc7a0
Compare
f2c66e8 to
54cac1e
Compare
| } | ||
| ``` | ||
|
|
||
| > **Note**: `Export` is included in the interface as of the tagged complyctl SDK release that |
There was a problem hiding this comment.
Just one clarification - a second Export interface was defined after the initial design so this could remain optional for the plugin authors.. The Export method should not be included in the Provider interface.
| ```go | ||
| type DescribeRequest struct{} | ||
|
|
||
| type DescribeResponse struct { |
There was a problem hiding this comment.
Nit: This type should now include SupportsExport bool as well.
There was a problem hiding this comment.
Documentation updated.
| Providers MUST implement the `Export` method but MAY return an unimplemented stub: | ||
|
|
||
| ```go | ||
| // Stub implementation — acceptable until Export is fully supported by a provider. |
There was a problem hiding this comment.
Nit: We droppd the need for a stub implementation by making the Export it's own interface. Plugin authors can now skip completely if they do not want to implement export logic.
There was a problem hiding this comment.
Documentation updated.
Add spec 004 for extracting the OpenSCAP and AMPEL providers from the complyctl repository into the standalone complytime-providers repository. The spec covers the full scope of the migration including: provider source code relocation, terminology rename from 'plugin' to 'provider' across all complyctl surfaces, complytime-providers monorepo layout (single go.mod), CI workflow updates (ci_compliance.yml to download provider binary from complytime-providers releases), and the pkg/plugin → pkg/provider SDK directory rename. RPM spec and testing-farm configuration updates are explicitly deferred to a follow-up specification. Assisted-by: OpenCode (claude-sonnet-4-6@default) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
- Downgrade handshake constant identifier rename from MUST to SHOULD in FR-013 and the related Assumptions entry; the go-plugin framework does not require identifier names to follow any convention, so renaming them is a stylistic preference with no functional impact, left to the implementer's discretion. - Remove local filesystem path from the Dependencies section; the path was developer-machine-specific and irrelevant to other contributors. Assisted-by: OpenCode (claude-sonnet-4-6@default) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
Add implementation plan, research decisions, data model, provider SDK contract, and task breakdown for the 004-providers-repository-split feature. Also update AGENTS.md with active technology context. Assisted-by: OpenCode (claude-sonnet-4-6) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
…references Implement Phase 1-3 of the providers repository split: - Rename pkg/plugin/ → pkg/provider/ with full identifier renames: Plugin interface → Provider, LoadedPlugin → LoadedProvider, PluginInfo → ProviderInfo, LoadPlugins → LoadProviders, GetPlugin → GetProvider, ListPlugins → ListProviders, DiscoverPlugins → DiscoverProviders, SupportedPlugins → SupportedProviders - Rename internal/complytime.PluginExecutablePrefix → ProviderExecutablePrefix and ResolvePluginDir → ResolveProviderDir (value unchanged: complyctl-provider-) - Update all CLI, internal, and provider source files to import pkg/provider and use provider terminology in identifiers, error messages, and log fields - Rename cmd/test-plugin/ → cmd/test-provider/ and update Makefile target build-test-plugin → build-test-provider - Remove docs/PLUGIN_GUIDE.md and docs/man/complyctl-openscap-plugin.* from complyctl (to be migrated to complytime-providers) - Remove openscap-plugin build step and vendor step from Makefile - Update CI workflows behavioral_assessment.yml and e2e_test.yml to use build-test-provider target - Update docs/man/complyctl.md, c2p-openscap-manifest.md, INSTALLATION.md, QUICK_START.md, STYLE_GUIDE.md to use provider terminology throughout - Wire values (MagicCookieKey, UUID, protocol version) are unchanged All 19 packages build and all tests pass. Assisted-by: OpenCode (claude-sonnet-4-6) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
Update all remaining non-exempt 'plugin' references across complyctl: - pkg/log: log field key 'plugin' → 'provider' - pkg/provider/client.go: comments and pluginClient field → gopluginClient - internal/doctor: pluginLogger param → providerLogger - cmd/behavioral-report: --test-plugin flag → --test-provider - tests/behavioral: TestPluginBinary field → TestProviderBinary; update local vars, comments, and runtime error string assertions - tests/e2e: update comments, make target references, and helper messages - .github/actions/setup-complyctl: build-test-plugin → build-test-provider - docs/man: update plugin→provider in complyctl.md and c2p-openscap-manifest.md Exempt from renaming: hashicorp/go-plugin library names, GRPCEvaluatorPlugin struct (implements goplugin.Plugin interface), proto-generated names (RegisterPluginServer, NewPluginClient, PluginClient), COMPLYCTL_PLUGIN magic cookie wire value (frozen), and api/plugin/ proto package. Assisted-by: OpenCode (claude-sonnet-4-6) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
Remove remaining 'plugin' user-visible references from README.md (dispatch to plugins, Plugin Guide link, generate/variables descriptions). Update AGENTS.md to remove stale reference to cmd/openscap-plugin/go.mod. Mark tasks T020-T053 complete in specs/004-providers-repository-split/tasks.md. SC-001 confirmed: zero source files under cmd/openscap-plugin/ or cmd/ampel-plugin/. SC-002 confirmed: no provider-concept 'plugin' refs in Go sources, Makefile, CI, or docs. SC-003 confirmed: both providers build from complytime-providers. SC-004 confirmed: go test ./... passes. SC-007 confirmed: make build produces only complyctl CLI binary. Assisted-by: OpenCode (claude-sonnet-4-6@default) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
…ovider scan.go: Replace remaining pkg/plugin import alias usages in the export path (executeScanPhase, maybeExport, runExport, exportToPlugins, exportSinglePlugin, exportResult) with pkg/provider equivalents. cli_test.go: Update import from pkg/plugin to pkg/provider and rename all pluginID field references to providerID. These references were missed during the pkg/plugin → pkg/provider rename because upstream's Export RPC additions (PR complytime#463) landed in the same functions during the rebase, leaving a mix of old and new package names. Assisted-by: OpenCode (claude-sonnet-4-6@default) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
Export WorkspaceDir from pkg/provider so provider authors can import the canonical workspace directory name instead of duplicating it locally. Providers in complytime-providers were hard-coding ".complytime" because internal/complytime.WorkspaceDir is not importable by external modules. Update contracts/provider-sdk.md to address review feedback (gvauter): - Remove Export from the Provider interface; Export is optional via the separate Exporter interface (ISP design finalised in PR complytime#463) - Add SupportsExport bool to DescribeResponse struct definition - Replace the stub implementation example with the correct opt-in pattern: implement Exporter + set SupportsExport: true in DescribeResponse - Update the contract stability table to list Exporter separately Assisted-by: OpenCode (claude-sonnet-4-6@default) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
ba6fc6e to
b9d9483
Compare
|
All testing-farm jobs are expected to fail. The initial spec intentionally excluded RPM updates from this PR. This will be addressed in a follow-up PR once the separation is concluded. Also integration tests will be worked later. |
Summary
Implements specification 004 (
specs/004-providers-repository-split/spec.md) — the complyctl-side changes for migrating provider implementations out of complyctl and into the standalonecomplytime-providersrepository.What this PR contains
pkg/plugin/→pkg/provider/rename (refactor(provider): rename pkg/plugin to pkg/provider and update all references): renames the SDK package, updates all import paths, renames exported types and functions (Plugin→Provider,LoadedPlugin→LoadedProvider,PluginInfo→ProviderInfo,PluginID→ProviderID,GetPlugin→GetProvider,ListPlugins→ListProviders,LoadPlugins→LoadProviders). Handshake wire values ("COMPLYCTL_PLUGIN"magic cookie, UUID) are preserved byte-for-byte — only Go identifier names change.Full terminology sweep (
refactor(provider): sweep remaining plugin terminology to provider): updates CLI output strings, log keys, error messages, Makefile targets, CI workflow steps, and environment variables (COMPLYCTL_PLUGIN_DIR→COMPLYCTL_PROVIDER_DIR). Carve-outs preserved:hashicorp/go-pluginlibrary name, proto packagecomplyctl.plugin.v1,GRPCEvaluatorPluginstruct,COMPLYCTL_PLUGINmagic cookie,api/plugin/directory.Documentation update (
docs(provider): update README and AGENTS with provider terminology): updatesREADME.md,AGENTS.md, and alldocs/content to use provider terminology; removesdocs/PLUGIN_GUIDE.mdanddocs/man/complyctl-openscap-plugin.*.Spec nit fix (
fix(spec): address review nits from PR #474): updatesspec.mdline 26 perjpower432review comment.Phase 1 design artifacts (
docs(spec): add phase 1 design artifacts for providers repository split): addsspecs/004-providers-repository-split/plan.md,research.md,data-model.md, andcontracts/provider-sdk.md.Build fix (
fix(provider): update scan.go and cli_test.go plugin references to provider): fixescmd/complyctl/cli/scan.goand its test file — references missed during the rename because upstream's Export RPC (PR feat: add --format otel to scan command for ComplyBeacon evidence export #463) landed in the same functions during the rebase.Rebased onto upstream/main (PR #463 Export RPC)
This branch is rebased onto
upstream/mainwhich includes the merged Export RPC changes from PR #463. Conflict resolution inpkg/provider/client.goandpkg/provider/manager.gotook both sets of changes simultaneously:ExportRequest,ExportResponse,CollectorConfig,Exporterinterface,SupportsExportfield) were preserved from upstream.RouteExport/resolveExporterinmanager.goarrived from upstream still usingpluginterminology and were corrected as part of conflict resolution.Related Issues
Review Hints
Handshake wire values are frozen: the
"COMPLYCTL_PLUGIN"magic cookie and the UUID constant are unchanged byte-for-byte. Only Go identifier names change. This is intentional — changing the wire values would silently break all provider connections at runtime.pkg/plugin/import path change: any external consumer importinggithub.com/complytime/complyctl/pkg/pluginwill need to update topkg/provider. Thecomplytime-providersrepository'sgo.moduses areplacedirective during development; it must be replaced with a versionedrequirebefore merging that PR (tracked as T038).Proto package rename deferred:
complyctl.plugin.v1→complyctl.provider.v1is explicitly deferred to a future major version. The rationale is documented incontracts/provider-sdk.md.cmd/openscap-plugin/andcmd/ampel-plugin/removal is out of scope for this PR: that step requirescomplytime-providersto publish a release first. It will land in a follow-up PR after the providers repository is stable.RPM spec and testing-farm configuration updates are explicitly out of scope and will be addressed in a follow-up specification.