3.3 KiB
3.3 KiB
| id | slug | title | status | kind | priority | labels | workflow_state | created_at | updated_at | assignee | legacy_ticket | queued_by | queued_at | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 20260607-223233-parse-ticket-frontmatter-as-yaml | parse-ticket-frontmatter-as-yaml | Parse Ticket frontmatter as YAML | open | task | P1 |
|
inprogress | 2026-06-07T22:32:33Z | 2026-06-07T23:25:23Z | null | null | 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
legacy_ticket: 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: intake
attention_required: null
- Panel should derive
Clarifyfromworkflow_state: intake. - 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_ticketreadinessneeds_preflightrisk_flagsaction_requiredworkflow_stateattention_requiredqueued_byqueued_atlabels
Acceptance criteria
- A Ticket with
attention_required: nullis parsed withattention_required == None. - A Ticket with
workflow_state: intakeandattention_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.