Skip to content

ci(interop-tests): verify generated Go FFI binding freshness #7467

Description

@coderabbitai

Summary

Add a CI freshness check for the committed Go FFI binding at interop-tests/src/tests/go_app/ffi_gen.go.

Required changes

Add a CI step that enables the existing rust2go::RegenArgs configuration in interop-tests/build.rs, regenerates ffi_gen.go, and fails when the generated file differs from the committed version. Keep the normal build configuration unchanged so ordinary test builds do not regenerate the binding.

Rationale

ffi_gen.go is tracked in Git and used by the Go interop tests. The current CI configuration lints the directory but does not verify that ffi_gen.go is synchronized with interop-tests/src/tests/go_ffi.rs. A freshness check prevents stale generated bindings from being merged.

Affected areas

  • interop-tests/build.rs
  • interop-tests/src/tests/go_ffi.rs
  • interop-tests/src/tests/go_app/ffi_gen.go
  • CI workflow or script that runs interop-test checks

Acceptance criteria

  • CI has a dedicated check that regenerates ffi_gen.go using the existing rust2go::RegenArgs source and destination.
  • The check fails if regeneration changes interop-tests/src/tests/go_app/ffi_gen.go.
  • Normal builds and test runs continue to avoid automatic Go FFI regeneration.
  • The check documents or makes clear how it enables regeneration only for validation.

Backlinks

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status
New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions