Repository navigation
fix: search finds words in element documentation and microflow log messages - #1478
Conversation
|
Thanks for this — the design is sound, and I checked the claims that carry it:
One defect
Please also add a documented Marketplace module to Smaller: the subquery in Against the contribution checklist (CLAUDE.md)
Generated by Claude Code |
…ssages (mendixlabs#1477) The strings index now holds the documentation of entities, attributes, constants, pages and every other documented element, plus microflow log messages, so SEARCH finds words that appear only there. Both are plain strings, not Texts$Text, which is why the walk that finds the translatable text never saw them. A module's own rows carry the module's name in ModuleName (the objects view holds an empty one for a module). The catalog schema version is 25, so a cached catalog is rebuilt once. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
750cbf4 to
553b7e3
Compare
|
Thanks for the careful review. All points are addressed. The PR is now split into three:
Defect: the MODULE row was missing its module name. It is fixed here as you suggested: Snapshot scope of the Marketplace filter (in #1493): the Control run: the two tests fail with Regression MDL: Finding: there's no Real-app evidence: this is now in the description. It's a Mendix 11.12.5 app with a constant documented On Linux ( The two flag PRs both introduce |
AI Code ReviewCritical Issues
Moderate Issues
Minor Issues
What Looks Good
RecommendationApprove the PR. The changes are well-tested, documented, and maintain backward compatibility while extending search functionality as requested. No blocking issues identified. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
|
All points from the first round are addressed: the split into #1492 / #1493, the module-row Optional: the hand-written list of covered types in LGTM once CI is green. Generated by Claude Code |
Brings in #1478 (search finds documentation and log messages). Conflict in CHANGELOG.md [Unreleased] resolved by keeping both the Changed (#1474) and Fixed (#1477) entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U6JPskrhXuCjJVz4JRtcdX
… a list The hand-written list of document types would drift as the objects view grows; "every element the catalog records" stays true. Suggested in review of mendixlabs#1478. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… a list The hand-written list of document types would drift as the objects view grows; "every element the catalog records" stays true. Suggested in review of mendixlabs#1478. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part of #1477: this PR is the indexing fix. The two flags from the issue are separate PRs:
--fail-on-matchin #1492, and--exclude-marketplacein #1493, which is stacked on this one.What it fixes
A word that appears only in an element's documentation, or only in a microflow's log message, got
No matches found.frommxcli search/SEARCH. The catalog table that holds the documentation finds it.Documentation and a log message's
StringTemplate.Textare plain strings, notTexts$Text, so the walk that fills the strings index never saw them.How
buildDocumentationStrings()inmdl/catalog/builder_strings.gois oneINSERT … SELECTfrom the tables the builder has just filled, scoped to the snapshot being built:objectsview;attributes_data,microflow_parameters_dataandjava_action_parameters_data;modules_data, for a module's domain-model documentation.Each row names its element (
ObjectTypesuch asENTITY,ATTRIBUTEorCONSTANT) and its field (StringContextdocumentation).MODULErow is stored under the module's own name:CASE WHEN ObjectType = 'MODULE' THEN Name ELSE ModuleName END. Theobjectsview gives it'' as ModuleName.extractLogNodeNamesadds alog_messagerow beside the existinglog_nodeone.The catalog schema goes from 24 to 25, so a cached catalog is rebuilt once.
Docs:
docs-site/src/tools/search.mdlists every documented element type.SEARCHreference, thesearchhelp text and the syntax summary are updated.Evidence
Tests:
TestBuildStrings_IndexesElementDocumentation(including the module row'sModuleName),TestBuildStrings_UndocumentedElementsAddNoRowsandTestExtractLogNodeNames_IndexesTheLogMessage.Control run: with
buildDocumentationStringsand thelog_messageinsert reverted, the first and third tests fail; with them restored, they pass. With only theMODULECASEreverted, the first test fails onmodule:versusmodule:Sales. The full output is in the review reply below.Regression MDL:
mdl-examples/bug-tests/1477-search-documentation.mdlcontains a documented constant, entity and attribute, plus a microflow with a log message. Afterexec, this branch finds all four words and v0.26.0 finds none.Real app (Mendix 11.12.5), with a constant documented
legacy rate source:Building the catalog takes the same time as before, about 0.4–0.5 s.
Finding:
findings/mdl-other/2026-10-13-search-misses-words-only-in-documentation-or-log-message.json.Windows: the targeted tests pass. Across
mdl/catalog,mdl/executorandcmd/mxcli, the failing tests are exactly the same set as onmain.Linux (
golang:1.26.6-bookworm, ANTLR 4.13.2, as in CI):make grammar build test check-mdl check-findings check-conformance check-migration-reference lint-goall pass.🤖 Generated with Claude Code