Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/companions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,3 +244,17 @@ jobs:

- name: Verify every embedded tag is in the registry
run: ${{ github.workspace }}/bin/codefly companion verify --core-dir "${{ github.workspace }}/core"

# The published proto companion, pulled fresh on this runner, must render
# a Python client that streams all four RPC shapes. A tag republished
# with different content passes the presence check above and fails here.
- name: Qualify Python client streaming through the published companion
working-directory: cli
env:
CODEFLY_GENERATE_QUALIFY: "1"
GOWORK: "off"
run: go test ./cmd/generate -count=1 -run '^TestGenerateClientPythonStreaming$'

- name: Name the proto companion image the qualification ran
if: failure()
run: docker images --digests --format '{{.Repository}}:{{.Tag}} {{.Digest}} {{.ID}}' ghcr.io/codefly-dev/proto
2 changes: 1 addition & 1 deletion cmd/generate/contract_surface.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func loadContractSurfaces(service *resources.Service, endpoints []*basev0.Endpoi
// descriptor. A descriptor supplies schemas and options, including transitive
// imports; the catalog says which of those methods this listener serves.
func endpointProcedures(set *descriptorpb.FileDescriptorSet, endpoint *composition.APIContractEndpoint) ([]string, error) {
methods, err := composition.ProtobufProcedures(set, endpoint.Services)
methods, err := composition.ProtobufProcedures(set, *endpoint)
if err != nil {
return nil, fmt.Errorf("endpoint %s/%s: %w", endpoint.Service, endpoint.Endpoint, err)
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/codefly-dev/authority/libraries/authority-client/go v0.0.0-20261025214748-c9cef7470d20
github.com/codefly-dev/authority/libraries/delivery/go v0.0.0-20261025214748-c9cef7470d20
github.com/codefly-dev/authority/libraries/hop/go v0.0.0-20261025214748-c9cef7470d20
github.com/codefly-dev/core v0.19.7-0.20261025185759-e501458995d0
github.com/codefly-dev/core v0.19.7-0.20261026014924-50b50dd2a5da
github.com/codefly-dev/golor v0.1.3
github.com/codefly-dev/llm v0.1.7
github.com/codefly-dev/sdk-go/workcontext v0.1.1-0.20261018052022-70dc7a546458
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ github.com/codefly-dev/core v0.19.7-0.20261025175252-88f4434c68c7 h1:sFkQTBSvAjz
github.com/codefly-dev/core v0.19.7-0.20261025175252-88f4434c68c7/go.mod h1:1ina3kP+YSAL4tlZvnEYd4P8bFGnJECfkP86ojeeF1A=
github.com/codefly-dev/core v0.19.7-0.20261025185759-e501458995d0 h1:YEFvkyokBsUWbHoaoKOi6iJtMrqNNR7HsWdUQGN50TA=
github.com/codefly-dev/core v0.19.7-0.20261025185759-e501458995d0/go.mod h1:1ina3kP+YSAL4tlZvnEYd4P8bFGnJECfkP86ojeeF1A=
github.com/codefly-dev/core v0.19.7-0.20261025230614-9386c6bf7521 h1:UP7WCPYMa/K/BQYGdZ95wlCtyRFG+RccBadFVw+qYPs=
github.com/codefly-dev/core v0.19.7-0.20261025230614-9386c6bf7521/go.mod h1:1ina3kP+YSAL4tlZvnEYd4P8bFGnJECfkP86ojeeF1A=
github.com/codefly-dev/core v0.19.7-0.20261026014924-50b50dd2a5da h1:g/I/o/KTL8L2xEDrgJsSO4qLR2oYWJI8PorbVMmKSbM=
github.com/codefly-dev/core v0.19.7-0.20261026014924-50b50dd2a5da/go.mod h1:1ina3kP+YSAL4tlZvnEYd4P8bFGnJECfkP86ojeeF1A=
github.com/codefly-dev/golor v0.1.3 h1:xmo+ceyJFRYZdvpWE2fNd0jeaadp/Ibm1BnganiGKOc=
github.com/codefly-dev/golor v0.1.3/go.mod h1:sl/u/K1l7J0Pr3xyVZp8fOJYQItKKst1No9JqgzLLoY=
github.com/codefly-dev/gortk v0.2.0 h1:7bOlS5valYz2zil+fZctQNcPCYBcPj86abcw9N8h1hQ=
Expand Down
5 changes: 4 additions & 1 deletion pkg/gitops/wire_kits_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,14 @@ func TestTheModuleContractKitRunsThroughTheRender(t *testing.T) {
// (binding-names-calls): each declares what its calls require in its own
// published contract, a protobuf one and an OpenAPI one.
writeCalleePackages(t, workspace.Dir())
// roles-grant-bindings holds a role's spelled-out scope at the one
// audience that underwrites it: its documents and replica bindings both
// resolve to documents.
for rel, content := range map[string]string{
filepath.Join("modules", "assistant", resources.ModuleConfigurationName): "kind: module\nname: assistant\nservices:\n - name: api\n",
filepath.Join("modules", "assistant", "services", "api", resources.ServiceConfigurationName): hostedServiceYAML("api", "assistant") + "module-identity: true\n",
filepath.Join("modules", "assistant", "module.package.codefly.yaml"): "schema: codefly/module-package/v1\nid: acme/assistant\nversion: 1.0.0\n",
filepath.Join("configurations", "staging", "assistant.env"): "MODEL_AUDIENCE=model-gateway\nMODEL_RESOURCE_KIND=modelservice.profiles\nMODEL_BINDING=model\nEVIDENCE_AUDIENCE=documents\nEVIDENCE_RESOURCE_KIND=documents.passages\nEVIDENCE_BINDING=evidence\nANNOTATIONS_PREFIX=annotations\n",
filepath.Join("configurations", "staging", "assistant.env"): "MODEL_AUDIENCE=model-gateway\nMODEL_RESOURCE_KIND=modelservice.profiles\nMODEL_BINDING=model\nEVIDENCE_AUDIENCE=documents\nEVIDENCE_RESOURCE_KIND=documents.passages\nEVIDENCE_BINDING=evidence\nANNOTATIONS_PREFIX=annotations\nDOCUMENTS_AUDIENCE=documents\nREPLICA_AUDIENCE=documents\n",
} {
full := filepath.Join(workspace.Dir(), rel)
require.NoError(t, os.MkdirAll(filepath.Dir(full), 0o755))
Expand Down
Loading