Skip to content

Fix 1830#1874

Merged
oberstet merged 3 commits into
crossbario:masterfrom
oberstet:fix_1830
Jun 17, 2026
Merged

Fix 1830#1874
oberstet merged 3 commits into
crossbario:masterfrom
oberstet:fix_1830

Conversation

@oberstet

Copy link
Copy Markdown
Contributor

will fix #1830 - and then also #1828

oberstet added 2 commits June 17, 2026 14:48
…rossbario#1830)

Two bugs let stale generated files accumulate undetected:

1. `build-fbs` invoked a system `flatc` (whatever version is on PATH)
   instead of the vendored, version-matched flatc. A version mismatch can
   silently produce different generated code.
2. The CI verification ran `build-fbs` on top of the committed tree
   WITHOUT cleaning first, so any orphaned file (no longer produced by the
   schema) survived in both the "before" and "after" states, matched its
   own checksum, and was never flagged.

Fixes:

- justfile: build-fbs now uses the bundled flatc (${VENV_PATH}/bin/flatc),
  built from deps/flatbuffers during install, with a clear error if it is
  missing.
- main.yml: run `just clean-fbs` before `just build-fbs` so a clean
  regeneration is compared against the committed tree.
- main.yml: replace the opaque checksum diff with an actionable,
  categorized table derived from `git status` of the regenerated tree:
    content differs            -> regenerate & commit (e.g. newer flatc)
    orphan / not generated     -> delete (crossbario#1828)
    new, not committed         -> commit

Validated locally with the vendored v25.12.19 flatc: a clean regenerate
differs from the committed tree by exactly two files, both orphans
(ChannelBinding.py, Kdf.py) - confirming no flatc content drift, only the
crossbario#1828 leftovers.

NOTE: this commit intentionally leaves those two orphan files in place, so
CI is EXPECTED to fail on this commit - that red run proves the detection
mechanism works and that the files are genuinely stale. The orphans are
removed in the next commit (crossbario#1828), which turns CI green.

Refs crossbario#1828.

Note: This work was completed with AI assistance (Claude Code).
crossbario#1828)

These two files in src/autobahn/wamp/gen/wamp/proto/ are stale leftovers
from before the schema renamed the tables to KDF and TLSChannelBinding.
They are no longer produced by `flatc`, and their case-insensitive
collisions with the current KDF.py / TLSChannelBinding.py broke `git
clone` and directory copies on case-insensitive filesystems (APFS/macOS,
some Docker containers).

Produced by `just clean-fbs && just build-fbs` with the vendored
v25.12.19 flatc: a clean regeneration of the canonical tree differs from
the committed tree by exactly these two deletions (every other generated
file is byte-identical), so this commit is precisely "drop the orphans".

With the detection fix from the previous commit (crossbario#1830) now in place,
CI's clean-regenerate-and-compare turns green, proving the two files were
genuine attic leftovers.

Fixes crossbario#1828.

Note: This work was completed with AI assistance (Claude Code).
@oberstet oberstet merged commit e5be16a into crossbario:master Jun 17, 2026
42 of 43 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.

build-fbs uses system flatc and doesn't detect orphaned generated files

1 participant