3.0 KiB
3.0 KiB
| title | state | created_at | updated_at | queued_by | queued_at |
|---|---|---|---|---|---|
| Parse Ticket frontmatter as YAML | closed | 2026-06-07T22:32:33Z | 2026-06-09T10:20:56Z | workspace-panel | 2026-06-07T22:43:03Z |
Background
Ticket item.md frontmatter is written in YAML-like syntax and uses YAML null values such as:
assignee: null
attention_required: null
queued_by: null
queued_at: null
However the current Ticket frontmatter parsing path treats many scalar values as raw strings. Some fields have ad-hoc "null" filtering, but newer nullable fields such as attention_required can be read as Some("null") instead of None.
Observed bug:
workspace-panel-nonblocking-transitionshas:
workflow_state: planning
attention_required: null
- Panel should derive
Clarifyfromworkflow_state: planning. - Instead,
attention_requiredis interpreted as set and Panel derivesEditwith anattention_required is setblocker.
YAML null is valid YAML; the bug is that Ticket frontmatter is not consistently parsed as YAML/null-aware data.
Goal
Parse Ticket frontmatter as YAML data, or otherwise provide a YAML-compatible typed parsing layer, so nullable fields, lists, booleans, and strings are interpreted consistently with the file format.
Requirements
- Replace or wrap the current raw string frontmatter parsing for Ticket
item.mdwith a YAML-aware parser. - YAML null forms should parse as absent/
Nonefor nullable fields:nullNullNULL~- empty value where YAML treats it as null
- Preserve existing Ticket records and doctor compatibility.
- Preserve current emitted frontmatter format unless intentionally changed and documented.
- Parse list fields such as
labels/risk_flagsas YAML sequences when present. - Preserve tolerant behavior for existing simple inline list syntax, quoted strings, and old optional fields.
- Ensure optional string fields do not treat the literal YAML null as meaningful text.
- Avoid broad Ticket schema redesign in this ticket; focus on parsing correctness.
- Update tests to cover YAML null/list/bool behavior and the panel
attention_required: nullregression.
Candidate affected fields
At minimum verify:
assigneelegacy_ticketreadinessrisk_flagsaction_requiredworkflow_stateattention_requiredqueued_byqueued_atlabels
Acceptance criteria
- A Ticket with
attention_required: nullis parsed withattention_required == None. - A Ticket with
workflow_state: planningandattention_required: nullderives Panel actionClarify, notEdit. - Existing nullable fields no longer rely on per-field ad-hoc string
"null"filtering. - YAML sequence labels/risk flags parse correctly.
- Existing Ticket fixture tests and
target/debug/yoi ticket doctorpass. - Focused tests cover null variants (
null,~, empty), quoted literal string values where appropriate, and regression behavior. cargo test -p ticket ... --lib,cargo test -p tui workspace_panel --lib,cargo fmt --check, andgit diff --checkpass.