Repository navigation
fix: apply field edits to primary line and shadow copies, not first match (#17) - #19
Merged
Merged
Conversation
…atch (#17) set_tag, edit_links, and cmd_update each edited the FIRST line carrying the target ID in file order. For a feature with a @shadow copy the shadow can precede the primary (e.g. shadow in ## Now, primary in ## Backlog), so `set F-N --milestone m1` tagged only the shadow: milestone --table and `list --milestone default` showed the feature as unassigned while `list --milestone m1` matched it via the shadow — a dual-bucket feature. The same first-match bug hit every set tag, link --deps/--rel, prio, and the status verbs (done F-N could mark the shadow done and leave the primary todo). Fix: find_all_item_lines() returns every line carrying the ID (primary first, then shadows); the three editors now apply the edit to all of them, keeping derived copies in sync — consistent with shadow creation, which copies the primary line tags included. Link values are read from the primary line. New e2e scenario 49 reproduces #17 (shadow preceding primary) and checks set --milestone, the rollup table row, prio, and link sync. Greps anchor on the item title because the init template's # Meta code block contains a literal (F-0001) example line. version 1.1.1 -> 1.1.2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #17.
Problem
set_tag,edit_links, andcmd_updateall edited the first line carrying the target ID in file order. For a feature with a@shadowcopy, the shadow can precede the primary (shadow in## Now, primary in## Backlog), so:set F-N --milestone m1tagged only the shadow → the feature appeared in both its milestone (list --milestone m1, via the shadow) anddefault(milestone --table/list --milestone default, via the untagged primary) — the dual-instance bucket leak reported on byteorb (F-1088/1089/1093/1094/1095, F-1002).settag,link --deps/--rel,prio, and the status verbs (done F-Ncould mark the shadow done and leave the primarytodo) — confirmed by repro.Fix
New
find_all_item_lines()returns every line carrying the ID (primary first, then shadows). The three editors apply the edit to all of them, keeping the derived copies in sync — consistent with how shadows are created (copied from the primary line, tags included). Link/deps values are read from the primary.Verification
defaultbucket and lands on the correct--tablerow, plusprio/linksync.make checkgreen: 253 assertions, 0 failures; smoke OK; Python 3.8-safe; single file, zero deps.Patch release:
__version__1.1.1 → 1.1.2; CHANGELOG/schema/docstring note the sync semantics.