|
Assumption: you are using Dolt Server (or even legacy sync-branch) and using branches and PRs Since beads completions will be recorded prior to PRs being merged, how do you keep dependent work from being done before the code it depends on is available? This wasn't an issue with using issues.jsonl updates in the current branch but obviously that came with other issues. |
Replies: 1 comment 2 replies
|
@geerzo — this tension is fundamental to any setup where issue state lives outside the code branch. It's not unique to Dolt Server; embedded mode has the same decoupling. The file-based (jsonl) approach avoids it by making issue updates atomic with code commits, but that comes with its own costs (merge conflicts, no concurrent access, no query capability). I've been running Dolt Server for beads across multiple repos and have landed on some patterns that work well. The core reframe: Beads tracks work completion. Git tracks code availability. They're complementary state machines, not redundant ones. Deployment Mode Comparison
The dependency problem exists in ALL modes except file-based. Moving to Dolt (any mode) means accepting this decoupling and building conventions around it.
How Dependent Work Actually FlowsHere's the sequence when issue-2 depends on issue-1: The question is: what happens in THE GAP? Beads Already Has the Answer: GatesThe # Create a gate that waits for PR #42 to merge
bd create --type=gate --title="Wait for PR #42" \
--await-type=gh:pr --await-id=42
# Wire it into the dependency chain
bd dep add issue-2 <gate-id>
# Poll gates (can run in CI or on a schedule)
bd gate checkWhen Gate types available:
This means the full workflow becomes: Three Conventions (With and Without Gates)Convention 1: Don't Close Until Merged (simplest, no gates needed)Keep issues open until the PR actually merges. Use a label or status to indicate "work done, awaiting merge." Dependent work only starts when the blocker hits Trade-off: You lose visibility into "work is done" vs "PR is stuck in review." Convention 2: Gates for PR Merge (recommended)Use Trade-off: Requires running Convention 3: Branch-Based Dependencies (advanced, no gates)Dependent work bases its branch on the blocker's feature branch instead of main: # issue-2 depends on issue-1
git checkout -b feature/issue-2 feature/issue-1
# work on issue-2...
# when issue-1 merges to main, rebase:
git rebase mainThis lets dependent work start immediately without waiting for merge. Trade-off: Rebase complexity. If issue-1's PR gets significant review changes, issue-2 may need rework. Works best when the dependency is stable (e.g., "add the table" before "query the table"). The Dependency ToolingFor anyone not aware, beads has a full dependency system beyond gates: bd dep add issue-2 issue-1 # issue-2 blocked by issue-1
bd dep tree issue-1 --direction=up # what does issue-1 block?
bd blocked # show all blocked issues
bd ready # show unblocked work
bd graph # DAG visualization
bd dep cycles # detect circular depsCross-repo dependencies also work via external refs: bd dep add issue-2 external:other-project:issue-idWhat I've Found WorksRunning Dolt Server (Convention 2 — gates) with these practices:
The server model's strength is exactly this decoupling — multiple agents can read/write issues concurrently without merge conflicts, and you get real SQL queries for dependency analysis. The dependency sync problem is real but already solved by the gate system. |
@geerzo — this tension is fundamental to any setup where issue state lives outside the code branch. It's not unique to Dolt Server; embedded mode has the same decoupling. The file-based (jsonl) approach avoids it by making issue updates atomic with code commits, but that comes with its own costs (merge conflicts, no concurrent access, no query capability).
I've been running Dolt Server for beads across multiple repos and have landed on some patterns that work well. The core reframe:
Beads tracks work completion. Git tracks code availability. They're complementary state machines, not redundant ones.
Deployment Mode Comparison