Skip to content

Deleting a type inside a branch clears main's model and cache #772

Closed

Description

@bctiemann

Proposed Changes

Problem: Deleting a type inside a branch unregisters main's model and throughs and clears main's cache for every branch.

Fix: Guard the unregister block with if not in_branch; clear only the current context.

Where (line numbers as of a61cd70; they will have drifted): models.py:2235, 2322–2335

Audit: finding E3, severity Medium, effort S, originally batch 5 (#737). Not re-checked after the review: first confirm it against current main (reproduce it, or point to the code) before fixing.

Note: Related but separate: #755 / #756 handle a type deleted in main leaving its model registered in other workers. That fix deliberately doesn't signal for deletes inside a branch, so this in-process problem remains.

Justification

A user-reachable correctness or data-integrity bug, so it blocks v1.0. Tracked in #759 under tier 1 (correctness and data integrity), re-sliced from the pre-1.0 code audit so each fix gets its own reviewable PR.

Activity

  1. added this to the v0.7.1 milestone on Oct 19, 2026
  2. added a commit that references this issue on Oct 22, 2026
    6589b3f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions