fix(projection): the title is derived too
Retiring the displaced rows left `cust-wp-0010` and `kont-wp-0013` correctly identified and correctly backed while describing a different workplan's work: the update path syncs status, backing path and commit, but never title. I had said it would repair the title; it did not. Seven rows fleet-wide carry a title differing from their file, and three of them are why a blanket sync would be wrong: activity-core's files parse to an empty title, and blanking a real one is worse than leaving it stale. The sync applies only when the derived title is non-empty, which makes it four real corrections. The `_Row` fixture carried no `title` attribute at all, so no existing test could have caught this. Added, with the new tests written against the fake session rather than as assertions on source text. 755 pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: opus Assistant-Process: 2583210@bnt-lap001 Assistant-Session: f2bff2d5-e9b2-4338-92ca-10282a927006
This commit is contained in:
parent
fadfddb6c6
commit
500049fc31
2 changed files with 63 additions and 1 deletions
|
|
@ -966,6 +966,17 @@ async def reset_repository_projection(
|
|||
continue
|
||||
|
||||
changed = False
|
||||
# The title is derived like every other field, and not syncing it left
|
||||
# `cust-wp-0010` reading "Domain and Repository Goals" while its file
|
||||
# said "Workplan Lifecycle Documentation" — a record correctly
|
||||
# identified and correctly backed, describing the wrong work.
|
||||
#
|
||||
# An empty derived title is not an answer: three activity-core files
|
||||
# parse to no title at all, and blanking a real one is worse than
|
||||
# leaving it stale.
|
||||
if w.title and w.title.strip() and row.title != w.title.strip():
|
||||
row.title = w.title.strip()
|
||||
changed = True
|
||||
if w.status and row.status != w.status:
|
||||
row.status = w.status
|
||||
changed = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue