Skip to content

quest: adopt m3's unsafe policy; delete Vec::from_raw_parts - #649

Merged
moq-bot[bot] merged 10 commits into
mainfrom
quest-delete/ts-unsafe-policy
Nov 7, 2026
Merged

moq-bot[bot] merged 10 commits into
mainfrom
quest-delete/ts-unsafe-policy

Conversation

@kixelated

@kixelated kixelated commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Records m3's unsafe policy in quest/m3/README.md, replacing the narrower 2026-11-07 note from moq-dev/rust2#648.
  • Narrows the ts-unsafe epic's Goal to the constructs that fit the translator's existing pointer forms.
  • Deletes the Vec::from_raw_parts quest. moq-dev/rust2#635 is closed: it needed a WeakMap of adopted storage, metadata kept apart from the pointer.

This PR is built on #648's head (a1d4c2b, queued), which is built on moq-dev/rust2#638 (queued). Until both land, this diff also shows their changes.

Decisions

Decided with the maintainer on 2026-11-07, to stop one-off fixes for increasingly rare unsafe:

  1. ✅ Safe Rust is the contract, and translation effort goes there.
  2. ✅ unsafe inside std and common crates is wrapped at their safe API (std, hashbrown, bytes, tokio's channels), not translated.
  3. ✅ Other unsafe translates only where it fits the existing pointer forms: a place, an array element, or a byte in a buffer. A construct that needs a new pointer form or pointer metadata is refused with its span, unless a consumer needs it and no library wrapper covers it.
  4. ✅ An unsafe-heavy crate that a consumer needs is compiled to WASM behind its public API, not fixed construct by construct. This isn't planned until a consumer needs it.
  5. ✅ Delete Vec::from_raw_parts and stop feat(ts): translate Vec::from_raw_parts of memory from alloc or a Vec's #635.

Rejected:

  • Unsafe std gaps with no consumer each getting a quest (moq-dev/rust2#647, closed).
  • A second, byte-backed memory model with separate internal and external types for values whose address is reinterpreted, planned before a consumer needs it.

The other ts-unsafe PRs in flight fit rule 3, so they continue:

🤖 Generated with Claude Code

(Written by Claude Opus 5.5 with high effort)

Review

mechanical fix by quest land watch: merged main at 7301a08dbec95030c7df6e263ec3b138812aaffc with the quest merge driver (head f532b3f)

mechanical fix by codex, gpt-6.1-sol, medium effort: Merged base and re·solved quest/m3/README.md conflict retaining both policy passages; just check base and just test base passed. (head ddd387f)

Rewritten by quest review after each round.

  • Reviewer: Codex, gpt-6.1-sol, medium effort
  • Session: 01a1b698-b7c6-7900-8390-a08de1492b12, round 1
  • Head: b7f23c1
  • Base: origin/main at 48a0fae
  • Score: 10/10, The specified diff only updates quest documentation and planning scope, with no actionable defects or remaining references to deleted quest files.
  • Findings: none

kixelated and others added 5 commits November 6, 2026 23:16
The spike's findings: translation reads each import's JS shape from the
program wasm-bindgen's macro encodes in a link_section static, since
source reading misses the macro_rules!-made imports on the encoder's path.
The imports quest is rewritten to it and split: closures, js-sys's
futures, and the VideoEncoder test in headless Chromium move to a
closures quest. The epic records tokio::sync as a further gap for
web-codecs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… stay refused

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pullfrog

pullfrog Bot commented Nov 7, 2026

Copy link
Copy Markdown

Pullfrog  | Review this ➔

@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 360b3952-10f5-4146-9761-18b407134644
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@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 b7f23c1 against base 48a0fae, separating the previously reviewed #648 stack at a1d4c2b from this PR's three-document delta.

No actionable findings in the new planning changes. The m3 policy, narrowed unsafe epic goal, historical notes, and removal of the Vec::from_raw_parts quest/list entry are consistent. The stated direction is explicit: prioritize safe APIs and existing pointer representations, refuse unsupported constructs, and defer broader memory models or WASM wrappers until a consumer requires them. No executable translator or runtime behavior changes in this PR.

Verification limits: GitHub-only static documentation review. I did not execute quest validation or independently assess the abandoned implementation's storage-metadata requirements. Existing runtime limitations are not resolved by this policy change. This is a COMMENT, not an approval.

(Written by review (OpenAI))

@kixelated
kixelated added this pull request to the merge queue Nov 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 7, 2026
@moq-bot

moq-bot Bot commented Nov 7, 2026

Copy link
Copy Markdown

quest land watch: the merge queue removed this pull request at 837f7af because it conflicts with main (merge_conflict).

The land fixer works on it in the background, and the watcher re-enqueues it at the back of the queue once it is fixed or judged flaky, or hands it back here with what it needs.

(written by quest land watch)

@moq-bot
moq-bot Bot enabled auto-merge November 7, 2026 15:37
@moq-bot

moq-bot Bot commented Nov 7, 2026

Copy link
Copy Markdown

quest land watch: armed auto-merge on this pull request at ddd387f, so it joins the back of the merge queue once its required checks pass, with the land fixer's fix (codex, gpt-6.1-sol, medium effort): Merged base and re·solved quest/m3/README.md conflict retaining both policy passages; just check base and just test base passed..

(written by quest land watch)

@moq-bot
moq-bot Bot added this pull request to the merge queue Nov 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 7, 2026
@moq-bot

moq-bot Bot commented Nov 7, 2026

Copy link
Copy Markdown

quest land watch: the merge queue removed this pull request at ddd387f because it conflicts with main (merge_conflict).

The land fixer works on it in the background, and the watcher re-enqueues it at the back of the queue once it is fixed or judged flaky, or hands it back here with what it needs.

(written by quest land watch)

@moq-bot
moq-bot Bot enabled auto-merge November 7, 2026 16:00
@moq-bot

moq-bot Bot commented Nov 7, 2026

Copy link
Copy Markdown

quest land watch: armed auto-merge on this pull request at f532b3f, so it joins the back of the merge queue once its required checks pass, with main at 7301a08 merged in by the quest merge driver.

(written by quest land watch)

@moq-bot
moq-bot Bot added this pull request to the merge queue Nov 7, 2026
Merged via the queue into main with commit f827882 Nov 7, 2026
7 checks passed
@moq-bot
moq-bot Bot deleted the quest-delete/ts-unsafe-policy branch November 7, 2026 16:02
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