fix(build): de-conflate std from bazel-bindings; select artifacts by name; register components - #324
Merged
Merged
Conversation
…name; register components Follow-up to the core-module incident, addressing "why isn't this in the bazel rules" — the investigation found the script and bazel are not just duplicated, they DIVERGE. 1. FEATURE DE-CONFLATION (the real design flaw, mine). `bazel-bindings` means "where do the WIT bindings come from" in every stage crate. In rate I gave it a SECOND meaning — std vs no_std — so the two build systems produced materially different artifacts from one source: bazel (sets bazel-bindings) got std + WASI imports; cargo-component (--no-default-features) got the WASI-free one we publish. Split into an independent `std` feature. Because rules_rust does not apply Cargo's default-features, a bazel build enabling only `bazel-bindings` now gets no_std — i.e. bazel produces the WASI-free component too. Verified the cargo path is unchanged: component header, 4581 bytes, ZERO wasi imports. 2. ARTIFACT SELECTION BY NAME (second latent bug, found while verifying the above). `ls target/.../*.wasm | head -1` picks whatever sorts first — with a shared CARGO_TARGET_DIR (a common CI disk-saving setting) building `rate` selected falcon_flight_component.wasm because "flight" < "rate", and would have published it under the wrong name. Now derives the expected artifact from the crate name and honours CARGO_TARGET_DIR. 3. wasm.directory REGISTRATION. Filed the four verified components (iekf, position, attitude, mixer -> issues #474-#477, auto-PRs #478-#481; adding to an existing namespace auto-merges). falcon-rate is deliberately HELD: the published 1.129.0 artifact is still the core module, and registering a broken artifact in a public index is worse than a late listing. Documented, with the header-check recipe — config.mediaType claims "component" regardless of the bytes, so metadata cannot be trusted for this. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HvusAXYbHLyv3uTzfBcMbG
…lation, honestly scoped)
CI caught that my feature de-conflation was correct in principle but incomplete.
Flipping the semantics DID move the bazel build onto the no_std path — and that
immediately exposed that the bazel target cannot support no_std yet:
error[E0433]: cannot find module or crate `lol_alloc`
error[E0152]: found duplicate lang item `panic_impl`
Bazel does not read Cargo.toml deps (lol_alloc is absent from the target's
deps), and rules_rust still links std, so the crate's own #[panic_handler]
collides. Making bazel emit the WASI-free variant is therefore real work — a
crate_universe entry plus a genuine no_std config — not a feature flip.
So: keep the de-conflation (it is a genuine improvement and the prerequisite for
convergence) and have the bazel target opt into `std` EXPLICITLY. Behaviour is
unchanged from before this PR — bazel builds the std variant, cargo-component
builds the WASI-free one we publish — but the two concerns are no longer riding
one flag, and the remaining gap is named rather than hidden.
Documented the divergence and the follow-up in docs/OCI-DISTRIBUTION.md: once
bazel can build no_std, the release should consume bazel outputs and the script
becomes a thin bundler — which structurally removes the bug class that shipped
falcon-rate:1.129.0 as a core module.
Corrects my own PR claim: I said this would make bazel produce the WASI-free
component. It does not, and I am not asserting it until measured.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HvusAXYbHLyv3uTzfBcMbG
avrabe
added a commit
that referenced
this pull request
Jul 30, 2026
#325) FV-FALCON-OCI-001 claimed distribution was "validated end-to-end" on v1.127/ v1.128. That evidence was NOT sufficient, and jess proved it in the field: falcon-rate:1.129.0 shipped as a raw core module. My check confirmed the OCI config mediaType — which reads "component" regardless of the payload — so it verified the WRAPPER, not the BYTES. Record it honestly rather than quietly re-verifying: the gap, its root cause (no_std dropped `cabi_realloc`, wit-bindgen-rt only provides it when std is linked; the build failure was then swallowed by `|| true`), and the four strengthenings that close it (#323, #324) — cabi_realloc exported, build failures abort, an 8-byte HEADER assert on every component (verified to REJECT the published 1.129.0 artifact), and by-name artifact selection. This is the release-planning loop working as intended: a field regression re-opens the requirement's verification rather than being patched silently. Also defers SWREQ-FALCON-MATHF32-P06 (Cody-Waite argument reduction) from v1.130 to v1.131 — an explicit, logged scope move, not a silent slip. It is the multi-week proof of the four and is not ready; v1.130 is a fix release that republishes falcon-rate as a real component. rivet validate: PASS. Claude-Session: https://claude.ai/code/session_01HvusAXYbHLyv3uTzfBcMbG Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the core-module incident, answering "why isn't this in the Bazel rules?". The investigation found the script and Bazel don't just duplicate each other — they diverge.
1. Feature de-conflation (the real design flaw — mine)
bazel-bindingsmeans "where do the WIT bindings come from" in every stage crate. InrateI gave it a second meaning — std vs no_std — so one source produced materially different artifacts per build system. Now split into an independentstdfeature.Bazel doesn't read
Cargo.tomldeps, andrules_ruststill links std. So Bazel now explicitly opts intostd, and behaviour is unchanged from before this PR. What's gained is that the two concerns no longer ride one flag, and the remaining gap is named rather than hidden.2. Artifact selection by name (second latent bug)
Found while verifying the above:
ls target/.../*.wasm | head -1picks whatever sorts first. With a sharedCARGO_TARGET_DIR— a common CI disk-saving setting — buildingrateselectedfalcon_flight_component.wasm("flight" < "rate") and would have published it under the wrong name. Now derives the artifact from the crate name and honoursCARGO_TARGET_DIR.3. wasm.directory registration
Filed the four verified components — iekf, position, attitude, mixer (issues #474–#477 → auto-PRs #478–#481; existing namespace auto-merges).
falcon-ratedeliberately HELD: the published 1.129.0 artifact is still a core module. Registering a broken artifact in a public index is worse than a late listing. Documented with the header-check recipe, sinceconfig.mediaTypeclaims "component" regardless of payload.The real follow-up (documented, not done here)
Make Bazel able to build the no_std variant (
lol_allocin crate_universe + a genuine no_std config), then have the release consume Bazel outputs and reduce the script to a thin bundler. That structurally removes the bug class that shippedfalcon-rate:1.129.0— a Bazel action failure can't be swallowed, and its outputs are declared rather than globbed.Refs: jess#167, #323.
🤖 Generated with Claude Code