(2c95d38) Gate a blocker by the column it is in, not by whether it is done, and bump to 0.33.1

check_blockers refused every move while a blocked by target was still open, so a
dependent sat in backlog until its blocker landed even when the blocker was in
reviewing and its code was there to build on. The way out was -f, which also waives
the backward and skipping guard, on every move for as long as the pair existed.

The rule is now the columns: a ticket may stand level with what it waits on but never
ahead of it, so a blocker in reviewing lets the dependent be committed and reviewed
and gates only done. util::blocks_move is the one place it is decided, taking the
status moved into and the blocker's own, and mv passes the target through. A finished
blocker still holds up nothing, answered through is_open, and a target of discarded
is answered by name rather than by its place in Status::ALL, where it sits last.

The refusal now names the status moved into and only the blockers still behind it: a
dependent told to wait for work already ahead of it has nothing to act on. The board
asks the same function about the column one stage ahead, so the blocked mark means the
card cannot advance rather than that a dependency was ever recorded, which also takes
it off cards in the two terminal columns.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ansho Rei
2026-09-10 11:38:17 +02:00
co-authored by Claude Opus 5
parent 9c224fb768
commit ead3c4340d
15 changed files with 409 additions and 90 deletions
Generated
+1 -1
View File
@@ -1563,7 +1563,7 @@ dependencies = [
[[package]]
name = "worklane"
version = "0.33.0"
version = "0.33.1"
dependencies = [
"anyhow",
"assert_cmd",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "worklane"
version = "0.33.0"
version = "0.33.1"
edition = "2024"
[dependencies]
+2 -2
View File
@@ -10,10 +10,10 @@ Worklane is a local Kanban flow for agentic software development.
| `worklane add` | Creates a ticket in backlog with `--title`, `--description`, `--acceptance`, `--plan`, `--tags`, `--due`, `--owner`, `--priority` flags. `--due` takes `YYYY-MM-DD` and refuses anything else at parse time |
| `worklane ls [status]` | Lists tickets, each column in its own order: the backlog by due date, soonest first, then priority then title, with an undated ticket below every dated one; committed and reviewing by when the ticket entered them, oldest first; done and discarded newest first. Optional positional status, and `--priority <1-5>`, `--tag <tag>` and `--campaign <campaign>`, which compose in any combination. `--tag` matches a whole value of the comma-separated Tags field, case sensitively, so `--tag bug` does not list a ticket tagged `bugfix` or one tagged `Bug`. `--ids` prints one ticket per line as its short id, a tab and its title, unstyled, done included, for a script or a completion |
| `worklane show <id>` | Shows ticket by UUID prefix (4+ chars), title substring, or filename substring. A campaign is addressed the same way, plus its exact codename, which wins over all three. Ends with the ticket's history: every comment on it and every change to its status, owner or tags, oldest first, each naming who made it |
| `worklane mv <id> --status <target> [-f]` | Moves ticket between statuses. Default: forward only, one stage at a time. `-f` bypasses both restrictions. `--status discarded` is exempt and reachable from anywhere, for a ticket that will not be done; leaving `discarded` is a backward move and needs `-f`. Discarding is refused while open tickets are blocked by the ticket, `-f` overrides. Records a `status` entry in the ticket's history, after the move: a refused or no-op move records nothing. `--actor` names the writer of that entry |
| `worklane mv <id> --status <target> [-f]` | Moves ticket between statuses. Default: forward only, one stage at a time. `-f` bypasses both restrictions. `--status discarded` is exempt and reachable from anywhere, for a ticket that will not be done; leaving `discarded` is a backward move and needs `-f`. A move that would put the ticket ahead of one it is blocked by is refused, naming the target status and every blocker still behind it; standing level with a blocker is allowed, so only the last stage waits for it to land. Discarding is refused while open tickets are blocked by the ticket. `-f` overrides both. Records a `status` entry in the ticket's history, after the move: a refused or no-op move records nothing. `--actor` names the writer of that entry |
| `worklane set <ticket>` | Replaces fields with `--title`, `--description`, `--acceptance`, `--plan`, `--tags`, `--due`, `--priority`. At least one required. Changing the title renames the file, keeping the UUID. `--clear <field>` returns a field to unset instead, repeatable, taking `due`, `tags`, `priority`, `description`, `acceptance` or `plan`, and writing back exactly what `add` writes for a field it was never given. No `title`, which addresses the ticket, and no `owner`, which is `chown`'s. Replacing and clearing the same field in one call is refused. `--tags` records a `tags` entry in the ticket's history, with the tags before and after, and it is the only field of this command's that is logged; `--actor` names the writer of that entry |
| `worklane append <ticket>` | Adds to a section with `--description`, `--acceptance`, `--plan`, or to the tags with `--tags`. At least one required. The description gains a paragraph; list items go on the end, steps numbered on from the last. `--tags` keeps the tags the ticket already carries, ignores one it already has, and takes several as a repeated flag or separated by commas, the way the field itself is written; it is the counterpart to `set --tags`, which replaces the whole field. It records a `tags` entry in the ticket's history, and `--actor` names the writer of that entry, this command's only logged field as it is `set`'s. Emptying a field is `set --clear`, which has no counterpart here |
| `worklane relate <ticket>` | Records an edge to another ticket with `--blocked-by`, `--regression-of` or `--relates-to`, each repeatable. At least one required. Only the ticket named is written; `show` derives the other end by scanning, and a derived row that reads exactly like a stored one is drawn once. `relates to` on a ticket whose target already stores it reports no change, since it is the same edge; `blocked by` and `regression of` read differently from the far end, so a mutual pair is two rows. `mv` refuses to move a ticket blocked by one that is not done, unless `-f`. `--clear <kind> <target>` takes an edge off instead, repeatable, the kind spelled either way, `blocked-by` or `blocked by`. The target resolves against the edges the ticket holds first, by id prefix, which is the only way to reach one whose ticket has been deleted, then as an ordinary ticket search. An edge the ticket does not hold reports no change; a target naming nothing at all is an error. Recording and clearing the same edge in one call is refused |
| `worklane relate <ticket>` | Records an edge to another ticket with `--blocked-by`, `--regression-of` or `--relates-to`, each repeatable. At least one required. Only the ticket named is written; `show` derives the other end by scanning, and a derived row that reads exactly like a stored one is drawn once. `relates to` on a ticket whose target already stores it reports no change, since it is the same edge; `blocked by` and `regression of` read differently from the far end, so a mutual pair is two rows. `mv` refuses to move a ticket to a status ahead of one it is blocked by, unless `-f`: level is allowed, so a blocker in reviewing gates only the move to done. `--clear <kind> <target>` takes an edge off instead, repeatable, the kind spelled either way, `blocked-by` or `blocked by`. The target resolves against the edges the ticket holds first, by id prefix, which is the only way to reach one whose ticket has been deleted, then as an ordinary ticket search. An edge the ticket does not hold reports no change; a target naming nothing at all is an error. Recording and clearing the same edge in one call is refused |
| `worklane chown <user> <ticket>` | Sets the Owner field, the only command that writes it. Free text, checked against nothing. User first and ticket second, after Unix `chown`. `worklane chown --clear <ticket>` returns the field to unset, taking the ticket in the flag since there is no user to give, and not to the git user `add` falls back to. Records an `owner` entry in the ticket's history, with the owner before and after; `--actor` names who made the change, which is not the same as the user argument |
| `worklane check <ticket> [criteria...]` | Ticks acceptance criteria, each by number as shown by `show` or by a substring. Several in one call, or `all` for every one of them. Prompts with the numbered list if none is given, or errors with it when there is no terminal |
| `worklane uncheck <ticket> [criteria...]` | Unticks acceptance criteria, addressed the same way |
+7 -6
View File
@@ -272,15 +272,16 @@ as above. Then confirm with `worklane show`.
### A move is refused by a blocker
```
Cannot move 'Beta' while it is blocked by:
Cannot move 'Beta' to reviewing while it is blocked by:
...
Use --force (-f) to move it anyway.
A ticket cannot move ahead of what it waits on. Use --force (-f) to move it anyway.
```
Working as intended: a ticket cannot advance while something it waits on is unfinished.
Finish the blocker, or use `-f` if the dependency is no longer real. Note that the
relation stays on the ticket and will refuse the next move too, and there is no way to
take a relation off, so `-f` is the answer every time until the blocker is done.
Working as intended: a ticket may stand level with what it waits on but not ahead of it,
so this move was one column too far. Advance the blocker to that column, which is usually
the answer and costs nothing, or use `-f` if the dependency is no longer real. If it is
not real at all, take the edge off instead of forcing every move:
`worklane relate <ticket> --clear blocked-by <blocker>`.
If the message says `is blocked by X, which is not on the board`, the blocker has been
deleted. That is a warning rather than a refusal and the move goes through.
+4 -2
View File
@@ -113,8 +113,10 @@ wrong by however much the guess was wrong.
The rules a dating plan has to keep:
- **Nothing is dated before the ticket it is blocked by.** Read the Relations first and
date blockers ahead of their dependents. A dependent dated before its blocker is a date
`mv` will refuse to honour anyway.
date blockers ahead of their dependents, or on the same day: a dependent may be worked
and reviewed alongside its blocker, so the two can share a date, but a dependent dated
earlier is a date `mv` will refuse to honour anyway, since only the blocker's own
landing lets it land.
- **A blocker left undated makes its dependent's date a fiction.** Either date both or
neither.
- **Date what fits, not what exists.** Ask how much capacity the week holds, or take the
+6 -2
View File
@@ -35,8 +35,12 @@ comments are where the intent moved after filing. A criterion that contradicts a
is one of the more useful things you can find: it means the ticket was not updated when
the plan changed, and one of the two is now lying to whoever reads the board.
Read the Relations too. A `blocked by` that is not done, or a `regression of`, changes
what the change was allowed to do and what the review has to check twice.
Read the Relations too. A `blocked by` that has not landed, or a `regression of`, changes
what the change was allowed to do and what the review has to check twice. A ticket
reaching review while its blocker is still in review is allowed by the board, so it is
normal rather than a fault, and it is exactly the case where the code under review may be
resting on work that has not landed: check that it does not assume the blocker is
finished.
## 2. Find the work
+18 -8
View File
@@ -32,8 +32,9 @@ go straight to `reviewing` and has to be walked through `committed` anyway. Doin
front is the same two commands in a more useful order. `-f` allows a backward or
skipping move, for correcting a mistake.
A move is also refused while the ticket is blocked by one that is not done yet, see
[Relating tickets](#relating-tickets).
A move is also refused while it would take the ticket a column ahead of one it is
blocked by: a pair can be committed together and reviewed together, and only the move to
`done` waits for the blocker to land. See [Relating tickets](#relating-tickets).
`mv` stamps the time as it goes: `Committed On`, `Submitted On`, `Completed On` and
`Discarded On`, shown by `show` among the rest of the metadata. They **accumulate**, so a
@@ -63,7 +64,7 @@ What it means everywhere else:
`ls discarded` and `--ids` still reach it
- A campaign counts a discarded member as **finished**: the work left the campaign rather
than sitting in it unfinished
- A discarded ticket **blocks nothing**, so a ticket waiting on it can move
- A discarded ticket **blocks nothing**, so a ticket waiting on it can move anywhere
- Discarding a ticket that open tickets are blocked by is **refused**, naming them: their
plans depended on this work, so they need a look first. `-f` says you looked
- Getting it back is a backward move, so it needs `-f`:
@@ -253,11 +254,20 @@ tickets each blocking the other is two facts and the block shows both. A symmetr
comes off with `--clear` at the end that stores it, since that is the only end holding a
line to remove.
`--blocked-by` is enforced: `mv` refuses to move a ticket while a ticket it is blocked by
is not in `done` or `discarded`, whichever move it is, and names every open blocker. `-f`
moves it anyway, beside the backward and skipping moves it already allows. It is enforced
from the other end too: discarding a ticket that open tickets are blocked by is refused,
naming them. The other two kinds are reference data and never refuse anything.
`--blocked-by` is enforced by the column: **a ticket cannot move to a status ahead of
the one its blocker is in**, and standing level with it is allowed. So a blocker in
`reviewing` lets the dependent be committed and submitted for review and refuses only
`done`; a blocker still in `backlog` holds the dependent in `backlog`. With several
blockers the least advanced one sets the ceiling, and the refusal names the status you
tried to move to and every blocker still behind it. A blocker in `done` or `discarded`
holds up nothing at all.
That is what makes it worth recording an edge on work you are about to start rather than
work you have finished: waiting on a ticket in review costs nothing until the last move.
`-f` moves past it anyway, beside the backward and skipping moves it already allows. It
is enforced from the other end too: discarding a ticket that open tickets are blocked by
is refused, naming them. The other two kinds are reference data and never refuse
anything.
Recording a relation the ticket already holds reports no change. A ticket cannot relate
to itself, and a target that later disappears shows as `_missing_` rather than silently
+1 -1
View File
@@ -523,7 +523,7 @@ export const uncheck = checkboxTool("uncheck");
*/
export const relate = tool({
description:
"Record a relation from one ticket to another, or take one off. Kinds: blocked-by means this one waits on that one and its moves are refused while the target is open; regression-of means this one broke that one's fix; relates-to is a neighbour with no dependency. The edge is stored on the ticket you name alone, and show derives the other end for the target, so never record both directions.",
"Record a relation from one ticket to another, or take one off. Kinds: blocked-by means this one waits on that one and cannot move to a status ahead of it, so it may be committed and reviewed alongside the target and only lands once the target does; regression-of means this one broke that one's fix; relates-to is a neighbour with no dependency. The edge is stored on the ticket you name alone, and show derives the other end for the target, so never record both directions.",
args: {
ticket: tool.schema
.string()
+5 -3
View File
@@ -23,9 +23,11 @@ Recording an edge between two tickets, and drawing the block that reports them.
- **A line in the section that is not a relation is an error naming the ticket**, not a line quietly dropped. Nothing but `relate` writes there, so a bad line means a hand-edited file. The TUI is the deliberate exception: `detail_of` falls back to no block, since one corrupt ticket must not take the whole board down
- **The block is built outside `content_trim` and passed in.** Half of it comes from other tickets and `content_trim` has only the body. It is spliced over the stored lines where the file has the section, and injected ahead of the metadata where it does not, because a ticket that is only pointed at has no section of its own and still has relations to show
- `ensure_section` inserts against `SECTION_ORDER`, before the first following section that is actually in the file, and adds no blank line that was not already there. A handwritten `## Notes` between the plan and the metadata therefore keeps its place, and Metadata is in that list as an anchor rather than as something anything appends to
- **The blocker check runs on every move**, after the already-in-that-status return and behind `force`. An open blocker is a reason not to start and a reason not to finish, and one rule is easier to hold than a table of which transitions care. A move to the status the ticket is already in is not a move, so it is not refused. `-f` now bypasses three rules, which is the right home for it: each one is a deliberate override of something the board would otherwise keep true
- **A blocker that is not on the board warns and allows the move.** Refusing would wedge the ticket with no way out but `-f`, and a uuid nothing carries is a bookkeeping fault rather than a dependency. The refusal names **every** open blocker, since clearing the one that happened to be printed would leave the ticket blocked
- Left out on purpose: removing a relation, which 4179958 assigns to 74904dc. The blocked marker on the card landed in b8ce18c, and it cost no scan of the board: the blockers ride along on the read that already builds the cards. See [The Board View](tui-board.md)
- **A dependent may stand level with its blocker but never ahead of it.** `blocks_move` is the rule: the move is refused exactly when the status moved into is further down `Status::ALL` than the blocker's own, so a blocker in reviewing lets the dependent be committed and reviewed and gates only done. The first shape of this refused every move while a blocker was not done, which read as one rule rather than a table of transitions but stopped the work it was meant to order: a pair is usually built and reviewed together, and waiting for the blocker to land cost a `-f` on every move and left the rule enforcing nothing
- **A finished blocker is answered by `is_open`, and a discard target by name.** Done landed and discarded never will, so neither holds anything up, and that is the one place the board decides what finished means. Discarded is last in `Status::ALL` for the stamp rule's sake, so a comparison of positions alone would read a discard as the furthest move of all: `blocks_move` returns false for it outright, since abandoning a ticket is not carrying it along the flow and owes nothing to what it waits on. A status that is not one of the five holds up every move, the direction `is_open` already takes with such a value: a fault surfaces rather than quietly letting a dependent past
- **The blocker check runs on every move**, after the already-in-that-status return and behind `force`, with the target status passed in as what decides the answer. A move to the status the ticket is already in is not a move, so it is not refused. A backward move never is either, being at or behind everything, and it needs `-f` for its own reason anyway. `-f` bypasses three rules, which is the right home for it: each one is a deliberate override of something the board would otherwise keep true
- **A blocker that is not on the board warns and allows the move.** Refusing would wedge the ticket with no way out but `-f`, and a uuid nothing carries is a bookkeeping fault rather than a dependency. The refusal names **every** blocker still behind the move and the status it was for, since advancing the one that happened to be printed would leave the ticket held up, and a ticket refused the next stage after moving once is otherwise told nothing about what changed. A blocker further along than the move is left out of the list entirely: a dependent told to wait for work already ahead of it has nothing to act on
- Left out on purpose: removing a relation, which 4179958 assigns to 74904dc. The blocked marker on the card landed in b8ce18c, and it cost no scan of the board: the blockers ride along on the read that already builds the cards. It asks `blocks_move` about the status one stage ahead of the column the card is in, so the mark means the card cannot advance and not that a dependency was ever recorded. See [The Board View](tui-board.md)
## The Relations Block
- **One builder, two painters.** `relation_rows` decides which edges there are, what they are called and which direction comes first; `relation_cells` decides the layout, the mark and the colours; `paint_cells` turns cells into escapes for the CLI and `span_of` turns the same cells into ratatui spans for the board. Two builders producing one block in two shapes is a pair free to disagree about ordering or padding, which is what this shape exists to prevent
+2 -2
View File
@@ -19,8 +19,8 @@ What a ticket file holds, how the statuses move it, and how a search finds it.
- **`Status::ALL` is every directory that can hold a ticket, and that is the only list left.** It is what the tree walkers want: `status_dirs`, `RelationIndex::load`, `collect_ticket_items`' callers, `cmd_tags`, `list_ids`, the resolver, the digest and the board's own columns all have to see a discarded ticket or it becomes unaddressable. There was a second list, `FLOW`, the four stages work moves through, which used to be what the board drew from; a136d13 drew the discarded column behind a visibility prefix instead, which took FLOW's last reader away, so it is gone. Hiding is decided by `Visibility`, never by leaving a status out of the walk: what is drawn changes, what is read does not. The prefix property survives on the order alone — done and discarded are deliberately the last two in `ALL` — and `the_terminal_columns_are_last_in_the_order_drawn` pins it
- **Discarding is not a stage, so the walk rules do not apply to entering it.** `mv --status discarded` is allowed from any status with no `-f`, because a backlog ticket that turns out to be a duplicate should not have to be walked through committed and reviewing to be abandoned. Leaving it needs `-f`, which comes free from the backward-move rule
- **The two dependency guards look opposite ways, and `mv` picks by direction.** `check_blockers` asks what this ticket waits on and gates work moves; `check_dependents` asks who waits on this ticket and gates the discard. A ticket being abandoned owes nothing to its own blockers, but the tickets blocked *by* it recorded a dependency on work that is about to be declared never-happening, so those plans get a look before the ground moves. `-f` is the caller saying they looked. Both name every offender rather than the first, and both skip targets that are themselves done or discarded
- **Discarded satisfies a block the way done does.** There is nothing left to wait for, and whether the dependent still makes sense was asked at discard time by the guard above, which is what makes it safe to pass here rather than a second place to re-ask
- **The two dependency guards look opposite ways, and `mv` picks by direction.** `check_blockers` asks what this ticket waits on and gates work moves, refusing the ones that would put it ahead of a blocker; `check_dependents` asks who waits on this ticket and gates the discard. A ticket being abandoned owes nothing to its own blockers, but the tickets blocked *by* it recorded a dependency on work that is about to be declared never-happening, so those plans get a look before the ground moves. `-f` is the caller saying they looked. Both name every offender rather than the first, and both skip targets that are themselves done or discarded; `check_blockers` also skips a blocker already further along than the move being made
- **Discarded satisfies a block the way done does.** There is nothing left to wait for, and whether the dependent still makes sense was asked at discard time by the guard above, which is what makes it safe to pass here rather than a second place to re-ask. It is also why `blocks_move` answers a discard by name and not by position: discarded is last in `Status::ALL`, so comparing positions alone would read the two terminal statuses as the furthest stages of the flow rather than the ends of it
- **Both terminal statuses are hidden by default and counted anyway.** `ls` leaves done and discarded out of the decorated listing and keeps them in the summary counts, and `--ids` and the status positional still reach both: a ticket nobody will work still has to be nameable by a completion or a script
- **A campaign counts a discarded member as finished.** The work was decided out of the campaign rather than left in it, and counting it outstanding would hold a campaign open forever over a ticket nobody will ever do
- **`mv` creates the target directory before moving into it.** A board made before a status existed has no directory for it, and the first move into one is the wrong place to refuse. `init` gets all five from `status_dirs()`
+1 -1
View File
@@ -102,7 +102,7 @@ The TUI: the columns, the cards, the frame, the pickers and the footer.
- **`digest` watches the campaigns directory** as well as the statuses and the history. A campaign filed elsewhere has to reach the picker and a codename edited by hand has to reach every card that names it, and a directory's own mtime would miss the edit
- **The tags go under the title, dimmed, each prefixed with `#`.** The field was invisible on the board: nothing said a ticket was tagged `bug` without opening it. The marker is what stops the row reading as a third line of the title, since a tag is an ordinary word and the title sits directly above it. The row is dropped whole when the column will not hold it, the rule a corner follows, and an untagged ticket spends no row at all, the way a short title spends no second one
- `tags` is a field on `TicketItem`, filled in `collect_ticket_items` through `parse_tags`, for the reason the criteria count is. `parse_tags` splits the comma-separated field into whole trimmed values, so a caller asking for `bug` is not answered by `bugfix`, and reads absent, `_None_` and empty as the same answer
- **A held-up card carries `BLOCKED_MARK`, `×`, after its id, in brightred.** The constant lives in `util.rs` and the relations block draws the same one, since both say the same word. A ticket waiting on an open blocker looked exactly like one that is ready, and the board is where the next thing to pick up is chosen. Not a fourth circle from Geometric Shapes: those belong to the priority meter two cells away and would read as part of that ramp. The multiplication sign is Latin-1, like the middle dot the unset priority draws, so it renders wherever the meter does
- **A held-up card carries `BLOCKED_MARK`, `×`, after its id, in brightred.** The constant lives in `util.rs` and the relations block draws the same one, since both say the same word. A ticket its blocker has not moved out of the way of looked exactly like one that is ready, and the board is where the next thing to pick up is chosen. The mark is `mv`'s own rule asked one column ahead, so it says this cannot advance rather than that a dependency was ever recorded: a card in committed whose blocker is in reviewing is unmarked, because reviewing is where it may go, and the same card is marked once it sits in reviewing and only done is left. The two terminal columns have no next stage and nothing in them is drawn blocked. Not a fourth circle from Geometric Shapes: those belong to the priority meter two cells away and would read as part of that ramp. The multiplication sign is Latin-1, like the middle dot the unset priority draws, so it renders wherever the meter does
- **The mark goes after the id, not before it.** Ahead of the id it would push every id in the column out of line whenever one card was blocked, which costs more than one card's state is worth. It is measured before the project label and the due date, so both give way to it: those are context for a ticket somebody can start, and this is the one thing on a card that says not to. Dropped whole when the row cannot hold the identity and the mark together, the rule a corner follows
- **`blocked` is on `Card`, not on `TicketItem`.** The answer lives on two tickets at once, so no card can reach it alone, and it is settled at reload the way `project` is. What `collect_ticket_items` fills is the ticket's own `uuid` and its `blockers`, both read off the file it is already holding; `mark_blocked` then walks the columns once for a uuid-to-status map and once to answer every card. No file is read twice and nothing is asked per draw
- **A blocker the board does not hold marks nothing**, the answer `mv` already gives a dangling uuid. A Relations section that cannot be parsed reads as no blockers, the exception `detail_of` makes for the same reason: `show` and `mv` are where a hand-edited file is reported, and a board that will not draw because one ticket is malformed is the worse failure
+30 -26
View File
@@ -490,59 +490,63 @@ fn move_ticket_file(
.map_err(|e| anyhow!("Could not move ticket '{}' to {}: {}", title, dest.display(), e))
}
/// Refuse a move while a ticket it is `blocked by` is not done.
/// Refuse a move that would put a ticket ahead of one it is `blocked by`.
///
/// Every move, not only the one into committed: an open blocker is a reason not to
/// start and a reason not to finish, and one rule is easier to hold than a table of
/// which transitions care. Called before anything is written, so a refusal leaves no
/// rename, no rewritten field and no half moved ticket.
/// Every move is asked, and `target` is what decides the answer: a ticket may stand
/// level with what it waits on, so a blocker in reviewing lets the dependent be
/// committed and reviewed and refuses only done. The rule and why it is this one are in
/// [`blocks_move`]. Called before anything is written, so a refusal leaves no rename, no
/// rewritten field and no half moved ticket.
///
/// A target the board does not have warns and allows the move. Refusing there would
/// wedge the ticket behind a bookkeeping fault with no way out but `--force`, and a
/// dangling uuid is not a dependency.
fn check_blockers(worklane_dir: &Path, content: &str, title: &str) -> Result<()> {
let blockers: Vec<Relation> = parse_relations(content, title)?
fn check_blockers(worklane_dir: &Path, content: &str, title: &str, target: Status) -> Result<()> {
let edges: Vec<Relation> = parse_relations(content, title)?
.into_iter()
.filter(|relation| relation.kind == RelationKind::BlockedBy)
.collect();
if blockers.is_empty() {
if edges.is_empty() {
return Ok(());
}
let index = RelationIndex::load(worklane_dir)?;
let mut open: Vec<String> = Vec::new();
let mut behind: Vec<String> = Vec::new();
for blocker in &blockers {
match index.get(&blocker.target) {
// Discarded satisfies a block the way done does: there is nothing left to
// wait for. Whether the dependent still makes sense was asked when the
// blocker was discarded, which is `check_dependents`' refusal.
Some(target) if !is_open(&target.status) => {}
Some(target) => open.push(format!(
for edge in &edges {
match index.get(&edge.target) {
// A blocker level with the move, or ahead of it, is not in the way. Neither
// is a discarded one: whether the dependent still makes sense was asked when
// the blocker was discarded, which is `check_dependents`' refusal.
Some(blocker) if !blocks_move(target, &blocker.status) => {}
Some(blocker) => behind.push(format!(
" ({}) {} [{}]",
color_text(short_id(&target.uuid), Color::Red),
target.title,
color_text(&target.status, Color::Orange),
color_text(short_id(&blocker.uuid), Color::Red),
blocker.title,
color_text(&blocker.status, Color::Orange),
)),
None => eprintln!(
"Warning: ticket '{}' is blocked by {}, which is not on the board.",
title,
short_id(&blocker.target),
short_id(&edge.target),
),
}
}
if open.is_empty() {
if behind.is_empty() {
return Ok(());
}
// Every open blocker, not the first: a ticket waiting on three of them is not
// unblocked by clearing the one the message happened to name.
// Every blocker still behind the move, not the first: a ticket waiting on three of
// them is not freed by advancing the one the message happened to name. The status
// moved into is named too, since a ticket that moved once already and is refused the
// next stage is otherwise told nothing about what changed.
Err(anyhow!(
"Cannot move '{}' while it is blocked by:\n{}\nUse --force (-f) to move it anyway.",
"Cannot move '{}' to {} while it is blocked by:\n{}\nA ticket cannot move ahead of what it waits on. Use --force (-f) to move it anyway.",
color_text(title, Color::Green),
open.join("\n"),
color_text(target.as_str(), Color::Orange),
behind.join("\n"),
))
}
@@ -691,7 +695,7 @@ pub fn cmd_mv(args: &MvArgs, start: &Path, sink: &mut Sink) -> Result<()> {
if !force {
match discarding {
true => check_dependents(&worklane_dir, &parse_ticket_field(&resolved, "ID"), &title)?,
false => check_blockers(&worklane_dir, &resolved, &title)?,
false => check_blockers(&worklane_dir, &resolved, &title, *target)?,
}
}
+54 -19
View File
@@ -307,7 +307,8 @@ fn project_name(dir: &Path) -> String {
pub struct Card {
pub ticket: TicketItem,
pub project: Option<String>,
/// Whether a ticket this one is `blocked by` is on the board and not done.
/// Whether a ticket this one is `blocked by` would refuse its move out of this
/// column, which is `mv`'s rule asked one stage ahead. See `mark_blocked`.
///
/// Decided at reload like `project`, and for a stronger reason: the answer lives on
/// two tickets at once, so no card can reach it alone and asking per draw would mean
@@ -3283,7 +3284,13 @@ fn campaign_of(ticket: &TicketItem, campaigns: &CampaignIndex) -> Option<Cell> {
Some(campaign_label(&campaign.uuid, campaign.codename.as_deref()))
}
/// Set `blocked` on every card whose ticket waits on one that is not done.
/// Set `blocked` on every card that cannot move out of the column it is in.
///
/// The mark is `mv`'s answer to the move the card would make next, so the question is
/// asked of the status one stage ahead: a card in committed whose blocker is in
/// reviewing is not marked, because reviewing is where it may go, and the same card is
/// marked once it sits in reviewing and only done is left. The two terminal columns have
/// no next stage and nothing in them is drawn blocked.
///
/// Two walks of what `columns_of` has just read, not a lookup per relation: the status
/// of a blocker is on another card, so the pass builds the uuid to status map once and
@@ -3307,9 +3314,14 @@ fn mark_blocked(columns: &mut [Column]) {
.collect();
for column in columns.iter_mut() {
// Nothing moves forward out of done or discarded, so nothing there is held up.
let Some(next) = Status::from_name(column.status).and_then(Status::next_in_flow) else {
continue;
};
for card in column.cards.iter_mut() {
card.blocked = card.ticket.blockers.iter().any(|blocker| {
matches!(status_of.get(blocker.as_str()), Some(status) if is_open(status))
matches!(status_of.get(blocker.as_str()), Some(status) if blocks_move(next, status))
});
}
}
@@ -8190,8 +8202,9 @@ approach";
run_line(&mut board, "relate 1111111 --blocked-by 2222222");
assert!(board.prompt.is_none(), "relate was refused: {:?}", refused(&board));
// `mv` names every open blocker on a line of its own and then says what `-f` does,
// which is three lines and the reason none of them may be dropped.
// `mv` names every blocker in the way on a line of its own and then says what the
// rule is and what `-f` does, which is three lines and the reason none of them may
// be dropped.
run_line(&mut board, "mv 1111111 --status committed");
let notice = board.notice.as_ref().expect("the refusal said nothing");
assert!(notice.failed, "a refused move was reported as a success");
@@ -9458,12 +9471,12 @@ approach";
.collect()
}
/// The one thing on a card that says do not start this. Without it a ticket whose
/// blocker is still open reads exactly like one that is ready.
/// The one thing on a card that says this cannot advance. Without it a ticket its
/// blocker has not moved out of the way of reads exactly like one that is ready.
#[test]
fn a_card_waiting_on_an_open_ticket_carries_the_blocked_mark() {
fn a_card_its_blocker_has_not_moved_ahead_of_carries_the_blocked_mark() {
let dir = board_dir();
write_ticket(&dir, "committed", BLOCKER, "The blocker", "");
write_ticket(&dir, "backlog", BLOCKER, "The blocker", "");
write_ticket(&dir, "backlog", WAITER, "The waiter", &blocked_by(BLOCKER));
let board = one_board(&dir);
@@ -9478,6 +9491,26 @@ approach";
);
}
/// The mark is the move the card would make next, not the dependency itself: a
/// blocker a stage ahead leaves the next column open, so the card is not held up
/// until it stands level with it again.
#[test]
fn a_card_whose_blocker_is_a_stage_ahead_carries_none() {
let dir = board_dir();
write_ticket(&dir, "reviewing", BLOCKER, "The blocker", "");
write_ticket(&dir, "committed", WAITER, "The waiter", &blocked_by(BLOCKER));
assert!(!marked_blocked(&one_board(&dir), "The waiter"));
// The same pair once the waiter has caught up: only done is left, and that is
// the stage the blocker still has to reach first.
let caught_up = board_dir();
write_ticket(&caught_up, "reviewing", BLOCKER, "The blocker", "");
write_ticket(&caught_up, "reviewing", WAITER, "The waiter", &blocked_by(BLOCKER));
assert!(marked_blocked(&one_board(&caught_up), "The waiter"));
}
/// The mark is the state of the dependency, not a note that one was ever recorded.
#[test]
fn a_card_whose_blockers_are_all_done_carries_none() {
@@ -9492,13 +9525,13 @@ approach";
assert!(!screen.contains(BLOCKED_MARK), "a cleared blocker still marked:\n{screen}");
}
/// One open blocker out of two is still a reason not to start, the rule `mv` applies
/// when it names every open blocker rather than the first.
/// One blocker out of two still in the way is still a reason not to start, the rule
/// `mv` applies when it names every blocker behind the move rather than the first.
#[test]
fn a_card_is_marked_while_any_one_of_its_blockers_is_open() {
fn a_card_is_marked_while_any_one_of_its_blockers_is_in_the_way() {
let dir = board_dir();
write_ticket(&dir, "done", BLOCKER, "The blocker", "");
write_ticket(&dir, "reviewing", ELSEWHERE, "The other blocker", "");
write_ticket(&dir, "backlog", ELSEWHERE, "The other blocker", "");
write_ticket(
&dir,
"backlog",
@@ -9513,9 +9546,9 @@ approach";
/// A discarded blocker holds nothing up, the answer `mv` gives it: there is nothing
/// left to wait for.
///
/// The board and `mv` share `is_open` for this, which is what keeps them from
/// The board and `mv` share `blocks_move` for this, which is what keeps them from
/// drifting now that the blocker arrives in the map: `columns_of` builds every
/// status, so a rule written as `!= DONE` would mark these cards while `mv` kept
/// status, so a rule of the board's own would mark these cards while `mv` kept
/// letting them move. The fixture writes the directory directly, the way a board
/// that predates a discard would hold one.
#[test]
@@ -9526,8 +9559,10 @@ approach";
write_ticket(&dir, "backlog", WAITER, "The waiter", &blocked_by(BLOCKER));
assert!(!marked_blocked(&one_board(&dir), "The waiter"));
assert!(!is_open(DISCARDED), "the rule the board and mv share");
assert!(is_open("backlog") && is_open("committed") && is_open("reviewing"));
assert!(
!blocks_move(Status::Committed, DISCARDED) && !blocks_move(Status::Committed, DONE),
"the rule the board and mv share"
);
}
/// The answer `mv` gives a dangling uuid: a bookkeeping fault, not a dependency.
@@ -9566,7 +9601,7 @@ approach";
#[test]
fn a_column_too_narrow_for_the_mark_drops_it() {
let dir = board_dir();
write_ticket(&dir, "committed", BLOCKER, "The blocker", "");
write_ticket(&dir, "backlog", BLOCKER, "The blocker", "");
write_ticket(&dir, "backlog", WAITER, "The waiter", &blocked_by(BLOCKER));
let board = one_board(&dir);
@@ -9593,7 +9628,7 @@ approach";
#[test]
fn the_blocked_mark_follows_a_card_onto_the_merge() {
let (first, second) = (board_dir(), board_dir());
write_ticket(&first, "committed", BLOCKER, "The blocker", "");
write_ticket(&first, "backlog", BLOCKER, "The blocker", "");
write_ticket(&first, "backlog", WAITER, "The waiter", &blocked_by(BLOCKER));
write_ticket(&second, "backlog", ELSEWHERE, "Elsewhere", &blocked_by(BLOCKER));
+179 -6
View File
@@ -2422,7 +2422,8 @@ pub fn parse_relations(content: &str, title: &str) -> Result<Vec<Relation>> {
pub struct RelatedTicket {
pub uuid: String,
pub title: String,
/// The directory it sits in, which is what decides whether a blocker is still open.
/// The directory it sits in, which is how far along a blocker stands and therefore
/// which moves it holds up.
pub status: String,
/// The relations it stores, and therefore where an inverse is derived from.
pub relations: Vec<Relation>,
@@ -3144,6 +3145,78 @@ impl Status {
Status::Discarded => "discarded",
}
}
/// The status a directory name or a `Status` field names, and nothing for a value
/// that is not one of the five.
///
/// The inverse of [`Status::as_str`], derived from [`Status::ALL`] rather than
/// matching the five names a second time, so a status added to the list is
/// recognised here without a second edit. Callers reading a status off disk hold a
/// string, and this is where they turn it back into something the flow order can be
/// asked about.
pub fn from_name(name: &str) -> Option<Status> {
Status::ALL.into_iter().find(|status| status.as_str() == name)
}
/// This status's place in the flow, which is its index in [`Status::ALL`].
///
/// Read rather than spelled, for the reason `mv` reads the same list to decide
/// whether a move goes forward: two orders of the five statuses could disagree, and
/// there is only one flow.
pub fn flow_position(self) -> usize {
Status::ALL
.iter()
.position(|status| *status == self)
.expect("Status::ALL holds every variant")
}
/// The status the flow moves into from here, and nothing at the end of it.
///
/// The three working statuses each have a successor; the two terminal ones have
/// none. Discarded follows done in [`Status::ALL`] only so that leaving it reads as
/// a backward move, so it is nothing's successor even though it sits after one, and
/// nothing moves forward out of done either.
pub fn next_in_flow(self) -> Option<Status> {
match self {
Status::Done | Status::Discarded => None,
_ => Status::ALL.get(self.flow_position() + 1).copied(),
}
}
}
/// Whether a blocker sitting in `blocker` holds up a move into `target`.
///
/// The rule is the columns: a ticket may stand level with what it waits on but never
/// ahead of it, so the move is refused exactly when `target` is further down the flow
/// than the blocker. Level is allowed, which is what lets a pair be committed together
/// and reviewed together; only the last stage still waits for the blocker to land,
/// which is the gate that carries the meaning anyway.
///
/// A finished blocker holds up nothing, and [`is_open`] is where the board decides what
/// finished means. Answered by name rather than by a place in [`Status::ALL`]: discarded
/// sits last there for the stamp rule's sake, and a block that rested on that would
/// change meaning the day the list is reordered.
///
/// Takes the blocker's status as a string because that is what the callers hold, the
/// directory the ticket was found in. A value that is not a status at all holds up every
/// move, the direction [`is_open`] takes with the same value: a fault surfaces instead of
/// quietly letting a dependent past.
pub fn blocks_move(target: Status, blocker: &str) -> bool {
if !is_open(blocker) {
return false;
}
// Abandoning a ticket is not carrying it along the flow, so it owes nothing to what
// it waits on. `mv` asks `check_dependents` on that move rather than this, and the
// answer here agrees so no caller has to route around a wrong one.
if target == Status::Discarded {
return false;
}
match Status::from_name(blocker) {
Some(blocker) => target.flow_position() > blocker.flow_position(),
None => true,
}
}
pub fn status_dirs() -> Vec<&'static str> {
@@ -3174,9 +3247,9 @@ pub const DISCARDED: &str = Status::Discarded.as_str();
///
/// The two terminal statuses do not: done landed and discarded never will, so in both
/// cases there is nothing left to wait for and nothing left to plan around. One spelling
/// for all three readers, because `mv` refuses a move on it, refuses a discard on it and
/// the board draws its blocked mark from it, and two views disagreeing about what counts
/// as open would be the difference nobody can explain later.
/// for every reader, because `mv` refuses a discard on it and [`blocks_move`] answers a
/// finished blocker with it, and two views disagreeing about what counts as open would be
/// the difference nobody can explain later.
///
/// Takes the status as a string because that is what the callers hold: the directory a
/// ticket was found in, not a parsed [`Status`]. An unrecognised value reads as open,
@@ -3282,8 +3355,8 @@ pub struct TicketItem {
///
/// Read here for the reason `criteria` is: the board marks every held-up card on
/// every tick, and asking per card would re-read every ticket body on every draw.
/// The uuids only, never the answer: whether a blocker is still open is a fact
/// about another ticket, so it belongs to whoever holds the whole board.
/// The uuids only, never the answer: how far along a blocker stands is a fact about
/// another ticket, so it belongs to whoever holds the whole board.
///
/// A Relations section that cannot be parsed reads as no blockers rather than as a
/// ticket that cannot be listed. `show` and `mv` still refuse it, which is where a
@@ -6449,4 +6522,104 @@ Plain line with **bold** and a [link](http://x.test/a).
let error = find_worklane_dir(&project).unwrap_err().to_string();
assert!(error.contains("not a directory"), "{error}");
}
// ------------------------------------------------- what a blocker holds up --
/// The column rule over every pair of working statuses: the move is refused exactly
/// when it would land further down the flow than the blocker stands. Level is
/// allowed, which is the whole of it — a pair can be committed together and reviewed
/// together, and only done still waits for the blocker to land.
#[test]
fn a_blocker_holds_up_only_the_moves_ahead_of_it() {
let flow = [
Status::Backlog,
Status::Committed,
Status::Reviewing,
Status::Done,
];
for blocker in [Status::Backlog, Status::Committed, Status::Reviewing] {
for target in flow {
assert_eq!(
blocks_move(target, blocker.as_str()),
target.flow_position() > blocker.flow_position(),
"a blocker in {} against a move to {}",
blocker.as_str(),
target.as_str(),
);
}
}
}
/// A finished blocker holds up nothing, whichever way it finished: done landed and
/// discarded never will, so in both cases there is nothing left to wait for.
#[test]
fn a_done_or_discarded_blocker_holds_up_nothing() {
for blocker in [DONE, DISCARDED] {
for target in Status::ALL {
assert!(
!blocks_move(target, blocker),
"a {blocker} blocker held up a move to {}",
target.as_str(),
);
}
}
}
/// Abandoning a ticket is not a stage of work, so its own blockers have no say. The
/// question `mv` asks on that move is the other one, about the tickets waiting on it.
#[test]
fn abandoning_a_ticket_is_not_held_up_by_its_blockers() {
for blocker in Status::ALL {
assert!(
!blocks_move(Status::Discarded, blocker.as_str()),
"a blocker in {} held up a discard",
blocker.as_str(),
);
}
}
/// A value that is not one of the five is a bookkeeping fault, not a stage, and it
/// surfaces by holding the dependent where it is rather than quietly letting it past.
#[test]
fn a_status_that_is_not_one_holds_up_every_move_along_the_flow() {
for target in [
Status::Backlog,
Status::Committed,
Status::Reviewing,
Status::Done,
] {
assert!(blocks_move(target, "in-progress"), "{}", target.as_str());
}
}
/// Each working status has a successor and the two terminal ones have none, discarded
/// included: it follows done in `Status::ALL` for the stamp rule's sake, not because
/// the flow moves into it.
#[test]
fn only_the_working_statuses_have_a_next_stage() {
assert_eq!(Status::Backlog.next_in_flow(), Some(Status::Committed));
assert_eq!(Status::Committed.next_in_flow(), Some(Status::Reviewing));
assert_eq!(Status::Reviewing.next_in_flow(), Some(Status::Done));
assert_eq!(Status::Done.next_in_flow(), None);
assert_eq!(Status::Discarded.next_in_flow(), None);
}
/// The name a status is stored under reads back as that status, and nothing else
/// reads back as one: the directory a ticket was found in is the caller's only
/// handle on it.
#[test]
fn a_status_name_round_trips_and_nothing_else_resolves() {
for status in Status::ALL {
assert_eq!(Status::from_name(status.as_str()), Some(status));
assert_eq!(
status.flow_position(),
Status::ALL.iter().position(|s| *s == status).unwrap()
);
}
for name in ["Backlog", "", "in-progress", "backlog "] {
assert_eq!(Status::from_name(name), None, "{name:?} resolved as a status");
}
}
}
+98 -10
View File
@@ -702,9 +702,10 @@ fn move_ticket(temp: &TempDir, ticket: &str, status: &str, force: bool) -> std::
}
/// Refused, and nothing written: not the rename, not the Status field, not a stray
/// temp file. The blocker is named with its status, since that is what has to change.
/// temp file. The blocker is named with its status, since that is what has to change,
/// and the move names the status it was for, since that is what decides the refusal.
#[test]
fn mv_refuses_a_move_while_a_blocker_is_open() {
fn mv_refuses_a_move_past_a_blocker() {
let temp = TempDir::new().unwrap();
let worklane = setup_worklane(&temp);
let filename = create_gated_pair(&worklane, &temp, "backlog");
@@ -715,6 +716,7 @@ fn mv_refuses_a_move_while_a_blocker_is_open() {
let stderr = String::from_utf8_lossy(&out.stderr);
assert!(stderr.contains("blocked by"), "{stderr}");
assert!(stderr.contains("to committed"), "the move is not named: {stderr}");
assert!(stderr.contains("The Blocker"), "{stderr}");
assert!(stderr.contains("backlog"), "{stderr}");
assert!(stderr.contains("--force"), "{stderr}");
@@ -729,16 +731,19 @@ fn mv_refuses_a_move_while_a_blocker_is_open() {
assert_eq!(stray_files(&worklane), Vec::<String>::new());
}
/// Every open blocker, not the first: clearing the one the message happened to name
/// would leave the ticket blocked and the reader surprised.
/// Every blocker still behind the move, not the first: advancing the one the message
/// happened to name would leave the ticket held up and the reader surprised.
///
/// The gated ticket is in reviewing and both blockers are behind it, so the move to done
/// is ahead of both. A blocker further along than the move is a separate case, below.
#[test]
fn mv_names_every_open_blocker() {
fn mv_names_every_blocker_behind_the_move() {
let temp = TempDir::new().unwrap();
let worklane = setup_worklane(&temp);
create_gated_pair(&worklane, &temp, "backlog");
create_gated_pair(&worklane, &temp, "reviewing");
create_ticket(
&worklane,
"reviewing",
"committed",
"The Second Blocker",
"Also not done.",
"cccc3333cccc3333cccc3333cccc3333cccc",
@@ -754,12 +759,95 @@ fn mv_names_every_open_blocker() {
.assert()
.success();
let out = move_ticket(&temp, "aaaa1111", "committed", false);
let out = move_ticket(&temp, "aaaa1111", "done", false);
let stderr = String::from_utf8_lossy(&out.stderr);
assert!(stderr.contains("The Blocker"), "{stderr}");
assert!(stderr.contains("The Second Blocker"), "{stderr}");
}
/// A blocker that has moved on is not in the way, and it is left out of the message
/// rather than listed with the ones that are: a ticket told to wait for work that is
/// already ahead of it has nothing to act on.
#[test]
fn mv_leaves_out_a_blocker_the_move_does_not_pass() {
let temp = TempDir::new().unwrap();
let worklane = setup_worklane(&temp);
create_gated_pair(&worklane, &temp, "backlog");
create_ticket(
&worklane,
"reviewing",
"The Second Blocker",
"Further along than the move.",
"cccc3333cccc3333cccc3333cccc3333cccc",
"bob",
"_Not set_",
"test",
);
Command::cargo_bin(BIN_NAME)
.unwrap()
.current_dir(temp.path())
.args(["relate", "aaaa1111", "--blocked-by", "cccc3333"])
.assert()
.success();
// Refused by the backlog blocker, which is the only one the move passes.
let out = move_ticket(&temp, "aaaa1111", "committed", false);
assert!(!out.status.success());
let stderr = String::from_utf8_lossy(&out.stderr);
assert!(stderr.contains("The Blocker"), "{stderr}");
assert!(
!stderr.contains("The Second Blocker"),
"a blocker ahead of the move was named: {stderr}"
);
}
/// The walk the change is for: a dependent follows its blocker one column at a time,
/// standing level with it and never ahead, and none of it costs a `-f`.
#[test]
fn mv_walks_a_dependent_up_behind_its_blocker() {
let temp = TempDir::new().unwrap();
let worklane = setup_worklane(&temp);
let filename = create_gated_pair(&worklane, &temp, "backlog");
// Level is allowed: the blocker is committed, so the dependent may be committed too,
// and reviewing is the stage it may not reach yet.
assert!(
move_ticket(&temp, "bbbb2222", "committed", false)
.status
.success()
);
let out = move_ticket(&temp, "aaaa1111", "committed", false);
assert!(out.status.success(), "{}", String::from_utf8_lossy(&out.stderr));
assert!(worklane.join("committed").join(&filename).exists());
let refused = move_ticket(&temp, "aaaa1111", "reviewing", false);
assert!(
!refused.status.success(),
"the dependent moved a column ahead of its blocker"
);
// The blocker submits, and reviewing opens for the dependent while done does not.
assert!(
move_ticket(&temp, "bbbb2222", "reviewing", false)
.status
.success()
);
let out = move_ticket(&temp, "aaaa1111", "reviewing", false);
assert!(out.status.success(), "{}", String::from_utf8_lossy(&out.stderr));
let refused = move_ticket(&temp, "aaaa1111", "done", false);
assert!(!refused.status.success(), "the dependent landed before its blocker");
assert!(worklane.join("reviewing").join(&filename).exists());
// And the last stage, which is the one that was ever worth waiting for.
assert!(move_ticket(&temp, "bbbb2222", "done", false).status.success());
let out = move_ticket(&temp, "aaaa1111", "done", false);
assert!(out.status.success(), "{}", String::from_utf8_lossy(&out.stderr));
assert!(worklane.join("done").join(&filename).exists());
}
/// `-f` is where the deliberate overrides live, beside the backward and skipping moves.
#[test]
fn mv_moves_a_blocked_ticket_with_force() {
@@ -790,8 +878,8 @@ fn mv_allows_the_move_once_the_blocker_is_done() {
assert!(worklane.join("committed").join(&filename).exists());
}
/// Every move, not only the one into committed. An open blocker is a reason not to
/// finish as much as a reason not to start.
/// Every move is asked, not only the one into committed: a blocker that has not started
/// is a reason not to finish as much as a reason not to start.
#[test]
fn mv_checks_the_blockers_on_every_move() {
let temp = TempDir::new().unwrap();