Repository navigation
Description
Parent
What to build
A human working in the GitHub UI, or a merged pull request, can touch a wayful issue without making the map unusable from the CLI.
The record decoder is strict and every mutating command gates on whole-map integrity, and those two combine badly. A pull request that says Closes #74 closes the step's issue as completed; the step is then permanently undecodable, and because the write gate fails on any decode error anywhere in the map, every subsequent write to that map fails too. The same holds for an issue closed with a reason wayful does not model, an issue whose type label was removed or duplicated, and a body whose Wayful data block was deleted. Nothing in the CLI can recover from any of them.
Four changes:
- Tolerant decode of native state. A step closed as completed with no recorded summary decodes as complete. A close reason wayful does not model decodes as cancelled rather than throwing.
- A scoped write gate. A command blocks on integrity problems affecting the records it actually touches, not on every record in the map.
- Safe mutation ordering. A save is several separate mutations with no transaction between them. Order them so an interrupted run never leaves a record the decoder rejects — in particular, unblocking a step clears the block reason from the body before removing the blocked label, and a failure between the two produces a record that can never be read again.
- No orphans. When a step or goal issue is created but linking it to its map fails, the run must not leave an unreferenced wayful issue behind in the repository.
Reads become consistent while we are here: every collection read degrades the same way — render what decoded, name what did not, by issue number — instead of some commands showing partial results and others failing on the first bad record. Today a decode error surfaced through a hard failure does not even say which record it came from.
Acceptance criteria
- After closing a step's issue on GitHub as completed,
wayful map statusreports the map andwayful context <map>renders, with the step shown as complete. - After that same close,
wayful step create,wayful step cancel, andwayful goal addon that map all still succeed. - After closing a step's issue on GitHub with a reason wayful does not model,
wayful map showrenders the map rather than failing. - With one goal's data block removed by hand on GitHub,
wayful goal listlists every other goal and names the broken one by its issue number. - The same malformed record produces the same skip-and-collect behaviour from
wayful map show,wayful map status,wayful map next,wayful goal list, andwayful artifact list. - A step whose issue carries the blocked label but no recorded reason is still readable by
wayful step show, andwayful step unblockreturns it to pending. -
wayful step createwhose sub-issue linking fails reports the failure and leaves no unreferenced wayful issue in the repository. -
wayful map validatestill reports every decode problem it finds and exits 1.
Blocked by
None (can start immediately).
Activity