Skip to content

Pre-release walk fixes (#744) - #747

Merged
erikdarlingdata merged 8 commits into
devfrom
fix/744-walk-fixes
Dec 1, 2026
Merged

erikdarlingdata merged 8 commits into
devfrom
fix/744-walk-fixes

Conversation

@erikdarlingdata

@erikdarlingdata erikdarlingdata commented Dec 1, 2026 •

Copy link
Copy Markdown
Owner

Part of #744

App items (6, 7, 9)

6. Human Advice "(Node 7) (Node 7)". ResultMapper already fills a warning's Operator with OperatorLabel.Format(node), which always ends in "(Node N)". The card tag in AdviceContentBuilder.CardSections.cs added the suffix again. It now adds it only when the operator text does not already carry it (the fallback node.PhysicalOp path has no suffix, so the guard stays instead of dropping the code). Test: AdviceCardsTests.ACardTagShowsTheNodeOnce (golden plan tags show one node; a bare "Hash Match" with node 7 still reads "Hash Match (Node 7)").

7. Editor "." commits the completion. OnTextEntering in QuerySessionControl.Editor.cs now closes the completion window without inserting when the typed character is ".". Other non-identifier characters behave as before. OnTextEntering/OnTextEntered became internal and an IsCompletionOpen property was added so a headless test can drive them. Test: EditorCompletionDotTests.ADotClosesTheKeywordListWithoutCommittingIt (opens the list on "sys", types ".", the list closes and the text stays "sys").

9. Settings label. "Default metric for top" is now "Default metric for top queries" (matches the AppSettingsService doc comment for that setting).

Core, web and MCP items (1, 2, 3, 4, 5, 8)

1. Rule 40 wording. The message says "1 execution" and "1 join execution" for a count that prints as "1". A ratio below 0.01 prints two significant digits (0.001 reads "0.001", 0.00012 reads "0.00012"); other ratios keep N2. Tests: NestedLoopsInnerCheckTests (SingularExecutionWordForACountOfOne, RatioBelowOneHundredthIsNotPrintedAsZero).

2. Key Lookup / RID Lookup icon. PlanIconMapper now maps "Key Lookup (Clustered)" to bookmark_lookup and "RID Lookup (Heap)" to rid_lookup. New PlanIconCoverageTests parses every fixture plan and checks each node's IconName has a png in the Core embedded resources and in wwwroot/icons. It found no other missing names.

3. Doubled prefix. Messages that began with their own WarningType, which surfaces print in front: Key Lookup, RID Lookup, Exchange Spill ("Exchange spill: 4 writes ..." now "4 writes ..."), Many-to-Many Merge Join, and Table-Valued Function (the function name now leads). Baseline lines, the golden advice file and the affected tests were updated by hand-editing the changed lines and regenerating WarningBaseline.txt; the diff holds only these lines plus the rule 40 lines from item 1. New test EveryFixture_WarningMessageDoesNotRepeatItsOwnWarningType.

4. Web body statements. Index.razor lays out PlanStatements.EnumerateAll(parsedPlan) instead of Batches[*].Statements. That was the only loop over Batches in PlanViewer.Web. The web project builds clean; no test (Razor page), so unverified in a browser.

5. MCP get_plan_warnings. Passes includeOperatorWarnings: true. Each item already carries node_id and operator. The [Description] now says it covers statement and operator warnings. The old test GetPlanWarnings_PreservesTheHistoricalStatementWarningScope pinned "No warnings" on row_goal_plan, which has an operator warning, so it became GetPlanWarnings_ReturnsOperatorWarningsAndNamesTheirNode (key_lookup_plan, node_id, operator, severity filter).

8. MCP instructions. "30 rules" is now 37 in McpInstructions.cs and in README.md (tree line); the README rules paragraph already said 37. How I counted: IsRuleDisabled(n) gates in PlanViewer.Core cover 1-20, 22-24, 26-30 and 32-40 = 37 distinct rules (rules 7 and 29 only raise the severity of other warnings, so they never appear as a RuleNumber literal; 21 was removed, 25 and 31 are unused). The Joins line now names rule 40, and one line explains cost_note and not_ranked_cost_unknown from #742's code.

Tests

Full suite on the pushed head: 1834 total, 1801 passed, 33 skipped, 0 failed. Build: 0 errors, same 3 warnings as dev.

Noticed, not fixed

  • "Row goal active:", "Local variables detected:" and "Stale statistics on:" lead-ins repeat the type in different words. Not a strict repeat, and the CLI output hash test (HistoricalCliContractTests) pins the Row goal text, so I left them.
  • Rule 40 still prints "1.0 rows" style counts for rows (N1 format); only the execution count was in scope.

🤖 Generated with Claude Code

https://claude.ai/code/session_01M98owdDaj4ReE2NfjxDDuU

erikdarlingdata and others added 8 commits November 30, 2026 23:43
…y are not a repeat of the type, and the CLI output hash pins them (#744)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01M98owdDaj4ReE2NfjxDDuU
@erikdarlingdata
erikdarlingdata marked this pull request as ready for review December 1, 2026 04:54
@claude

claude Bot commented Dec 1, 2026

Copy link
Copy Markdown

Reviewed. No correctness, untrusted-input, security or repo-convention problems found. Version files, NoWarn and T-SQL are untouched, and no new Core file needs a Web.csproj link. I grepped for code that depends on the removed "Key Lookup:" / "Exchange spill:" etc. message prefixes and found none outside the updated tests. The rule-40 ratio formatting is correct for the tested values (0.005, 0.00012). Coverage is good: each fix has a test. One non-blocking nit is inline.

@erikdarlingdata
erikdarlingdata merged commit 66fd4dd into dev Dec 1, 2026
5 checks passed
@erikdarlingdata
erikdarlingdata deleted the fix/744-walk-fixes branch December 1, 2026 04:56
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.

1 participant