Skip to content

bug: branch merge loses the branch's delete when main merged an older branch first #773

Description

@azimafroozeh

What happened

b0 forks from main before w2 is inserted, b1 forks after and deletes w2. After main merges b0 and then b1, reading main still returns {"p.name":"w2"}; expected w2 gone, since b1 deleted it and main never touched it after b1 forked. Both merges report merged, no conflict. Found by the DST nightly (seed 242230, run of 2026-09-25); Steps is a minimal case of the same shape in the .gqt corpus format.

Steps to reproduce

--- schema
node Person {
    name: String @key
}

--- seed
{"type":"Person","data":{"name":"alice"}}

--- mutate
branch create b0

--- expect ok

--- mutate
query insert_w2() {
    insert Person { name: "w2" }
}

--- expect affected: nodes=1 edges=0

--- mutate
branch create b1

--- expect ok

--- mutate
query insert_x1() {
    insert Person { name: "x1" }
}

--- expect affected: nodes=1 edges=0

--- mutate
query insert_x2() {
    insert Person { name: "x2" }
}

--- expect affected: nodes=1 edges=0

--- mutate
query insert_x3() {
    insert Person { name: "x3" }
}

--- expect affected: nodes=1 edges=0

--- mutate branch: b0
query insert_y() {
    insert Person { name: "y" }
}

--- expect affected: nodes=1 edges=0

--- mutate
branch merge b0

--- expect outcome: merged

--- mutate branch: b1
query delete_w2() {
    delete Person where name = "w2"
}

--- expect affected: nodes=1 edges=0

--- mutate
branch merge b1

--- expect outcome: merged

--- query
query names_on_main() {
    match { $p: Person }
    return { $p.name }
}

Version

omnigraph 0.11.0, main @ 80406fe, built from source (Lance 11.0.0)

Environment

macOS (Darwin 25.5) arm64, local filesystem store (the .gqt harness runs the embedded engine). The DST nightly hit the same shape on the in-memory object-store backend (ubuntu-latest).

Logs / output

{"p.name":"alice"}
{"p.name":"w2"}
{"p.name":"x1"}
{"p.name":"x2"}
{"p.name":"x3"}
{"p.name":"y"}

Activity

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

Metadata

Metadata

Assignees

Labels

P-highHigh priorityacceptedTriaged and validated; open for a PRbugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions