Skip to content

merge guard can archive a local-merge entity before Git delivery succeeds #689

Description

@clkao

Problem

In a split-root workflow with merge: local and no registered merge hook, merge guard can consume the terminal approval and archive the entity before the required manual Git merge runs.

If the later Git merge conflicts, workflow state incorrectly reports the entity as done and archived although delivery did not occur.

Reproduction

  1. Configure a linear five-stage workflow ending in a terminal stage.
  2. Set merge: local without a merge hook.
  3. Approve the final gate so the application is approved-awaiting-merge.
  4. Run spacedock merge guard <entity> --verdict passed.
  5. Observe that the entity becomes done and archived.
  6. Follow the emitted instruction to run the manual git merge --no-ff.
  7. Make that merge conflict.

The code is not delivered, but workflow state remains terminal.

Expected

Terminal approval must remain pending until Git delivery is proven. Either perform the local merge before terminalization or require a durable merge sentinel before consuming the approval and archiving.

A failed merge must leave the entity recoverable without reverting an archive commit manually.

Context

  • Workflow scale: approximately 124 entities
  • Shape: linear five-stage flow with gated validation
  • State backend: split-root
  • Commissioned with: Spacedock 0.19.9
  • Observed runtime: Spacedock 0.27.0+dev

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