Skip to content

Tracking fws U6: apply_patch publishes through the guard #2021

Open

Description

@easonLiangWorldedtech

What this unit delivers: the apply_patch tool publishes through the guard; a move carries the source's completeness to its destination instead of claiming completeness for lines the model never read; a partial-source move onto an already-observed destination is rejected before any state changes. It also rolls back the parent directories saveDirectly created when the guard refuses the publish.

Why it matters: patch hunks are the easiest way to "write" a file the model never fully read; routing them through the guard closes that hole.

Implemented by: PR #1915 (branch fws/u6-apply-patch-wiring).

Acceptance:

  • apply_patch publishes via guardedWrite; an unobserved overwrite and a stale version token are refused with the standard remediation.
  • A move inherits the source's complete flag; a partial-source move onto an observed destination is refused pre-state-change.
  • saveDirectly removes the directories it created (innermost-first, rmdir refuses a populated directory) and rethrows the original error.

Part of the file-write-safety epic #1375, landed as a nine-PR chain tracked on #1991. Merge order: U1 -> U2 -> U3 -> U4 -> U5 -> U8 -> U6 -> U7 -> U9.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions