Skip to content

fix(runtime-core): keep anchor upgrade off caller future frames - #1128

Merged
ScriptedAlchemy merged 2 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
sol/alias-validation-depth
Sep 9, 2026
Merged

fix(runtime-core): keep anchor upgrade off caller future frames#1128
ScriptedAlchemy merged 2 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
sol/alias-validation-depth

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Root cause

validate_alias_copy_conflicts held an array IntoIter<&str, 2> across an await at the deepest store-open migration chain, consuming repeated auto-trait solver/layout depth. The alias/disposition upgrade futures were also inlined into every caller.

Fix

  • iterate a promoted slice instead of retaining the array iterator across await
  • box the two schema-upgrade phases at their owner boundary
  • keep default recursion/query limits and every feature combination

Evidence

  • schema-install future: 7,664 B → 2,144 B
  • induced +4-level baseline reproduces E0275; fixed state compiles
  • exact all-features CLI build passed
  • 27 anchor/migration tests, 469 runtime-core tests, 380 global-db tests passed
  • all-feature clippy, fmt and commitlint passed

No timeout, feature, or recursion-limit change.

`cargo build -p tracedecay-cli --all-features --bin tracedecay --locked`
overflowed the trait solver with E0275 (`&str: Send`) while checking the
daemon project-open future. Auto-trait obligations walk every future a
caller inlines, and the deepest leaf on that path was the array literal
in `validate_alias_copy_conflicts`: iterating it in place holds a
`std::array::IntoIter<&str, 2>` across the query `await`, whose
`MaybeDangling`/`ManuallyDrop`/`MaybeUninit`/`PolymorphicIter` layers are
re-entered for every obligation raised above it. Borrowing a promoted
slice leaves a plain `slice::Iter` on that frame instead.

Async lowering also expands an awaited future into its caller, so the two
anchor upgrade phases expanded into every migration, admission, and
store-open future that installs this schema; they are now awaited through
a box, as the project-open phases already are. The install future is
2,144 B under `--features hotpath`, down from 7,664 B, and the size probe
fails if either phase is inlined again.
…plan-reopened' into sol/alias-validation-depth
@changeset-bot

changeset-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 248e746

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 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-09-09T03:17:43.628493Z 248e746 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.

@ScriptedAlchemy
ScriptedAlchemy merged commit 3fd7643 into codex/tracedecay-total-redesign-plan-reopened Sep 9, 2026
9 of 25 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.

1 participant