chore(fbs): pin flatc toolchain to 25.9.23 and guard codegen drift #83
Reference in New Issue
Block a user
Delete Branch "feature/flatc-pin-25-9-23"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What & why
Fixes the toolchain drift flagged in the "Notes" of #82. The committed
FlatBuffers bindings were generated by flatc 25.x (TS runtime
flatbuffers@25.9.23), but nothing pinned the compiler. On a box with anolder flatc — Debian's apt ships 23.5.26 — a regen silently churns
output and flips nullable-scalar builder defaults (
= null↔0). #82shipped 5 report files from the wrong compiler as a result.
Approach (agreed with owner)
Unify the whole toolchain on 25.9.23 — the only version available as
an npm package and a prebuilt
flatcbinary and a Go tag — andmake the bindings reproducible + guarded.
github.com/google/flatbuffers25.12.19 →25.9.23 in
pkg/schema,pkg/transcoder,gateway,integration, sothe compiler and both runtimes match. (25.12.19 is not on npm, so the TS
runtime can't go up; we align down instead.)
binding change is
ui/frontend/src/proto/galaxy/fbs/order/command-item.ts— the lone file still on the old optional-scalar builder default
(
cmd_applied/cmd_error_code:0/BigInt(0)→null). Inert inpractice: the TS side never builds those response-only fields (the
engine writes them in Go via
pkg/transcoder/order.go), and the readeraccessors are unchanged. The 5 #12 report files already matched 25.9.23
(their only off-version delta was the eslint header, restored in #82).
flatc-checkguard inui/Makefile(
fbs-ts) and a newpkg/schema/fbs/Makefile(fbs-go); both refuse amismatched flatc and point at the release binary. Stale apt install hint
fixed.
.gitea/workflows/fbs-codegen.yamldownloads the pinned flatc, regenerates Go + TS, and fails on any diff —
catching both "forgot to regenerate" and "wrong flatc version".
pkg/schema/fbs/README.md.Verification
build/vet, transcoder roundtrip + enginetests,
pnpm check(0 errors) and the full vitest suite (888) all green.make fbs-go/make fbs-tswithflatc 25.9.23 produces no further diff (the new CI guard's invariant).
flatc-checkfails with the download hint.