Skip to content

Tidy the match graph fetch: closing message, kept reason, no double opens - #44

Merged
danielplohmann merged 3 commits into
familiary:mainfrom
r0ny123:match-graph-followups
Oct 15, 2026
Merged

danielplohmann merged 3 commits into
familiary:mainfrom
r0ny123:match-graph-followups

Conversation

@r0ny123

@r0ny123 r0ny123 commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

These are the four optional points from the review of #40, left out of it so its approval stood.

  • Closing message. After the graph opens, the activity line says "Opened the graph of function N." instead of staying on "Fetching function N for the graph viewer...".
  • The reason of a failed fetch stays visible. When the request raised, _reportFailure posted the reason and "Failed to fetch function entry N." then overwrote it. queryRemoteFunction now reports a raised error once, as "Fetching function N for the graph viewer failed (request timed out).", and posts the generic line only when the server answered without the entry. queryFunctionEntryById and querySampleEntryById had no other callers and are folded into it.
  • No duplicate graphs. Function Scope and Block Scope ignore a double click on a match whose graph is still being fetched. Once it has opened, a double click opens it again as before.
  • Changelog. The Fetch a match's remote function off the UI thread #40 entry now says that on IDA the click still waits for the remote function, though no longer for its sample.

Testing

  • test_a_raising_request_keeps_its_reason and tests/ui_qt/test_match_graph.py (repeat double click, closing message) fail without the change.
  • ruff format --check, ruff check, the sync checks and python -m pytest tests (242 tests) pass.
  • Binary Ninja 6: the GUI integration test passes all 186 checks against a local MCRIT 1.12.0, including the function, name and block match graphs.

…pens

Follow-ups to fetching a match's remote function off the UI thread:
- After the graph opens, the activity line says "Opened the graph of
  function N." instead of staying on "Fetching function N for the graph
  viewer...".
- A raising request reported its reason through _reportFailure, which
  "Failed to fetch function entry N." then overwrote. queryRemoteFunction
  now reports a raised error once, with the function and the reason, and
  posts the generic line only when the server answered without the entry.
  queryFunctionEntryById and querySampleEntryById had no other callers
  and are folded into it.
- Function Scope and Block Scope ignore a double click on a match whose
  graph is still being fetched, which opened two identical graphs.
- The changelog says that on IDA the click still waits for the remote
  function, though no longer for its sample.
queryRemoteFunction read the function's CFG with toSmdaFunction() after
its try block, so a malformed CFG raised out of the request instead of
answering None. The widgets then never got their answer, and the id they
had marked as being fetched stayed marked, so double clicking that match
did nothing for the rest of the session. The CFG is now read inside the
try and reported like any other failure.

Block Scope's repeat-click guard and closing message get a test too.
@danielplohmann

Copy link
Copy Markdown
Collaborator

#36, #38 and #46 are merged, so this conflicts with main now, in CHANGELOG.md and BlockMatchWidget.py. The second is only adjacency in __init__: keep #36's _shown_function and _shown_block next to your _graph_fetches. Your _graph_fetches guard on the double-click and #36's _shown_* lookups already merge on their own. Could you merge main in? It goes after #39 and before #41.

@danielplohmann

Copy link
Copy Markdown
Collaborator

One more thing for the merge: with both sides of the conflicts kept, the two new tests in tests/ui_qt/test_match_graph.py fail on the merged tree (264 others pass). #36 added a local tint step to the graph-opening path, and the test fakes don't cover it:

  • FunctionMatchWidget.py:565: _Backend has no show_local_match_coloring.
  • FunctionMatchWidget.py:566: _Matcher.getColoredMatches() has no "a" side.
  • BlockMatchWidget.py:620: the parent SimpleNamespace has no local_smda_report.

Extending the fakes should be enough. Otherwise, I read the PR ahead of the merge and have nothing to add, so once main is in and the suite passes it is ready.

Keeps familiary#36's _shown_function and _shown_block next to _graph_fetches, and
extends the match graph tests' fakes for the local tint step familiary#36 added
to the graph-opening path: show_local_match_coloring on the backend, an
"a" side in the matcher's colouring and a local SMDA report for Block
Scope.
@r0ny123

r0ny123 commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

Done in 6e6a6ed: I merged main in, kept #36's _shown_function and _shown_block next to _graph_fetches, and extended the fakes in test_match_graph.py with show_local_match_coloring, the "a" side and a local SMDA report. The suite passes (266 tests), and the Binary Ninja 6 GUI test passes all 196 checks against MCRIT 1.15.0, including the graph openings and the tint in the disassembly, HLIL and Pseudo-C views.

@danielplohmann danielplohmann left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. 6e6a6ed resolves both conflicts as discussed: __init__ keeps _graph_fetches next to #36's _shown_function/_shown_block, the changelog keeps your longer bullet, and the fakes in test_match_graph.py cover #36's tint step. Lint, the sync checks and the suite pass on main plus #39 plus this branch (272 tests).

@danielplohmann
danielplohmann merged commit 9d106a5 into familiary:main Oct 15, 2026
10 checks passed
@r0ny123
r0ny123 deleted the match-graph-followups branch October 15, 2026 19:49
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.

2 participants