UAT parser & merge robustness: phantom items, undefined-named gaps, silently-dropped merges #46
Labels
No labels
already-shipped
bug
documentation
duplicate
enhancement
good first issue
help wanted
in progress
invalid
needs-decision
proposal
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: crenshawdev/cadence#46
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: low · Area: uat · surfaced in the post-v1.2.0 cross-model review sweep (bundled: three UAT parse/merge robustness gaps). Related to #35 (the high-severity newline-injection case in the same subsystem).
1. A numbered list in a non-item
###section becomes a phantom itemcadence-core/bin/lib/planning-files.mjs:266-277:parseUatsplits on###and, for each chunk, matches the item head with/^(\d+)\.\s+(.+?)\s*$/m— the/mflag lets it match a numbered line anywhere in the chunk, not just its first line. A hand-added### Manual notessection containing1. check the logsyields a phantom item (possibly with a duplicatek), which has no status so the checklist can never complete; the nextwriteUatthen deletes the notes section and materializes the phantom as a real item.2. A gap with neither
knornamebecomes an item titled "undefined"cadence-core/bin/planning.mjs:366: onuat merge, a gap that matches no existing item is pushed as{ k: ++k, name: g.name, ... }. With noname, the item renders### 2. undefined, statusfail— a permanently-failing nameless item that blocks completion until deleted by hand.init/refreshvalidate their payloads;mergedoes not.3.
uat mergesilently drops findings for non-pending itemscadence-core/bin/planning.mjs:346-372: the merge only fills items whose status ispending. A verifier pass or gap for an item already recorded (by a prior verifier or the user) is dropped with no count and no "N skipped, already recorded" note in the result. The "verifier never overwrites user results" invariant is correct, but the silent drop hides a real discrepancy between the verifier and the recorded state.Fix direction
Anchor the item-head match to the first line of each
###chunk; validate merge gap payloads (require akorname) asinit/refreshalready do; and surface a count of merge findings skipped because the item was non-pending.