Skip to content

fix(harvest-learnings): a heading the toolkit log carries is not drafted again when it has ~ * or ` (port of #594) - #604

Merged
MendixMau merged 3 commits into
masterfrom
port/594-saingge
Nov 1, 2026
Merged

MendixMau merged 3 commits into
masterfrom
port/594-saingge

Conversation

@MendixMau

Copy link
Copy Markdown
Owner

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.sh matched 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.

Row Answer
Process none: wrap-up tool, not a gate
Dependencies bin/harvest-learnings.sh and its fixture only; master has not touched either since #594's base
Context cost none: no routed or always-loaded file
Behaviour n/a: script only
Runtime one tr over the ledger per run

Field 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.sh passes 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.

  • No client data
  • Size: 3 files, +47/−4
  • CHANGELOG line (credited to saingge)

Review: pending independent review


Generated by Claude Code

saingge and others added 3 commits November 1, 2026 07:26
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants