Skip to main content

Session, batching and write-ups

These tools are in the session toolset. Starting the server with MEMLAB_TOOLSETS=session exposes only them, plus the few tools every session needs, and memlab_tools({enable: "session"}) turns them on in a session. Try them in the order listed.

ToolUse it when
memlab_round_digestThe verdict table for a finished round and nothing else — the audit verdict (with every blocking check and its detail right under it), the ladder shape, and the per-metric rate/fit/verdict rows, without the ~30 KB of prose. format: "doc_markdown" gives a short write-up section instead, with compare_to for the previous round; its Next line names the specialist calls for the leak candidates. format: "json" returns one JSON object for a program: the audit verdict with its blocking checks and caveats, the ladder, the sample counters, and the sidecar of every tool of the latest battery (<tool>.json: verdict, headline, main-table rows; an earlier battery's sidecars in another directory are left out). round: "r425" reads a round from the shared round index, so it works from another host. A repeat call for the same round in a session is compact (compact: false for the full digest).
memlab_sweep_digestOne row per round across a whole sweep, plus the leak-candidate classes no earlier round reported — where the sweep found something new. A positive_control.json from the sweep runner heads it with PASS, SWEEP VOID when the control did not reproduce, or MISCONFIGURED when it fired only in another round. Rounds that record stimuli (area and input per combo) add the (area × stimulus) pairs the combos could drive and no round did.
memlab_activity_reportWork without retention: per combo, request rate, resource errors, rejections, long-task time and error-screen time from the samples taken between rungs, ranked against the idle control round, with the most-requested paths and their HTTP statuses. Finds request loops and stuck error screens that leave the heap flat. A per-sample work counter dict is ranked per cycle against the idle control, with add/remove-style pairs left apart flagged.
memlab_round_auditRead a round’s run.json BEFORE analysing it, so a broken bring-up is caught before its numbers travel into a write-up. Flags rungs taken while the app’s error fallback was on screen. A deliberate reload at a fault window’s start (run.json faults.cold_start) is read as two segments, not a broken ladder. When run.json has a network_trace, caveats a round where at least half of the media requests failed (environment). Also names recorded fixes whose fixed_behind prop the build does not serve (absent from the registry, or read by no served code).
memlab_load_snapshotLoad a local path, a manifold:// URL, or a bare Nest filename.
memlab_snapshotsList / switch / unload resident snapshots; set session output controls.
memlab_batchSeveral tools against ONE load — the load is the expensive part.
memlab_snapshot_headerNode/edge counts WITHOUT loading the snapshot.
memlab_server_statusConfirm the server is alive (returns instantly), and see what large snapshots cost it: peak RSS, recent loads with time and RSS before/after, evictions, and the slowest tools this session.
memlab_finding_indexRecord findings as you go so the write-up is not reconstructed from memory. Keyed by retainer path, or by kind + keys for update queues, collections and probes; list filters by round, title, kind and dev_only (a finding only a development build has); search ranks findings by the words of a free-text query in their title, note, signature, keys and classes (a typo still matches); cover stores the served revision and gating hash. With run_dir the workstream comes from run.json; a NEW check lists probable duplicates to reconfirm instead. A fix records the diffs or commits that carry it, its A/B (a fix without verified_by_ab is answered with a warning) and its fix_outcome once shipped; stale lists fixes whose outcome was never settled or whose gate stopped serving, and entries with a recorded fix still stored as known.
memlab_finding_noteSend your write-up of one finding to the leak-hunt runs app: explanation, root_cause, suggested_fix, and a fix's fix_diff and fix_rationale, for the round in run_dir. Quoted values, URLs and ids are hashed on this host before the note is recorded.
memlab_feedbackBefore you finish a session that used memlab: send your suggestions for improving memlab (tools, skills, harness) to the leak-hunt runs app, one submission per call, scrubbed on this host. prompt: true returns what to cover; areas tags them; round_dir stores them with a round.
memlab_validate_findingBefore calling anything a leak: the LEAK GATE on one population (key, population: "<kind>:<key>", node_ids, or a population saved by save_as) of a ladder — PASS only for linear growth with a non-zero last-interval Δ, kept at settle, production-reachable after the dev cut, and no bounded / transient / dev-only family; a FAIL names what to report it as (one-time, transient, bounded, dev, flat, aggregate, artifact, unknown). Also checks a write-up declares every check (reproduced, at rest, production-like, retainer path, per-cycle rate, not a known artifact, the fix verdict for a fix) with evidence or a reason: VALID or INVALID.
memlab_counterevidenceThe falsification step before a leak claim: the strongest reasons the claim on one population (key, population or node_ids, with its ladder) is WRONG, ranked strong / medium / weak — drains at settle, a plateau (step→flat), a last-interval Δ of 0, growth slowing, a bounded / transient / dev-only known family, dev-only after the cut, bound evidence, an aggregate or artifact class, too few rungs — or "No counterevidence found" with what was checked.
memlab_report_lintBefore filing a ladder report: reads its claims (a population in backticks with "production leak", "unbounded", "dev-only", "bounded", "transient" or "not a leak"), recomputes each with the leak gate on the ladder, and flags every contradiction — "claims unbounded, but the last-interval Δ is 0", "claims dev-only, but a production path survives the dev cut", "claims a production leak, but the gate FAILs one-time".
memlab_reportsRender the findings.
memlab_hunt_reportRender a leak-hunt run.
memlab_analyze_runPoint at a run.json and get the WHOLE analysis protocol — trend, owner attribution, population diff, artifact classification, caveats — in one call.