Skip to content

chore(quest): plan #197's follow-ups - #218

Merged
kixelated merged 1 commit into
mainfrom
quest-plan/ffi-implied-bounds
Oct 29, 2026
Merged

kixelated merged 1 commit into
mainfrom
quest-plan/ffi-implied-bounds

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Problem

#197 left two follow-ups in the exporter's parameter inference.

Approach

Two quests, since they are independent and land at different priorities:

  • Owned implementors for a parameter that must outlive the call [S], in m1's ffi-export. each reads only direct outlives bounds, so keep(kept: impl Kept) with trait Kept: 'static, implemented for Point and &'static Point, picks &Point. Reproduced on main: the generated glue fails to compile (E0597: a0 does not live long enough).
    • Not unsound. The glue borrows through a guard local to the call (rt::Object::borrow, then &*local), so rustc rejects any borrow that must outlive it. The cost is a build failure in generated code instead of a refusal at a source span.
  • Into targets through a chain of From implementations [S], in m3. sources follows one level of From impls. No consumer needs more yet (moq's Timed is one level), so it waits for one, as ffi-instance-rename does.

Decisions

  • Split: ✅ two quests (independent, different priorities) / one quest
  • Soundness of each: ✅ a build failure in generated glue, not unsound (reproduced) / unsound
  • implied-outlives placement: ✅ m1 ffi-export, last in rank (a correctness gap in the exporter, though moq doesn't hit it) / m3 until a consumer hits it
  • ffi-from-chains placement: ✅ m3, waiting on a consumer / m1

Impact

None: quest files only.

Alternatives

  • One quest for both: they share choose's neighbourhood but no code, and one has no consumer.

Follow-ups

None.

(written by Claude Opus 5.5)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T07:41:53.546322Z abf7493 PR opened
🔒 Security Review ✅ Completed 2026-10-29T07:42:00.525527Z abf7493 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by review (OpenAI)

Reviewed commit: abf7493

No actionable issues found in this planning-only change. Separating the implied-lifetime correctness gap from consumer-driven multi-hop From inference keeps the scope and priorities clear. The current each path reads only direct outlives clauses, unlike choose; sharing elaborated lifetime handling is the simpler direction. The generated call-local object guard supports describing this as a glue compilation failure rather than a demonstrated escaping-borrow vulnerability. Carrying lifetime constraints and guarding cycles are appropriate requirements for the later chain work.

Verification: static quest diff and relevant collector/glue inspection only. No fixture reproduction, export compilation or tests performed; neither planned fix is implemented by this PR.

(Written by OpenAI)

@kixelated
kixelated merged commit 6753b88 into main Oct 29, 2026
1 check passed
@kixelated
kixelated deleted the quest-plan/ffi-implied-bounds branch October 29, 2026 14:00
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.

1 participant