blocks_add skips the cycle check that deps_add runs #822

Closed
opened 2026-10-20 01:19:49 +00:00 by hexajon · 0 comments
Owner

deps_add refuses an edge that would close a dependency cycle: it checks the new edge against the whole existing graph. blocks_add sends the edge straight to the forge with no check.

The forge refuses only a cycle of two issues. A cycle of three or more is accepted, through both the dependencies and the blocks endpoint. The close-semantics probe in internal/testforge/closeprobe shows this on Forgejo and Gitea, at the baseline and latest pins. So blocks_add can build a ring such as A -> B -> C -> A, and none of those issues can ever close.

Fix: blocks_add runs the same cycle check as deps_add before it writes the edge, and refuses with the same message that names the cycle path.

Acceptance, against throwaway Forgejo and Gitea servers:

  • blocks_add that would close a ring of three issues is refused before any write, and the message names the ring.
  • blocks_add that closes no cycle still writes the edge.
`deps_add` refuses an edge that would close a dependency cycle: it checks the new edge against the whole existing graph. `blocks_add` sends the edge straight to the forge with no check. The forge refuses only a cycle of two issues. A cycle of three or more is accepted, through both the dependencies and the blocks endpoint. The close-semantics probe in `internal/testforge/closeprobe` shows this on Forgejo and Gitea, at the baseline and latest pins. So `blocks_add` can build a ring such as A -> B -> C -> A, and none of those issues can ever close. Fix: `blocks_add` runs the same cycle check as `deps_add` before it writes the edge, and refuses with the same message that names the cycle path. Acceptance, against throwaway Forgejo and Gitea servers: - `blocks_add` that would close a ring of three issues is refused before any write, and the message names the ring. - `blocks_add` that closes no cycle still writes the edge.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sixfold-space/madtea#822
No description provided.