Skip to content

Lab: bisect over an oracle: the commit where a fixture's hit appears or goes #94

Backlog

Description

@mareklangiewicz

Lab issue (neospector lua/myemmylab.lua M.bisect at 2007, CLI myemmylabcli.lua bisect at 2383). Part of #17.

Problem

gndx emmylua bisect GOOD BAD --tree=T --above=S only judges a commit by CPU seconds. The question that keeps coming up in fork work is about a hit, not a time: "which upstream commit added this false hit?" (#47 was bisected to upstream b38ed6f by hand), or "which fork commit fixes main's bug?" (1121Z handoff). Today each probe is a hand-built binary plus emmylua_check on a fixture plus a grep.

Want

  • An oracle mode beside the CPU one: --fixture=DIR --hit=FILE:LINE:CODE (FILE a path suffix, as in corpus diff --line), with --gone to look for the commit where the hit disappears rather than where it appears.
  • The same reused scratch worktree and first-parent walk M.bisect(commits, is_bad) already has; only is_bad changes. GOOD and BAD are measured first and must disagree, as now.
  • Each probe prints the commit, the verdict and the fixture's hits on that line, so a wrong FILE:LINE shows up on the first probe.

Notes

Activity

  1. mareklangiewicz commented on Nov 26, 2026

    @mareklangiewicz
    OwnerAuthor

    Raised by the 2026-11-26 retro, with two cases the oracle mode must cover. Both came up while porting fixes for upstream 1359 / 1472.

    1. Behaviour added inside a merge resolution. Some fork behaviour lives in no replayable commit: it was written while resolving a merge (AGENTS.md "Merging upstream"). A first-parent walk over the fork lands on the merge commit itself. So the probe line should say merge <sha> when the verdict flips there, and offer --into-merge to then diff the resolution against both parents for the hunk that holds the hit's file.
    2. Fixes that span two commits. 1472 ports fork e7f7c4b + 65c2b82, and 4391566's #x half. A hit that goes only when both halves are in flips at the second commit, so bisect names the second. The probe output should list every commit since GOOD that touched the files the flip commit touched. Then "fix = X + Y" is visible, not hidden behind Y.

    Control for both: bisect the fork for the 1472 fixture test_arithmetic_on_optional_integer_is_integer (--gone) and check that the output names both e7f7c4b and 65c2b82. (unprobed)

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