Repository navigation
fix(harvest-learnings): a heading the toolkit log carries is not drafted again when it has ~ * or ` (port of #594) - #604
Merged
Merged
Conversation
…not drafted again when it has ~ * or ` Section 1 strips ~ * ` from a project heading, takes the first 30 characters after a BUG-nnn tag and searches bug-logs/mxcli-bugs.md for them. The log was searched as written, so the stripped text was never a substring of a toolkit heading that has those characters (BUG-01 starts with a backtick pair), and the heading was drafted again. The log is now stripped the same way before the search. The search also takes -e: stripping leaves BUG-26 and BUG-54 starting with "--", which grep read as an option. A project whose bug log held copies of all 223 headings in the toolkit log drafted 103 of them at 95e1b30 and 0 now. Fixture: tests/wave2/test-harvest-learnings.sh T6, with four headings taken from the log itself; it fails on 95e1b30. Ported from #594 onto current master; the only conflict was the CHANGELOG insertion point, and both lines are kept. Re-verified on master 0db1c0e. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018LeNWZV2sVH62vkgfYh5u5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018LeNWZV2sVH62vkgfYh5u5
5 of 6 tasks
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.
Supersedes #594 by @saingge. Their commit is kept as authored, rebased onto current master; the only conflict was the CHANGELOG insertion point, and both lines are kept.
Direct lane
What changed and why:
bin/harvest-learnings.shmatched a project bug-log heading, stripped of~ * \``, against the toolkit ledger *unstripped*. So a heading whose first 30 characters held a backtick never matched and was drafted again. The ledger is now stripped the same way into a temp file.grep -F -ekeeps a slice starting with-` from being read as an option.bin/harvest-learnings.shand its fixture only; master has not touched either since #594's basetrover the ledger per runField evidence (from #594): on a real project, master drafted 103 headings the ledger already carries; after the fix, 0.
Re-verified on master 0db1c0e:
test-harvest-learnings.shpasses 22/0 on this branch and 21/1 with master's script (the new T6 fails there). That is T1. The fixture reads headings from the real ledger, not hand-written input.Review: pending independent review
Generated by Claude Code