beads/internal/httpapi/spec
CI Bot 4bf7b4baba feat(httpapi): publish addDependencies on the v0 surface
Completes the graph write side: a batch of edges asserted as ONE
transaction, or none of them, over issueops.DependencyEditor.

All-or-nothing is the role's shape rather than a policy choice here.
Edges asserted together describe a graph, and half a graph is a graph
nobody asked for — the cycle a caller was refused for is exactly the
state a partial commit would leave behind. That is batchCreateIssues'
posture (fix the payload, resend unchanged), not BatchCloser's
keep-the-survivors one, and it is proved where a fake role cannot prove
it: a batch whose later edge closes a cycle is read back through a real
`bd serve` against real Dolt and leaves zero edges.

Two frozen codes, both 409, both statements about state the client
cannot see without reading it — the claim's not_claimable situation, so
the claim's answer:

  dependency_cycle covers BOTH never-makes-progress refusals, the plain
  scheduling cycle and the blocking edge against the issue's own
  ancestor or descendant. One code because they have one client
  recovery and no force bypass, and codes are the vocabulary of
  recovery. The typed distinction is not lost: the hierarchy refusal
  additionally carries issue_id, blocker_id and blocker_is_ancestor,
  read from *DependencyHierarchyConflictError inside the refusing
  transaction, and member PRESENCE is the discriminator. The three are
  enough to rebuild the typed error whole, both polarities included,
  which is why the boolean travels through a pointer and is emitted
  when false. Nothing can recover them after the fact — the conflicting
  hierarchy may exist only inside the batch that was rolled back.

  dependency_exists is a pair carrying another type, with
  existing_type and requested_type from
  *DependencyTypeConflictError's fields.

The endpoint refusals PR #5415 typed are mapped to their 400 and named
by finding the refused edge in the request by BOTH endpoints, which is
what DependencyEndpointNotFoundError carries the whole edge for. A
target may legitimately be an `external:` reference or another
repository's id, so only a locally-visible absence refuses; the proxied
test pins both sides of that line.

A self-dependency is refused at the wire edge as a value, not a
conflict: it is invalid whatever the graph holds, and answering it here
is what lets the refusal name the offending edge.
SkipPerEdgeCycleCheck stays unpublished — an unauthenticated surface is
where a default must be the guarded one.

Co-Authored-By: Claude Fable <noreply@anthropic.com>
2026-08-08 00:19:48 +00:00
..
embed.go feat(httpapi): OpenAPI v0 spec, types-only codegen, and the drift gates (bd-ilb) 2026-07-31 08:37:34 +00:00
openapi.v0.yaml feat(httpapi): publish addDependencies on the v0 surface 2026-08-08 00:19:48 +00:00