Skip to content

[Flow 2.0 Epic] Ergonomic Memory Safety Architecture #679

Closed

Description

@godofecht

ROADMAP-SYNC: flow-2-0-epic-ergonomic-memory-safety-architecture

Track the design and implementation of Flow 2.0 memory safety architecture.

Overview

Flow 2.0 aims to achieve compile-time spatial and temporal memory safety without verbose lifetime annotations or restrictive ownership constraints.

Reference: docs/project/roadmap-2.0.md

Core Workstreams

  1. Sound Lifetime Domain Propagation
  2. Automated Aliasing and Borrow Inference
  3. Effect-Bounded Lifetimes and Capabilities
  4. Tiered Safety Profiles and Formal Proofs

Activity

  1. added
    enhancement
    roadmap
    epic
    on Aug 21, 2026
  2. godofecht commented on Sep 12, 2026

    @godofecht
    ContributorAuthor

    Incremental step merged in #884: type checker now flags domain-bound values escaping into static/global storage, with 44 lifetime-domain tests. Broader escape analysis (#687) and struct-field propagation (#684) remain.

  3. godofecht commented on Oct 7, 2026

    @godofecht
    ContributorAuthor

    Design decision, 2026-10-07, decided by the project owner, on the request and persistent domains from Axiom §7 (#1369): accepted.

    • Lattice: callback < frame < request < session < application < persistent.
    • request may allocate and is not @rt_safe.
    • persistent is the outermost domain and outlives the process.

    Follow-up: #1421 (must values stored in persistent be TransportSafe?). Recorded in docs/project/Questions.md by #1422.

  4. godofecht commented on Oct 8, 2026

    @godofecht
    ContributorAuthor

    Audit, 2026-10-08, against main 55dc81b7, using the checklist in docs/project/roadmap-2.0.md. Stays open.

    Workstream item Status Delivered by / tracked in
    @lifetime(...), LD1 to LD4, FrameArena done #148, #884
    Interprocedural escape analysis done #687 (closed)
    request and persistent domains done #1369 train; decision in Questions.md
    Persistent values TransportSafe? decided, closed #1421
    Propagation through struct fields and collections done #684 (closed by the #1369 train, #1358)
    Domain-bound allocation tracking for arenas and heap regions done #690 (closed)
    Local region inference and non-aliasing proofs done #694 (closed)
    Value semantics with inferred move defaults open #696, PR #1354
    Escape through a call, closure or heap cell open, no issue
    Domains on parameters and in types open, no issue
    domain frame { ... } blocks open design question Questions.md, "Lifetime domains: annotation-only or domain blocks in v0?"
    Cross-module @rt_safe / @lifetime summaries first slice done, rest open #765, draft PR #1355
    Reject unknown externs from @rt_safe / callback open, no issue
    RT-safe callable contracts for closures open #766, PR #1348 train
    safety / flight profiles done #273, docs/language/safety-profiles.md
    flight no-heap / no-float subset open safety-profiles.md lists it as future
    Default lowering from domain to stack / arena / heap open, no issue
    Formal proofs of the domain lattice rules open, no issue

    The roadmap checklist is behind the issues: #684, #690 and #694 are closed but still unchecked there. That edit belongs with the next change to docs/project/roadmap-2.0.md.

    Remaining for this epic: #696, #765, #766, the domain blocks decision, and the six unticketed items above (call/closure/heap-cell escape, domains on parameters and types, rejecting unknown externs, the flight subset, default domain lowering, lattice proofs).

  5. godofecht commented on Oct 12, 2026

    @godofecht
    ContributorAuthor

    Audit, 2026-10-12, against main 34d6fa3. Stays open.

    Workstream items update:

    Remaining for this epic:

    • Domain blocks decision (domain frame { ... }).
    • Reject unknown externs from @rt_safe and callback code.
    • Escape through call, closure, or heap cell remaining paths.
    • Domains on parameters and in types.
    • Flight no-heap / no-float subset.
    • Default lowering from domain to stack, arena, or heap.
    • Formal proofs of domain lattice rules.
  6. godofecht commented on Oct 12, 2026

    @godofecht
    ContributorAuthor

    PR #1480 merged into main (d2a373a). Marked completed effect-bounded lifetime summary items in docs/project/roadmap-2.0.md:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    compilerenhancementepicroadmap

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions