You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/shark-dive.md
+83-9Lines changed: 83 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -371,7 +371,7 @@ press, because a surface with less than that is one whose answer is "ask your hu
371
371
| --- | --- |
372
372
|`open_heap_dumps`| Every heap dump open, by the file name the other tools take, with the method to follow. |
373
373
|`list_leaks`| The **Leaks** screen: what this heap dump says shouldn't be there. |
374
-
|`agent_log`| The **Agent logs** screen: what has already been tried on this dump, and what it came to. |
374
+
|`agent_log`| The **Agent logs** screen: what has already been tried on this dump, and what it came to — and, for one session, every call it made with the text it sent and read back. |
375
375
|`chain_from_gc_root`| One chain, every step with its labels and its verdict. |
376
376
|`describe_object`| What an object is: its class, fields, labels, size. |
377
377
|`ways_held`| Every way an object is held, rather than the one chain — the *X ways from here* list. |
@@ -419,11 +419,14 @@ unexplained steps cannot report a root cause, however sure it is, and what it ge
419
419
objects to go and read.
420
420
421
421
**What it did is on the *Agent logs* screen**, one row per agent that has connected to the app. Open a row
422
-
and there is every call that agent made, in order and in words — what it did, which object it did it to, and
423
-
the sentence it gave for doing it:
422
+
and there is everything that agent sent, in order and in words — what each call did, which object it did it
423
+
to, and the sentence it gave for doing it:
424
424
425
425
```
426
-
08:23:04 ▸ Asked which heap dumps are open
426
+
08:23:01 Connected
427
+
08:23:01 Sent the notification notifications/initialized
428
+
08:23:02 Asked what the tools are
429
+
08:23:04 Asked which heap dumps are open
427
430
because: Seeing what there is to read before asking anything about it.
428
431
08:23:11 Listed the leaks
429
432
because: Starting from what the heap dump already says shouldn't be here.
@@ -440,8 +443,8 @@ the sentence it gave for doing it:
440
443
*0x12d368b8* on *Read the chain to 0x12d368b8* and the window opens that object, so reading what an agent did
441
444
and going to look at it are one move. A call that named nothing went somewhere all the same — *leaks* on
442
445
*Listed the leaks* is the leaks screen, and *dominator tree* on *Read the dominator tree* is the tree from its
443
-
root. The one row that leads to several places unfolds instead: *Asked which heap dumps are open* opens into
444
-
the dumps that were open, each of them a window away.
446
+
root. The one row that leads to several places keeps them behind its fold instead: *Asked which heap dumps are
447
+
open* opens into the dumps that were open, each of them a window away.
445
448
446
449
**A refused call is a row too**, in red, under the reason the agent gave for making it — and those are the
447
450
half of a session worth reading, since a refusal is where the method sent an agent back to the heap dump
@@ -454,10 +457,81 @@ rather than on to an answer:
454
457
reference: the rules can only name one once something below it is known not to belong. […]
455
458
```
456
459
460
+
**And so is every other line that arrived** — the three at the top of that session are the handshake. A call
461
+
naming a tool that doesn't exist, a line that wasn't JSON at all, a read that failed: each is a row, and the
462
+
ones nothing could answer say *Failed* rather than *Refused*, which is the opposite claim. A refusal is the
463
+
method working; this is Shark Dive not working.
464
+
465
+
```
466
+
08:24:02 Called solve_the_leak 0x12d368b8
467
+
because: Trying my luck.
468
+
Failed: There is no tool called "solve_the_leak". This server has open_heap_dumps, […]
469
+
08:24:09 Sent something this app could not read
470
+
Failed: That is not JSON: Unexpected JSON token at offset 0
471
+
```
472
+
473
+
Which is the point of keeping them: what this screen gets opened for is often why *nothing* happened, and a
474
+
screen holding only the calls that worked is the one screen that can't answer that. It shows in the shape of a
475
+
session — one sent from a shell is a *Connected* per call, `--agent` being a process per call — and the
476
+
`n call(s)` above the rows counts the calls rather than the lines.
477
+
478
+
**And every row unfolds onto the call itself** — the `▸ {}` under a row opens what the agent sent and what it
479
+
read back, as the text each of them was, so a step you don't follow is one question rather than a dead end:
480
+
481
+
```
482
+
11:37:31 Looked at 0x12d368b8
483
+
because: The one App leak: a MainActivity the app watched. Reading what it is before the chain.
484
+
▾ {}
485
+
sent over MCP:
486
+
describe_object {
487
+
"object": "0x12d368b8",
488
+
"reason": "The one App leak: a MainActivity the app watched. Reading what it is
0 commit comments