1.6 KiB
1.6 KiB
Implemented typed Ticket thread event logging for workflow audit events.
Changes:
- Added event kinds:
state_changedintake_summary
- Preserved existing event kinds and historical compatibility.
- Added typed backend data/API:
TicketStateChangeTicketIntakeSummaryTicketBackend::add_state_changed(...)TicketBackend::add_intake_summary(...)TicketBackend::set_state_field(...)as a frontmatter-field update plusstate_changedevent helper for the next workflow-state slice.
- Parser now understands quoted event attributes and exposes typed metadata such as
from,to,reason,state_field, and full attributes. - Doctor validates required fields for
state_changedandintake_summarywhere practical. TicketShowtool output includes new event metadata fields/attributes.- Thread event append now prevalidates and prerenders metadata before opening/appending
thread.md, preventing failed appends from corrupting the log. - Create event author validation happens before writing a ticket record.
- Documentation now describes
thread.mdas append-only audit history, not current-state authority.
Validation after merge:
cargo test -p ticket threadcargo test -p ticketcargo test -p yoi ticketcargo test -p pod ticket --libcargo check --workspace --all-targetscargo fmt --checkgit diff --check HEAD~1..HEADcargo build -p yoitarget/debug/yoi ticket doctornix build .#yoi --no-link --print-out-paths
External review approved after fixing prevalidation/partial-append safety.
explicit-ticket-workflow-state can proceed next.