Repository navigation
feat(auth): provide a product-owned fctl plugin - #162
Conversation
|
|
||
| # Independent Auth CLI/library module; no Auth server dependencies. | ||
| test-fctl-plugin: | ||
| @cd misc/fctl-plugin && go test -race ./... |
There was a problem hiding this comment.
🟡 [minor] Include plugin tests in the uploaded coverage reports
When just tests runs, test-fctl-plugin executes go test -race ./... without a coverage profile, while the subsequent root-module test writes only coverage.txt. As the README explicitly notes, root-module tests do not discover this nested module. Consequently the new plugin contributes no coverage data to the normal reporting path, so coverage regressions in it are invisible to the required coverage tracking despite its tests running.
Suggestion: Generate a separate atomic coverage profile for the nested module and include it in the CI coverage upload alongside the root profile. Keep race detection enabled and avoid having the root test overwrite the plugin profile.
Summary
Move Auth's fctl command contract into the product-owned
misc/fctl-pluginmodule. fctl can embed this package or run its native executable without moving credentials, profiles or terminal behavior into the plugin.The module retains all 12 Auth commands and declarative forms. GoReleaser builds Linux, macOS and Windows executables for amd64 and arm64, with exact service-version metadata and a separate plugin revision. Root validation recipes include the nested module.
On the next Auth
v*.*.*tag containing these changes, release CI publishes all six raw OCI executables toghcr.io/formancehq/fctl-plugin-authusing the job token withpackages: write, then attachesfctl-plugin-catalogue.jsonto the GitHub release. Before the first upload, the publisher checks exact tag version, plugin revision, binary entry point, platform and checksum. Catalogue entries use immutable OCI digests.Evidence
After: The independent module passes race tests, vet, lint and a public consumer dependency check, without fctl core or terminal dependencies. Coverage: 88.2% total.
mainand retains the shared Docker v2 release preset.Merge Danger
Door: two-way
Blast Radius: CLI
No server behavior or data migration changes. Tagged release jobs gain GHCR publication and a catalogue release asset. On first publication, an administrator must make the GHCR package Public and verify anonymous downloads before catalogue promotion. Promotion into the official fctl catalogue remains separate. Maintenance release branches must contain these workflow/tooling changes before tagging.