Skip to content

fix(world-cup): pin codama to stop IDL drift#635

Merged
dev-jodee merged 1 commit into
mainfrom
fix/world-cup-codama-idl-drift
Jul 16, 2026
Merged

fix(world-cup): pin codama to stop IDL drift#635
dev-jodee merged 1 commit into
mainfrom
fix/world-cup-codama-idl-drift

Conversation

@dev-jodee

Copy link
Copy Markdown
Collaborator

Summary

  • The scheduled Just workflow always failed on games/world-cup/pinocchio at the check-generated step.
  • Root cause: codama = "0.9.2" (caret) floated to 0.9.3, whose IDL output differs from the committed idl/world_cup.json (adds "constants": [], bumps spec version 1.0.01.6.0). No lockfile is committed for this sub-project, so CI resolved fresh every run → deterministic drift → failed every scheduled run.
  • Pin codama = "=0.9.3" so IDL generation is deterministic.
  • Regenerate and commit idl/world_cup.json to match.

Test Plan

  • just generate-idl twice produces zero diff against the committed IDL.
  • git diff --quiet -- idl clients/typescript/src/generated clients/rust/src/generated is clean → check-generated passes.

Notes

  • Generated client dirs (clients/*/src/generated) are gitignored, so the cargo-fmt not installed warning in the CI log is cosmetic and does not affect check-generated.

The scheduled `Just` workflow always failed at `check-generated`.
codama floated within 0.9.x, so CI regenerated idl/world_cup.json
(adds `constants: []`, spec version 1.0.0 -> 1.6.0) and the committed
IDL no longer matched. Pin codama to =0.9.3 and commit the regenerated
IDL so the check is deterministic.
@greptile-apps

greptile-apps Bot commented Jul 16, 2026

Copy link
Copy Markdown

Greptile Summary

This PR pins the codama dependency to an exact version (=0.9.3) and regenerates idl/world_cup.json to match the new generator output, fixing deterministic CI drift on the check-generated step.

  • Cargo.toml: Changes codama = "0.9.2" (caret, floating) to codama = "=0.9.3" (exact pin), making IDL generation reproducible across runs without a committed lockfile.
  • idl/world_cup.json: Regenerated IDL now includes an empty "constants": [] field and updates the spec version from 1.0.0 to 1.6.0, matching what codama 0.9.3 produces.

Confidence Score: 5/5

Safe to merge — the change is a targeted dependency pin with a matching regenerated artifact; no logic is altered.

The diff is minimal: one dependency version string in Cargo.toml and two additive fields in the generated IDL (constants: [] and spec version bump). Both changes are directly consistent with each other and with the stated root cause. The generated IDL is a committed artifact, not runtime logic, so any residual drift would surface immediately on the next check-generated run.

No files require special attention.

Important Files Changed

Filename Overview
games/world-cup/pinocchio/Cargo.toml Pins codama from floating "0.9.2" to exact "=0.9.3" to prevent IDL drift; straightforward and correct.
games/world-cup/pinocchio/idl/world_cup.json Regenerated IDL adds empty constants array and bumps spec version to 1.6.0, consistent with codama 0.9.3 output.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant CI as CI (just workflow)
    participant Cargo as Cargo resolver
    participant Codama as codama crate
    participant IDL as idl/world_cup.json

    Note over CI,IDL: Before this PR (broken)
    CI->>Cargo: "resolve codama = "0.9.2" (caret)"
    Cargo-->>Codama: resolves latest 0.9.x → 0.9.3
    Codama-->>IDL: generates IDL with constants:[], version:1.6.0
    CI->>IDL: check-generated diff
    IDL-->>CI: DIFF DETECTED → CI fails ❌

    Note over CI,IDL: After this PR (fixed)
    CI->>Cargo: "resolve codama = "=0.9.3" (exact)"
    Cargo-->>Codama: resolves exactly 0.9.3
    Codama-->>IDL: generates IDL with constants:[], version:1.6.0
    CI->>IDL: check-generated diff
    IDL-->>CI: no diff → CI passes ✅
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant CI as CI (just workflow)
    participant Cargo as Cargo resolver
    participant Codama as codama crate
    participant IDL as idl/world_cup.json

    Note over CI,IDL: Before this PR (broken)
    CI->>Cargo: "resolve codama = "0.9.2" (caret)"
    Cargo-->>Codama: resolves latest 0.9.x → 0.9.3
    Codama-->>IDL: generates IDL with constants:[], version:1.6.0
    CI->>IDL: check-generated diff
    IDL-->>CI: DIFF DETECTED → CI fails ❌

    Note over CI,IDL: After this PR (fixed)
    CI->>Cargo: "resolve codama = "=0.9.3" (exact)"
    Cargo-->>Codama: resolves exactly 0.9.3
    Codama-->>IDL: generates IDL with constants:[], version:1.6.0
    CI->>IDL: check-generated diff
    IDL-->>CI: no diff → CI passes ✅
Loading

Reviews (1): Last reviewed commit: "fix(world-cup): pin codama to stop IDL d..." | Re-trigger Greptile

@dev-jodee
dev-jodee requested a review from amilz July 16, 2026 13:49

@amilz amilz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deterministic fix: pin codama =0.9.3 and regen world_cup.json to match. CI green, changes match intent. LGTM

@dev-jodee
dev-jodee merged commit 607de30 into main Jul 16, 2026
18 checks passed
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.

2 participants