Skip to content

test: scalaPB codegen integration tests + CI + proto README#96

Closed
ottobot-ai wants to merge 1 commit into
scasplte2:mainfrom
ottobot-ai:feat/scalapb-codegen-tests
Closed

test: scalaPB codegen integration tests + CI + proto README#96
ottobot-ai wants to merge 1 commit into
scasplte2:mainfrom
ottobot-ai:feat/scalapb-codegen-tests

Conversation

@ottobot-ai

Copy link
Copy Markdown
Collaborator

Summary

Implements the remaining gaps identified in ScalaPB codegen spec (PR #95).

Task A — CI Fix: Add proto/compile proto/test step to .github/workflows/ci.yml

  • The proto module was previously invisible to CI (sharedData/test doesn't trigger proto compilation)
  • Now CI validates all ScalaPB generated types compile correctly on every push

Task B — Integration Test Completeness: 4 new tests in ScalaPBIntegrationTest.scala (was 2, now 6):

  • ArchiveStateMachine extends DataUpdate
  • CreateScript extends DataUpdate
  • InvokeScript extends DataUpdate
  • OttochainMessage union extends DataUpdate ✅ (via oneof CreateStateMachine variant)

All 6/6 DataUpdate message types now covered.

Task C — Documentation: modules/proto/README.md added covering:

  • Build-time generation strategy (sbt-protoc, why files are gitignored)
  • DataUpdate mixin integration pattern
  • Proto vs. Scala model boundary (ProtoAdapters Phase 1/2)
  • Sequenced trait structural gap documentation

Test Coverage

All 6 tests verify:

  1. Generated type can be constructed with correct field names
  2. Assignment to DataUpdate type compiles (compile-time proof of mixin)
  3. Runtime isInstanceOf[DataUpdate] assertion

Dependencies

Trello

Closes: ⚙️ ScalaPB: Configure codegen with DataUpdate mixins

Reviewer: @scasplte2

- Add 4 missing integration tests (ArchiveStateMachine, CreateScript,
  InvokeScript, OttochainMessage union) to ScalaPBIntegrationTest.scala
- Verify all 6 DataUpdate message types compile with mixin correctly
- Fix CI: add proto/compile proto/test step before sharedData/test
  (proto module was previously invisible to CI)
- Add modules/proto/README.md documenting build-time generation strategy,
  DataUpdate mixin integration, and ProtoAdapters Phase 1/2 boundary

Spec: PR scasplte2#95 (docs/design/scalapb-codegen-spec.md)
TDD gate: all tests compile = DataUpdate mixin works for all 6 types

~1.5h @work effort (simple, per spec)

Closes Trello card: https://trello.com/c/IMFiVKvx (⚙️ ScalaPB: Configure codegen)
@ottobot-ai ottobot-ai requested a review from scasplte2 February 24, 2026 00:39
@ottobot-ai ottobot-ai changed the title test: ScalaPB codegen integration tests + CI + proto README test: scalaPB codegen integration tests + CI + proto README Feb 24, 2026
@ottobot-ai

Copy link
Copy Markdown
Collaborator Author

Moving to feature branch feat/proto-migration on ottobot-ai/ottochain for agent iteration. Will submit rollup PR to upstream when ready.

@ottobot-ai ottobot-ai closed this Feb 26, 2026
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