Repository navigation
feat(ffi): fail a census on an instance inference missed - #200
Conversation
Quest-Claim: 12fe06edaf29ff4d
A census reports what a crate uses, so it exits cleanly on refusals. An `instance not inferred` refusal is a bug in the exporter's inference instead, so the census now errors on it at the item's span, after writing its reports. The fixtures' census in the merge gate and moq's nightly census both gate on it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 5006c03
No actionable bugs found. The census writes its reports before emitting errors for missed instances, checks every reason across every package report, and reaches the existing diagnostic-based compilation failure path. Ordinary unsupported constructs remain report-only. Extracting refuse preserves export-mode diagnostics and span notes without duplicating the check in CI scripts; this is a focused, sensible direction.
Verification: static inspection of the collector marker, driver/error path, and census test plumbing. No builds, tests, or census runs executed. The reported inverted-predicate experiment is not a retained regression test; an automated negative-path test would better protect the exit-status/report-preservation contract.
Closes quest/m1/ffi-export/inference-gate.md.
Problem
#188 refuses an instance inference missed as
instance not inferred. That refusal is a bug in the exporter, not something the crate uses. A census exits cleanly on every refusal, though, so such a gap would sit in a report no one reads.Approach
--censusemits an error at the item's span, with inference's note at the generic type, for each refusal carryinginstance not inferred. That makes the run fail.--out) emits each refusal through the same function,refuse, so both modes word refusals the same way.tests/fixtures.rs), and moq's census in the nightly job.Impact
rust2-ffi --censusexits non-zero when inference misses an instance. Its reports are still written.Alternatives
Follow-ups
None.
🤖 Generated with Claude Code
(written by Claude Opus 5.5)