Repository navigation
feat(cpp): reuse validated shared FFI native inputs - #5740
Conversation
Co-Authored-By: GPT-6 <noreply@openai.com>
|
Outcome: evidence-only draft. The quest remains open because release-input direction and compatibility work remain. Recommended next choice is an explicit FFI_VERSION pin plus immutable default-feature native release assets. Retaining native builds is the alternative that avoids adding that contract. No build, API, wire, or publishing behavior changed. Leave this PR a draft pending the maintainer's decision; the parent batch will present the choice. (written by GPT-6) |
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
Keep direct CMake builds on the current source checkout, while release packaging selects the explicit immutable FFI pin. Make the Nightly helper fixture portable so its existing tests run in the Nix shell. Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 12 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: GPT-6 <noreply@openai.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 041b74a0df
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The C++ native publisher could win the race to create the shared moq-ffi release and stamp it with hardcoded notes naming an AI model. Create it the way sh/gh/release.sh does, with generated notes from the previous moq-ffi tag, so the release looks the same whichever publisher creates it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
just cpp check already runs sh/cpp/ffi.test.py on every pull request and on all four C++ hosts, so the nightly gh test copy is redundant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@coderabbitai review Codex hit its usage limit. Please review head f11943a (merge of origin/main resolving (Written by Claude Opus 5.5) |
|
|
Both review bots are rate limited, so I ran a local Codex review ( (Written by Claude Opus 5.5) |
Problem
C++ rebuilds four default-feature FFI libraries that the shared coordinator already builds. Its independent
cpp-v*releases need an explicit, durable input and four-platform consumer proof before switching.Approach
Approved release-input decision: ✅ option 1, pin immutable default-feature native assets with
cpp/moq/FFI_VERSIONand checked-in SHA-256 hashes on the correspondingmoq-ffi-v*release. The alternatives were separate source builds or deferring reuse. Never select the newest release or fall back after a selected prebuilt fails.Add validated CMake/build-script prebuilt input, prepare checksummed release assets only after installed C++17/C++23 consumer gates on all four hosts, and refuse replacing published native assets. Nightly reuses each target's
cpp-native-*archive only after that target's installed-consumer gate succeeds, verifying its sidecar and manifest. Its packaging requires no second Rust build, and unrelated coordinator failures do not suppress successful C++ targets. Tag releases refuse same-run inputs.If the C++ publisher is first to create the shared
moq-ffi-v*release, it creates it exactly likesh/gh/release.sh(same title, notes generated from the previousmoq-ffitag), so the release looks the same whichever publisher wins the race.Keep standalone source builds as the current default: no existing release has this four-target default-feature asset contract, so the pin remains unset pending actual publication and compatibility evidence.
Decisions
Pinned-FFI download path (
FFI_VERSION,FFI_SHA256.json,ffi.py fetch), dormant until a release is pinned:Nightly C++ packaging depends on the shared FFI build (a target whose same-run consumer gate fails also fails its nightly C++ package; tags still build from source until pinned):
The C++ FFI fixtures run once, in
just cpp check(every pull request and all four C++ hosts), not again in nightlygh test.Impact
MOQ_FFI_DIR/--ffi-dir;FFI_VERSIONand per-target SHA-256 hashes select package-release inputs. Direct CMake andjust cpp checkdefault to the current source checkout. Nightly reuses validated same-run native inputs.moq-ffi-v*tag, attach default-feature static libraries, binding metadata and native linker inputs for all four C++ targets, gated by installed consumers; no release or tag is created by this PR.Alternatives
Expiring Actions artifact IDs cannot rebuild historical C++ releases. Separate native source builds remain the default until the approved release contract is available.
Validation
nix develop --command just checkpasses on4d449766f, including installed C++17/C++23, pkg-config, doc samples and OBS compile checks.cbbcf9b2c: all four installed C++17/C++23/coroutine consumers, Unix pkg-config/docs, checked archive extraction and final packages. Publication jobs were skipped. Later commits change only documentation and the tag-only release-creation notes, which the dry-run does not exercise..github/ffi.md: Windows has 6,077 archive members, including six assembly members with code differences. Complete executable equivalence remains unproven; installed consumers gate reuse. If feat(cpp)!: generate unprefixed names and one moq::expected #5727 changes the generator before merge/release, repeat the gates on that final checkout.Follow-ups
First publish a real FFI release with all four validated default-feature assets, then pin its version and exact archive hashes. Nightly reuse requires successful same-run installed-consumer gates; pinned release reuse additionally requires the actual four published downloads to pass those gates. The retained quest records the settled decision and passing current gates, and remains open for the real published-asset/pin activation condition.
Originally drafted by GPT-6; iterated by Claude Opus 5.5.
(Written by Claude Opus 5.5)