Repository navigation
Conversation
bin/bug-lookup.sh read only the toolkit ledger, so a bug a session had already written down in the project's bug-logs/ was invisible to the lookup that runs before experimenting on the same error. Run from inside a wired project, it now also searches that project's bug-logs/**.md after the ledger, and marks each hit "(project draft: <file>:<line>)". The ledger's output and ranking are unchanged: drafts are ranked in a separate pass, so they never move the ledger's IDF; --full and --index stay ledger-only. A ranked draft needs the same 40% coverage as the best ledger hit. The project is found with project-bin/_common.sh (mxtk_walk_root from $PWD); MXTK_PROJECT_DIR=<dir> names it and MXTK_PROJECT_DIR= (empty) turns drafts off. Field: a Mendix 10.24 app with mxcli v0.27.0, 43 files in bug-logs/. The query "cannot be spliced" listed no project drafts at 393d253; it lists 3, from 3 files, each pointing at a "## " line whose entry mentions splice. The project was not written. Test: group P of tests/wave2/test-bug-lookup.sh on synthetic drafts. With master's bug-lookup.sh (393d253) 3 of its checks fail (25 pass); with the change 28 of 28 pass, also under /bin/bash 3.2.57. Only one awk was on PATH, so the other awks were not run.
Owner
|
Thanks @saingge! Independent review: MERGE. We moved your commit unchanged, with your authorship, into #557, so CI runs without fork approval and we can handle CHANGELOG conflicts. This PR closes when #557 merges; the merge commit carries a Co-authored-by line for you. Generated by Claude Code |
MendixMau
added a commit
that referenced
this pull request
Oct 22, 2026
… from #531) Run from inside a wired project, bin/bug-lookup.sh now also searches that project's bug-logs/**.md after the ledger, in a separate ranking pass (ledger output and IDF unchanged; --full and --index stay ledger-only). MXTK_PROJECT_DIR names the project; empty turns drafts off. Fixture test-bug-lookup.sh group P 28/28. Contributed by @saingge in #531. Review: MERGE — additive; ledger output unchanged; no timing change. Security review: safe. Co-authored-by: saingge <262679532+saingge@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jQvaonym9V1wKKfAEPmRr
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.
Branch
fix/bug-lookup-project-drafts, one commit on origin/master 393d253. Lane 3 (direct).What changed and why
bin/bug-lookup.shread only the toolkit ledger (bug-logs/mxcli-bugs.md). The drafts a session writesfor a bug it hit go to the project's own
bug-logs/(the conventionbin/harvest-learnings.shreads),so the lookup that runs before experimenting on an error could not see them. Field case: a refusal was
logged, then hit again days later, because the lookup found nothing.
Run from inside a wired project, it now also searches that project's
bug-logs/**.mdafter theledger and marks each hit
(project draft: <file>:<line>).move the ledger's IDF. The ledger's own awk is the same program, now held in a variable and run twice.
--full Nand--indexstay ledger-only.project-bin/_common.sh(mxtk_walk_rootfrom$PWD), asbin/check-requirements.shdoes.MXTK_PROJECT_DIR=<dir>names it;MXTK_PROJECT_DIR=(empty)turns drafts off. Outside any project nothing changes.
bin/bug-lookup.shis untouched.Impact
bin/bug-lookup.shnow sourcesproject-bin/_common.shin a subshell to find the project (the same filebin/check-requirements.shandbin/status.shuse). Its own fixture and a new synthetic fixture folder. No new tool.findand one extra awk pass over the project'sbug-logs/per lookup. Measured on 43 files: not timed separately.Field evidence
A Mendix 10.24 app, mxcli v0.27.0, 43 files in
bug-logs/, run from the project root (read-only; theproject tree was unchanged afterwards):
bug-lookup.sh "cannot be spliced"at 393d253: no project drafts, 5 lines of ledger output.from 3 different files. Each
<file>:<line>points at a##heading, and each entry mentions "splice"(2, 3 and 5 times).
Checklist
LEAKGUARD_BASE=origin/master, then a read of the diff). The fixture is invented text withShop.*names, labelled synthetic in its first line.test-bug-lookup.sh, which targets the changed script) + T2 (the field run above).## BUG-DRAFT-<slug>: title (date)heading, version line, expected/actual/workaround bullets, a## Provenancesection); only the text is invented.mxtk_walk_roothandles the layouts.bashand/bin/bash3.2.57, with one awk (20200816) on PATH. Not run under mawk, gawk or Git Bash. The new awk uses only POSIX features the file's other awk blocks already use (ENVIRON,-v,index,tolower).## Unreleased, credited.Verification
The existing 17 checks (the 40-query dev set, the 18-query held-out set,
--full,--index, usage) passunchanged, with drafts off by default in the test.
Open points for the maintainer
--indexand--fulldo not include drafts. Easy to add, but it changes what--indexcounts.mxtk_walk_root(not tested): if the toolkit is cloned inside a project folder and the lookup runs there, the walk would return that project and its drafts would be searched.MXTK_PROJECT_DIR=avoids it.