When something goes wrong
The messages you will meet, and what to do about them.
These are the messages you are most likely to meet, in Barnspek’s own words, each with what it means and what to do. Shown messages were produced by the real commands; paths and IDs are shortened with “…”.
Setting up #
There is no barn #
$ vendor/bin/barnspek show
There is no barn in "…/hotel" or any folder above it: no .barn folder was found. Start one with `barnspek init`.Barnspek only works inside a barn, and looks for a .barn/ folder in the current folder and every folder above it.
What to do: run vendor/bin/barnspek init at the project’s root, or run the command from inside the project.
No area of business found #
$ vendor/bin/barnspek map --area-of-business=nothing
Barn: …/hotel
No area of business found: nothingThe name doesn’t match any area of business in the barn.
What to do: run vendor/bin/barnspek show to list them, and use a name or slug from the list.
A --option seems to be ignored #
You are running Barnspek through composer run or a Composer script, without -- before the command. Composer takes anything beginning -- for itself, silently.
What to do: write composer run barnspek -- <command> --option, or run vendor/bin/barnspek directly.
Capturing #
… is not a lifecycle stage #
$ vendor/bin/barnspek restage-story --area-of-business=reservations --story=cancel-their-booking --stage=nope
'nope' is not a lifecycle stage. The backbone runs:
establish — The role gains what it needs to take part: …
…The stage must be one of establish, adjust, transact, resolve or close. The message lists all five with their meanings.
What to do: use one of them, or --clear to leave the story Unassigned.
Nothing was deleted #
$ vendor/bin/barnspek delete --area-of-business=reservations --story=book-a-room
Barn: …/hotel
This deletes story 'book-a-room' of role 'guest'.
Nothing was deleted. Pass --yes to go ahead without being asked.Barnspek says what it would delete and then waits for you to agree. Run where it can’t ask, such as a script, it deletes nothing.
What to do: if you mean it, add --yes.
… is released, so its wording no longer changes directly #
$ vendor/bin/barnspek reword --area-of-business=reservations --story=book-a-room-for-a-run-of-nights --goal=zzz
Barn: …/hotel
Story 'book-a-room-for-a-run-of-nights' is released, so its wording no longer changes directly. Elaborate it in the open Phase instead: barnspek elaborate-story --area-of-business=reservations --story=book-a-room-for-a-run-of-nights --goal=... --reward=...The story’s Phase has been released, so its wording is locked. The same is said for deleting it, and for adding Scenarios with create-scenario:
Story 'book-a-room-for-a-run-of-nights' is released, so it is kept for good. Retire its Scenarios through an elaboration instead: …
Story 'book-a-room-for-a-run-of-nights' is released, so its Scenarios no longer change. It is elaborated in the active Phase: add "elaboration": true (or "amends": "<scenario>") to capture into that.What to do: follow the message: elaborate the story in the Phase being built, then make the change there.
Tickets and runs #
Story … has no scenarios yet #
$ vendor/bin/barnspek work:create reservations cancel-their-booking x --title=T --description=D
Barn: …/hotel
Story 01a1cb3e-… has no scenarios yet — run `barnspek refine` to capture at least one concrete case before opening a ticket against it.A ticket belongs to a Scenario, and this story has none. A story with no concrete case has nothing to point work at.
What to do: capture a Scenario first, with refine or create-scenario.
A deeper description of the work: Aborted #
work:create needs a title and a description. Run where it can’t ask, such as a script, it stops when one is missing.
What to do: give both, with --title and --description.
No work ticket found with id or reference #
work:status and work:delete take a ticket’s id or its reference, within an area of business.
What to do: run work:list for the Scenario to see its tickets’ ids and references.
settings.json not found #
$ vendor/bin/port-generator generate reservations
…/hotel/.barn/barnspek/settings.json not found — create it with a "portStubs" section, e.g.:
{"portStubs": {"directory": "tests/Spec/Port", "namespace": "App\\Tests\\Spec\\Port"}}The generator doesn’t know where to write the Ports.
What to do: create the file as the message shows, then run it again. Prove a Scenario has the rest of the setup.
The Scenario crashed … TODO: implement #
$ vendor/bin/scenario-bridge run reservations book-a-room-for-three-nights
- Scenario: They will now book a room for three nights:
💥 When they book a room for three nights they expect it to be accepted but the Scenario crashed authenticating as guest: RuntimeException: TODO: implement App\Tests\Spec\Port\Reservations\Role\GuestAuthenticator::authenticate()
Recorded this run against the Scenario (failed).A generated Port has not been filled in yet, so the run failed and recorded the failure.
What to do: implement the class the message names, then run the Scenario again.
A Scenario is red though every ticket is done #
That is the rule working: built is not proven. work:list says “Not yet run — prove it with scenario-bridge run” or shows the failing run.
What to do: run the Scenario. It turns green only if it passes.
A green Scenario went back to yellow #
A new ticket was opened on it. New work means the last run predates what is being changed, so the run was discarded.
What to do: finish the ticket, then run the Scenario again.
Releasing #
… can’t be released until it is proven #
$ vendor/bin/barnspek release-phase --area-of-business=reservations
Barn: …/hotel
first bookings can't be released until it is proven. These aren't proven yet:
- guest: cancel-their-booking (story, rough)
Each scenario needs its tickets done and a passing run (scenario-bridge run).Every Scenario in the Phase needs its tickets done and a passing run. The message lists the stories that aren’t proven yet, and the last of them is rough: it has no Scenario.
What to do: prove each story listed, or delete it (until the Phase is released) if it doesn’t belong in this slice.
… already has an active phase #
'reservations' already has an active phase ('Phase 1'). Release it before starting the next one.An area of business has one Phase being built at a time.
What to do: release the active Phase first.