Skip to content

feat(verification): add GoLang support for Docker-based verification#272

Open
apoorv7g wants to merge 4 commits into
accordproject:mainfrom
apoorv7g:CI-Go
Open

feat(verification): add GoLang support for Docker-based verification#272
apoorv7g wants to merge 4 commits into
accordproject:mainfrom
apoorv7g:CI-Go

Conversation

@apoorv7g

@apoorv7g apoorv7g commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

This adds end-to-end Go verification to the codegen pipeline: GitHub Actions matrix support, npm docker-run script wiring, a new Go docker target/image/entrypoint, and a new golang.compile.test.js suite that generates Go and runs go build.

It also updates verification case metadata and corpus manifest with explicit golang skip reasons for known cross-namespace import path issues emitted by GoLangVisitor, keeping failures intentional and documented.

Changes

  • Add verification/docker/golang/Dockerfile and entrypoint.sh: layers the golang:1.25-alpine toolchain onto the shared concerto-verify-base image, generates Go via concerto compile --target GoLang, fans generated files out into per-package subdirectories (Go requires one package per directory, unlike the flat output the visitor emits), and runs go build ./...
  • Register golang in scripts/verification/docker-run.js TARGETS, .github/workflows/verify-codegen.yml matrix, and verification/docker/targets.json
  • Add verify:docker:golang npm script to package.json, matching the existing per-target script pattern
  • Add test/verification/golang.compile.test.js: generates Go from each verification case via GoLangVisitor, mirrors the same per-package fan-out fix, writes a synthetic go.mod, and runs go build ./..., skipping gracefully when the go toolchain isn't installed
  • Add golang skip reasons to all 7 cases in test/verification/cases.js and to the metamodel case in verification/corpus/manifest.json, documenting a pre-existing GoLangVisitor bug (bare package-name imports instead of Go module-relative import paths) that breaks go build for any model with cross-namespace imports (e.g. anything referencing concerto.decorator)

Flags

  • CLI target string for Go is assumed to be GoLang (following the same convention as JavaVisitorJava, CSharpVisitorCSharp, RustVisitorRust, i.e. visitor class name minus Visitor); this should be double-checked against the installed @accordproject/concerto-cli version if verification behaves unexpectedly.

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests
  • Commits messages follow AP format
  • Extend the documentation, if necessary
  • Merging to main from fork:branchname

apoorv7g added 3 commits July 23, 2026 13:41
This adds end-to-end Go verification to the codegen pipeline: GitHub Actions matrix support, npm docker-run script wiring, a new Go docker target/image/entrypoint, and a new `golang.compile.test.js` suite that generates Go and runs `go build`.

It also updates verification case metadata and corpus manifest with explicit `golang` skip reasons for known cross-namespace import path issues emitted by `GoLangVisitor`, keeping failures intentional and documented.

Signed-off-by: Apoorv <130035517+APOORV7G@users.noreply.github.com>
This adds end-to-end Go verification to the codegen pipeline: GitHub Actions matrix support, npm docker-run script wiring, a new Go docker target/image/entrypoint, and a new `golang.compile.test.js` suite that generates Go and runs `go build`.

It also updates verification case metadata and corpus manifest with explicit `golang` skip reasons for known cross-namespace import path issues emitted by `GoLangVisitor`, keeping failures intentional and documented.

Signed-off-by: Apoorv <130035517+APOORV7G@users.noreply.github.com>
Signed-off-by: Apoorv Gadiya <130035517+apoorv7g@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant