Skip to content

Lab: tools the 2026-11-17 session hand-rolled (memo-off oracle, probe, differential reduce, red/green) #44

Open

Description

@mareklangiewicz

Lab issue (neospector lua/myemmylab*.lua in myvi). Part of #17. From the 2026-11-17 retro: each of these was written by hand in the scratchpad, some several times, and thrown away.

  • Memo-off oracle build. gndx emmylua build --no-flow-memo (or a cfg/env switch read in trace_decl): every decl trace takes the uncached walk. Plus corpus diff --oracle=LABEL, tagging each added line oracle-too / oracle-not. Today it classified 41 of 53 added lines on upstream 1360 mechanically. Needs the lab's per-tree timeout: diffs.nvim doesn't finish in 900 s without the memo.
    • Control used: on 1360's repro the oracle reports 0 need-check-nil, like the fix (main: 1).
  • gndx emmylua probe DIR… (done 2026-11-17, myvi cec4e03; plus --file/--line): run 0.25.1, upstream current and the installed fork (plus --bin= extras) on one or more fixture dirs (empty config) and print line:col code message per build, one row each, so issues get their build table directly. Written about 15 times today as bash loops; once, a probe without its control row produced a wrong claim (corrected in Upstream candidate: if not t.x then return end does not narrow t.x on main (fork and 0.25.1 do) #42).
  • Differential reduce. --absent-with=BIN: keep a line only if BIN still does NOT report the diagnostic on the mark line while the main binary does. Single-binary reduce kept a hit all builds shared and lost the difference. Also --context=FILE…: files copied beside the target (reducing which-key needed types.lua; inlining it hit the ---@meta trap, which makes a whole file definitions-only and silences it).
    • The scratch version was a 60-line Python ddmin over lines with a two-binary predicate (BR reports found nil param-type-mismatch on the mark line; UP doesn't): 437 → 11 lines in 137 runs.
  • gndx emmylua test --red=BASE --filter=… (the commit-shaped variant --red-revert=COMMIT[:FILE] is done, myvi 6e983af; --red=BASE itself is still open): run the filtered tests with the worktree's non-test files from BASE (expect failure), then on HEAD (expect pass). Done by hand twice today via tagged stashes; it is what showed the fork's own a5c2132 test can't fail on upstream (inline table types never reach the rule).

Activity

  1. mareklangiewicz commented on Nov 17, 2026

    @mareklangiewicz
    OwnerAuthor

    The 2026-11-17 retro items, landed in neospector (myvi ef5b88b..bc32aa6, each gated with gndx gate, live-checked):

    • corpus run LABEL BIN --trees=a,b + subset-aware corpus diff (ef5b88b): a subset run is compared on its own trees, the rest counted as skipped and flagged SUBSET, not refused. snacks + grug-far in 16 s reproduce the full run's 16 G1b removals.
    • test --show-output (093f247): libtest's flag, plus every test's whole ---- NAME stdout ---- section (dbg!, eprintln!), passing tests too.
    • Fork AGENTS.md "Measuring": iterate on fixtures, --filter and --trees; run the full corpus and full suite once, before the commit (733753d, not pushed yet).
    • test --red-revert=COMMIT[:FILE] (6e983af): the filtered tests in the scratch worktree at HEAD with COMMIT's non-test change (or FILE) reverse-applied must fail, then pass on the worktree. --red-revert=50b21557 is RED → GREEN; the control (an AGENTS.md-only commit) is NOT RED, exit 1.
    • probe PATHS… [--bin=…] [--file=… --line=…] (cec4e03): the three-way markdown table, a row per hit and a column per build.
    • Worktree state (bc32aa6): build/test/lint/install/profile warn about a bisect/rebase/merge/cherry-pick/revert in progress; bisect and --red-revert refuse a scratch worktree with one.

    Still open here: the memo-off oracle, differential reduce, and --red=BASE itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions