BE-010 CRIT: JS PATCH weaves the COMMIT tree as "ours", clobbering dirty wt edits

be patch (JS handler) classifies every path from the fork/ours/theirs COMMIT trees only and never reads on-disk bytes, directly against PATCH §Weave ("the ours side is the wt's current bytes, including user edits and any prior output; dirty files never cause a refusal"). A file clean on the commit side (oEqF) but dirty on disk takes the "only theirs" arm (patch.js:81) and is clean-overwritten with theirs bytes — uncommitted work lost, no refusal; the modify/delete arm (patch.js:97) unlinks a dirty file; PATCH-on-PATCH composition (prior output read as an edit) is broken too. Native C has the fix (PATCH-002 2583217c); the JS port does not; GET's identical flaw is JGET-004, PATCH's is unticketed. From the 2026-07-07 be/ review (BE/REVIEW), CRIT confirmed + orchestrator-reread of patch.js:79-104. Method Issues.

Input

Context

Goals

Constraints

WIP

Design decisions

TODOs

Blockers and bummers

Outcome